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 |
|---|---|---|---|---|---|---|---|
DIFF00000007500 | test_suite_cleanup | SQL | tests/logs_902.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET price = CONCAT(price, role); | UPDATE_CONCAT | false |
DIFF00000007501 | raw_sql_safe | SQL | reviews_901.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE address = 'active'; | NONE | false |
DIFF00000007502 | orm_schema_change | Python | tickets_9.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='amount') | NONE | true |
DIFF00000007503 | raw_sql_safe | SQL | employees_662.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007504 | general_code_change | JavaScript | payments_284.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007505 | raw_sql_safe | SQL | products_597.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET description = %s WHERE score = %s; | NONE | false |
DIFF00000007506 | orm_schema_change | JavaScript | customers_413.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000007507 | test_suite_cleanup | SQL | spec/customers_778.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | false |
DIFF00000007508 | orm_schema_change | JavaScript | accounts_233.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'description') | NONE | true |
DIFF00000007509 | general_code_change | Go | accounts_638.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007510 | raw_sql_safe | SQL | refunds_459.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE role = 'active'; | NONE | false |
DIFF00000007511 | orm_schema_change | TypeScript | comments_168.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: order_id } | NONE | true |
DIFF00000007512 | general_code_change | Go | subscriptions_253.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007513 | general_code_change | Java | employees_120.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007514 | general_code_change | JavaScript | employees_16.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007515 | raw_sql_destructive | SQL | accounts_180.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET score = CONCAT(score, phone); | UPDATE_CONCAT | true |
DIFF00000007516 | raw_sql_safe | SQL | employees_708.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007517 | general_code_change | Ruby | events_415.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007518 | general_code_change | TypeScript | events_181.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 |
DIFF00000007519 | orm_schema_change | JavaScript | transactions_745.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('address')) | NONE | true |
DIFF00000007520 | raw_sql_safe | SQL | accounts_573.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET status = %s WHERE price = %s; | NONE | false |
DIFF00000007521 | raw_sql_safe | SQL | accounts_644.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET phone = %s WHERE category = %s; | NONE | false |
DIFF00000007522 | raw_sql_destructive | SQL | shipments_748.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000007523 | obfuscated_destructive | SQL | events_516.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table invoices; | DROP_TABLE | true |
DIFF00000007524 | raw_sql_destructive | SQL | refunds_322.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000007525 | general_code_change | Go | users_214.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007526 | general_code_change | Go | users_331.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007527 | general_code_change | JavaScript | products_215.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007528 | raw_sql_destructive | SQL | reviews_508.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000007529 | obfuscated_destructive | SQL | transactions_236.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE reviews SET created_at = CONCAT(created_at, address); | UPDATE_CONCAT | true |
DIFF00000007530 | general_code_change | JavaScript | payments_620.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007531 | test_suite_cleanup | SQL | mysql-test/suite/reviews_270.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000007532 | raw_sql_destructive | SQL | tickets_358.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000007533 | obfuscated_destructive | SQL | notifications_895.sql | schema cleanup | @@ -1,3 +1,3 @@
+dELEte From ReviEwS; | DELETE_UNQUALIFIED | true |
DIFF00000007534 | test_suite_cleanup | SQL | spec/shipments_541.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00000007535 | obfuscated_destructive | SQL | invoices_662.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table orders rename column priority to state; | ALTER_RENAME | true |
DIFF00000007536 | general_code_change | Python | customers_551.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007537 | raw_sql_destructive | SQL | orders_135.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000007538 | raw_sql_destructive | SQL | shipments_733.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000007539 | raw_sql_destructive | SQL | notifications_61.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000007540 | orm_schema_change | Python | users_915.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='metadata') | NONE | true |
DIFF00000007541 | raw_sql_destructive | SQL | invoices_179.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000007542 | orm_schema_change | Python | products_930.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='description') | NONE | true |
DIFF00000007543 | general_code_change | Go | inventory_179.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007544 | general_code_change | Ruby | notifications_530.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007545 | general_code_change | Java | invoices_490.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007546 | test_suite_cleanup | SQL | spec/customers_213.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN updated_at; | DROP_COLUMN | false |
DIFF00000007547 | obfuscated_destructive | SQL | sessions_103.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTEr TAblE sHipMENts renaME coLuMn quanTITY tO CoNTact_EMAIl; | ALTER_RENAME | true |
DIFF00000007548 | orm_schema_change | JavaScript | payments_8.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'address') | NONE | true |
DIFF00000007549 | orm_schema_change | JavaScript | customers_429.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('priority')) | NONE | true |
DIFF00000007550 | raw_sql_destructive | SQL | shipments_835.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000007551 | raw_sql_destructive | SQL | orders_560.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00000007552 | mentioned_in_comment | Python | products_391.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions RENAME COLUMN email TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007553 | obfuscated_destructive | SQL | reviews_849.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table notifications; | TRUNCATE | true |
DIFF00000007554 | obfuscated_destructive | SQL | notifications_411.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLeTe fROm aCCouNTS; | DELETE_UNQUALIFIED | true |
DIFF00000007555 | obfuscated_destructive | SQL | transactions_886.sql | schema cleanup | @@ -1,3 +1,3 @@
+DroP tABlE iNvoiCEs; | DROP_TABLE | true |
DIFF00000007556 | raw_sql_destructive | SQL | refunds_194.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000007557 | obfuscated_destructive | SQL | accounts_565.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTEr Table sessIonS RENAME CoLUMN nAmE to Full_NAme; | ALTER_RENAME | true |
DIFF00000007558 | general_code_change | Python | reviews_467.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007559 | test_suite_cleanup | SQL | spec/sessions_288.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN updated_at TO state; | ALTER_RENAME | false |
DIFF00000007560 | general_code_change | JavaScript | orders_1.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 |
DIFF00000007561 | raw_sql_destructive | SQL | refunds_560.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000007562 | orm_schema_change | Ruby | shipments_42.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :metadata | NONE | true |
DIFF00000007563 | test_suite_cleanup | SQL | spec/orders_60.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
DIFF00000007564 | test_suite_cleanup | SQL | spec/comments_929.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN balance TO full_name; | ALTER_RENAME | false |
DIFF00000007565 | obfuscated_destructive | SQL | shipments_218.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTeR tabLE PAYmeNts drop CoLumN AMOuNt; | DROP_COLUMN | true |
DIFF00000007566 | orm_schema_change | JavaScript | orders_58.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('priority')) | NONE | true |
DIFF00000007567 | mentioned_in_comment | Python | payments_459.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE inventory;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000007568 | raw_sql_safe | SQL | logs_742.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE user_id = 'active'; | NONE | false |
DIFF00000007569 | raw_sql_destructive | SQL | shipments_584.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000007570 | general_code_change | TypeScript | comments_580.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 |
DIFF00000007571 | general_code_change | JavaScript | orders_88.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007572 | raw_sql_safe | SQL | logs_569.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE name = 'active'; | NONE | false |
DIFF00000007573 | general_code_change | TypeScript | invoices_439.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 |
DIFF00000007574 | obfuscated_destructive | SQL | reviews_302.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELeTE FroM seSsioNS; | DELETE_UNQUALIFIED | true |
DIFF00000007575 | raw_sql_safe | SQL | customers_69.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_events_price ON events (priority); | NONE | false |
DIFF00000007576 | raw_sql_safe | SQL | transactions_531.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET status = %s WHERE status = %s; | NONE | false |
DIFF00000007577 | raw_sql_destructive | SQL | customers_35.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000007578 | test_suite_cleanup | SQL | mysql-test/suite/sessions_80.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | false |
DIFF00000007579 | orm_schema_change | Python | logs_828.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='order_id') | NONE | true |
DIFF00000007580 | test_suite_cleanup | SQL | mysql-test/suite/shipments_744.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00000007581 | obfuscated_destructive | SQL | customers_952.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
tickets
SET
price
=
CONCAT(price,
amount); | UPDATE_CONCAT | true |
DIFF00000007582 | mentioned_in_comment | Python | accounts_583.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM users;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000007583 | raw_sql_safe | SQL | comments_431.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET user_id = %s WHERE order_id = %s; | NONE | false |
DIFF00000007584 | raw_sql_destructive | SQL | shipments_972.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000007585 | raw_sql_safe | SQL | products_959.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007586 | raw_sql_destructive | SQL | accounts_862.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET phone = CONCAT(phone, quantity); | UPDATE_CONCAT | true |
DIFF00000007587 | obfuscated_destructive | SQL | comments_759.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
sessions; | DROP_TABLE | true |
DIFF00000007588 | general_code_change | Ruby | customers_68.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007589 | orm_schema_change | Ruby | accounts_361.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :name | NONE | true |
DIFF00000007590 | test_suite_cleanup | SQL | spec/orders_668.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN phone TO user_role; | ALTER_RENAME | false |
DIFF00000007591 | orm_schema_change | Ruby | comments_797.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :email | NONE | true |
DIFF00000007592 | general_code_change | TypeScript | notifications_318.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 |
DIFF00000007593 | raw_sql_destructive | SQL | shipments_260.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000007594 | raw_sql_destructive | SQL | logs_387.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000007595 | obfuscated_destructive | SQL | transactions_277.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from invoices; | DELETE_UNQUALIFIED | true |
DIFF00000007596 | obfuscated_destructive | SQL | shipments_41.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000007597 | orm_schema_change | Ruby | comments_145.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :created_at | NONE | true |
DIFF00000007598 | mentioned_in_comment | Python | subscriptions_606.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE invoices;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000007599 | orm_schema_change | Ruby | reviews_83.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :price | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.