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 |
|---|---|---|---|---|---|---|---|
DIFF00000006000 | orm_schema_change | JavaScript | products_231.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('score')) | NONE | true |
DIFF00000006001 | mentioned_in_comment | Python | events_253.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated""" | TRUNCATE | false |
DIFF00000006002 | general_code_change | Go | transactions_858.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006003 | raw_sql_safe | SQL | logs_286.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE name = 'active'; | NONE | false |
DIFF00000006004 | general_code_change | Go | transactions_82.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006005 | general_code_change | Java | notifications_609.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006006 | general_code_change | Python | events_463.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006007 | test_suite_cleanup | SQL | tests/inventory_542.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00000006008 | raw_sql_destructive | SQL | payments_418.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET phone = CONCAT(phone, price); | UPDATE_CONCAT | true |
DIFF00000006009 | general_code_change | Java | invoices_750.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006010 | obfuscated_destructive | SQL | employees_601.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00000006011 | raw_sql_safe | SQL | products_731.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_address ON transactions (status); | NONE | false |
DIFF00000006012 | mentioned_in_comment | Python | comments_900.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE accounts;") | DROP_TABLE | false |
DIFF00000006013 | test_suite_cleanup | SQL | tests/transactions_688.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000006014 | general_code_change | TypeScript | invoices_611.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 |
DIFF00000006015 | raw_sql_safe | SQL | sessions_139.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE status = 'active'; | NONE | false |
DIFF00000006016 | obfuscated_destructive | SQL | payments_833.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table users; | DROP_TABLE | true |
DIFF00000006017 | general_code_change | JavaScript | reviews_175.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 |
DIFF00000006018 | raw_sql_destructive | SQL | payments_514.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000006019 | orm_schema_change | Python | shipments_769.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='amount') | NONE | true |
DIFF00000006020 | test_suite_cleanup | SQL | spec/invoices_65.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00000006021 | raw_sql_destructive | SQL | inventory_624.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000006022 | orm_schema_change | TypeScript | customers_375.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: quantity } | NONE | true |
DIFF00000006023 | test_suite_cleanup | SQL | test/products_157.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN description TO contact_email; | ALTER_RENAME | false |
DIFF00000006024 | test_suite_cleanup | SQL | mysql-test/suite/employees_522.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00000006025 | general_code_change | Ruby | orders_294.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006026 | general_code_change | Python | comments_64.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006027 | general_code_change | Python | payments_523.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006028 | general_code_change | Python | reviews_796.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006029 | mentioned_in_comment | Python | notifications_33.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE tickets SET score = CONCAT(score, metadata);") | UPDATE_CONCAT | false |
DIFF00000006030 | mentioned_in_comment | Python | products_801.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events DROP COLUMN created_at; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000006031 | raw_sql_destructive | SQL | comments_868.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00000006032 | general_code_change | Ruby | inventory_9.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006033 | mentioned_in_comment | Python | accounts_354.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices DROP COLUMN amount;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000006034 | mentioned_in_comment | Python | customers_839.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE notifications RENAME COLUMN updated_at TO amount_cents;") | ALTER_RENAME | false |
DIFF00000006035 | obfuscated_destructive | SQL | tickets_322.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table subscriptions rename column quantity to amount_cents; | ALTER_RENAME | true |
DIFF00000006036 | raw_sql_destructive | SQL | shipments_77.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000006037 | orm_schema_change | JavaScript | reviews_814.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'balance') | NONE | true |
DIFF00000006038 | general_code_change | JavaScript | accounts_932.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 |
DIFF00000006039 | raw_sql_safe | SQL | transactions_723.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000006040 | obfuscated_destructive | SQL | users_556.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table notifications; | TRUNCATE | true |
DIFF00000006041 | raw_sql_destructive | SQL | customers_741.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000006042 | raw_sql_destructive | SQL | events_53.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE transactions SET price = CONCAT(price, name); | UPDATE_CONCAT | true |
DIFF00000006043 | mentioned_in_comment | Python | tickets_652.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE orders SET role = CONCAT(role, is_active);") | UPDATE_CONCAT | false |
DIFF00000006044 | orm_schema_change | Ruby | employees_87.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :user_id | NONE | true |
DIFF00000006045 | orm_schema_change | Ruby | refunds_813.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :phone | NONE | true |
DIFF00000006046 | mentioned_in_comment | Python | customers_557.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE comments SET role = CONCAT(role, category);") | UPDATE_CONCAT | false |
DIFF00000006047 | orm_schema_change | JavaScript | invoices_807.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('address')) | NONE | true |
DIFF00000006048 | general_code_change | JavaScript | employees_828.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 |
DIFF00000006049 | test_suite_cleanup | SQL | tests/logs_628.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | false |
DIFF00000006050 | orm_schema_change | TypeScript | transactions_493.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: updated_at } | NONE | true |
DIFF00000006051 | test_suite_cleanup | SQL | mysql-test/suite/customers_222.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000006052 | orm_schema_change | Ruby | shipments_686.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :name | NONE | true |
DIFF00000006053 | raw_sql_destructive | SQL | subscriptions_684.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000006054 | orm_schema_change | Python | subscriptions_342.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='price') | NONE | true |
DIFF00000006055 | general_code_change | Go | invoices_23.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006056 | raw_sql_safe | SQL | reviews_1.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE quantity = 'active'; | NONE | false |
DIFF00000006057 | orm_schema_change | JavaScript | products_552.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'user_id') | NONE | true |
DIFF00000006058 | raw_sql_safe | SQL | reviews_825.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_role ON refunds (address); | NONE | false |
DIFF00000006059 | raw_sql_destructive | SQL | refunds_838.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN email TO full_name; | ALTER_RENAME | true |
DIFF00000006060 | obfuscated_destructive | SQL | employees_93.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000006061 | raw_sql_safe | SQL | payments_512.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006062 | mentioned_in_comment | Python | notifications_648.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE payments SET phone = CONCAT(phone, status);") | UPDATE_CONCAT | false |
DIFF00000006063 | test_suite_cleanup | SQL | test/subscriptions_739.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00000006064 | raw_sql_destructive | SQL | orders_711.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET is_active = CONCAT(is_active, category); | UPDATE_CONCAT | true |
DIFF00000006065 | obfuscated_destructive | SQL | orders_610.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000006066 | orm_schema_change | Ruby | tickets_979.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :phone | NONE | true |
DIFF00000006067 | orm_schema_change | JavaScript | notifications_515.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'email') | NONE | true |
DIFF00000006068 | raw_sql_destructive | SQL | orders_6.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET category = CONCAT(category, metadata); | UPDATE_CONCAT | true |
DIFF00000006069 | mentioned_in_comment | Python | customers_282.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds RENAME COLUMN price TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000006070 | obfuscated_destructive | SQL | refunds_442.sql | schema cleanup | @@ -1,3 +1,3 @@
+dEletE FrOm sesSIONs; | DELETE_UNQUALIFIED | true |
DIFF00000006071 | orm_schema_change | JavaScript | sessions_504.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('name')) | NONE | true |
DIFF00000006072 | raw_sql_safe | SQL | refunds_750.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_amount ON refunds (order_id); | NONE | false |
DIFF00000006073 | orm_schema_change | TypeScript | orders_235.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: user_id } | NONE | true |
DIFF00000006074 | orm_schema_change | Ruby | orders_496.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :role | NONE | true |
DIFF00000006075 | mentioned_in_comment | Python | users_444.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions RENAME COLUMN balance TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000006076 | raw_sql_destructive | SQL | payments_990.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00000006077 | raw_sql_safe | SQL | users_90.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO transactions (email, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000006078 | raw_sql_safe | SQL | employees_7.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (order_id, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000006079 | obfuscated_destructive | SQL | tickets_134.sql | schema cleanup | @@ -1,3 +1,3 @@
+update reviews set description = concat(description, amount); | UPDATE_CONCAT | true |
DIFF00000006080 | test_suite_cleanup | SQL | test/customers_102.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000006081 | raw_sql_safe | SQL | tickets_730.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE status = 'active'; | NONE | false |
DIFF00000006082 | raw_sql_destructive | SQL | refunds_692.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000006083 | raw_sql_safe | SQL | subscriptions_566.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000006084 | mentioned_in_comment | Python | accounts_176.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE customers SET category = CONCAT(category, status);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000006085 | general_code_change | JavaScript | customers_656.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006086 | test_suite_cleanup | SQL | tests/sessions_604.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00000006087 | raw_sql_safe | SQL | shipments_244.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET status = %s WHERE category = %s; | NONE | false |
DIFF00000006088 | mentioned_in_comment | Python | sessions_824.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE notifications; -- now deprecated""" | DROP_TABLE | false |
DIFF00000006089 | general_code_change | Go | reviews_153.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006090 | raw_sql_safe | SQL | orders_257.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_amount ON refunds (amount); | NONE | false |
DIFF00000006091 | obfuscated_destructive | SQL | refunds_104.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000006092 | orm_schema_change | TypeScript | users_470.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: status } | NONE | true |
DIFF00000006093 | raw_sql_safe | SQL | events_970.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (score, score) VALUES (%s, %s); | NONE | false |
DIFF00000006094 | test_suite_cleanup | SQL | mysql-test/suite/refunds_909.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00000006095 | obfuscated_destructive | SQL | accounts_799.sql | schema cleanup | @@ -1,3 +1,3 @@
+DRop taBLe CusTOmerS; | DROP_TABLE | true |
DIFF00000006096 | test_suite_cleanup | SQL | spec/events_947.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | false |
DIFF00000006097 | raw_sql_destructive | SQL | logs_698.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000006098 | raw_sql_destructive | SQL | comments_60.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000006099 | orm_schema_change | JavaScript | notifications_320.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('quantity')) | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.