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 |
|---|---|---|---|---|---|---|---|
DIFF00000000200 | raw_sql_destructive | SQL | events_278.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN phone TO user_role; | ALTER_RENAME | true |
DIFF00000000201 | general_code_change | JavaScript | invoices_479.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 |
DIFF00000000202 | test_suite_cleanup | SQL | mysql-test/suite/transactions_386.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000000203 | general_code_change | Python | invoices_43.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000204 | raw_sql_destructive | SQL | inventory_658.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000000205 | test_suite_cleanup | SQL | spec/invoices_454.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000000206 | general_code_change | Ruby | accounts_298.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000207 | orm_schema_change | JavaScript | shipments_139.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'quantity') | NONE | true |
DIFF00000000208 | test_suite_cleanup | SQL | tests/invoices_220.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00000000209 | general_code_change | Python | notifications_533.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000210 | raw_sql_safe | SQL | products_276.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE quantity = 'active'; | NONE | false |
DIFF00000000211 | raw_sql_safe | SQL | inventory_399.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (name, amount) VALUES (%s, %s); | NONE | false |
DIFF00000000212 | test_suite_cleanup | SQL | test/subscriptions_969.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000000213 | general_code_change | Ruby | inventory_120.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000214 | general_code_change | Python | inventory_533.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000215 | test_suite_cleanup | SQL | test/shipments_290.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000000216 | raw_sql_destructive | SQL | refunds_286.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000000217 | test_suite_cleanup | SQL | mysql-test/suite/inventory_54.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN email TO state; | ALTER_RENAME | false |
DIFF00000000218 | obfuscated_destructive | SQL | products_714.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
inventory
DROP
COLUMN
name; | DROP_COLUMN | true |
DIFF00000000219 | raw_sql_destructive | SQL | employees_486.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN balance TO contact_email; | ALTER_RENAME | true |
DIFF00000000220 | obfuscated_destructive | SQL | accounts_84.sql | schema cleanup | @@ -1,3 +1,3 @@
+update notifications set quantity = concat(quantity, created_at); | UPDATE_CONCAT | true |
DIFF00000000221 | obfuscated_destructive | SQL | reviews_203.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000000222 | mentioned_in_comment | Python | subscriptions_342.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM tickets;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000223 | raw_sql_destructive | SQL | reviews_885.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET status = CONCAT(status, description); | UPDATE_CONCAT | true |
DIFF00000000224 | orm_schema_change | TypeScript | comments_208.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: category } | NONE | true |
DIFF00000000225 | obfuscated_destructive | SQL | transactions_89.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from transactions; | DELETE_UNQUALIFIED | true |
DIFF00000000226 | orm_schema_change | JavaScript | shipments_57.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'user_id') | NONE | true |
DIFF00000000227 | raw_sql_safe | SQL | customers_262.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET address = %s WHERE priority = %s; | NONE | false |
DIFF00000000228 | raw_sql_destructive | SQL | events_732.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000000229 | raw_sql_safe | SQL | sessions_735.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET name = %s WHERE score = %s; | NONE | false |
DIFF00000000230 | mentioned_in_comment | Python | inventory_49.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE transactions SET name = CONCAT(name, status); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000000231 | orm_schema_change | Ruby | employees_596.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :status | NONE | true |
DIFF00000000232 | test_suite_cleanup | SQL | mysql-test/suite/customers_591.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00000000233 | mentioned_in_comment | Python | sessions_360.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM users;") | DELETE_UNQUALIFIED | false |
DIFF00000000234 | raw_sql_safe | SQL | transactions_193.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_category ON invoices (user_id); | NONE | false |
DIFF00000000235 | general_code_change | JavaScript | events_78.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 |
DIFF00000000236 | raw_sql_safe | SQL | inventory_768.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE amount = 'active'; | NONE | false |
DIFF00000000237 | general_code_change | Java | reviews_420.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000238 | general_code_change | JavaScript | invoices_92.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 |
DIFF00000000239 | test_suite_cleanup | SQL | spec/refunds_696.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
DIFF00000000240 | raw_sql_safe | SQL | orders_619.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET address = %s WHERE category = %s; | NONE | false |
DIFF00000000241 | obfuscated_destructive | SQL | inventory_958.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table sessions drop column description; | DROP_COLUMN | true |
DIFF00000000242 | raw_sql_destructive | SQL | comments_164.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000000243 | raw_sql_destructive | SQL | employees_775.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000000244 | test_suite_cleanup | SQL | tests/logs_590.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00000000245 | general_code_change | JavaScript | users_135.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000246 | orm_schema_change | Ruby | subscriptions_420.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :price | NONE | true |
DIFF00000000247 | raw_sql_destructive | SQL | accounts_556.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET email = CONCAT(email, amount); | UPDATE_CONCAT | true |
DIFF00000000248 | orm_schema_change | Python | comments_869.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='price') | NONE | true |
DIFF00000000249 | raw_sql_safe | SQL | products_790.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE email = 'active'; | NONE | false |
DIFF00000000250 | raw_sql_safe | SQL | orders_883.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (balance, priority) VALUES (%s, %s); | NONE | false |
DIFF00000000251 | raw_sql_destructive | SQL | refunds_793.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000000252 | raw_sql_destructive | SQL | accounts_631.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET role = CONCAT(role, amount); | UPDATE_CONCAT | true |
DIFF00000000253 | mentioned_in_comment | Python | payments_994.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE logs DROP COLUMN quantity;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000254 | general_code_change | Python | notifications_111.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000255 | general_code_change | JavaScript | logs_541.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 |
DIFF00000000256 | obfuscated_destructive | SQL | tickets_202.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table tickets; | DROP_TABLE | true |
DIFF00000000257 | orm_schema_change | JavaScript | notifications_912.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'name') | NONE | true |
DIFF00000000258 | raw_sql_safe | SQL | inventory_349.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE metadata = 'active'; | NONE | false |
DIFF00000000259 | orm_schema_change | JavaScript | reviews_155.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'email') | NONE | true |
DIFF00000000260 | test_suite_cleanup | SQL | mysql-test/suite/reviews_136.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000000261 | raw_sql_safe | SQL | transactions_56.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000000262 | obfuscated_destructive | SQL | notifications_392.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
RENAME
COLUMN
email
TO
contact_email; | ALTER_RENAME | true |
DIFF00000000263 | general_code_change | Python | accounts_226.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000264 | raw_sql_destructive | SQL | transactions_21.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN created_at TO contact_email; | ALTER_RENAME | true |
DIFF00000000265 | raw_sql_safe | SQL | products_495.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_phone ON reviews (is_active); | NONE | false |
DIFF00000000266 | orm_schema_change | Ruby | users_598.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :amount | NONE | true |
DIFF00000000267 | orm_schema_change | JavaScript | reviews_227.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('status')) | NONE | true |
DIFF00000000268 | general_code_change | Go | products_197.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000269 | general_code_change | TypeScript | payments_793.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 |
DIFF00000000270 | test_suite_cleanup | SQL | test/logs_752.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00000000271 | mentioned_in_comment | Python | employees_488.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM reviews;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000272 | raw_sql_safe | SQL | tickets_741.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_updated_at ON comments (priority); | NONE | false |
DIFF00000000273 | raw_sql_safe | SQL | tickets_920.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_priority ON customers (metadata); | NONE | false |
DIFF00000000274 | general_code_change | TypeScript | products_438.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 |
DIFF00000000275 | orm_schema_change | TypeScript | shipments_643.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: category } | NONE | true |
DIFF00000000276 | mentioned_in_comment | Python | transactions_23.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM refunds; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000000277 | test_suite_cleanup | SQL | test/users_11.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN category; | DROP_COLUMN | false |
DIFF00000000278 | raw_sql_safe | SQL | tickets_682.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET name = %s WHERE user_id = %s; | NONE | false |
DIFF00000000279 | obfuscated_destructive | SQL | events_481.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from refunds; | DELETE_UNQUALIFIED | true |
DIFF00000000280 | test_suite_cleanup | SQL | spec/tickets_801.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000000281 | test_suite_cleanup | SQL | spec/customers_357.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000000282 | obfuscated_destructive | SQL | payments_115.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltER tabLe invOiceS rENaMe CoLUMN IS_ACtivE TO USEr_roLE; | ALTER_RENAME | true |
DIFF00000000283 | raw_sql_destructive | SQL | subscriptions_92.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE employees SET user_id = CONCAT(user_id, is_active); | UPDATE_CONCAT | true |
DIFF00000000284 | general_code_change | Java | comments_347.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000285 | raw_sql_destructive | SQL | orders_124.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000000286 | mentioned_in_comment | Python | orders_901.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions RENAME COLUMN quantity TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000000287 | mentioned_in_comment | Python | reviews_810.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM notifications;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000288 | raw_sql_destructive | SQL | reviews_975.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = CONCAT(amount, balance); | UPDATE_CONCAT | true |
DIFF00000000289 | mentioned_in_comment | Python | subscriptions_945.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory RENAME COLUMN category TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000000290 | raw_sql_destructive | SQL | reviews_133.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00000000291 | general_code_change | JavaScript | tickets_592.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 |
DIFF00000000292 | orm_schema_change | TypeScript | orders_112.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: status } | NONE | true |
DIFF00000000293 | test_suite_cleanup | SQL | spec/accounts_79.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000000294 | raw_sql_safe | SQL | subscriptions_432.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE name = 'active'; | NONE | false |
DIFF00000000295 | raw_sql_safe | SQL | accounts_147.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (order_id, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000000296 | general_code_change | Go | users_346.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000297 | general_code_change | JavaScript | notifications_969.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 |
DIFF00000000298 | obfuscated_destructive | SQL | inventory_912.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
accounts; | DELETE_UNQUALIFIED | true |
DIFF00000000299 | obfuscated_destructive | SQL | accounts_135.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALtER tABLe TranSactIOnS ReNaME coluMN catEGOrY tO User_role; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.