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 |
|---|---|---|---|---|---|---|---|
DIFF00099993800 | raw_sql_safe | SQL | comments_265.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099993801 | raw_sql_safe | SQL | orders_185.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099993802 | raw_sql_safe | SQL | logs_167.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_amount ON users (price); | NONE | false |
DIFF00099993803 | general_code_change | JavaScript | customers_145.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993804 | general_code_change | JavaScript | accounts_311.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993805 | test_suite_cleanup | SQL | test/users_734.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00099993806 | general_code_change | Java | notifications_16.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099993807 | orm_schema_change | Python | transactions_16.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='email') | NONE | true |
DIFF00099993808 | general_code_change | Java | invoices_556.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099993809 | raw_sql_destructive | SQL | reviews_100.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00099993810 | general_code_change | Go | payments_248.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993811 | mentioned_in_comment | Python | subscriptions_670.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET metadata = CONCAT(metadata, phone);") | UPDATE_CONCAT | false |
DIFF00099993812 | mentioned_in_comment | Python | inventory_279.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE logs SET quantity = CONCAT(quantity, user_id); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099993813 | test_suite_cleanup | SQL | spec/shipments_43.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00099993814 | mentioned_in_comment | Python | inventory_60.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions DROP COLUMN price;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099993815 | general_code_change | Ruby | notifications_320.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993816 | mentioned_in_comment | Python | orders_868.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET phone = CONCAT(phone, metadata);") | UPDATE_CONCAT | false |
DIFF00099993817 | general_code_change | Python | orders_154.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099993818 | raw_sql_safe | SQL | payments_835.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099993819 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_962.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00099993820 | raw_sql_destructive | SQL | customers_979.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN description TO amount_cents; | ALTER_RENAME | true |
DIFF00099993821 | test_suite_cleanup | SQL | spec/accounts_584.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN price TO contact_email; | ALTER_RENAME | false |
DIFF00099993822 | raw_sql_destructive | SQL | customers_641.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00099993823 | raw_sql_destructive | SQL | orders_658.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00099993824 | raw_sql_destructive | SQL | logs_77.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099993825 | raw_sql_safe | SQL | invoices_757.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_amount ON payments (balance); | NONE | false |
DIFF00099993826 | general_code_change | Python | orders_610.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993827 | raw_sql_safe | SQL | sessions_361.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE email = 'active'; | NONE | false |
DIFF00099993828 | test_suite_cleanup | SQL | spec/tickets_102.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00099993829 | mentioned_in_comment | Python | inventory_835.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM transactions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099993830 | obfuscated_destructive | SQL | logs_778.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE users SET status = CONCAT(status, address); | UPDATE_CONCAT | true |
DIFF00099993831 | general_code_change | JavaScript | shipments_164.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 |
DIFF00099993832 | raw_sql_destructive | SQL | refunds_706.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00099993833 | raw_sql_destructive | SQL | users_26.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099993834 | general_code_change | Python | subscriptions_493.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993835 | raw_sql_destructive | SQL | reviews_476.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00099993836 | raw_sql_destructive | SQL | customers_836.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE refunds SET created_at = CONCAT(created_at, priority); | UPDATE_CONCAT | true |
DIFF00099993837 | raw_sql_destructive | SQL | tickets_48.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099993838 | raw_sql_safe | SQL | invoices_641.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE priority = 'active'; | NONE | false |
DIFF00099993839 | general_code_change | JavaScript | transactions_131.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993840 | raw_sql_destructive | SQL | accounts_477.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN priority TO contact_email; | ALTER_RENAME | true |
DIFF00099993841 | obfuscated_destructive | SQL | users_868.sql | schema cleanup | @@ -1,3 +1,3 @@
+dElETe fRoM CUsTomeRs; | DELETE_UNQUALIFIED | true |
DIFF00099993842 | obfuscated_destructive | SQL | customers_549.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpdatE ShIPMEnTs SEt rOLe = COncAt(RoLe, DEscripTIOn); | UPDATE_CONCAT | true |
DIFF00099993843 | general_code_change | Java | comments_786.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099993844 | general_code_change | TypeScript | logs_868.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 |
DIFF00099993845 | raw_sql_destructive | SQL | payments_461.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET score = CONCAT(score, score); | UPDATE_CONCAT | true |
DIFF00099993846 | obfuscated_destructive | SQL | transactions_109.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN status TO user_role; | ALTER_RENAME | true |
DIFF00099993847 | raw_sql_destructive | SQL | accounts_943.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET description = CONCAT(description, quantity); | UPDATE_CONCAT | true |
DIFF00099993848 | raw_sql_destructive | SQL | accounts_630.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099993849 | obfuscated_destructive | SQL | subscriptions_840.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099993850 | test_suite_cleanup | SQL | tests/invoices_714.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN address; | DROP_COLUMN | false |
DIFF00099993851 | obfuscated_destructive | SQL | inventory_320.sql | schema cleanup | @@ -1,3 +1,3 @@
+update transactions set amount = concat(amount, quantity); | UPDATE_CONCAT | true |
DIFF00099993852 | general_code_change | Python | transactions_419.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099993853 | test_suite_cleanup | SQL | tests/employees_349.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00099993854 | orm_schema_change | JavaScript | products_342.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'email') | NONE | true |
DIFF00099993855 | general_code_change | Ruby | notifications_463.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993856 | orm_schema_change | TypeScript | refunds_296.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: is_active } | NONE | true |
DIFF00099993857 | raw_sql_safe | SQL | inventory_809.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099993858 | raw_sql_safe | SQL | customers_706.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE role = 'active'; | NONE | false |
DIFF00099993859 | orm_schema_change | Python | orders_294.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='phone') | NONE | true |
DIFF00099993860 | mentioned_in_comment | Python | customers_991.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN status;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099993861 | general_code_change | Python | tickets_684.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993862 | raw_sql_destructive | SQL | invoices_911.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN address; | DROP_COLUMN | true |
DIFF00099993863 | obfuscated_destructive | SQL | shipments_674.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
products
RENAME
COLUMN
category
TO
user_role; | ALTER_RENAME | true |
DIFF00099993864 | test_suite_cleanup | SQL | mysql-test/suite/customers_729.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00099993865 | raw_sql_safe | SQL | refunds_423.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET updated_at = %s WHERE status = %s; | NONE | false |
DIFF00099993866 | orm_schema_change | Python | inventory_329.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='score') | NONE | true |
DIFF00099993867 | general_code_change | TypeScript | orders_8.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 |
DIFF00099993868 | obfuscated_destructive | SQL | payments_197.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00099993869 | raw_sql_safe | SQL | orders_837.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE amount = 'active'; | NONE | false |
DIFF00099993870 | general_code_change | Ruby | inventory_10.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993871 | orm_schema_change | Ruby | orders_665.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :role | NONE | true |
DIFF00099993872 | general_code_change | Go | users_948.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993873 | obfuscated_destructive | SQL | invoices_233.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table tickets; | DROP_TABLE | true |
DIFF00099993874 | orm_schema_change | JavaScript | orders_413.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'metadata') | NONE | true |
DIFF00099993875 | raw_sql_destructive | SQL | users_729.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099993876 | obfuscated_destructive | SQL | payments_761.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
invoices; | TRUNCATE | true |
DIFF00099993877 | obfuscated_destructive | SQL | reviews_12.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCaTe TABlE INvoicEs; | TRUNCATE | true |
DIFF00099993878 | mentioned_in_comment | Python | notifications_674.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE comments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099993879 | general_code_change | Go | accounts_18.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993880 | orm_schema_change | Python | orders_515.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='role') | NONE | true |
DIFF00099993881 | orm_schema_change | Python | subscriptions_677.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='metadata') | NONE | true |
DIFF00099993882 | test_suite_cleanup | SQL | tests/payments_14.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00099993883 | mentioned_in_comment | Python | transactions_523.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions RENAME COLUMN address TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099993884 | general_code_change | TypeScript | sessions_111.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 |
DIFF00099993885 | general_code_change | TypeScript | employees_5.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 |
DIFF00099993886 | orm_schema_change | Python | inventory_530.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='created_at') | NONE | true |
DIFF00099993887 | orm_schema_change | Ruby | invoices_899.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :role | NONE | true |
DIFF00099993888 | orm_schema_change | Python | employees_935.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='is_active') | NONE | true |
DIFF00099993889 | obfuscated_destructive | SQL | sessions_483.sql | schema cleanup | @@ -1,3 +1,3 @@
+dEleTE frOm pAyMeNTS; | DELETE_UNQUALIFIED | true |
DIFF00099993890 | raw_sql_destructive | SQL | subscriptions_736.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00099993891 | raw_sql_destructive | SQL | accounts_718.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN category TO amount_cents; | ALTER_RENAME | true |
DIFF00099993892 | mentioned_in_comment | Python | refunds_192.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE reviews;") | TRUNCATE | false |
DIFF00099993893 | general_code_change | Go | reviews_206.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993894 | raw_sql_destructive | SQL | products_67.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00099993895 | test_suite_cleanup | SQL | test/tickets_315.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00099993896 | general_code_change | Ruby | transactions_285.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993897 | general_code_change | JavaScript | employees_459.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993898 | general_code_change | Python | transactions_625.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993899 | raw_sql_safe | SQL | notifications_965.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_amount ON invoices (score); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.