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 |
|---|---|---|---|---|---|---|---|
DIFF00099997400 | raw_sql_destructive | SQL | logs_404.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00099997401 | general_code_change | TypeScript | orders_512.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 |
DIFF00099997402 | mentioned_in_comment | Python | employees_634.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE invoices;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099997403 | mentioned_in_comment | Python | notifications_549.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE accounts;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099997404 | general_code_change | Ruby | subscriptions_394.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997405 | raw_sql_destructive | SQL | comments_956.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00099997406 | general_code_change | Python | payments_827.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997407 | obfuscated_destructive | SQL | comments_6.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00099997408 | general_code_change | Ruby | users_884.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997409 | general_code_change | Go | accounts_821.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997410 | raw_sql_safe | SQL | employees_622.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_events_created_at ON events (description); | NONE | false |
DIFF00099997411 | mentioned_in_comment | Python | users_965.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE refunds RENAME COLUMN status TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099997412 | orm_schema_change | JavaScript | employees_182.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'created_at') | NONE | true |
DIFF00099997413 | raw_sql_destructive | SQL | refunds_705.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00099997414 | obfuscated_destructive | SQL | notifications_148.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN updated_at TO amount_cents; | ALTER_RENAME | true |
DIFF00099997415 | raw_sql_safe | SQL | sessions_633.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE quantity = 'active'; | NONE | false |
DIFF00099997416 | general_code_change | Python | invoices_175.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997417 | general_code_change | JavaScript | reviews_728.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 |
DIFF00099997418 | orm_schema_change | TypeScript | events_122.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: user_id } | NONE | true |
DIFF00099997419 | test_suite_cleanup | SQL | test/invoices_684.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN updated_at; | DROP_COLUMN | false |
DIFF00099997420 | test_suite_cleanup | SQL | tests/notifications_990.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET created_at = CONCAT(created_at, balance); | UPDATE_CONCAT | false |
DIFF00099997421 | mentioned_in_comment | Python | transactions_553.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE inventory;") | DROP_TABLE | false |
DIFF00099997422 | raw_sql_safe | SQL | tickets_129.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (created_at, priority) VALUES (%s, %s); | NONE | false |
DIFF00099997423 | mentioned_in_comment | Python | products_910.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE comments DROP COLUMN quantity; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997424 | raw_sql_safe | SQL | invoices_207.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099997425 | orm_schema_change | Python | subscriptions_452.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='amount') | NONE | true |
DIFF00099997426 | test_suite_cleanup | SQL | tests/shipments_338.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00099997427 | general_code_change | Java | sessions_541.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997428 | general_code_change | TypeScript | payments_542.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 |
DIFF00099997429 | raw_sql_safe | SQL | customers_19.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE price = 'active'; | NONE | false |
DIFF00099997430 | obfuscated_destructive | SQL | comments_445.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099997431 | test_suite_cleanup | SQL | mysql-test/suite/reviews_248.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00099997432 | raw_sql_destructive | SQL | users_536.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN balance TO amount_cents; | ALTER_RENAME | true |
DIFF00099997433 | general_code_change | Ruby | employees_171.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997434 | raw_sql_destructive | SQL | accounts_63.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099997435 | raw_sql_safe | SQL | invoices_39.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (order_id, score) VALUES (%s, %s); | NONE | false |
DIFF00099997436 | general_code_change | Go | reviews_983.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997437 | orm_schema_change | JavaScript | products_2.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('role')) | NONE | true |
DIFF00099997438 | general_code_change | JavaScript | sessions_418.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997439 | general_code_change | TypeScript | products_11.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 |
DIFF00099997440 | raw_sql_safe | SQL | tickets_105.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (status, user_id) VALUES (%s, %s); | NONE | false |
DIFF00099997441 | orm_schema_change | JavaScript | orders_308.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'role') | NONE | true |
DIFF00099997442 | general_code_change | Python | payments_549.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997443 | general_code_change | TypeScript | shipments_921.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 |
DIFF00099997444 | orm_schema_change | TypeScript | comments_492.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: user_id } | NONE | true |
DIFF00099997445 | orm_schema_change | TypeScript | subscriptions_310.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: email } | NONE | true |
DIFF00099997446 | raw_sql_destructive | SQL | users_17.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN price; | DROP_COLUMN | true |
DIFF00099997447 | general_code_change | JavaScript | employees_108.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997448 | obfuscated_destructive | SQL | events_127.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
refunds; | DELETE_UNQUALIFIED | true |
DIFF00099997449 | obfuscated_destructive | SQL | employees_660.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
reviews
RENAME
COLUMN
created_at
TO
user_role; | ALTER_RENAME | true |
DIFF00099997450 | raw_sql_safe | SQL | customers_543.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE is_active = 'active'; | NONE | false |
DIFF00099997451 | raw_sql_destructive | SQL | tickets_903.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00099997452 | test_suite_cleanup | SQL | spec/customers_197.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00099997453 | raw_sql_destructive | SQL | transactions_627.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN score TO amount_cents; | ALTER_RENAME | true |
DIFF00099997454 | raw_sql_safe | SQL | products_494.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE email = 'active'; | NONE | false |
DIFF00099997455 | general_code_change | JavaScript | products_621.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 |
DIFF00099997456 | raw_sql_safe | SQL | sessions_744.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE status = 'active'; | NONE | false |
DIFF00099997457 | test_suite_cleanup | SQL | spec/payments_783.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00099997458 | mentioned_in_comment | Python | shipments_124.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE shipments;") | TRUNCATE | false |
DIFF00099997459 | general_code_change | Python | products_284.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997460 | raw_sql_safe | SQL | products_758.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE balance = 'active'; | NONE | false |
DIFF00099997461 | obfuscated_destructive | SQL | accounts_773.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALter TABlE TIckeTs DROp CoLuMN IS_AcTivE; | DROP_COLUMN | true |
DIFF00099997462 | orm_schema_change | Python | notifications_87.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='priority') | NONE | true |
DIFF00099997463 | mentioned_in_comment | Python | orders_31.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions DROP COLUMN user_id; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997464 | raw_sql_safe | SQL | products_364.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE score = 'active'; | NONE | false |
DIFF00099997465 | raw_sql_destructive | SQL | sessions_660.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00099997466 | raw_sql_destructive | SQL | shipments_256.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00099997467 | orm_schema_change | Python | comments_195.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='balance') | NONE | true |
DIFF00099997468 | mentioned_in_comment | Python | sessions_878.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET score = CONCAT(score, quantity);") | UPDATE_CONCAT | false |
DIFF00099997469 | test_suite_cleanup | SQL | test/comments_625.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET updated_at = CONCAT(updated_at, status); | UPDATE_CONCAT | false |
DIFF00099997470 | raw_sql_safe | SQL | logs_134.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET status = %s WHERE order_id = %s; | NONE | false |
DIFF00099997471 | raw_sql_safe | SQL | users_722.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE category = 'active'; | NONE | false |
DIFF00099997472 | raw_sql_destructive | SQL | products_847.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00099997473 | raw_sql_safe | SQL | employees_651.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (metadata, order_id) VALUES (%s, %s); | NONE | false |
DIFF00099997474 | general_code_change | Java | accounts_531.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997475 | obfuscated_destructive | SQL | refunds_516.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
orders
RENAME
COLUMN
amount
TO
contact_email; | ALTER_RENAME | true |
DIFF00099997476 | general_code_change | Python | tickets_425.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997477 | general_code_change | JavaScript | subscriptions_598.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997478 | mentioned_in_comment | Python | customers_344.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE products DROP COLUMN balance; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997479 | general_code_change | Java | reviews_960.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997480 | raw_sql_safe | SQL | users_703.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = %s WHERE created_at = %s; | NONE | false |
DIFF00099997481 | raw_sql_destructive | SQL | events_281.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00099997482 | test_suite_cleanup | SQL | tests/invoices_529.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00099997483 | general_code_change | Python | orders_94.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997484 | raw_sql_destructive | SQL | comments_945.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00099997485 | general_code_change | Go | tickets_282.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997486 | raw_sql_destructive | SQL | employees_30.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00099997487 | general_code_change | Python | accounts_611.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997488 | obfuscated_destructive | SQL | inventory_345.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeleTE from CUsTOMeRs; | DELETE_UNQUALIFIED | true |
DIFF00099997489 | obfuscated_destructive | SQL | events_288.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099997490 | orm_schema_change | TypeScript | inventory_375.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: description } | NONE | true |
DIFF00099997491 | raw_sql_safe | SQL | comments_315.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE quantity = 'active'; | NONE | false |
DIFF00099997492 | obfuscated_destructive | SQL | employees_375.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN priority TO contact_email; | ALTER_RENAME | true |
DIFF00099997493 | test_suite_cleanup | SQL | tests/shipments_707.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00099997494 | raw_sql_safe | SQL | payments_493.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997495 | general_code_change | Go | subscriptions_574.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997496 | general_code_change | Go | accounts_116.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997497 | raw_sql_safe | SQL | customers_216.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE balance = 'active'; | NONE | false |
DIFF00099997498 | obfuscated_destructive | SQL | accounts_560.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
orders; | TRUNCATE | true |
DIFF00099997499 | orm_schema_change | JavaScript | orders_805.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('order_id')) | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.