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 |
|---|---|---|---|---|---|---|---|
DIFF00000008100 | obfuscated_destructive | SQL | invoices_419.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table events drop column name; | DROP_COLUMN | true |
DIFF00000008101 | test_suite_cleanup | SQL | test/customers_179.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN updated_at TO state; | ALTER_RENAME | false |
DIFF00000008102 | obfuscated_destructive | SQL | invoices_32.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTeR taBle tIckEtS dRop cOLUMN sCOre; | DROP_COLUMN | true |
DIFF00000008103 | orm_schema_change | JavaScript | logs_795.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('address')) | NONE | true |
DIFF00000008104 | obfuscated_destructive | SQL | subscriptions_49.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET metadata = CONCAT(metadata, priority); | UPDATE_CONCAT | true |
DIFF00000008105 | mentioned_in_comment | Python | payments_94.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM sessions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000008106 | mentioned_in_comment | Python | notifications_551.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE users DROP COLUMN updated_at;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000008107 | orm_schema_change | Python | sessions_624.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='quantity') | NONE | true |
DIFF00000008108 | raw_sql_destructive | SQL | notifications_427.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000008109 | mentioned_in_comment | Python | notifications_657.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE subscriptions; -- now deprecated""" | DROP_TABLE | false |
DIFF00000008110 | raw_sql_destructive | SQL | transactions_106.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00000008111 | obfuscated_destructive | SQL | payments_179.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000008112 | general_code_change | Python | transactions_484.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008113 | mentioned_in_comment | Python | refunds_300.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions RENAME COLUMN category TO full_name;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000008114 | general_code_change | Python | logs_205.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008115 | raw_sql_safe | SQL | accounts_435.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000008116 | raw_sql_destructive | SQL | employees_494.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN amount TO contact_email; | ALTER_RENAME | true |
DIFF00000008117 | general_code_change | JavaScript | customers_781.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008118 | general_code_change | JavaScript | customers_959.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 |
DIFF00000008119 | mentioned_in_comment | Python | employees_294.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN metadata;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000008120 | orm_schema_change | TypeScript | customers_976.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: priority } | NONE | true |
DIFF00000008121 | raw_sql_destructive | SQL | inventory_262.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET user_id = CONCAT(user_id, description); | UPDATE_CONCAT | true |
DIFF00000008122 | general_code_change | TypeScript | reviews_591.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 |
DIFF00000008123 | raw_sql_safe | SQL | tickets_127.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_score ON invoices (user_id); | NONE | false |
DIFF00000008124 | orm_schema_change | JavaScript | notifications_157.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'role') | NONE | true |
DIFF00000008125 | mentioned_in_comment | Python | comments_849.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE products;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008126 | general_code_change | TypeScript | users_239.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 |
DIFF00000008127 | raw_sql_destructive | SQL | comments_937.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN user_id TO full_name; | ALTER_RENAME | true |
DIFF00000008128 | test_suite_cleanup | SQL | test/users_452.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE events SET category = CONCAT(category, status); | UPDATE_CONCAT | false |
DIFF00000008129 | orm_schema_change | JavaScript | accounts_524.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'amount') | NONE | true |
DIFF00000008130 | raw_sql_destructive | SQL | shipments_434.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN updated_at TO contact_email; | ALTER_RENAME | true |
DIFF00000008131 | test_suite_cleanup | SQL | spec/sessions_972.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN address TO state; | ALTER_RENAME | false |
DIFF00000008132 | raw_sql_destructive | SQL | sessions_256.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000008133 | orm_schema_change | JavaScript | events_143.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'category') | NONE | true |
DIFF00000008134 | general_code_change | Ruby | invoices_257.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008135 | raw_sql_destructive | SQL | shipments_437.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000008136 | test_suite_cleanup | SQL | mysql-test/suite/invoices_493.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | false |
DIFF00000008137 | general_code_change | Python | shipments_237.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008138 | test_suite_cleanup | SQL | mysql-test/suite/accounts_205.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN email; | DROP_COLUMN | false |
DIFF00000008139 | obfuscated_destructive | SQL | events_806.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table subscriptions drop column price; | DROP_COLUMN | true |
DIFF00000008140 | general_code_change | Python | refunds_929.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008141 | orm_schema_change | Python | employees_915.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='amount') | NONE | true |
DIFF00000008142 | general_code_change | Python | transactions_954.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008143 | mentioned_in_comment | Python | invoices_713.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE tickets SET metadata = CONCAT(metadata, description);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008144 | general_code_change | TypeScript | invoices_706.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 |
DIFF00000008145 | obfuscated_destructive | SQL | shipments_599.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
products; | DROP_TABLE | true |
DIFF00000008146 | raw_sql_destructive | SQL | users_781.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000008147 | general_code_change | Ruby | accounts_644.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008148 | raw_sql_destructive | SQL | shipments_435.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00000008149 | raw_sql_safe | SQL | logs_492.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_priority ON notifications (role); | NONE | false |
DIFF00000008150 | obfuscated_destructive | SQL | transactions_108.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPdAtE eVENts Set updAted_at = Concat(uPDAted_AT, CreatEd_aT); | UPDATE_CONCAT | true |
DIFF00000008151 | general_code_change | JavaScript | transactions_668.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008152 | test_suite_cleanup | SQL | mysql-test/suite/accounts_661.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00000008153 | orm_schema_change | JavaScript | events_765.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'status') | NONE | true |
DIFF00000008154 | general_code_change | Python | employees_62.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008155 | orm_schema_change | TypeScript | sessions_593.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: name } | NONE | true |
DIFF00000008156 | raw_sql_safe | SQL | sessions_548.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000008157 | raw_sql_safe | SQL | customers_271.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (quantity, description) VALUES (%s, %s); | NONE | false |
DIFF00000008158 | obfuscated_destructive | SQL | employees_75.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table reviews rename column quantity to amount_cents; | ALTER_RENAME | true |
DIFF00000008159 | raw_sql_destructive | SQL | inventory_776.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET score = CONCAT(score, status); | UPDATE_CONCAT | true |
DIFF00000008160 | raw_sql_destructive | SQL | orders_535.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000008161 | raw_sql_destructive | SQL | logs_682.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000008162 | mentioned_in_comment | Python | employees_794.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE accounts SET quantity = CONCAT(quantity, updated_at);") | UPDATE_CONCAT | false |
DIFF00000008163 | general_code_change | Ruby | products_631.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008164 | mentioned_in_comment | Python | refunds_717.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE comments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000008165 | mentioned_in_comment | Python | accounts_276.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM comments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000008166 | obfuscated_destructive | SQL | accounts_240.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000008167 | test_suite_cleanup | SQL | tests/notifications_126.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET balance = CONCAT(balance, is_active); | UPDATE_CONCAT | false |
DIFF00000008168 | orm_schema_change | TypeScript | employees_863.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: role } | NONE | true |
DIFF00000008169 | test_suite_cleanup | SQL | test/users_556.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN name TO amount_cents; | ALTER_RENAME | false |
DIFF00000008170 | obfuscated_destructive | SQL | reviews_906.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
logs
RENAME
COLUMN
price
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000008171 | general_code_change | Go | employees_735.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008172 | test_suite_cleanup | SQL | mysql-test/suite/products_634.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET category = CONCAT(category, category); | UPDATE_CONCAT | false |
DIFF00000008173 | mentioned_in_comment | Python | employees_602.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE accounts;") | TRUNCATE | false |
DIFF00000008174 | general_code_change | JavaScript | orders_716.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008175 | mentioned_in_comment | Python | comments_608.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE reviews SET address = CONCAT(address, balance);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008176 | general_code_change | Go | subscriptions_578.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008177 | mentioned_in_comment | Python | comments_750.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE users;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008178 | raw_sql_destructive | SQL | events_884.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN metadata TO amount_cents; | ALTER_RENAME | true |
DIFF00000008179 | general_code_change | TypeScript | sessions_932.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 |
DIFF00000008180 | test_suite_cleanup | SQL | tests/tickets_134.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN email; | DROP_COLUMN | false |
DIFF00000008181 | mentioned_in_comment | Python | refunds_525.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE employees;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000008182 | raw_sql_safe | SQL | sessions_317.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET user_id = %s WHERE quantity = %s; | NONE | false |
DIFF00000008183 | general_code_change | Python | payments_974.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008184 | general_code_change | Python | customers_66.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008185 | test_suite_cleanup | SQL | spec/shipments_967.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00000008186 | obfuscated_destructive | SQL | shipments_946.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table shipments; | TRUNCATE | true |
DIFF00000008187 | obfuscated_destructive | SQL | logs_820.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000008188 | orm_schema_change | TypeScript | customers_321.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: address } | NONE | true |
DIFF00000008189 | raw_sql_safe | SQL | subscriptions_657.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE status = 'active'; | NONE | false |
DIFF00000008190 | general_code_change | JavaScript | reviews_804.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 |
DIFF00000008191 | test_suite_cleanup | SQL | test/refunds_567.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET updated_at = CONCAT(updated_at, name); | UPDATE_CONCAT | false |
DIFF00000008192 | general_code_change | Go | shipments_795.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008193 | raw_sql_safe | SQL | shipments_404.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000008194 | mentioned_in_comment | Python | events_565.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE employees RENAME COLUMN description TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000008195 | test_suite_cleanup | SQL | tests/events_607.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN updated_at TO full_name; | ALTER_RENAME | false |
DIFF00000008196 | general_code_change | Ruby | comments_737.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008197 | general_code_change | Ruby | notifications_443.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008198 | test_suite_cleanup | SQL | mysql-test/suite/transactions_199.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000008199 | test_suite_cleanup | SQL | tests/inventory_840.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.