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 |
|---|---|---|---|---|---|---|---|
DIFF00000000100 | raw_sql_safe | SQL | users_844.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000000101 | raw_sql_destructive | SQL | products_723.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000000102 | orm_schema_change | TypeScript | inventory_740.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: created_at } | NONE | true |
DIFF00000000103 | raw_sql_destructive | SQL | shipments_417.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00000000104 | mentioned_in_comment | Python | orders_255.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE tickets; -- now deprecated""" | TRUNCATE | false |
DIFF00000000105 | mentioned_in_comment | Python | notifications_528.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts RENAME COLUMN updated_at TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000000106 | general_code_change | Python | invoices_876.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000107 | general_code_change | TypeScript | subscriptions_347.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 |
DIFF00000000108 | test_suite_cleanup | SQL | test/comments_845.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET quantity = CONCAT(quantity, user_id); | UPDATE_CONCAT | false |
DIFF00000000109 | general_code_change | Python | orders_797.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000110 | raw_sql_safe | SQL | payments_813.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET balance = %s WHERE metadata = %s; | NONE | false |
DIFF00000000111 | raw_sql_destructive | SQL | events_890.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000000112 | test_suite_cleanup | SQL | spec/invoices_394.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET created_at = CONCAT(created_at, user_id); | UPDATE_CONCAT | false |
DIFF00000000113 | general_code_change | JavaScript | shipments_10.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000114 | mentioned_in_comment | Python | tickets_996.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE sessions; -- now deprecated""" | TRUNCATE | false |
DIFF00000000115 | mentioned_in_comment | Python | customers_189.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE customers;") | DROP_TABLE | false |
DIFF00000000116 | general_code_change | Ruby | tickets_892.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000117 | orm_schema_change | JavaScript | inventory_864.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('category')) | NONE | true |
DIFF00000000118 | obfuscated_destructive | SQL | notifications_482.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from shipments; | DELETE_UNQUALIFIED | true |
DIFF00000000119 | general_code_change | Ruby | invoices_6.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000120 | mentioned_in_comment | Python | sessions_627.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE refunds;") | TRUNCATE | false |
DIFF00000000121 | obfuscated_destructive | SQL | shipments_977.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
transactions
SET
priority
=
CONCAT(priority,
user_id); | UPDATE_CONCAT | true |
DIFF00000000122 | general_code_change | JavaScript | products_315.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 |
DIFF00000000123 | raw_sql_safe | SQL | orders_798.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE role = 'active'; | NONE | false |
DIFF00000000124 | obfuscated_destructive | SQL | shipments_229.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
events
RENAME
COLUMN
amount
TO
state; | ALTER_RENAME | true |
DIFF00000000125 | mentioned_in_comment | Python | users_174.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE transactions SET created_at = CONCAT(created_at, created_at);") | UPDATE_CONCAT | false |
DIFF00000000126 | raw_sql_destructive | SQL | employees_742.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET is_active = CONCAT(is_active, phone); | UPDATE_CONCAT | true |
DIFF00000000127 | mentioned_in_comment | Python | orders_259.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE reviews;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000000128 | raw_sql_destructive | SQL | payments_951.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000000129 | general_code_change | JavaScript | accounts_712.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 |
DIFF00000000130 | orm_schema_change | TypeScript | inventory_164.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: role } | NONE | true |
DIFF00000000131 | raw_sql_safe | SQL | refunds_334.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (status, status) VALUES (%s, %s); | NONE | false |
DIFF00000000132 | obfuscated_destructive | SQL | orders_628.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000000133 | orm_schema_change | Ruby | accounts_789.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :phone | NONE | true |
DIFF00000000134 | general_code_change | Java | payments_263.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000135 | test_suite_cleanup | SQL | tests/refunds_768.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000000136 | general_code_change | JavaScript | events_538.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000137 | raw_sql_safe | SQL | logs_708.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (category, name) VALUES (%s, %s); | NONE | false |
DIFF00000000138 | raw_sql_safe | SQL | employees_137.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_user_id ON transactions (created_at); | NONE | false |
DIFF00000000139 | obfuscated_destructive | SQL | transactions_938.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000000140 | obfuscated_destructive | SQL | accounts_380.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000000141 | raw_sql_destructive | SQL | products_361.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000000142 | test_suite_cleanup | SQL | tests/employees_844.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00000000143 | general_code_change | JavaScript | tickets_433.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 |
DIFF00000000144 | mentioned_in_comment | Python | events_553.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN phone TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000000145 | general_code_change | JavaScript | employees_723.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000146 | general_code_change | Java | reviews_21.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000147 | raw_sql_destructive | SQL | employees_587.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000000148 | orm_schema_change | JavaScript | accounts_605.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000000149 | raw_sql_safe | SQL | comments_70.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_phone ON subscriptions (description); | NONE | false |
DIFF00000000150 | general_code_change | Python | transactions_432.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000151 | orm_schema_change | Ruby | invoices_650.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :order_id | NONE | true |
DIFF00000000152 | test_suite_cleanup | SQL | spec/products_95.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | false |
DIFF00000000153 | orm_schema_change | Python | reviews_530.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='updated_at') | NONE | true |
DIFF00000000154 | test_suite_cleanup | SQL | tests/transactions_266.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00000000155 | general_code_change | Python | sessions_891.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000156 | raw_sql_destructive | SQL | logs_939.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET metadata = CONCAT(metadata, description); | UPDATE_CONCAT | true |
DIFF00000000157 | general_code_change | TypeScript | comments_957.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 |
DIFF00000000158 | raw_sql_destructive | SQL | products_704.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE employees SET score = CONCAT(score, order_id); | UPDATE_CONCAT | true |
DIFF00000000159 | orm_schema_change | JavaScript | refunds_747.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'name') | NONE | true |
DIFF00000000160 | obfuscated_destructive | SQL | notifications_107.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000000161 | general_code_change | JavaScript | accounts_267.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000162 | raw_sql_safe | SQL | products_541.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET phone = %s WHERE priority = %s; | NONE | false |
DIFF00000000163 | general_code_change | JavaScript | products_86.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 |
DIFF00000000164 | general_code_change | Java | logs_194.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000165 | raw_sql_safe | SQL | sessions_792.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000000166 | general_code_change | Java | users_219.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000167 | obfuscated_destructive | SQL | events_664.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLEtE fRoM EVEnTs; | DELETE_UNQUALIFIED | true |
DIFF00000000168 | general_code_change | JavaScript | payments_98.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 |
DIFF00000000169 | orm_schema_change | Ruby | employees_700.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :role | NONE | true |
DIFF00000000170 | orm_schema_change | JavaScript | accounts_416.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'amount') | NONE | true |
DIFF00000000171 | mentioned_in_comment | Python | sessions_944.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE transactions; -- now deprecated""" | TRUNCATE | false |
DIFF00000000172 | orm_schema_change | Python | employees_30.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='email') | NONE | true |
DIFF00000000173 | general_code_change | JavaScript | transactions_404.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 |
DIFF00000000174 | test_suite_cleanup | SQL | mysql-test/suite/events_242.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000000175 | mentioned_in_comment | Python | reviews_750.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE payments DROP COLUMN balance;") | DROP_COLUMN | false |
DIFF00000000176 | raw_sql_destructive | SQL | comments_414.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000000177 | raw_sql_safe | SQL | inventory_424.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_description ON tickets (updated_at); | NONE | false |
DIFF00000000178 | general_code_change | Python | employees_15.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000179 | obfuscated_destructive | SQL | events_529.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000000180 | general_code_change | JavaScript | accounts_212.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 |
DIFF00000000181 | raw_sql_destructive | SQL | reviews_296.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000000182 | raw_sql_safe | SQL | inventory_909.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (balance, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000000183 | raw_sql_destructive | SQL | events_86.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000000184 | raw_sql_safe | SQL | reviews_20.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE name = 'active'; | NONE | false |
DIFF00000000185 | mentioned_in_comment | Python | inventory_474.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE reviews; -- now deprecated""" | DROP_TABLE | false |
DIFF00000000186 | test_suite_cleanup | SQL | tests/subscriptions_502.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN phone TO state; | ALTER_RENAME | false |
DIFF00000000187 | raw_sql_destructive | SQL | orders_786.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN address TO state; | ALTER_RENAME | true |
DIFF00000000188 | general_code_change | Python | logs_444.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000189 | obfuscated_destructive | SQL | orders_469.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from logs; | DELETE_UNQUALIFIED | true |
DIFF00000000190 | orm_schema_change | Ruby | transactions_93.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :amount | NONE | true |
DIFF00000000191 | general_code_change | Java | inventory_370.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000192 | obfuscated_destructive | SQL | invoices_675.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000000193 | test_suite_cleanup | SQL | mysql-test/suite/tickets_861.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00000000194 | general_code_change | JavaScript | payments_32.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 |
DIFF00000000195 | obfuscated_destructive | SQL | subscriptions_626.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table refunds drop column price; | DROP_COLUMN | true |
DIFF00000000196 | orm_schema_change | TypeScript | employees_593.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: role } | NONE | true |
DIFF00000000197 | test_suite_cleanup | SQL | spec/reviews_584.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN description TO amount_cents; | ALTER_RENAME | false |
DIFF00000000198 | test_suite_cleanup | SQL | mysql-test/suite/shipments_717.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00000000199 | general_code_change | Python | invoices_667.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.