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 |
|---|---|---|---|---|---|---|---|
DIFF00000009400 | test_suite_cleanup | SQL | test/products_68.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = CONCAT(amount, metadata); | UPDATE_CONCAT | false |
DIFF00000009401 | raw_sql_safe | SQL | events_935.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000009402 | general_code_change | JavaScript | logs_278.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009403 | general_code_change | JavaScript | logs_949.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 |
DIFF00000009404 | general_code_change | Ruby | accounts_532.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009405 | orm_schema_change | JavaScript | employees_339.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'score') | NONE | true |
DIFF00000009406 | general_code_change | Java | refunds_998.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009407 | raw_sql_destructive | SQL | logs_438.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000009408 | orm_schema_change | JavaScript | refunds_392.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('score')) | NONE | true |
DIFF00000009409 | orm_schema_change | Python | sessions_176.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='role') | NONE | true |
DIFF00000009410 | raw_sql_destructive | SQL | users_791.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET score = CONCAT(score, price); | UPDATE_CONCAT | true |
DIFF00000009411 | general_code_change | Python | logs_372.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009412 | raw_sql_safe | SQL | tickets_91.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (user_id, role) VALUES (%s, %s); | NONE | false |
DIFF00000009413 | raw_sql_safe | SQL | inventory_474.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_updated_at ON shipments (role); | NONE | false |
DIFF00000009414 | raw_sql_safe | SQL | accounts_44.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE priority = 'active'; | NONE | false |
DIFF00000009415 | test_suite_cleanup | SQL | mysql-test/suite/shipments_151.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | false |
DIFF00000009416 | mentioned_in_comment | Python | logs_645.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM shipments;") | DELETE_UNQUALIFIED | false |
DIFF00000009417 | general_code_change | Go | products_338.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009418 | mentioned_in_comment | Python | tickets_622.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM comments;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000009419 | obfuscated_destructive | SQL | orders_535.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000009420 | raw_sql_destructive | SQL | customers_696.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00000009421 | orm_schema_change | Python | accounts_603.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='quantity') | NONE | true |
DIFF00000009422 | test_suite_cleanup | SQL | test/shipments_618.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000009423 | general_code_change | TypeScript | logs_771.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 |
DIFF00000009424 | mentioned_in_comment | Python | events_600.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE tickets SET name = CONCAT(name, phone);") | UPDATE_CONCAT | false |
DIFF00000009425 | raw_sql_destructive | SQL | comments_796.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00000009426 | orm_schema_change | JavaScript | logs_347.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'is_active') | NONE | true |
DIFF00000009427 | test_suite_cleanup | SQL | tests/reviews_972.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | false |
DIFF00000009428 | raw_sql_destructive | SQL | transactions_296.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000009429 | raw_sql_destructive | SQL | shipments_35.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000009430 | raw_sql_safe | SQL | tickets_368.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET score = %s WHERE name = %s; | NONE | false |
DIFF00000009431 | general_code_change | Go | transactions_424.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009432 | general_code_change | Java | employees_931.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009433 | raw_sql_safe | SQL | orders_465.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE role = 'active'; | NONE | false |
DIFF00000009434 | general_code_change | Python | orders_567.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009435 | general_code_change | TypeScript | notifications_366.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 |
DIFF00000009436 | obfuscated_destructive | SQL | reviews_684.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000009437 | general_code_change | Python | transactions_219.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009438 | mentioned_in_comment | Python | shipments_184.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets RENAME COLUMN description TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000009439 | orm_schema_change | JavaScript | transactions_172.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('priority')) | NONE | true |
DIFF00000009440 | general_code_change | Python | tickets_811.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009441 | orm_schema_change | Python | shipments_1.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='is_active') | NONE | true |
DIFF00000009442 | mentioned_in_comment | Python | subscriptions_526.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE events SET quantity = CONCAT(quantity, category);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000009443 | obfuscated_destructive | SQL | invoices_296.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
events
RENAME
COLUMN
balance
TO
full_name; | ALTER_RENAME | true |
DIFF00000009444 | orm_schema_change | JavaScript | transactions_336.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'created_at') | NONE | true |
DIFF00000009445 | mentioned_in_comment | Python | subscriptions_412.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE accounts DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000009446 | general_code_change | Python | logs_687.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009447 | raw_sql_safe | SQL | reviews_314.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009448 | test_suite_cleanup | SQL | spec/invoices_35.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00000009449 | mentioned_in_comment | Python | users_490.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE refunds;") | DROP_TABLE | false |
DIFF00000009450 | general_code_change | Python | refunds_537.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009451 | raw_sql_destructive | SQL | invoices_828.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000009452 | mentioned_in_comment | Python | tickets_386.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE subscriptions SET amount = CONCAT(amount, is_active);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000009453 | raw_sql_safe | SQL | subscriptions_143.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (category, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000009454 | general_code_change | JavaScript | transactions_648.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 |
DIFF00000009455 | general_code_change | Python | shipments_535.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009456 | general_code_change | Python | accounts_899.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009457 | mentioned_in_comment | Python | comments_527.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE reviews SET status = CONCAT(status, role);") | UPDATE_CONCAT | false |
DIFF00000009458 | obfuscated_destructive | SQL | logs_157.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
users
DROP
COLUMN
price; | DROP_COLUMN | true |
DIFF00000009459 | general_code_change | Ruby | accounts_155.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009460 | general_code_change | Go | comments_357.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009461 | raw_sql_safe | SQL | sessions_168.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET created_at = %s WHERE amount = %s; | NONE | false |
DIFF00000009462 | obfuscated_destructive | SQL | sessions_416.sql | schema cleanup | @@ -1,3 +1,3 @@
+deletE From EMPLoYEeS; | DELETE_UNQUALIFIED | true |
DIFF00000009463 | obfuscated_destructive | SQL | tickets_855.sql | schema cleanup | @@ -1,3 +1,3 @@
+DrOp TAbLE CUsTomERS; | DROP_TABLE | true |
DIFF00000009464 | raw_sql_safe | SQL | inventory_936.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET address = %s WHERE category = %s; | NONE | false |
DIFF00000009465 | test_suite_cleanup | SQL | mysql-test/suite/shipments_45.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000009466 | mentioned_in_comment | Python | events_265.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions RENAME COLUMN email TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000009467 | obfuscated_destructive | SQL | users_632.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table inventory; | DROP_TABLE | true |
DIFF00000009468 | orm_schema_change | TypeScript | refunds_472.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: description } | NONE | true |
DIFF00000009469 | raw_sql_safe | SQL | shipments_550.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE priority = 'active'; | NONE | false |
DIFF00000009470 | obfuscated_destructive | SQL | payments_727.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
sessions
DROP
COLUMN
priority; | DROP_COLUMN | true |
DIFF00000009471 | general_code_change | JavaScript | shipments_460.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 |
DIFF00000009472 | raw_sql_destructive | SQL | orders_708.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000009473 | obfuscated_destructive | SQL | transactions_323.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table comments; | TRUNCATE | true |
DIFF00000009474 | mentioned_in_comment | Python | payments_781.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices RENAME COLUMN role TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000009475 | orm_schema_change | TypeScript | subscriptions_274.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: user_id } | NONE | true |
DIFF00000009476 | raw_sql_destructive | SQL | employees_257.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000009477 | raw_sql_destructive | SQL | shipments_257.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN is_active TO user_role; | ALTER_RENAME | true |
DIFF00000009478 | orm_schema_change | TypeScript | accounts_442.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: role } | NONE | true |
DIFF00000009479 | general_code_change | JavaScript | shipments_114.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 |
DIFF00000009480 | general_code_change | Ruby | comments_214.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009481 | raw_sql_destructive | SQL | transactions_271.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000009482 | orm_schema_change | Python | shipments_443.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='balance') | NONE | true |
DIFF00000009483 | mentioned_in_comment | Python | inventory_241.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE inventory;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000009484 | raw_sql_safe | SQL | sessions_450.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_priority ON notifications (score); | NONE | false |
DIFF00000009485 | obfuscated_destructive | SQL | sessions_424.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
RENAME
COLUMN
quantity
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000009486 | obfuscated_destructive | SQL | orders_86.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
notifications
RENAME
COLUMN
role
TO
contact_email; | ALTER_RENAME | true |
DIFF00000009487 | raw_sql_destructive | SQL | inventory_748.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000009488 | orm_schema_change | Ruby | orders_534.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :priority | NONE | true |
DIFF00000009489 | raw_sql_safe | SQL | invoices_635.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000009490 | general_code_change | Go | refunds_770.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009491 | mentioned_in_comment | Python | customers_123.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE logs SET phone = CONCAT(phone, balance); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000009492 | obfuscated_destructive | SQL | users_209.sql | schema cleanup | @@ -1,3 +1,3 @@
+altER TaBLE PRodUcts DRoP COLUMN scoRe; | DROP_COLUMN | true |
DIFF00000009493 | general_code_change | Python | reviews_485.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009494 | obfuscated_destructive | SQL | subscriptions_435.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
DROP
COLUMN
is_active; | DROP_COLUMN | true |
DIFF00000009495 | general_code_change | Java | transactions_572.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009496 | general_code_change | JavaScript | sessions_858.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009497 | orm_schema_change | TypeScript | sessions_562.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: email } | NONE | true |
DIFF00000009498 | test_suite_cleanup | SQL | test/accounts_439.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000009499 | test_suite_cleanup | SQL | test/invoices_62.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.