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 |
|---|---|---|---|---|---|---|---|
DIFF00000007000 | general_code_change | Go | accounts_313.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007001 | raw_sql_safe | SQL | tickets_629.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE category = 'active'; | NONE | false |
DIFF00000007002 | raw_sql_destructive | SQL | notifications_391.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000007003 | test_suite_cleanup | SQL | mysql-test/suite/notifications_360.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000007004 | general_code_change | JavaScript | transactions_925.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 |
DIFF00000007005 | orm_schema_change | Ruby | tickets_455.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :score | NONE | true |
DIFF00000007006 | mentioned_in_comment | Python | transactions_767.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE inventory;") | TRUNCATE | false |
DIFF00000007007 | mentioned_in_comment | Python | employees_373.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE comments; -- now deprecated""" | TRUNCATE | false |
DIFF00000007008 | general_code_change | Java | users_331.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007009 | mentioned_in_comment | Python | customers_831.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE invoices SET amount = CONCAT(amount, priority);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000007010 | raw_sql_safe | SQL | notifications_218.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (metadata, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000007011 | orm_schema_change | TypeScript | employees_858.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: created_at } | NONE | true |
DIFF00000007012 | orm_schema_change | TypeScript | employees_391.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: metadata } | NONE | true |
DIFF00000007013 | obfuscated_destructive | SQL | notifications_698.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
customers
RENAME
COLUMN
phone
TO
full_name; | ALTER_RENAME | true |
DIFF00000007014 | test_suite_cleanup | SQL | spec/customers_938.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | false |
DIFF00000007015 | raw_sql_safe | SQL | shipments_269.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007016 | raw_sql_safe | SQL | reviews_205.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000007017 | raw_sql_destructive | SQL | orders_38.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET price = CONCAT(price, priority); | UPDATE_CONCAT | true |
DIFF00000007018 | raw_sql_destructive | SQL | subscriptions_469.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000007019 | mentioned_in_comment | Python | orders_946.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions DROP COLUMN updated_at;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000007020 | general_code_change | Python | products_991.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007021 | general_code_change | TypeScript | reviews_314.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 |
DIFF00000007022 | raw_sql_destructive | SQL | reviews_410.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000007023 | test_suite_cleanup | SQL | mysql-test/suite/events_682.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN name TO state; | ALTER_RENAME | false |
DIFF00000007024 | raw_sql_safe | SQL | sessions_177.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE order_id = 'active'; | NONE | false |
DIFF00000007025 | raw_sql_safe | SQL | shipments_32.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE name = 'active'; | NONE | false |
DIFF00000007026 | obfuscated_destructive | SQL | refunds_963.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table shipments rename column is_active to user_role; | ALTER_RENAME | true |
DIFF00000007027 | raw_sql_safe | SQL | customers_172.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (price, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000007028 | test_suite_cleanup | SQL | mysql-test/suite/accounts_610.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN metadata TO user_role; | ALTER_RENAME | false |
DIFF00000007029 | orm_schema_change | Ruby | orders_234.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :email | NONE | true |
DIFF00000007030 | raw_sql_destructive | SQL | payments_326.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00000007031 | mentioned_in_comment | Python | employees_819.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE notifications; -- now deprecated""" | TRUNCATE | false |
DIFF00000007032 | raw_sql_destructive | SQL | invoices_415.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000007033 | test_suite_cleanup | SQL | spec/inventory_36.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN price TO contact_email; | ALTER_RENAME | false |
DIFF00000007034 | general_code_change | Go | refunds_739.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007035 | mentioned_in_comment | Python | users_3.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN priority;") | DROP_COLUMN | false |
DIFF00000007036 | raw_sql_safe | SQL | orders_409.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET created_at = %s WHERE status = %s; | NONE | false |
DIFF00000007037 | orm_schema_change | JavaScript | events_911.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000007038 | test_suite_cleanup | SQL | spec/invoices_39.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET name = CONCAT(name, order_id); | UPDATE_CONCAT | false |
DIFF00000007039 | general_code_change | Python | accounts_608.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007040 | raw_sql_destructive | SQL | inventory_1.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000007041 | mentioned_in_comment | Python | invoices_691.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions DROP COLUMN balance;") | DROP_COLUMN | false |
DIFF00000007042 | mentioned_in_comment | Python | invoices_544.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE employees SET user_id = CONCAT(user_id, balance); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000007043 | mentioned_in_comment | Python | payments_518.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM refunds; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000007044 | test_suite_cleanup | SQL | spec/inventory_489.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | false |
DIFF00000007045 | general_code_change | Python | comments_18.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007046 | general_code_change | Python | logs_74.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007047 | orm_schema_change | JavaScript | shipments_939.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('address')) | NONE | true |
DIFF00000007048 | test_suite_cleanup | SQL | spec/notifications_403.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000007049 | raw_sql_destructive | SQL | accounts_941.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000007050 | raw_sql_destructive | SQL | employees_701.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000007051 | mentioned_in_comment | Python | users_487.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE users DROP COLUMN priority;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000007052 | raw_sql_safe | SQL | products_74.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (amount, quantity) VALUES (%s, %s); | NONE | false |
DIFF00000007053 | obfuscated_destructive | SQL | events_587.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
users
DROP
COLUMN
created_at; | DROP_COLUMN | true |
DIFF00000007054 | orm_schema_change | Ruby | comments_68.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :quantity | NONE | true |
DIFF00000007055 | orm_schema_change | JavaScript | subscriptions_298.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('role')) | NONE | true |
DIFF00000007056 | orm_schema_change | Ruby | shipments_690.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :user_id | NONE | true |
DIFF00000007057 | mentioned_in_comment | Python | shipments_52.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE users SET email = CONCAT(email, category); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000007058 | obfuscated_destructive | SQL | customers_44.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE reviews SET user_id = CONCAT(user_id, email); | UPDATE_CONCAT | true |
DIFF00000007059 | obfuscated_destructive | SQL | logs_151.sql | schema cleanup | @@ -1,3 +1,3 @@
+update events set email = concat(email, priority); | UPDATE_CONCAT | true |
DIFF00000007060 | test_suite_cleanup | SQL | spec/employees_601.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000007061 | general_code_change | Ruby | shipments_488.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007062 | test_suite_cleanup | SQL | test/notifications_127.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000007063 | general_code_change | TypeScript | logs_186.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 |
DIFF00000007064 | obfuscated_destructive | SQL | tickets_907.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000007065 | orm_schema_change | TypeScript | events_305.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: priority } | NONE | true |
DIFF00000007066 | general_code_change | JavaScript | inventory_509.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 |
DIFF00000007067 | obfuscated_destructive | SQL | customers_991.sql | schema cleanup | @@ -1,3 +1,3 @@
+update reviews set updated_at = concat(updated_at, status); | UPDATE_CONCAT | true |
DIFF00000007068 | raw_sql_safe | SQL | notifications_164.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET status = %s WHERE description = %s; | NONE | false |
DIFF00000007069 | mentioned_in_comment | Python | products_275.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE users;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000007070 | test_suite_cleanup | SQL | tests/employees_301.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000007071 | general_code_change | Ruby | orders_336.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007072 | raw_sql_safe | SQL | logs_610.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE updated_at = 'active'; | NONE | false |
DIFF00000007073 | obfuscated_destructive | SQL | comments_809.sql | schema cleanup | @@ -1,3 +1,3 @@
+DrOp tABle cusTOMERs; | DROP_TABLE | true |
DIFF00000007074 | mentioned_in_comment | Python | logs_498.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory RENAME COLUMN metadata TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000007075 | general_code_change | TypeScript | payments_975.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 |
DIFF00000007076 | raw_sql_safe | SQL | comments_734.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_balance ON transactions (created_at); | NONE | false |
DIFF00000007077 | general_code_change | Java | subscriptions_446.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007078 | general_code_change | JavaScript | shipments_509.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007079 | general_code_change | Go | shipments_104.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007080 | orm_schema_change | TypeScript | customers_645.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: address } | NONE | true |
DIFF00000007081 | raw_sql_safe | SQL | events_262.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_created_at ON logs (is_active); | NONE | false |
DIFF00000007082 | orm_schema_change | JavaScript | products_849.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('payments', 'user_id') | NONE | true |
DIFF00000007083 | mentioned_in_comment | Python | shipments_344.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE comments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000007084 | general_code_change | Python | inventory_337.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007085 | raw_sql_safe | SQL | subscriptions_141.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (user_id, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000007086 | general_code_change | JavaScript | subscriptions_788.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007087 | obfuscated_destructive | SQL | events_910.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000007088 | raw_sql_destructive | SQL | payments_526.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000007089 | general_code_change | TypeScript | subscriptions_728.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 |
DIFF00000007090 | test_suite_cleanup | SQL | test/products_30.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE accounts SET updated_at = CONCAT(updated_at, user_id); | UPDATE_CONCAT | false |
DIFF00000007091 | general_code_change | Ruby | logs_718.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007092 | raw_sql_destructive | SQL | users_252.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET created_at = CONCAT(created_at, status); | UPDATE_CONCAT | true |
DIFF00000007093 | obfuscated_destructive | SQL | accounts_504.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00000007094 | general_code_change | TypeScript | transactions_182.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 |
DIFF00000007095 | mentioned_in_comment | Python | products_330.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE reviews RENAME COLUMN score TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000007096 | orm_schema_change | JavaScript | users_92.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'phone') | NONE | true |
DIFF00000007097 | general_code_change | Ruby | transactions_15.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007098 | orm_schema_change | JavaScript | refunds_175.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'order_id') | NONE | true |
DIFF00000007099 | general_code_change | Python | tickets_984.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.