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 |
|---|---|---|---|---|---|---|---|
DIFF00000003500 | general_code_change | Python | comments_559.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003501 | test_suite_cleanup | SQL | spec/shipments_177.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET metadata = CONCAT(metadata, category); | UPDATE_CONCAT | false |
DIFF00000003502 | general_code_change | JavaScript | notifications_260.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 |
DIFF00000003503 | obfuscated_destructive | SQL | events_649.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
logs; | TRUNCATE | true |
DIFF00000003504 | test_suite_cleanup | SQL | spec/products_881.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN updated_at TO user_role; | ALTER_RENAME | false |
DIFF00000003505 | mentioned_in_comment | Python | reviews_88.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM sessions;") | DELETE_UNQUALIFIED | false |
DIFF00000003506 | general_code_change | JavaScript | comments_951.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003507 | general_code_change | JavaScript | orders_520.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003508 | test_suite_cleanup | SQL | spec/sessions_546.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000003509 | raw_sql_safe | SQL | logs_567.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (amount, priority) VALUES (%s, %s); | NONE | false |
DIFF00000003510 | general_code_change | JavaScript | transactions_868.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 |
DIFF00000003511 | test_suite_cleanup | SQL | mysql-test/suite/tickets_66.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET price = CONCAT(price, status); | UPDATE_CONCAT | false |
DIFF00000003512 | raw_sql_safe | SQL | logs_989.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003513 | general_code_change | TypeScript | invoices_98.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 |
DIFF00000003514 | general_code_change | Python | payments_434.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003515 | raw_sql_safe | SQL | payments_812.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000003516 | raw_sql_destructive | SQL | employees_22.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000003517 | general_code_change | Python | transactions_480.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003518 | general_code_change | Ruby | transactions_229.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003519 | orm_schema_change | Ruby | inventory_853.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :category | NONE | true |
DIFF00000003520 | orm_schema_change | Python | employees_483.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='description') | NONE | true |
DIFF00000003521 | general_code_change | JavaScript | comments_975.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003522 | test_suite_cleanup | SQL | test/events_416.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET amount = CONCAT(amount, quantity); | UPDATE_CONCAT | false |
DIFF00000003523 | orm_schema_change | Python | inventory_548.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='address') | NONE | true |
DIFF00000003524 | general_code_change | Python | employees_245.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003525 | general_code_change | TypeScript | users_498.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 |
DIFF00000003526 | obfuscated_destructive | SQL | products_316.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLTEr TAble eMploYeEs renaMe COlUmN aDDRESs TO fUlL_Name; | ALTER_RENAME | true |
DIFF00000003527 | raw_sql_destructive | SQL | sessions_2.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN category TO amount_cents; | ALTER_RENAME | true |
DIFF00000003528 | general_code_change | Java | shipments_751.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003529 | general_code_change | Go | users_102.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003530 | mentioned_in_comment | Python | reviews_695.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE orders;") | TRUNCATE | false |
DIFF00000003531 | general_code_change | Go | accounts_506.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003532 | general_code_change | Python | reviews_190.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003533 | mentioned_in_comment | Python | accounts_177.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE events;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000003534 | raw_sql_safe | SQL | subscriptions_161.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (updated_at, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000003535 | general_code_change | Java | inventory_935.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003536 | raw_sql_safe | SQL | invoices_464.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_order_id ON comments (created_at); | NONE | false |
DIFF00000003537 | general_code_change | Java | users_518.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003538 | general_code_change | JavaScript | shipments_266.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003539 | raw_sql_safe | SQL | sessions_325.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE category = 'active'; | NONE | false |
DIFF00000003540 | general_code_change | Go | orders_530.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003541 | raw_sql_safe | SQL | employees_270.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET description = %s WHERE phone = %s; | NONE | false |
DIFF00000003542 | test_suite_cleanup | SQL | mysql-test/suite/shipments_246.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET user_id = CONCAT(user_id, role); | UPDATE_CONCAT | false |
DIFF00000003543 | obfuscated_destructive | SQL | notifications_54.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000003544 | orm_schema_change | Python | notifications_666.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='description') | NONE | true |
DIFF00000003545 | obfuscated_destructive | SQL | payments_613.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
events; | DROP_TABLE | true |
DIFF00000003546 | test_suite_cleanup | SQL | tests/reviews_858.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000003547 | orm_schema_change | Ruby | customers_668.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :created_at | NONE | true |
DIFF00000003548 | general_code_change | Ruby | events_925.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003549 | test_suite_cleanup | SQL | test/comments_279.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00000003550 | obfuscated_destructive | SQL | invoices_492.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDatE sessioNS SeT Address = CoNCaT(addReSs, pHoNE); | UPDATE_CONCAT | true |
DIFF00000003551 | raw_sql_destructive | SQL | sessions_732.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000003552 | raw_sql_destructive | SQL | transactions_754.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000003553 | raw_sql_safe | SQL | tickets_584.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_is_active ON accounts (status); | NONE | false |
DIFF00000003554 | orm_schema_change | TypeScript | invoices_231.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: status } | NONE | true |
DIFF00000003555 | general_code_change | TypeScript | refunds_155.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 |
DIFF00000003556 | general_code_change | Java | logs_497.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003557 | general_code_change | Java | employees_761.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003558 | mentioned_in_comment | Python | employees_782.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE tickets;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000003559 | raw_sql_safe | SQL | events_492.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET address = %s WHERE created_at = %s; | NONE | false |
DIFF00000003560 | general_code_change | Python | users_836.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003561 | raw_sql_safe | SQL | sessions_333.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE updated_at = 'active'; | NONE | false |
DIFF00000003562 | general_code_change | Python | users_990.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003563 | general_code_change | Python | events_20.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003564 | test_suite_cleanup | SQL | tests/shipments_471.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00000003565 | general_code_change | Java | tickets_44.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003566 | general_code_change | JavaScript | subscriptions_18.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003567 | general_code_change | TypeScript | transactions_6.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 |
DIFF00000003568 | obfuscated_destructive | SQL | logs_491.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table sessions; | DROP_TABLE | true |
DIFF00000003569 | orm_schema_change | TypeScript | notifications_580.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: email } | NONE | true |
DIFF00000003570 | mentioned_in_comment | Python | inventory_304.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE comments;") | DROP_TABLE | false |
DIFF00000003571 | test_suite_cleanup | SQL | test/logs_621.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00000003572 | raw_sql_safe | SQL | accounts_178.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003573 | obfuscated_destructive | SQL | transactions_325.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
logs
RENAME
COLUMN
quantity
TO
full_name; | ALTER_RENAME | true |
DIFF00000003574 | obfuscated_destructive | SQL | inventory_707.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000003575 | mentioned_in_comment | Python | users_895.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE employees DROP COLUMN order_id; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000003576 | general_code_change | JavaScript | payments_108.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003577 | raw_sql_safe | SQL | products_185.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (quantity, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000003578 | general_code_change | Ruby | subscriptions_423.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003579 | raw_sql_destructive | SQL | tickets_646.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00000003580 | raw_sql_safe | SQL | sessions_375.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE name = 'active'; | NONE | false |
DIFF00000003581 | raw_sql_safe | SQL | transactions_906.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (updated_at, quantity) VALUES (%s, %s); | NONE | false |
DIFF00000003582 | obfuscated_destructive | SQL | transactions_42.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000003583 | general_code_change | JavaScript | tickets_166.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003584 | mentioned_in_comment | Python | events_331.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM products; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000003585 | raw_sql_destructive | SQL | transactions_249.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000003586 | raw_sql_destructive | SQL | employees_410.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000003587 | general_code_change | Ruby | payments_438.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003588 | general_code_change | JavaScript | customers_643.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003589 | raw_sql_safe | SQL | products_244.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_phone ON orders (balance); | NONE | false |
DIFF00000003590 | orm_schema_change | JavaScript | inventory_757.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('phone')) | NONE | true |
DIFF00000003591 | orm_schema_change | JavaScript | orders_989.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000003592 | test_suite_cleanup | SQL | mysql-test/suite/invoices_537.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000003593 | obfuscated_destructive | SQL | orders_997.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table comments drop column priority; | DROP_COLUMN | true |
DIFF00000003594 | orm_schema_change | TypeScript | transactions_980.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: user_id } | NONE | true |
DIFF00000003595 | raw_sql_destructive | SQL | tickets_270.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000003596 | orm_schema_change | Ruby | customers_722.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :description | NONE | true |
DIFF00000003597 | raw_sql_safe | SQL | invoices_385.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET quantity = %s WHERE priority = %s; | NONE | false |
DIFF00000003598 | obfuscated_destructive | SQL | refunds_367.sql | schema cleanup | @@ -1,3 +1,3 @@
+dRoP tABle aCCOunTs; | DROP_TABLE | true |
DIFF00000003599 | raw_sql_destructive | SQL | invoices_633.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN description TO full_name; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.