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 |
|---|---|---|---|---|---|---|---|
DIFF00099993100 | mentioned_in_comment | Python | orders_953.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE accounts;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099993101 | raw_sql_safe | SQL | shipments_557.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE status = 'active'; | NONE | false |
DIFF00099993102 | obfuscated_destructive | SQL | customers_836.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099993103 | orm_schema_change | Ruby | orders_329.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :created_at | NONE | true |
DIFF00099993104 | test_suite_cleanup | SQL | spec/subscriptions_615.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00099993105 | general_code_change | TypeScript | events_740.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 |
DIFF00099993106 | raw_sql_safe | SQL | refunds_494.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_email ON accounts (status); | NONE | false |
DIFF00099993107 | test_suite_cleanup | SQL | test/accounts_228.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN amount TO user_role; | ALTER_RENAME | false |
DIFF00099993108 | raw_sql_safe | SQL | transactions_839.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_description ON sessions (quantity); | NONE | false |
DIFF00099993109 | general_code_change | Go | customers_616.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993110 | general_code_change | Go | reviews_432.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993111 | general_code_change | Go | reviews_398.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993112 | raw_sql_destructive | SQL | orders_541.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN email; | DROP_COLUMN | true |
DIFF00099993113 | raw_sql_destructive | SQL | inventory_766.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099993114 | obfuscated_destructive | SQL | payments_808.sql | schema cleanup | @@ -1,3 +1,3 @@
+truNCATe tABle PRodUCTs; | TRUNCATE | true |
DIFF00099993115 | general_code_change | JavaScript | subscriptions_286.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 |
DIFF00099993116 | raw_sql_safe | SQL | transactions_206.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (user_id, created_at) VALUES (%s, %s); | NONE | false |
DIFF00099993117 | general_code_change | Go | events_218.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993118 | obfuscated_destructive | SQL | comments_505.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099993119 | general_code_change | Ruby | notifications_320.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993120 | mentioned_in_comment | Python | shipments_636.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE logs; -- now deprecated""" | DROP_TABLE | false |
DIFF00099993121 | general_code_change | JavaScript | invoices_415.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993122 | general_code_change | Python | events_100.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993123 | orm_schema_change | Ruby | customers_428.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :address | NONE | true |
DIFF00099993124 | general_code_change | Python | notifications_675.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099993125 | raw_sql_destructive | SQL | employees_712.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00099993126 | general_code_change | Ruby | subscriptions_325.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099993127 | test_suite_cleanup | SQL | tests/customers_446.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET balance = CONCAT(balance, metadata); | UPDATE_CONCAT | false |
DIFF00099993128 | raw_sql_safe | SQL | orders_124.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099993129 | general_code_change | Python | products_630.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099993130 | test_suite_cleanup | SQL | mysql-test/suite/sessions_74.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099993131 | raw_sql_destructive | SQL | shipments_131.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET is_active = CONCAT(is_active, order_id); | UPDATE_CONCAT | true |
DIFF00099993132 | obfuscated_destructive | SQL | invoices_471.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpdATE shipMENTs SET Name = cONcat(nAmE, BalANCe); | UPDATE_CONCAT | true |
DIFF00099993133 | raw_sql_safe | SQL | payments_682.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099993134 | mentioned_in_comment | Python | refunds_84.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE users RENAME COLUMN description TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099993135 | test_suite_cleanup | SQL | tests/refunds_478.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00099993136 | test_suite_cleanup | SQL | tests/invoices_638.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | false |
DIFF00099993137 | orm_schema_change | JavaScript | events_685.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'address') | NONE | true |
DIFF00099993138 | test_suite_cleanup | SQL | test/accounts_981.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00099993139 | test_suite_cleanup | SQL | test/payments_509.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN score; | DROP_COLUMN | false |
DIFF00099993140 | general_code_change | TypeScript | payments_132.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 |
DIFF00099993141 | raw_sql_destructive | SQL | invoices_967.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00099993142 | orm_schema_change | JavaScript | subscriptions_850.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'amount') | NONE | true |
DIFF00099993143 | raw_sql_safe | SQL | comments_552.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE status = 'active'; | NONE | false |
DIFF00099993144 | raw_sql_safe | SQL | payments_943.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099993145 | test_suite_cleanup | SQL | tests/subscriptions_720.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN name; | DROP_COLUMN | false |
DIFF00099993146 | test_suite_cleanup | SQL | tests/inventory_556.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00099993147 | raw_sql_safe | SQL | reviews_975.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099993148 | raw_sql_safe | SQL | sessions_799.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099993149 | general_code_change | Go | payments_313.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099993150 | orm_schema_change | JavaScript | invoices_461.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'category') | NONE | true |
DIFF00099993151 | raw_sql_destructive | SQL | comments_146.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00099993152 | test_suite_cleanup | SQL | spec/tickets_830.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099993153 | raw_sql_safe | SQL | refunds_369.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (priority, category) VALUES (%s, %s); | NONE | false |
DIFF00099993154 | obfuscated_destructive | SQL | events_175.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN role TO full_name; | ALTER_RENAME | true |
DIFF00099993155 | test_suite_cleanup | SQL | test/payments_795.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN quantity TO user_role; | ALTER_RENAME | false |
DIFF00099993156 | raw_sql_destructive | SQL | orders_65.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099993157 | raw_sql_destructive | SQL | transactions_585.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN priority TO user_role; | ALTER_RENAME | true |
DIFF00099993158 | raw_sql_destructive | SQL | notifications_732.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET quantity = CONCAT(quantity, user_id); | UPDATE_CONCAT | true |
DIFF00099993159 | obfuscated_destructive | SQL | transactions_388.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
customers; | DROP_TABLE | true |
DIFF00099993160 | mentioned_in_comment | Python | notifications_22.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE events;") | DROP_TABLE | false |
DIFF00099993161 | raw_sql_destructive | SQL | refunds_941.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00099993162 | obfuscated_destructive | SQL | reviews_998.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
RENAME
COLUMN
role
TO
user_role; | ALTER_RENAME | true |
DIFF00099993163 | test_suite_cleanup | SQL | mysql-test/suite/comments_744.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET phone = CONCAT(phone, priority); | UPDATE_CONCAT | false |
DIFF00099993164 | general_code_change | JavaScript | reviews_595.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 |
DIFF00099993165 | test_suite_cleanup | SQL | mysql-test/suite/users_415.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN category TO state; | ALTER_RENAME | false |
DIFF00099993166 | general_code_change | Python | inventory_644.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099993167 | general_code_change | JavaScript | employees_399.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993168 | raw_sql_destructive | SQL | sessions_219.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00099993169 | general_code_change | JavaScript | users_925.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099993170 | test_suite_cleanup | SQL | tests/shipments_538.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00099993171 | general_code_change | Java | inventory_232.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099993172 | raw_sql_destructive | SQL | notifications_92.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN priority TO state; | ALTER_RENAME | true |
DIFF00099993173 | general_code_change | Python | tickets_227.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099993174 | orm_schema_change | Ruby | employees_551.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :name | NONE | true |
DIFF00099993175 | general_code_change | TypeScript | subscriptions_781.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 |
DIFF00099993176 | orm_schema_change | JavaScript | accounts_916.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'priority') | NONE | true |
DIFF00099993177 | raw_sql_safe | SQL | sessions_862.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_email ON tickets (description); | NONE | false |
DIFF00099993178 | obfuscated_destructive | SQL | sessions_207.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
notifications
RENAME
COLUMN
status
TO
user_role; | ALTER_RENAME | true |
DIFF00099993179 | raw_sql_safe | SQL | events_7.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET is_active = %s WHERE updated_at = %s; | NONE | false |
DIFF00099993180 | orm_schema_change | Ruby | subscriptions_910.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :quantity | NONE | true |
DIFF00099993181 | orm_schema_change | Python | tickets_987.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='role') | NONE | true |
DIFF00099993182 | mentioned_in_comment | Python | shipments_880.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE users RENAME COLUMN created_at TO full_name;") | ALTER_RENAME | false |
DIFF00099993183 | raw_sql_destructive | SQL | reviews_35.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00099993184 | test_suite_cleanup | SQL | mysql-test/suite/notifications_39.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN amount TO contact_email; | ALTER_RENAME | false |
DIFF00099993185 | mentioned_in_comment | Python | shipments_147.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE events;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099993186 | raw_sql_destructive | SQL | users_779.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET amount = CONCAT(amount, is_active); | UPDATE_CONCAT | true |
DIFF00099993187 | obfuscated_destructive | SQL | logs_217.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE inventory SET order_id = CONCAT(order_id, created_at); | UPDATE_CONCAT | true |
DIFF00099993188 | obfuscated_destructive | SQL | payments_867.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00099993189 | orm_schema_change | Ruby | subscriptions_313.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :quantity | NONE | true |
DIFF00099993190 | raw_sql_destructive | SQL | invoices_985.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET phone = CONCAT(phone, order_id); | UPDATE_CONCAT | true |
DIFF00099993191 | raw_sql_destructive | SQL | payments_701.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET priority = CONCAT(priority, quantity); | UPDATE_CONCAT | true |
DIFF00099993192 | raw_sql_safe | SQL | users_362.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE description = 'active'; | NONE | false |
DIFF00099993193 | obfuscated_destructive | SQL | sessions_626.sql | schema cleanup | @@ -1,3 +1,3 @@
+altER TaBLE InvOiCEs ReNaME cOLUmn scoRe To Amount_CeNts; | ALTER_RENAME | true |
DIFF00099993194 | test_suite_cleanup | SQL | tests/transactions_643.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET is_active = CONCAT(is_active, updated_at); | UPDATE_CONCAT | false |
DIFF00099993195 | obfuscated_destructive | SQL | logs_881.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099993196 | test_suite_cleanup | SQL | spec/payments_278.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | false |
DIFF00099993197 | test_suite_cleanup | SQL | mysql-test/suite/transactions_338.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | false |
DIFF00099993198 | mentioned_in_comment | Python | subscriptions_93.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM transactions;") | DELETE_UNQUALIFIED | false |
DIFF00099993199 | obfuscated_destructive | SQL | shipments_161.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROp tABlE tiCKEtS; | DROP_TABLE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.