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 |
|---|---|---|---|---|---|---|---|
DIFF00099997700 | mentioned_in_comment | Python | logs_600.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE comments;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099997701 | general_code_change | Python | sessions_238.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997702 | mentioned_in_comment | Python | subscriptions_196.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE events;") | DROP_TABLE | false |
DIFF00099997703 | test_suite_cleanup | SQL | mysql-test/suite/transactions_119.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00099997704 | general_code_change | Go | orders_510.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997705 | test_suite_cleanup | SQL | tests/subscriptions_289.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN status TO user_role; | ALTER_RENAME | false |
DIFF00099997706 | general_code_change | Python | orders_693.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997707 | raw_sql_safe | SQL | logs_347.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (phone, score) VALUES (%s, %s); | NONE | false |
DIFF00099997708 | orm_schema_change | JavaScript | employees_246.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'user_id') | NONE | true |
DIFF00099997709 | general_code_change | JavaScript | payments_668.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 |
DIFF00099997710 | raw_sql_safe | SQL | transactions_301.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099997711 | raw_sql_destructive | SQL | orders_349.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099997712 | general_code_change | TypeScript | subscriptions_644.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 |
DIFF00099997713 | general_code_change | Java | invoices_125.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997714 | raw_sql_destructive | SQL | users_175.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN name TO amount_cents; | ALTER_RENAME | true |
DIFF00099997715 | raw_sql_destructive | SQL | orders_844.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN category TO full_name; | ALTER_RENAME | true |
DIFF00099997716 | general_code_change | Python | inventory_674.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997717 | general_code_change | TypeScript | shipments_916.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 |
DIFF00099997718 | orm_schema_change | Ruby | sessions_967.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :metadata | NONE | true |
DIFF00099997719 | raw_sql_safe | SQL | accounts_316.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997720 | mentioned_in_comment | Python | orders_4.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM employees; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997721 | general_code_change | Ruby | inventory_162.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997722 | obfuscated_destructive | SQL | tickets_604.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099997723 | raw_sql_destructive | SQL | shipments_600.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00099997724 | test_suite_cleanup | SQL | test/customers_587.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00099997725 | raw_sql_safe | SQL | shipments_621.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET description = %s WHERE name = %s; | NONE | false |
DIFF00099997726 | orm_schema_change | JavaScript | users_391.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'amount') | NONE | true |
DIFF00099997727 | raw_sql_safe | SQL | notifications_431.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099997728 | general_code_change | TypeScript | products_104.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 |
DIFF00099997729 | general_code_change | Java | notifications_9.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997730 | obfuscated_destructive | SQL | notifications_939.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltER taBLE iNvENTOry dROP CoLumn ORDeR_ID; | DROP_COLUMN | true |
DIFF00099997731 | general_code_change | JavaScript | orders_878.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997732 | orm_schema_change | JavaScript | products_106.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('status')) | NONE | true |
DIFF00099997733 | general_code_change | Python | tickets_429.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997734 | orm_schema_change | JavaScript | invoices_438.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'balance') | NONE | true |
DIFF00099997735 | raw_sql_destructive | SQL | reviews_25.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN balance TO full_name; | ALTER_RENAME | true |
DIFF00099997736 | general_code_change | Python | customers_12.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997737 | raw_sql_safe | SQL | customers_448.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET created_at = %s WHERE updated_at = %s; | NONE | false |
DIFF00099997738 | general_code_change | TypeScript | transactions_330.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 |
DIFF00099997739 | orm_schema_change | JavaScript | inventory_91.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'score') | NONE | true |
DIFF00099997740 | raw_sql_safe | SQL | comments_161.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE user_id = 'active'; | NONE | false |
DIFF00099997741 | raw_sql_destructive | SQL | shipments_870.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099997742 | general_code_change | Python | users_324.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997743 | raw_sql_safe | SQL | accounts_650.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_category ON subscriptions (created_at); | NONE | false |
DIFF00099997744 | orm_schema_change | TypeScript | shipments_506.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: score } | NONE | true |
DIFF00099997745 | general_code_change | TypeScript | customers_345.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 |
DIFF00099997746 | general_code_change | Python | users_854.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997747 | orm_schema_change | Ruby | notifications_659.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :category | NONE | true |
DIFF00099997748 | raw_sql_safe | SQL | payments_322.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (status, address) VALUES (%s, %s); | NONE | false |
DIFF00099997749 | general_code_change | Python | transactions_61.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997750 | test_suite_cleanup | SQL | tests/payments_296.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN address; | DROP_COLUMN | false |
DIFF00099997751 | mentioned_in_comment | Python | users_321.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE accounts;") | DROP_TABLE | false |
DIFF00099997752 | obfuscated_destructive | SQL | accounts_4.sql | schema cleanup | @@ -1,3 +1,3 @@
+update inventory set is_active = concat(is_active, description); | UPDATE_CONCAT | true |
DIFF00099997753 | general_code_change | Go | tickets_533.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997754 | general_code_change | JavaScript | payments_981.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997755 | test_suite_cleanup | SQL | mysql-test/suite/comments_341.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00099997756 | raw_sql_destructive | SQL | employees_215.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099997757 | mentioned_in_comment | Python | employees_568.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE subscriptions SET phone = CONCAT(phone, category);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099997758 | orm_schema_change | JavaScript | products_126.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'score') | NONE | true |
DIFF00099997759 | general_code_change | Ruby | comments_478.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997760 | raw_sql_destructive | SQL | notifications_493.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET user_id = CONCAT(user_id, role); | UPDATE_CONCAT | true |
DIFF00099997761 | test_suite_cleanup | SQL | test/tickets_753.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | false |
DIFF00099997762 | raw_sql_safe | SQL | events_650.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE is_active = 'active'; | NONE | false |
DIFF00099997763 | raw_sql_destructive | SQL | logs_60.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN priority TO full_name; | ALTER_RENAME | true |
DIFF00099997764 | orm_schema_change | Ruby | shipments_325.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :category | NONE | true |
DIFF00099997765 | orm_schema_change | JavaScript | refunds_752.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'metadata') | NONE | true |
DIFF00099997766 | raw_sql_destructive | SQL | comments_884.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN price; | DROP_COLUMN | true |
DIFF00099997767 | orm_schema_change | TypeScript | products_13.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: user_id } | NONE | true |
DIFF00099997768 | test_suite_cleanup | SQL | test/refunds_40.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00099997769 | test_suite_cleanup | SQL | test/transactions_564.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00099997770 | general_code_change | Go | invoices_26.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997771 | raw_sql_destructive | SQL | payments_411.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET status = CONCAT(status, phone); | UPDATE_CONCAT | true |
DIFF00099997772 | general_code_change | TypeScript | invoices_123.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 |
DIFF00099997773 | raw_sql_safe | SQL | payments_588.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET balance = %s WHERE price = %s; | NONE | false |
DIFF00099997774 | raw_sql_safe | SQL | inventory_946.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099997775 | raw_sql_destructive | SQL | customers_673.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN description; | DROP_COLUMN | true |
DIFF00099997776 | raw_sql_safe | SQL | subscriptions_246.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997777 | orm_schema_change | JavaScript | reviews_274.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('order_id')) | NONE | true |
DIFF00099997778 | raw_sql_safe | SQL | customers_311.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE created_at = 'active'; | NONE | false |
DIFF00099997779 | obfuscated_destructive | SQL | notifications_129.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00099997780 | general_code_change | JavaScript | refunds_195.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 |
DIFF00099997781 | general_code_change | Go | accounts_164.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997782 | raw_sql_safe | SQL | orders_9.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE order_id = 'active'; | NONE | false |
DIFF00099997783 | mentioned_in_comment | Python | products_86.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099997784 | orm_schema_change | Ruby | events_293.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :category | NONE | true |
DIFF00099997785 | mentioned_in_comment | Python | transactions_158.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE logs;") | TRUNCATE | false |
DIFF00099997786 | orm_schema_change | Ruby | payments_523.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :category | NONE | true |
DIFF00099997787 | mentioned_in_comment | Python | sessions_579.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM inventory;") | DELETE_UNQUALIFIED | false |
DIFF00099997788 | test_suite_cleanup | SQL | tests/payments_212.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN updated_at TO user_role; | ALTER_RENAME | false |
DIFF00099997789 | general_code_change | JavaScript | sessions_993.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997790 | raw_sql_safe | SQL | notifications_33.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (priority, phone) VALUES (%s, %s); | NONE | false |
DIFF00099997791 | general_code_change | TypeScript | tickets_481.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 |
DIFF00099997792 | general_code_change | Java | employees_734.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997793 | test_suite_cleanup | SQL | mysql-test/suite/payments_59.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00099997794 | test_suite_cleanup | SQL | test/accounts_503.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN user_id TO contact_email; | ALTER_RENAME | false |
DIFF00099997795 | general_code_change | JavaScript | payments_661.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 |
DIFF00099997796 | raw_sql_safe | SQL | products_564.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (order_id, user_id) VALUES (%s, %s); | NONE | false |
DIFF00099997797 | general_code_change | Ruby | refunds_64.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997798 | raw_sql_safe | SQL | users_115.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET priority = %s WHERE amount = %s; | NONE | false |
DIFF00099997799 | general_code_change | Go | notifications_14.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.