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 |
|---|---|---|---|---|---|---|---|
DIFF00000004600 | raw_sql_safe | SQL | logs_950.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE email = 'active'; | NONE | false |
DIFF00000004601 | general_code_change | TypeScript | accounts_638.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 |
DIFF00000004602 | raw_sql_destructive | SQL | subscriptions_971.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000004603 | raw_sql_destructive | SQL | orders_237.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN name TO amount_cents; | ALTER_RENAME | true |
DIFF00000004604 | test_suite_cleanup | SQL | mysql-test/suite/transactions_51.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00000004605 | raw_sql_destructive | SQL | invoices_782.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET phone = CONCAT(phone, address); | UPDATE_CONCAT | true |
DIFF00000004606 | obfuscated_destructive | SQL | refunds_52.sql | schema cleanup | @@ -1,3 +1,3 @@
+deLETe FrOM eVEnts; | DELETE_UNQUALIFIED | true |
DIFF00000004607 | raw_sql_safe | SQL | employees_600.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE status = 'active'; | NONE | false |
DIFF00000004608 | raw_sql_safe | SQL | users_902.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000004609 | mentioned_in_comment | Python | reviews_920.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE orders RENAME COLUMN balance TO state;") | ALTER_RENAME | false |
DIFF00000004610 | general_code_change | JavaScript | notifications_912.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004611 | general_code_change | Python | events_797.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004612 | mentioned_in_comment | Python | events_716.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE employees;") | TRUNCATE | false |
DIFF00000004613 | raw_sql_destructive | SQL | shipments_35.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN metadata TO contact_email; | ALTER_RENAME | true |
DIFF00000004614 | obfuscated_destructive | SQL | inventory_399.sql | schema cleanup | @@ -1,3 +1,3 @@
+deleTe FROm LoGS; | DELETE_UNQUALIFIED | true |
DIFF00000004615 | raw_sql_safe | SQL | payments_961.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE quantity = 'active'; | NONE | false |
DIFF00000004616 | test_suite_cleanup | SQL | mysql-test/suite/users_267.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00000004617 | general_code_change | Ruby | customers_671.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004618 | orm_schema_change | Ruby | customers_860.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :email | NONE | true |
DIFF00000004619 | mentioned_in_comment | Python | events_409.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 |
DIFF00000004620 | general_code_change | TypeScript | notifications_271.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 |
DIFF00000004621 | general_code_change | JavaScript | employees_670.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 |
DIFF00000004622 | raw_sql_safe | SQL | notifications_270.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_user_id ON notifications (balance); | NONE | false |
DIFF00000004623 | raw_sql_safe | SQL | orders_455.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE role = 'active'; | NONE | false |
DIFF00000004624 | orm_schema_change | TypeScript | refunds_281.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: description } | NONE | true |
DIFF00000004625 | test_suite_cleanup | SQL | tests/products_9.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000004626 | raw_sql_safe | SQL | customers_152.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE address = 'active'; | NONE | false |
DIFF00000004627 | raw_sql_safe | SQL | reviews_488.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000004628 | general_code_change | Python | users_871.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004629 | obfuscated_destructive | SQL | events_754.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000004630 | general_code_change | JavaScript | notifications_840.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004631 | obfuscated_destructive | SQL | inventory_64.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table inventory rename column phone to contact_email; | ALTER_RENAME | true |
DIFF00000004632 | general_code_change | Python | transactions_185.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004633 | orm_schema_change | TypeScript | comments_211.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: category } | NONE | true |
DIFF00000004634 | raw_sql_safe | SQL | payments_25.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_address ON accounts (user_id); | NONE | false |
DIFF00000004635 | obfuscated_destructive | SQL | shipments_409.sql | schema cleanup | @@ -1,3 +1,3 @@
+uPdAtE trANsacTIoNS SET updATED_At = cONCAT(uPDated_AT, StAtuS); | UPDATE_CONCAT | true |
DIFF00000004636 | test_suite_cleanup | SQL | spec/logs_473.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000004637 | raw_sql_destructive | SQL | accounts_907.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000004638 | obfuscated_destructive | SQL | events_745.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000004639 | orm_schema_change | Python | users_454.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='user_id') | NONE | true |
DIFF00000004640 | raw_sql_destructive | SQL | accounts_58.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000004641 | mentioned_in_comment | Python | customers_795.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE subscriptions;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000004642 | orm_schema_change | Python | invoices_420.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='description') | NONE | true |
DIFF00000004643 | general_code_change | JavaScript | products_400.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 |
DIFF00000004644 | test_suite_cleanup | SQL | spec/users_591.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000004645 | obfuscated_destructive | SQL | tickets_754.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTer TAblE noTIFIcatioNS DROP cOLUMn DeScrIptIoN; | DROP_COLUMN | true |
DIFF00000004646 | orm_schema_change | JavaScript | transactions_798.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('address')) | NONE | true |
DIFF00000004647 | general_code_change | Python | logs_311.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004648 | general_code_change | Ruby | orders_98.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004649 | orm_schema_change | Ruby | subscriptions_551.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :category | NONE | true |
DIFF00000004650 | orm_schema_change | Python | orders_974.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='name') | NONE | true |
DIFF00000004651 | orm_schema_change | JavaScript | inventory_876.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('phone')) | NONE | true |
DIFF00000004652 | mentioned_in_comment | Python | notifications_418.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE notifications;") | DROP_TABLE | false |
DIFF00000004653 | obfuscated_destructive | SQL | orders_749.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
users; | DROP_TABLE | true |
DIFF00000004654 | orm_schema_change | JavaScript | accounts_859.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000004655 | general_code_change | Java | refunds_863.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004656 | orm_schema_change | JavaScript | employees_953.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('balance')) | NONE | true |
DIFF00000004657 | orm_schema_change | JavaScript | invoices_485.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'name') | NONE | true |
DIFF00000004658 | general_code_change | Go | inventory_657.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004659 | raw_sql_safe | SQL | logs_638.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_email ON comments (role); | NONE | false |
DIFF00000004660 | raw_sql_destructive | SQL | subscriptions_783.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | true |
DIFF00000004661 | mentioned_in_comment | Python | products_564.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated""" | TRUNCATE | false |
DIFF00000004662 | general_code_change | Python | logs_2.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004663 | general_code_change | JavaScript | notifications_399.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 |
DIFF00000004664 | test_suite_cleanup | SQL | spec/logs_690.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET score = CONCAT(score, category); | UPDATE_CONCAT | false |
DIFF00000004665 | mentioned_in_comment | Python | inventory_388.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE invoices RENAME COLUMN order_id TO contact_email;") | ALTER_RENAME | false |
DIFF00000004666 | raw_sql_destructive | SQL | orders_272.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET price = CONCAT(price, email); | UPDATE_CONCAT | true |
DIFF00000004667 | raw_sql_safe | SQL | subscriptions_62.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (amount, price) VALUES (%s, %s); | NONE | false |
DIFF00000004668 | raw_sql_safe | SQL | notifications_766.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET quantity = %s WHERE created_at = %s; | NONE | false |
DIFF00000004669 | raw_sql_destructive | SQL | notifications_368.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN created_at TO user_role; | ALTER_RENAME | true |
DIFF00000004670 | mentioned_in_comment | Python | comments_381.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000004671 | general_code_change | Python | reviews_482.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004672 | general_code_change | JavaScript | comments_376.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 |
DIFF00000004673 | test_suite_cleanup | SQL | spec/accounts_271.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE transactions SET quantity = CONCAT(quantity, role); | UPDATE_CONCAT | false |
DIFF00000004674 | general_code_change | Ruby | invoices_654.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004675 | test_suite_cleanup | SQL | mysql-test/suite/employees_255.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | false |
DIFF00000004676 | orm_schema_change | TypeScript | sessions_217.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: quantity } | NONE | true |
DIFF00000004677 | raw_sql_safe | SQL | inventory_84.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (amount, priority) VALUES (%s, %s); | NONE | false |
DIFF00000004678 | mentioned_in_comment | Python | reviews_564.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE orders DROP COLUMN category; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000004679 | test_suite_cleanup | SQL | test/logs_123.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000004680 | raw_sql_safe | SQL | comments_706.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET score = %s WHERE address = %s; | NONE | false |
DIFF00000004681 | raw_sql_destructive | SQL | tickets_320.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN created_at TO full_name; | ALTER_RENAME | true |
DIFF00000004682 | obfuscated_destructive | SQL | orders_371.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
comments
SET
status
=
CONCAT(status,
name); | UPDATE_CONCAT | true |
DIFF00000004683 | raw_sql_destructive | SQL | users_550.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET score = CONCAT(score, name); | UPDATE_CONCAT | true |
DIFF00000004684 | general_code_change | JavaScript | employees_462.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 |
DIFF00000004685 | orm_schema_change | TypeScript | accounts_424.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: score } | NONE | true |
DIFF00000004686 | test_suite_cleanup | SQL | spec/reviews_27.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET updated_at = CONCAT(updated_at, score); | UPDATE_CONCAT | false |
DIFF00000004687 | obfuscated_destructive | SQL | reviews_120.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00000004688 | raw_sql_safe | SQL | products_167.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE is_active = 'active'; | NONE | false |
DIFF00000004689 | general_code_change | Go | orders_51.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004690 | mentioned_in_comment | Python | events_810.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN balance;") | DROP_COLUMN | false |
DIFF00000004691 | general_code_change | Python | products_661.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004692 | raw_sql_safe | SQL | employees_307.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET is_active = %s WHERE price = %s; | NONE | false |
DIFF00000004693 | general_code_change | Ruby | employees_349.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004694 | general_code_change | JavaScript | logs_472.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004695 | orm_schema_change | TypeScript | payments_584.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: created_at } | NONE | true |
DIFF00000004696 | raw_sql_safe | SQL | products_304.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_created_at ON employees (address); | NONE | false |
DIFF00000004697 | raw_sql_safe | SQL | reviews_192.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE is_active = 'active'; | NONE | false |
DIFF00000004698 | test_suite_cleanup | SQL | test/products_669.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN score TO amount_cents; | ALTER_RENAME | false |
DIFF00000004699 | raw_sql_destructive | SQL | refunds_198.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.