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 |
|---|---|---|---|---|---|---|---|
DIFF00000008600 | raw_sql_safe | SQL | refunds_439.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET created_at = %s WHERE price = %s; | NONE | false |
DIFF00000008601 | raw_sql_destructive | SQL | reviews_949.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000008602 | obfuscated_destructive | SQL | inventory_352.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
tickets; | DROP_TABLE | true |
DIFF00000008603 | test_suite_cleanup | SQL | tests/refunds_632.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN order_id TO full_name; | ALTER_RENAME | false |
DIFF00000008604 | mentioned_in_comment | Python | tickets_135.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000008605 | test_suite_cleanup | SQL | test/orders_96.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00000008606 | general_code_change | Ruby | orders_419.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008607 | raw_sql_destructive | SQL | users_609.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000008608 | raw_sql_safe | SQL | users_340.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000008609 | mentioned_in_comment | Python | comments_30.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE reviews SET updated_at = CONCAT(updated_at, balance); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000008610 | general_code_change | JavaScript | subscriptions_906.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 |
DIFF00000008611 | mentioned_in_comment | Python | orders_842.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE tickets;") | TRUNCATE | false |
DIFF00000008612 | raw_sql_safe | SQL | invoices_107.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (order_id, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000008613 | raw_sql_destructive | SQL | refunds_417.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000008614 | raw_sql_safe | SQL | reviews_245.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET is_active = %s WHERE score = %s; | NONE | false |
DIFF00000008615 | raw_sql_safe | SQL | reviews_212.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET updated_at = %s WHERE balance = %s; | NONE | false |
DIFF00000008616 | general_code_change | JavaScript | reviews_557.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 |
DIFF00000008617 | raw_sql_destructive | SQL | inventory_477.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000008618 | orm_schema_change | JavaScript | sessions_689.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'created_at') | NONE | true |
DIFF00000008619 | raw_sql_safe | SQL | orders_195.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET balance = %s WHERE price = %s; | NONE | false |
DIFF00000008620 | general_code_change | Ruby | accounts_728.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008621 | general_code_change | TypeScript | refunds_924.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 |
DIFF00000008622 | general_code_change | Ruby | inventory_845.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008623 | orm_schema_change | TypeScript | accounts_523.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: metadata } | NONE | true |
DIFF00000008624 | general_code_change | Python | comments_299.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008625 | obfuscated_destructive | SQL | invoices_932.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table users rename column address to state; | ALTER_RENAME | true |
DIFF00000008626 | test_suite_cleanup | SQL | test/inventory_60.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000008627 | raw_sql_safe | SQL | comments_68.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE price = 'active'; | NONE | false |
DIFF00000008628 | raw_sql_safe | SQL | inventory_93.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET created_at = %s WHERE priority = %s; | NONE | false |
DIFF00000008629 | obfuscated_destructive | SQL | shipments_558.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN quantity TO amount_cents; | ALTER_RENAME | true |
DIFF00000008630 | general_code_change | Java | comments_923.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008631 | mentioned_in_comment | Python | comments_345.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE tickets;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008632 | test_suite_cleanup | SQL | tests/comments_312.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN email; | DROP_COLUMN | false |
DIFF00000008633 | orm_schema_change | Python | accounts_442.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='category') | NONE | true |
DIFF00000008634 | orm_schema_change | Ruby | notifications_440.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :quantity | NONE | true |
DIFF00000008635 | obfuscated_destructive | SQL | notifications_476.sql | schema cleanup | @@ -1,3 +1,3 @@
+update refunds set metadata = concat(metadata, address); | UPDATE_CONCAT | true |
DIFF00000008636 | orm_schema_change | TypeScript | invoices_64.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: role } | NONE | true |
DIFF00000008637 | mentioned_in_comment | Python | shipments_339.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE payments;") | DROP_TABLE | false |
DIFF00000008638 | raw_sql_safe | SQL | reviews_789.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (status, name) VALUES (%s, %s); | NONE | false |
DIFF00000008639 | obfuscated_destructive | SQL | notifications_334.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000008640 | raw_sql_destructive | SQL | tickets_333.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN price; | DROP_COLUMN | true |
DIFF00000008641 | mentioned_in_comment | Python | reviews_138.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments RENAME COLUMN order_id TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000008642 | orm_schema_change | Python | comments_845.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='role') | NONE | true |
DIFF00000008643 | orm_schema_change | JavaScript | reviews_21.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'priority') | NONE | true |
DIFF00000008644 | test_suite_cleanup | SQL | tests/subscriptions_863.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN is_active; | DROP_COLUMN | false |
DIFF00000008645 | raw_sql_safe | SQL | accounts_708.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET order_id = %s WHERE is_active = %s; | NONE | false |
DIFF00000008646 | raw_sql_safe | SQL | invoices_869.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_order_id ON orders (quantity); | NONE | false |
DIFF00000008647 | raw_sql_destructive | SQL | tickets_546.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000008648 | orm_schema_change | TypeScript | payments_950.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: email } | NONE | true |
DIFF00000008649 | obfuscated_destructive | SQL | shipments_703.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table tickets; | DROP_TABLE | true |
DIFF00000008650 | general_code_change | TypeScript | comments_742.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 |
DIFF00000008651 | obfuscated_destructive | SQL | shipments_393.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
RENAME
COLUMN
role
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000008652 | general_code_change | Python | sessions_913.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008653 | general_code_change | Python | users_557.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008654 | test_suite_cleanup | SQL | mysql-test/suite/products_987.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00000008655 | test_suite_cleanup | SQL | mysql-test/suite/notifications_950.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET score = CONCAT(score, email); | UPDATE_CONCAT | false |
DIFF00000008656 | raw_sql_destructive | SQL | transactions_549.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000008657 | raw_sql_safe | SQL | customers_486.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE updated_at = 'active'; | NONE | false |
DIFF00000008658 | orm_schema_change | JavaScript | comments_721.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'updated_at') | NONE | true |
DIFF00000008659 | orm_schema_change | Python | customers_333.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='score') | NONE | true |
DIFF00000008660 | mentioned_in_comment | Python | notifications_690.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets RENAME COLUMN description TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000008661 | raw_sql_destructive | SQL | payments_189.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00000008662 | general_code_change | TypeScript | comments_660.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 |
DIFF00000008663 | general_code_change | Python | subscriptions_300.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008664 | raw_sql_safe | SQL | refunds_350.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000008665 | general_code_change | Go | logs_960.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008666 | raw_sql_safe | SQL | tickets_964.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (address, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000008667 | test_suite_cleanup | SQL | test/notifications_266.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET address = CONCAT(address, metadata); | UPDATE_CONCAT | false |
DIFF00000008668 | raw_sql_safe | SQL | inventory_517.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_name ON users (balance); | NONE | false |
DIFF00000008669 | obfuscated_destructive | SQL | products_628.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000008670 | test_suite_cleanup | SQL | mysql-test/suite/transactions_825.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00000008671 | test_suite_cleanup | SQL | tests/reviews_649.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET price = CONCAT(price, price); | UPDATE_CONCAT | false |
DIFF00000008672 | test_suite_cleanup | SQL | mysql-test/suite/employees_794.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET amount = CONCAT(amount, amount); | UPDATE_CONCAT | false |
DIFF00000008673 | test_suite_cleanup | SQL | test/events_557.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | false |
DIFF00000008674 | obfuscated_destructive | SQL | notifications_636.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLteR tabLe tRANsAcTIoNS ReNAMe COlUmN qUantITY to sTatE; | ALTER_RENAME | true |
DIFF00000008675 | obfuscated_destructive | SQL | sessions_272.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN updated_at TO user_role; | ALTER_RENAME | true |
DIFF00000008676 | general_code_change | JavaScript | invoices_632.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008677 | orm_schema_change | TypeScript | payments_589.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: name } | NONE | true |
DIFF00000008678 | general_code_change | TypeScript | refunds_81.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 |
DIFF00000008679 | general_code_change | JavaScript | subscriptions_454.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008680 | obfuscated_destructive | SQL | sessions_387.sql | schema cleanup | @@ -1,3 +1,3 @@
+dRop tabLE Refunds; | DROP_TABLE | true |
DIFF00000008681 | test_suite_cleanup | SQL | test/subscriptions_350.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | false |
DIFF00000008682 | raw_sql_safe | SQL | inventory_285.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET balance = %s WHERE order_id = %s; | NONE | false |
DIFF00000008683 | mentioned_in_comment | Python | events_165.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events RENAME COLUMN score TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000008684 | general_code_change | Java | products_699.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008685 | raw_sql_safe | SQL | users_2.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000008686 | raw_sql_safe | SQL | transactions_34.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_created_at ON subscriptions (metadata); | NONE | false |
DIFF00000008687 | raw_sql_destructive | SQL | transactions_89.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000008688 | raw_sql_destructive | SQL | subscriptions_210.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN price TO full_name; | ALTER_RENAME | true |
DIFF00000008689 | test_suite_cleanup | SQL | tests/logs_821.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN updated_at TO state; | ALTER_RENAME | false |
DIFF00000008690 | raw_sql_destructive | SQL | refunds_872.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00000008691 | orm_schema_change | Ruby | sessions_99.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :name | NONE | true |
DIFF00000008692 | mentioned_in_comment | Python | subscriptions_324.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE comments SET priority = CONCAT(priority, name);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008693 | general_code_change | Ruby | payments_469.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008694 | raw_sql_safe | SQL | notifications_737.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE category = 'active'; | NONE | false |
DIFF00000008695 | general_code_change | JavaScript | notifications_630.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008696 | raw_sql_destructive | SQL | tickets_134.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000008697 | raw_sql_destructive | SQL | inventory_474.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET name = CONCAT(name, quantity); | UPDATE_CONCAT | true |
DIFF00000008698 | raw_sql_safe | SQL | invoices_600.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000008699 | test_suite_cleanup | SQL | mysql-test/suite/tickets_197.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.