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 |
|---|---|---|---|---|---|---|---|
DIFF00000005600 | general_code_change | TypeScript | users_681.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 |
DIFF00000005601 | raw_sql_safe | SQL | employees_215.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000005602 | mentioned_in_comment | Python | orders_159.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets RENAME COLUMN email TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000005603 | raw_sql_safe | SQL | logs_943.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000005604 | test_suite_cleanup | SQL | mysql-test/suite/accounts_974.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000005605 | raw_sql_safe | SQL | customers_974.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE status = 'active'; | NONE | false |
DIFF00000005606 | mentioned_in_comment | Python | tickets_928.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE orders;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000005607 | raw_sql_destructive | SQL | sessions_49.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000005608 | mentioned_in_comment | Python | notifications_952.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments DROP COLUMN user_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000005609 | orm_schema_change | JavaScript | comments_578.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000005610 | orm_schema_change | Ruby | tickets_387.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :quantity | NONE | true |
DIFF00000005611 | test_suite_cleanup | SQL | test/employees_553.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00000005612 | general_code_change | Java | payments_917.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005613 | raw_sql_destructive | SQL | subscriptions_489.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET category = CONCAT(category, email); | UPDATE_CONCAT | true |
DIFF00000005614 | general_code_change | JavaScript | refunds_400.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005615 | obfuscated_destructive | SQL | notifications_42.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN user_id TO full_name; | ALTER_RENAME | true |
DIFF00000005616 | raw_sql_safe | SQL | users_475.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000005617 | mentioned_in_comment | Python | payments_125.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE tickets SET description = CONCAT(description, description); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000005618 | orm_schema_change | JavaScript | comments_337.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('role')) | NONE | true |
DIFF00000005619 | raw_sql_safe | SQL | invoices_993.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_is_active ON refunds (address); | NONE | false |
DIFF00000005620 | obfuscated_destructive | SQL | notifications_129.sql | schema cleanup | @@ -1,3 +1,3 @@
+DRoP table ReViews; | DROP_TABLE | true |
DIFF00000005621 | general_code_change | Python | users_726.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005622 | general_code_change | Java | inventory_991.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005623 | orm_schema_change | JavaScript | subscriptions_610.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('address')) | NONE | true |
DIFF00000005624 | test_suite_cleanup | SQL | tests/users_675.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN price; | DROP_COLUMN | false |
DIFF00000005625 | raw_sql_safe | SQL | comments_299.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO transactions (created_at, score) VALUES (%s, %s); | NONE | false |
DIFF00000005626 | obfuscated_destructive | SQL | payments_449.sql | schema cleanup | @@ -1,3 +1,3 @@
+alTeR taBlE EMPloyEEs rEname COlUmN DEsCrIPtIOn tO fuLL_namE; | ALTER_RENAME | true |
DIFF00000005627 | orm_schema_change | JavaScript | transactions_257.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('user_id')) | NONE | true |
DIFF00000005628 | test_suite_cleanup | SQL | test/users_957.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET user_id = CONCAT(user_id, phone); | UPDATE_CONCAT | false |
DIFF00000005629 | general_code_change | JavaScript | customers_162.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 |
DIFF00000005630 | general_code_change | JavaScript | reviews_759.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005631 | orm_schema_change | Python | inventory_449.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='status') | NONE | true |
DIFF00000005632 | raw_sql_safe | SQL | reviews_309.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_updated_at ON customers (status); | NONE | false |
DIFF00000005633 | general_code_change | JavaScript | reviews_991.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 |
DIFF00000005634 | general_code_change | TypeScript | customers_122.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 |
DIFF00000005635 | obfuscated_destructive | SQL | payments_683.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table employees rename column name to contact_email; | ALTER_RENAME | true |
DIFF00000005636 | general_code_change | Ruby | employees_151.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005637 | general_code_change | Go | sessions_24.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005638 | obfuscated_destructive | SQL | notifications_309.sql | schema cleanup | @@ -1,3 +1,3 @@
+update events set status = concat(status, created_at); | UPDATE_CONCAT | true |
DIFF00000005639 | general_code_change | Python | users_389.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005640 | general_code_change | JavaScript | tickets_639.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 |
DIFF00000005641 | general_code_change | JavaScript | users_423.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 |
DIFF00000005642 | orm_schema_change | Python | invoices_468.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='order_id') | NONE | true |
DIFF00000005643 | obfuscated_destructive | SQL | accounts_247.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTeR TAblE REFunDs DRoP COlUMN SCORE; | DROP_COLUMN | true |
DIFF00000005644 | raw_sql_destructive | SQL | tickets_688.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000005645 | test_suite_cleanup | SQL | test/accounts_665.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000005646 | raw_sql_destructive | SQL | products_171.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000005647 | general_code_change | TypeScript | employees_110.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 |
DIFF00000005648 | orm_schema_change | JavaScript | orders_30.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000005649 | obfuscated_destructive | SQL | refunds_444.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
customers; | DROP_TABLE | true |
DIFF00000005650 | mentioned_in_comment | Python | reviews_237.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE subscriptions SET updated_at = CONCAT(updated_at, score);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000005651 | raw_sql_destructive | SQL | payments_404.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000005652 | mentioned_in_comment | Python | shipments_212.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE payments;") | DROP_TABLE | false |
DIFF00000005653 | mentioned_in_comment | Python | orders_209.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE employees;") | DROP_TABLE | false |
DIFF00000005654 | mentioned_in_comment | Python | logs_590.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE products SET email = CONCAT(email, is_active);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000005655 | raw_sql_safe | SQL | users_312.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000005656 | orm_schema_change | Ruby | refunds_33.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :email | NONE | true |
DIFF00000005657 | obfuscated_destructive | SQL | refunds_90.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000005658 | orm_schema_change | Python | employees_35.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='role') | NONE | true |
DIFF00000005659 | general_code_change | JavaScript | inventory_216.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 |
DIFF00000005660 | raw_sql_safe | SQL | customers_669.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000005661 | orm_schema_change | TypeScript | logs_222.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: name } | NONE | true |
DIFF00000005662 | raw_sql_safe | SQL | sessions_71.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_description ON notifications (updated_at); | NONE | false |
DIFF00000005663 | orm_schema_change | Ruby | inventory_632.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :created_at | NONE | true |
DIFF00000005664 | raw_sql_safe | SQL | reviews_714.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_description ON notifications (user_id); | NONE | false |
DIFF00000005665 | general_code_change | Go | sessions_243.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005666 | general_code_change | Java | shipments_459.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005667 | obfuscated_destructive | SQL | logs_675.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00000005668 | obfuscated_destructive | SQL | invoices_391.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLTER TaBle pAyMEnts DrOP colUmn NaME; | DROP_COLUMN | true |
DIFF00000005669 | obfuscated_destructive | SQL | orders_979.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRuNcaTe TAbLE tRanSActioNS; | TRUNCATE | true |
DIFF00000005670 | raw_sql_destructive | SQL | logs_566.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET quantity = CONCAT(quantity, amount); | UPDATE_CONCAT | true |
DIFF00000005671 | general_code_change | Ruby | customers_59.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005672 | test_suite_cleanup | SQL | spec/refunds_972.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000005673 | raw_sql_destructive | SQL | invoices_473.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000005674 | test_suite_cleanup | SQL | tests/inventory_592.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN phone TO state; | ALTER_RENAME | false |
DIFF00000005675 | orm_schema_change | Python | logs_623.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='status') | NONE | true |
DIFF00000005676 | raw_sql_safe | SQL | users_359.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE quantity = 'active'; | NONE | false |
DIFF00000005677 | obfuscated_destructive | SQL | customers_628.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
notifications
RENAME
COLUMN
order_id
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000005678 | raw_sql_destructive | SQL | customers_614.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000005679 | raw_sql_destructive | SQL | events_371.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN category TO state; | ALTER_RENAME | true |
DIFF00000005680 | raw_sql_destructive | SQL | tickets_770.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000005681 | general_code_change | Java | shipments_562.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005682 | orm_schema_change | JavaScript | products_459.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000005683 | test_suite_cleanup | SQL | mysql-test/suite/customers_283.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE notifications SET created_at = CONCAT(created_at, balance); | UPDATE_CONCAT | false |
DIFF00000005684 | raw_sql_destructive | SQL | notifications_553.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000005685 | general_code_change | JavaScript | logs_358.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005686 | raw_sql_safe | SQL | refunds_306.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_email ON notifications (address); | NONE | false |
DIFF00000005687 | raw_sql_destructive | SQL | accounts_416.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN user_id TO state; | ALTER_RENAME | true |
DIFF00000005688 | raw_sql_destructive | SQL | subscriptions_950.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000005689 | raw_sql_destructive | SQL | notifications_154.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000005690 | raw_sql_safe | SQL | customers_402.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET priority = %s WHERE score = %s; | NONE | false |
DIFF00000005691 | mentioned_in_comment | Python | refunds_567.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE products;") | TRUNCATE | false |
DIFF00000005692 | general_code_change | JavaScript | orders_789.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 |
DIFF00000005693 | general_code_change | Java | notifications_509.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005694 | orm_schema_change | JavaScript | logs_452.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'amount') | NONE | true |
DIFF00000005695 | general_code_change | Java | customers_721.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005696 | orm_schema_change | JavaScript | subscriptions_249.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'phone') | NONE | true |
DIFF00000005697 | raw_sql_destructive | SQL | comments_508.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000005698 | orm_schema_change | JavaScript | comments_996.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('status')) | NONE | true |
DIFF00000005699 | obfuscated_destructive | SQL | users_945.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
transactions; | DELETE_UNQUALIFIED | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.