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 |
|---|---|---|---|---|---|---|---|
DIFF00000000500 | orm_schema_change | JavaScript | comments_520.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('role')) | NONE | true |
DIFF00000000501 | raw_sql_safe | SQL | products_549.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE priority = 'active'; | NONE | false |
DIFF00000000502 | mentioned_in_comment | Python | customers_792.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM users;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000503 | orm_schema_change | Python | orders_774.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='address') | NONE | true |
DIFF00000000504 | raw_sql_destructive | SQL | payments_566.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET email = CONCAT(email, name); | UPDATE_CONCAT | true |
DIFF00000000505 | raw_sql_safe | SQL | events_140.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (metadata, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000000506 | raw_sql_safe | SQL | refunds_891.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE name = 'active'; | NONE | false |
DIFF00000000507 | general_code_change | Java | notifications_688.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000508 | general_code_change | Go | customers_384.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000509 | mentioned_in_comment | Python | customers_317.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees RENAME COLUMN phone TO full_name;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000000510 | general_code_change | JavaScript | payments_478.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000511 | raw_sql_safe | SQL | customers_842.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (name, email) VALUES (%s, %s); | NONE | false |
DIFF00000000512 | mentioned_in_comment | Python | shipments_135.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE inventory SET name = CONCAT(name, category); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000000513 | raw_sql_safe | SQL | inventory_985.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000000514 | general_code_change | JavaScript | invoices_77.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000515 | mentioned_in_comment | Python | accounts_388.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions DROP COLUMN order_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000516 | obfuscated_destructive | SQL | notifications_818.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table transactions; | TRUNCATE | true |
DIFF00000000517 | test_suite_cleanup | SQL | tests/employees_212.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00000000518 | obfuscated_destructive | SQL | inventory_244.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN address TO full_name; | ALTER_RENAME | true |
DIFF00000000519 | general_code_change | Ruby | comments_159.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000520 | raw_sql_destructive | SQL | tickets_502.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000000521 | raw_sql_safe | SQL | employees_364.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000000522 | mentioned_in_comment | Python | shipments_710.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM shipments;") | DELETE_UNQUALIFIED | false |
DIFF00000000523 | orm_schema_change | JavaScript | transactions_135.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'score') | NONE | true |
DIFF00000000524 | orm_schema_change | JavaScript | sessions_20.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'phone') | NONE | true |
DIFF00000000525 | general_code_change | Java | logs_783.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000526 | mentioned_in_comment | Python | reviews_601.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE products; -- now deprecated""" | DROP_TABLE | false |
DIFF00000000527 | mentioned_in_comment | Python | sessions_311.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE products; -- now deprecated""" | TRUNCATE | false |
DIFF00000000528 | general_code_change | JavaScript | shipments_520.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 |
DIFF00000000529 | general_code_change | Python | users_890.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000530 | orm_schema_change | JavaScript | logs_61.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'address') | NONE | true |
DIFF00000000531 | mentioned_in_comment | Python | refunds_997.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE comments SET is_active = CONCAT(is_active, status); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000000532 | obfuscated_destructive | SQL | events_313.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN category TO amount_cents; | ALTER_RENAME | true |
DIFF00000000533 | mentioned_in_comment | Python | invoices_985.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets DROP COLUMN score; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000000534 | orm_schema_change | TypeScript | products_742.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: priority } | NONE | true |
DIFF00000000535 | orm_schema_change | JavaScript | transactions_300.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'price') | NONE | true |
DIFF00000000536 | general_code_change | JavaScript | subscriptions_135.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000537 | test_suite_cleanup | SQL | tests/users_690.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | false |
DIFF00000000538 | raw_sql_destructive | SQL | invoices_217.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET name = CONCAT(name, user_id); | UPDATE_CONCAT | true |
DIFF00000000539 | general_code_change | JavaScript | customers_778.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000540 | mentioned_in_comment | Python | payments_757.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE customers; -- now deprecated""" | DROP_TABLE | false |
DIFF00000000541 | raw_sql_safe | SQL | comments_932.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_role ON users (email); | NONE | false |
DIFF00000000542 | mentioned_in_comment | Python | subscriptions_860.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE subscriptions DROP COLUMN order_id;") | DROP_COLUMN | false |
DIFF00000000543 | orm_schema_change | JavaScript | orders_431.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'updated_at') | NONE | true |
DIFF00000000544 | general_code_change | JavaScript | employees_897.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 |
DIFF00000000545 | general_code_change | JavaScript | comments_682.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 |
DIFF00000000546 | general_code_change | Python | reviews_721.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000547 | orm_schema_change | JavaScript | tickets_654.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'category') | NONE | true |
DIFF00000000548 | raw_sql_safe | SQL | users_6.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_metadata ON notifications (name); | NONE | false |
DIFF00000000549 | general_code_change | Go | notifications_603.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000550 | general_code_change | Python | tickets_653.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000551 | general_code_change | Python | inventory_149.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000552 | general_code_change | TypeScript | notifications_410.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 |
DIFF00000000553 | general_code_change | JavaScript | accounts_477.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 |
DIFF00000000554 | orm_schema_change | Python | tickets_479.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='address') | NONE | true |
DIFF00000000555 | raw_sql_destructive | SQL | reviews_921.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN balance TO full_name; | ALTER_RENAME | true |
DIFF00000000556 | orm_schema_change | JavaScript | transactions_186.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'address') | NONE | true |
DIFF00000000557 | general_code_change | TypeScript | notifications_351.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 |
DIFF00000000558 | orm_schema_change | Ruby | refunds_565.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :amount | NONE | true |
DIFF00000000559 | orm_schema_change | JavaScript | comments_785.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('user_id')) | NONE | true |
DIFF00000000560 | general_code_change | JavaScript | inventory_86.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000561 | mentioned_in_comment | Python | invoices_398.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE customers RENAME COLUMN user_id TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000000562 | mentioned_in_comment | Python | products_517.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM notifications;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000563 | raw_sql_destructive | SQL | transactions_661.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | true |
DIFF00000000564 | mentioned_in_comment | Python | employees_846.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM sessions;") | DELETE_UNQUALIFIED | false |
DIFF00000000565 | raw_sql_destructive | SQL | notifications_939.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET description = CONCAT(description, is_active); | UPDATE_CONCAT | true |
DIFF00000000566 | general_code_change | Python | shipments_970.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000567 | raw_sql_destructive | SQL | comments_543.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000000568 | general_code_change | TypeScript | invoices_692.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 |
DIFF00000000569 | test_suite_cleanup | SQL | test/notifications_952.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00000000570 | general_code_change | JavaScript | accounts_327.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 |
DIFF00000000571 | mentioned_in_comment | Python | users_702.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE payments; -- now deprecated""" | TRUNCATE | false |
DIFF00000000572 | raw_sql_destructive | SQL | users_994.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET score = CONCAT(score, balance); | UPDATE_CONCAT | true |
DIFF00000000573 | test_suite_cleanup | SQL | spec/events_676.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET updated_at = CONCAT(updated_at, price); | UPDATE_CONCAT | false |
DIFF00000000574 | mentioned_in_comment | Python | refunds_590.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE events;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000000575 | raw_sql_safe | SQL | transactions_50.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET price = %s WHERE metadata = %s; | NONE | false |
DIFF00000000576 | orm_schema_change | JavaScript | orders_82.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000000577 | orm_schema_change | JavaScript | events_241.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('orders', table => table.dropColumn('created_at')) | NONE | true |
DIFF00000000578 | orm_schema_change | JavaScript | sessions_622.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('score')) | NONE | true |
DIFF00000000579 | raw_sql_safe | SQL | reviews_383.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE email = 'active'; | NONE | false |
DIFF00000000580 | test_suite_cleanup | SQL | test/refunds_964.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000000581 | raw_sql_destructive | SQL | notifications_801.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000000582 | raw_sql_destructive | SQL | subscriptions_530.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000000583 | orm_schema_change | Python | reviews_403.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='price') | NONE | true |
DIFF00000000584 | raw_sql_destructive | SQL | payments_476.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000000585 | orm_schema_change | Python | customers_58.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='address') | NONE | true |
DIFF00000000586 | orm_schema_change | Python | customers_765.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='metadata') | NONE | true |
DIFF00000000587 | test_suite_cleanup | SQL | tests/invoices_236.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN amount TO state; | ALTER_RENAME | false |
DIFF00000000588 | raw_sql_destructive | SQL | employees_537.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000000589 | test_suite_cleanup | SQL | tests/comments_631.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00000000590 | orm_schema_change | Python | payments_757.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='address') | NONE | true |
DIFF00000000591 | orm_schema_change | Ruby | subscriptions_739.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :email | NONE | true |
DIFF00000000592 | obfuscated_destructive | SQL | subscriptions_390.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
accounts; | DROP_TABLE | true |
DIFF00000000593 | orm_schema_change | TypeScript | sessions_555.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: name } | NONE | true |
DIFF00000000594 | general_code_change | JavaScript | orders_334.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 |
DIFF00000000595 | general_code_change | TypeScript | products_255.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 |
DIFF00000000596 | general_code_change | Python | invoices_887.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000597 | orm_schema_change | Ruby | invoices_519.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :quantity | NONE | true |
DIFF00000000598 | raw_sql_safe | SQL | payments_744.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_address ON logs (balance); | NONE | false |
DIFF00000000599 | general_code_change | JavaScript | notifications_335.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.