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 |
|---|---|---|---|---|---|---|---|
DIFF00099995200 | obfuscated_destructive | SQL | inventory_446.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtER tAblE NoTIFICAtiONs ReNaME CoLUmn cATeGoRy tO full_nAME; | ALTER_RENAME | true |
DIFF00099995201 | general_code_change | Ruby | shipments_169.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995202 | orm_schema_change | Python | orders_252.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='balance') | NONE | true |
DIFF00099995203 | obfuscated_destructive | SQL | sessions_349.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00099995204 | obfuscated_destructive | SQL | orders_453.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from accounts; | DELETE_UNQUALIFIED | true |
DIFF00099995205 | orm_schema_change | JavaScript | payments_529.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('price')) | NONE | true |
DIFF00099995206 | obfuscated_destructive | SQL | refunds_13.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE users SET role = CONCAT(role, score); | UPDATE_CONCAT | true |
DIFF00099995207 | general_code_change | Python | invoices_196.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995208 | orm_schema_change | JavaScript | invoices_18.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'order_id') | NONE | true |
DIFF00099995209 | general_code_change | Python | notifications_330.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995210 | general_code_change | Python | subscriptions_870.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995211 | raw_sql_safe | SQL | tickets_723.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET name = %s WHERE priority = %s; | NONE | false |
DIFF00099995212 | orm_schema_change | TypeScript | transactions_995.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: amount } | NONE | true |
DIFF00099995213 | general_code_change | Java | employees_179.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995214 | test_suite_cleanup | SQL | test/orders_850.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN email TO contact_email; | ALTER_RENAME | false |
DIFF00099995215 | mentioned_in_comment | Python | refunds_319.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM employees; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099995216 | general_code_change | JavaScript | logs_182.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 |
DIFF00099995217 | orm_schema_change | JavaScript | refunds_752.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'role') | NONE | true |
DIFF00099995218 | raw_sql_destructive | SQL | refunds_818.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099995219 | general_code_change | Ruby | employees_269.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995220 | general_code_change | Java | shipments_620.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995221 | obfuscated_destructive | SQL | employees_61.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00099995222 | test_suite_cleanup | SQL | spec/users_613.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE events SET user_id = CONCAT(user_id, price); | UPDATE_CONCAT | false |
DIFF00099995223 | obfuscated_destructive | SQL | reviews_126.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table subscriptions rename column role to amount_cents; | ALTER_RENAME | true |
DIFF00099995224 | orm_schema_change | Python | reviews_276.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='updated_at') | NONE | true |
DIFF00099995225 | raw_sql_safe | SQL | sessions_820.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_description ON reviews (address); | NONE | false |
DIFF00099995226 | test_suite_cleanup | SQL | spec/sessions_40.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN price TO state; | ALTER_RENAME | false |
DIFF00099995227 | obfuscated_destructive | SQL | inventory_16.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRUncate TAbLe USErs; | TRUNCATE | true |
DIFF00099995228 | obfuscated_destructive | SQL | refunds_710.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00099995229 | general_code_change | Go | customers_619.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995230 | obfuscated_destructive | SQL | notifications_79.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtER TabLE LogS REnAMe cOLUmN AdDREss tO UsEr_ROLE; | ALTER_RENAME | true |
DIFF00099995231 | orm_schema_change | TypeScript | employees_990.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: metadata } | NONE | true |
DIFF00099995232 | mentioned_in_comment | Python | orders_899.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM tickets;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099995233 | general_code_change | JavaScript | employees_158.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995234 | general_code_change | Go | comments_676.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995235 | orm_schema_change | TypeScript | users_963.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: score } | NONE | true |
DIFF00099995236 | raw_sql_safe | SQL | payments_419.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_metadata ON subscriptions (price); | NONE | false |
DIFF00099995237 | raw_sql_destructive | SQL | tickets_854.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET metadata = CONCAT(metadata, score); | UPDATE_CONCAT | true |
DIFF00099995238 | obfuscated_destructive | SQL | transactions_71.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLeTE FROM ShIPmEnTs; | DELETE_UNQUALIFIED | true |
DIFF00099995239 | mentioned_in_comment | Python | subscriptions_867.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE notifications RENAME COLUMN category TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099995240 | orm_schema_change | Ruby | users_100.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :phone | NONE | true |
DIFF00099995241 | obfuscated_destructive | SQL | products_627.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
transactions; | DROP_TABLE | true |
DIFF00099995242 | orm_schema_change | Ruby | invoices_430.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :order_id | NONE | true |
DIFF00099995243 | general_code_change | TypeScript | customers_359.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 |
DIFF00099995244 | general_code_change | Ruby | subscriptions_276.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995245 | test_suite_cleanup | SQL | mysql-test/suite/employees_135.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | false |
DIFF00099995246 | general_code_change | TypeScript | accounts_815.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 |
DIFF00099995247 | raw_sql_destructive | SQL | orders_826.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN score TO user_role; | ALTER_RENAME | true |
DIFF00099995248 | raw_sql_safe | SQL | users_106.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (description, price) VALUES (%s, %s); | NONE | false |
DIFF00099995249 | test_suite_cleanup | SQL | test/users_817.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN role; | DROP_COLUMN | false |
DIFF00099995250 | mentioned_in_comment | Python | events_463.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET email = CONCAT(email, score);") | UPDATE_CONCAT | false |
DIFF00099995251 | orm_schema_change | Ruby | subscriptions_640.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :updated_at | NONE | true |
DIFF00099995252 | raw_sql_safe | SQL | tickets_712.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_name ON orders (name); | NONE | false |
DIFF00099995253 | raw_sql_destructive | SQL | logs_773.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET amount = CONCAT(amount, created_at); | UPDATE_CONCAT | true |
DIFF00099995254 | mentioned_in_comment | Python | subscriptions_849.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE transactions RENAME COLUMN email TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099995255 | general_code_change | TypeScript | employees_321.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 |
DIFF00099995256 | test_suite_cleanup | SQL | tests/comments_75.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN role TO amount_cents; | ALTER_RENAME | false |
DIFF00099995257 | obfuscated_destructive | SQL | transactions_656.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE notifications SET description = CONCAT(description, priority); | UPDATE_CONCAT | true |
DIFF00099995258 | raw_sql_destructive | SQL | accounts_356.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN description; | DROP_COLUMN | true |
DIFF00099995259 | raw_sql_destructive | SQL | employees_790.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00099995260 | obfuscated_destructive | SQL | customers_324.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRuNCaTe taBlE emPLoYEES; | TRUNCATE | true |
DIFF00099995261 | test_suite_cleanup | SQL | mysql-test/suite/payments_767.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00099995262 | test_suite_cleanup | SQL | spec/sessions_349.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET name = CONCAT(name, role); | UPDATE_CONCAT | false |
DIFF00099995263 | orm_schema_change | Ruby | transactions_713.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :price | NONE | true |
DIFF00099995264 | general_code_change | TypeScript | employees_119.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 |
DIFF00099995265 | general_code_change | Go | accounts_753.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995266 | orm_schema_change | JavaScript | customers_18.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'email') | NONE | true |
DIFF00099995267 | general_code_change | Go | products_691.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995268 | obfuscated_destructive | SQL | shipments_829.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
notifications; | DELETE_UNQUALIFIED | true |
DIFF00099995269 | test_suite_cleanup | SQL | test/inventory_141.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN user_id TO state; | ALTER_RENAME | false |
DIFF00099995270 | raw_sql_safe | SQL | users_618.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099995271 | orm_schema_change | TypeScript | comments_981.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: score } | NONE | true |
DIFF00099995272 | raw_sql_destructive | SQL | users_532.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099995273 | raw_sql_safe | SQL | accounts_910.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET quantity = %s WHERE name = %s; | NONE | false |
DIFF00099995274 | orm_schema_change | JavaScript | inventory_842.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'price') | NONE | true |
DIFF00099995275 | mentioned_in_comment | Python | customers_654.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds DROP COLUMN amount;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099995276 | raw_sql_destructive | SQL | employees_949.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099995277 | orm_schema_change | Python | users_448.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='is_active') | NONE | true |
DIFF00099995278 | raw_sql_destructive | SQL | inventory_855.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN status; | DROP_COLUMN | true |
DIFF00099995279 | mentioned_in_comment | Python | customers_672.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM shipments;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099995280 | test_suite_cleanup | SQL | test/reviews_919.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN priority; | DROP_COLUMN | false |
DIFF00099995281 | orm_schema_change | TypeScript | inventory_852.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: user_id } | NONE | true |
DIFF00099995282 | general_code_change | TypeScript | payments_9.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 |
DIFF00099995283 | obfuscated_destructive | SQL | subscriptions_787.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00099995284 | test_suite_cleanup | SQL | mysql-test/suite/inventory_416.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN quantity TO user_role; | ALTER_RENAME | false |
DIFF00099995285 | test_suite_cleanup | SQL | tests/sessions_505.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | false |
DIFF00099995286 | general_code_change | Python | orders_236.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995287 | general_code_change | JavaScript | transactions_446.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995288 | orm_schema_change | JavaScript | inventory_463.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099995289 | orm_schema_change | TypeScript | products_978.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: metadata } | NONE | true |
DIFF00099995290 | raw_sql_destructive | SQL | transactions_381.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00099995291 | orm_schema_change | TypeScript | events_627.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: role } | NONE | true |
DIFF00099995292 | raw_sql_safe | SQL | events_238.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099995293 | obfuscated_destructive | SQL | tickets_347.sql | schema cleanup | @@ -1,3 +1,3 @@
+DRoP tAble eVentS; | DROP_TABLE | true |
DIFF00099995294 | orm_schema_change | Ruby | reviews_647.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :is_active | NONE | true |
DIFF00099995295 | orm_schema_change | Ruby | shipments_126.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :score | NONE | true |
DIFF00099995296 | general_code_change | Ruby | accounts_983.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995297 | raw_sql_safe | SQL | logs_939.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE address = 'active'; | NONE | false |
DIFF00099995298 | mentioned_in_comment | Python | comments_581.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE orders SET user_id = CONCAT(user_id, balance);") | UPDATE_CONCAT | false |
DIFF00099995299 | raw_sql_destructive | SQL | sessions_632.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.