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 |
|---|---|---|---|---|---|---|---|
DIFF00000001500 | mentioned_in_comment | Python | products_848.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE reviews;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000001501 | general_code_change | Python | orders_479.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001502 | raw_sql_safe | SQL | products_346.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (role, amount) VALUES (%s, %s); | NONE | false |
DIFF00000001503 | raw_sql_destructive | SQL | comments_712.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000001504 | raw_sql_safe | SQL | users_657.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000001505 | mentioned_in_comment | Python | sessions_6.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions DROP COLUMN user_id; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000001506 | obfuscated_destructive | SQL | logs_807.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table tickets rename column name to state; | ALTER_RENAME | true |
DIFF00000001507 | orm_schema_change | JavaScript | customers_4.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('score')) | NONE | true |
DIFF00000001508 | raw_sql_safe | SQL | products_168.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000001509 | obfuscated_destructive | SQL | payments_932.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN is_active TO state; | ALTER_RENAME | true |
DIFF00000001510 | raw_sql_safe | SQL | sessions_984.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (address, category) VALUES (%s, %s); | NONE | false |
DIFF00000001511 | orm_schema_change | JavaScript | logs_901.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'address') | NONE | true |
DIFF00000001512 | orm_schema_change | JavaScript | products_400.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'priority') | NONE | true |
DIFF00000001513 | general_code_change | JavaScript | orders_73.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 |
DIFF00000001514 | orm_schema_change | JavaScript | customers_500.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('amount')) | NONE | true |
DIFF00000001515 | raw_sql_destructive | SQL | comments_618.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000001516 | raw_sql_safe | SQL | transactions_576.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET role = %s WHERE metadata = %s; | NONE | false |
DIFF00000001517 | raw_sql_safe | SQL | transactions_71.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE description = 'active'; | NONE | false |
DIFF00000001518 | obfuscated_destructive | SQL | logs_858.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDAte SEsSiONS Set rolE = cONCAT(Role, PRiorItY); | UPDATE_CONCAT | true |
DIFF00000001519 | orm_schema_change | TypeScript | orders_578.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: email } | NONE | true |
DIFF00000001520 | raw_sql_destructive | SQL | sessions_636.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00000001521 | orm_schema_change | JavaScript | products_317.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('score')) | NONE | true |
DIFF00000001522 | test_suite_cleanup | SQL | test/subscriptions_632.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000001523 | orm_schema_change | Python | comments_739.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='score') | NONE | true |
DIFF00000001524 | mentioned_in_comment | Python | sessions_810.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN description;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001525 | obfuscated_destructive | SQL | logs_6.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000001526 | mentioned_in_comment | Python | orders_439.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM reviews; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001527 | general_code_change | JavaScript | shipments_44.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 |
DIFF00000001528 | obfuscated_destructive | SQL | inventory_568.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
inventory; | TRUNCATE | true |
DIFF00000001529 | general_code_change | Ruby | comments_244.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001530 | obfuscated_destructive | SQL | subscriptions_8.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
products
SET
email
=
CONCAT(email,
email); | UPDATE_CONCAT | true |
DIFF00000001531 | general_code_change | Python | accounts_769.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001532 | raw_sql_safe | SQL | notifications_17.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000001533 | mentioned_in_comment | Python | tickets_150.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE reviews SET created_at = CONCAT(created_at, email);") | UPDATE_CONCAT | false |
DIFF00000001534 | general_code_change | TypeScript | inventory_417.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 |
DIFF00000001535 | general_code_change | JavaScript | customers_462.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001536 | orm_schema_change | Python | reviews_288.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='is_active') | NONE | true |
DIFF00000001537 | raw_sql_destructive | SQL | refunds_50.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000001538 | mentioned_in_comment | Python | refunds_275.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE invoices;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001539 | orm_schema_change | JavaScript | notifications_947.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'name') | NONE | true |
DIFF00000001540 | raw_sql_destructive | SQL | sessions_694.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000001541 | raw_sql_destructive | SQL | inventory_951.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000001542 | general_code_change | Ruby | customers_147.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001543 | raw_sql_destructive | SQL | payments_190.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00000001544 | general_code_change | JavaScript | notifications_297.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 |
DIFF00000001545 | general_code_change | Java | invoices_502.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001546 | general_code_change | JavaScript | accounts_766.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 |
DIFF00000001547 | orm_schema_change | JavaScript | accounts_803.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'user_id') | NONE | true |
DIFF00000001548 | orm_schema_change | JavaScript | orders_555.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('email')) | NONE | true |
DIFF00000001549 | orm_schema_change | Ruby | users_122.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :category | NONE | true |
DIFF00000001550 | test_suite_cleanup | SQL | tests/transactions_805.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN description; | DROP_COLUMN | false |
DIFF00000001551 | obfuscated_destructive | SQL | employees_919.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000001552 | general_code_change | Java | inventory_527.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001553 | raw_sql_destructive | SQL | refunds_198.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00000001554 | raw_sql_destructive | SQL | payments_939.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN user_id TO full_name; | ALTER_RENAME | true |
DIFF00000001555 | general_code_change | Python | sessions_770.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001556 | orm_schema_change | Python | logs_513.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='amount') | NONE | true |
DIFF00000001557 | orm_schema_change | Ruby | orders_456.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :created_at | NONE | true |
DIFF00000001558 | general_code_change | TypeScript | tickets_959.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 |
DIFF00000001559 | test_suite_cleanup | SQL | test/notifications_440.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | false |
DIFF00000001560 | raw_sql_destructive | SQL | subscriptions_861.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000001561 | test_suite_cleanup | SQL | spec/customers_766.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00000001562 | orm_schema_change | JavaScript | inventory_180.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('description')) | NONE | true |
DIFF00000001563 | orm_schema_change | TypeScript | inventory_31.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: description } | NONE | true |
DIFF00000001564 | general_code_change | Go | tickets_834.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001565 | raw_sql_safe | SQL | customers_349.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE email = 'active'; | NONE | false |
DIFF00000001566 | raw_sql_destructive | SQL | customers_334.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000001567 | test_suite_cleanup | SQL | test/inventory_175.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
DIFF00000001568 | general_code_change | Ruby | accounts_188.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001569 | mentioned_in_comment | Python | subscriptions_441.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001570 | obfuscated_destructive | SQL | tickets_512.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table transactions; | TRUNCATE | true |
DIFF00000001571 | general_code_change | Go | events_393.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001572 | mentioned_in_comment | Python | orders_969.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE customers RENAME COLUMN metadata TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000001573 | mentioned_in_comment | Python | comments_588.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE sessions;") | TRUNCATE | false |
DIFF00000001574 | general_code_change | JavaScript | payments_49.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 |
DIFF00000001575 | raw_sql_safe | SQL | shipments_402.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET is_active = %s WHERE balance = %s; | NONE | false |
DIFF00000001576 | orm_schema_change | JavaScript | transactions_277.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('status')) | NONE | true |
DIFF00000001577 | general_code_change | JavaScript | accounts_339.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001578 | test_suite_cleanup | SQL | test/shipments_245.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00000001579 | test_suite_cleanup | SQL | test/users_98.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN created_at TO user_role; | ALTER_RENAME | false |
DIFF00000001580 | raw_sql_safe | SQL | orders_338.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000001581 | general_code_change | JavaScript | reviews_893.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 |
DIFF00000001582 | general_code_change | TypeScript | tickets_566.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 |
DIFF00000001583 | general_code_change | Python | subscriptions_915.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001584 | test_suite_cleanup | SQL | tests/transactions_416.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | false |
DIFF00000001585 | general_code_change | Ruby | orders_665.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001586 | raw_sql_safe | SQL | reviews_921.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE status = 'active'; | NONE | false |
DIFF00000001587 | mentioned_in_comment | Python | shipments_753.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events DROP COLUMN email; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000001588 | raw_sql_safe | SQL | comments_743.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE description = 'active'; | NONE | false |
DIFF00000001589 | general_code_change | Go | logs_317.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001590 | test_suite_cleanup | SQL | tests/tickets_803.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
DIFF00000001591 | test_suite_cleanup | SQL | tests/events_668.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000001592 | raw_sql_safe | SQL | logs_889.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE created_at = 'active'; | NONE | false |
DIFF00000001593 | test_suite_cleanup | SQL | mysql-test/suite/logs_108.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN is_active TO amount_cents; | ALTER_RENAME | false |
DIFF00000001594 | obfuscated_destructive | SQL | customers_867.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00000001595 | raw_sql_safe | SQL | accounts_50.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE metadata = 'active'; | NONE | false |
DIFF00000001596 | orm_schema_change | Python | orders_699.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='updated_at') | NONE | true |
DIFF00000001597 | raw_sql_destructive | SQL | employees_879.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000001598 | test_suite_cleanup | SQL | mysql-test/suite/payments_544.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN email TO user_role; | ALTER_RENAME | false |
DIFF00000001599 | raw_sql_safe | SQL | customers_561.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (quantity, amount) VALUES (%s, %s); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.