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 |
|---|---|---|---|---|---|---|---|
DIFF00000006300 | raw_sql_safe | SQL | accounts_486.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006301 | general_code_change | Ruby | sessions_457.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006302 | raw_sql_destructive | SQL | comments_211.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000006303 | raw_sql_safe | SQL | comments_30.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_address ON accounts (metadata); | NONE | false |
DIFF00000006304 | orm_schema_change | JavaScript | reviews_785.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('role')) | NONE | true |
DIFF00000006305 | test_suite_cleanup | SQL | spec/shipments_691.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00000006306 | orm_schema_change | JavaScript | payments_111.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('priority')) | NONE | true |
DIFF00000006307 | test_suite_cleanup | SQL | test/employees_922.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000006308 | raw_sql_destructive | SQL | notifications_33.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN name TO amount_cents; | ALTER_RENAME | true |
DIFF00000006309 | raw_sql_destructive | SQL | employees_966.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000006310 | raw_sql_safe | SQL | reviews_749.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET score = %s WHERE status = %s; | NONE | false |
DIFF00000006311 | raw_sql_safe | SQL | customers_347.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_amount ON customers (address); | NONE | false |
DIFF00000006312 | raw_sql_destructive | SQL | orders_389.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE employees SET status = CONCAT(status, order_id); | UPDATE_CONCAT | true |
DIFF00000006313 | raw_sql_safe | SQL | comments_520.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE created_at = 'active'; | NONE | false |
DIFF00000006314 | general_code_change | Python | tickets_30.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006315 | general_code_change | Go | accounts_858.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006316 | general_code_change | Java | accounts_244.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006317 | raw_sql_destructive | SQL | payments_685.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00000006318 | general_code_change | JavaScript | transactions_794.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 |
DIFF00000006319 | raw_sql_destructive | SQL | orders_197.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000006320 | obfuscated_destructive | SQL | accounts_759.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
subscriptions
SET
score
=
CONCAT(score,
created_at); | UPDATE_CONCAT | true |
DIFF00000006321 | test_suite_cleanup | SQL | test/events_762.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN description TO state; | ALTER_RENAME | false |
DIFF00000006322 | mentioned_in_comment | Python | users_8.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE products DROP COLUMN score;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000006323 | raw_sql_destructive | SQL | logs_418.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000006324 | test_suite_cleanup | SQL | mysql-test/suite/reviews_736.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000006325 | raw_sql_destructive | SQL | transactions_78.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000006326 | orm_schema_change | Ruby | events_497.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :price | NONE | true |
DIFF00000006327 | raw_sql_safe | SQL | sessions_460.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006328 | general_code_change | JavaScript | payments_450.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 |
DIFF00000006329 | orm_schema_change | JavaScript | comments_321.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('score')) | NONE | true |
DIFF00000006330 | orm_schema_change | Ruby | refunds_367.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :address | NONE | true |
DIFF00000006331 | raw_sql_destructive | SQL | transactions_24.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000006332 | raw_sql_safe | SQL | customers_195.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_address ON orders (user_id); | NONE | false |
DIFF00000006333 | raw_sql_safe | SQL | users_790.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000006334 | raw_sql_safe | SQL | accounts_921.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET category = %s WHERE email = %s; | NONE | false |
DIFF00000006335 | raw_sql_safe | SQL | inventory_263.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006336 | orm_schema_change | JavaScript | employees_747.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('payments', 'email') | NONE | true |
DIFF00000006337 | test_suite_cleanup | SQL | spec/invoices_315.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00000006338 | orm_schema_change | Ruby | notifications_70.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :role | NONE | true |
DIFF00000006339 | raw_sql_safe | SQL | customers_398.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET user_id = %s WHERE email = %s; | NONE | false |
DIFF00000006340 | mentioned_in_comment | Python | notifications_305.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds RENAME COLUMN price TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000006341 | obfuscated_destructive | SQL | notifications_264.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table accounts; | TRUNCATE | true |
DIFF00000006342 | orm_schema_change | JavaScript | subscriptions_396.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'balance') | NONE | true |
DIFF00000006343 | raw_sql_safe | SQL | products_282.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET category = %s WHERE score = %s; | NONE | false |
DIFF00000006344 | raw_sql_safe | SQL | logs_534.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (category, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000006345 | test_suite_cleanup | SQL | tests/shipments_189.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN status; | DROP_COLUMN | false |
DIFF00000006346 | raw_sql_safe | SQL | orders_429.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET created_at = %s WHERE role = %s; | NONE | false |
DIFF00000006347 | general_code_change | Python | orders_542.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006348 | mentioned_in_comment | Python | sessions_802.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE accounts;") | DROP_TABLE | false |
DIFF00000006349 | raw_sql_safe | SQL | customers_954.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_description ON customers (user_id); | NONE | false |
DIFF00000006350 | raw_sql_destructive | SQL | comments_141.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000006351 | general_code_change | Ruby | invoices_107.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006352 | general_code_change | TypeScript | sessions_384.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 |
DIFF00000006353 | test_suite_cleanup | SQL | test/products_504.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | false |
DIFF00000006354 | raw_sql_destructive | SQL | orders_701.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000006355 | general_code_change | Java | refunds_786.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006356 | orm_schema_change | Python | users_163.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='user_id') | NONE | true |
DIFF00000006357 | raw_sql_destructive | SQL | invoices_287.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00000006358 | obfuscated_destructive | SQL | shipments_621.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
sessions; | DROP_TABLE | true |
DIFF00000006359 | general_code_change | Python | users_432.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006360 | mentioned_in_comment | Python | products_284.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE payments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000006361 | obfuscated_destructive | SQL | invoices_798.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN status TO full_name; | ALTER_RENAME | true |
DIFF00000006362 | raw_sql_destructive | SQL | sessions_704.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000006363 | general_code_change | Go | employees_196.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006364 | general_code_change | TypeScript | events_794.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 |
DIFF00000006365 | raw_sql_destructive | SQL | reviews_618.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN amount TO full_name; | ALTER_RENAME | true |
DIFF00000006366 | general_code_change | JavaScript | employees_672.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006367 | general_code_change | JavaScript | events_356.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 |
DIFF00000006368 | raw_sql_safe | SQL | customers_518.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000006369 | mentioned_in_comment | Python | users_441.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds DROP COLUMN description;") | DROP_COLUMN | false |
DIFF00000006370 | general_code_change | Java | users_868.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006371 | general_code_change | Java | refunds_263.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006372 | mentioned_in_comment | Python | shipments_817.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE payments SET balance = CONCAT(balance, user_id);") | UPDATE_CONCAT | false |
DIFF00000006373 | mentioned_in_comment | Python | tickets_867.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM customers;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000006374 | obfuscated_destructive | SQL | employees_648.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter taBlE ticKeTS ReName coLumN catEGORY to fuLl_Name; | ALTER_RENAME | true |
DIFF00000006375 | raw_sql_destructive | SQL | accounts_833.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | true |
DIFF00000006376 | mentioned_in_comment | Python | logs_546.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE sessions SET balance = CONCAT(balance, order_id); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000006377 | raw_sql_destructive | SQL | invoices_431.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000006378 | test_suite_cleanup | SQL | mysql-test/suite/reviews_953.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00000006379 | general_code_change | Python | events_328.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006380 | raw_sql_destructive | SQL | orders_140.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN order_id TO contact_email; | ALTER_RENAME | true |
DIFF00000006381 | general_code_change | JavaScript | events_345.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 |
DIFF00000006382 | general_code_change | Ruby | notifications_141.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006383 | obfuscated_destructive | SQL | logs_928.sql | schema cleanup | @@ -1,3 +1,3 @@
+Drop TabLE InVOiCES; | DROP_TABLE | true |
DIFF00000006384 | orm_schema_change | Ruby | refunds_966.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :quantity | NONE | true |
DIFF00000006385 | raw_sql_destructive | SQL | accounts_133.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000006386 | general_code_change | TypeScript | events_739.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 |
DIFF00000006387 | orm_schema_change | JavaScript | subscriptions_160.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'updated_at') | NONE | true |
DIFF00000006388 | obfuscated_destructive | SQL | notifications_175.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRUnCaTe TabLE EVEnts; | TRUNCATE | true |
DIFF00000006389 | general_code_change | Java | refunds_910.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006390 | raw_sql_safe | SQL | orders_945.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET role = %s WHERE role = %s; | NONE | false |
DIFF00000006391 | general_code_change | Go | tickets_205.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006392 | obfuscated_destructive | SQL | payments_837.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table products; | TRUNCATE | true |
DIFF00000006393 | orm_schema_change | JavaScript | customers_305.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('address')) | NONE | true |
DIFF00000006394 | orm_schema_change | Python | comments_584.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='balance') | NONE | true |
DIFF00000006395 | raw_sql_destructive | SQL | inventory_777.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000006396 | raw_sql_safe | SQL | comments_522.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000006397 | general_code_change | Python | sessions_139.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006398 | raw_sql_safe | SQL | orders_146.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_updated_at ON products (priority); | NONE | false |
DIFF00000006399 | mentioned_in_comment | Python | invoices_43.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE inventory; -- now deprecated""" | DROP_TABLE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.