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 |
|---|---|---|---|---|---|---|---|
DIFF00099995100 | orm_schema_change | Python | employees_342.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='category') | NONE | true |
DIFF00099995101 | general_code_change | Go | transactions_27.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995102 | general_code_change | Ruby | accounts_39.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995103 | raw_sql_safe | SQL | tickets_524.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET priority = %s WHERE phone = %s; | NONE | false |
DIFF00099995104 | test_suite_cleanup | SQL | test/comments_586.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00099995105 | general_code_change | Python | tickets_92.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995106 | raw_sql_safe | SQL | notifications_323.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE name = 'active'; | NONE | false |
DIFF00099995107 | test_suite_cleanup | SQL | tests/comments_647.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN name TO state; | ALTER_RENAME | false |
DIFF00099995108 | test_suite_cleanup | SQL | mysql-test/suite/employees_978.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN score; | DROP_COLUMN | false |
DIFF00099995109 | orm_schema_change | Ruby | payments_885.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :status | NONE | true |
DIFF00099995110 | orm_schema_change | TypeScript | invoices_162.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: metadata } | NONE | true |
DIFF00099995111 | general_code_change | JavaScript | users_501.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 |
DIFF00099995112 | orm_schema_change | TypeScript | orders_204.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: address } | NONE | true |
DIFF00099995113 | general_code_change | Go | accounts_529.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995114 | raw_sql_destructive | SQL | notifications_125.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | true |
DIFF00099995115 | raw_sql_destructive | SQL | payments_181.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099995116 | obfuscated_destructive | SQL | employees_842.sql | schema cleanup | @@ -1,3 +1,3 @@
+altEr TaBLE cUSTOMERs droP cOLuMn AmOuNT; | DROP_COLUMN | true |
DIFF00099995117 | general_code_change | Ruby | notifications_988.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995118 | obfuscated_destructive | SQL | subscriptions_769.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from tickets; | DELETE_UNQUALIFIED | true |
DIFF00099995119 | general_code_change | Go | accounts_232.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995120 | raw_sql_destructive | SQL | logs_45.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN metadata TO contact_email; | ALTER_RENAME | true |
DIFF00099995121 | raw_sql_safe | SQL | customers_776.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE address = 'active'; | NONE | false |
DIFF00099995122 | general_code_change | TypeScript | logs_619.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 |
DIFF00099995123 | obfuscated_destructive | SQL | reviews_393.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE comments SET address = CONCAT(address, address); | UPDATE_CONCAT | true |
DIFF00099995124 | raw_sql_destructive | SQL | users_606.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00099995125 | general_code_change | Java | logs_473.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995126 | raw_sql_safe | SQL | tickets_739.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099995127 | test_suite_cleanup | SQL | spec/logs_857.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET user_id = CONCAT(user_id, metadata); | UPDATE_CONCAT | false |
DIFF00099995128 | orm_schema_change | JavaScript | logs_648.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('balance')) | NONE | true |
DIFF00099995129 | mentioned_in_comment | Python | inventory_371.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE users;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099995130 | general_code_change | Python | logs_447.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995131 | general_code_change | JavaScript | invoices_498.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995132 | raw_sql_safe | SQL | tickets_761.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET score = %s WHERE updated_at = %s; | NONE | false |
DIFF00099995133 | general_code_change | TypeScript | subscriptions_266.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 |
DIFF00099995134 | obfuscated_destructive | SQL | notifications_461.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table users rename column order_id to full_name; | ALTER_RENAME | true |
DIFF00099995135 | orm_schema_change | Python | events_610.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='name') | NONE | true |
DIFF00099995136 | test_suite_cleanup | SQL | test/employees_970.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN priority; | DROP_COLUMN | false |
DIFF00099995137 | general_code_change | Python | subscriptions_826.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995138 | raw_sql_destructive | SQL | refunds_94.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN is_active TO state; | ALTER_RENAME | true |
DIFF00099995139 | raw_sql_safe | SQL | refunds_582.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099995140 | obfuscated_destructive | SQL | products_479.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
subscriptions
SET
description
=
CONCAT(description,
quantity); | UPDATE_CONCAT | true |
DIFF00099995141 | test_suite_cleanup | SQL | test/employees_850.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | false |
DIFF00099995142 | raw_sql_safe | SQL | notifications_61.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE score = 'active'; | NONE | false |
DIFF00099995143 | raw_sql_destructive | SQL | refunds_902.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00099995144 | mentioned_in_comment | Python | employees_839.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE employees DROP COLUMN email;") | DROP_COLUMN | false |
DIFF00099995145 | general_code_change | Ruby | accounts_933.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995146 | raw_sql_destructive | SQL | orders_126.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099995147 | obfuscated_destructive | SQL | users_175.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00099995148 | test_suite_cleanup | SQL | mysql-test/suite/refunds_927.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN description TO amount_cents; | ALTER_RENAME | false |
DIFF00099995149 | obfuscated_destructive | SQL | subscriptions_998.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00099995150 | mentioned_in_comment | Python | tickets_414.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM subscriptions; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099995151 | raw_sql_destructive | SQL | inventory_284.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00099995152 | test_suite_cleanup | SQL | mysql-test/suite/notifications_529.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00099995153 | orm_schema_change | Python | events_571.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='description') | NONE | true |
DIFF00099995154 | raw_sql_destructive | SQL | tickets_206.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN price TO user_role; | ALTER_RENAME | true |
DIFF00099995155 | general_code_change | TypeScript | subscriptions_950.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 |
DIFF00099995156 | general_code_change | JavaScript | events_842.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 |
DIFF00099995157 | mentioned_in_comment | Python | users_325.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE comments DROP COLUMN address;") | DROP_COLUMN | false |
DIFF00099995158 | raw_sql_destructive | SQL | users_608.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00099995159 | test_suite_cleanup | SQL | mysql-test/suite/events_668.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET score = CONCAT(score, price); | UPDATE_CONCAT | false |
DIFF00099995160 | orm_schema_change | Ruby | employees_589.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :is_active | NONE | true |
DIFF00099995161 | test_suite_cleanup | SQL | tests/shipments_158.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN description; | DROP_COLUMN | false |
DIFF00099995162 | orm_schema_change | Python | events_392.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='name') | NONE | true |
DIFF00099995163 | general_code_change | JavaScript | reviews_599.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 |
DIFF00099995164 | general_code_change | Python | sessions_451.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995165 | general_code_change | Java | notifications_85.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995166 | raw_sql_destructive | SQL | employees_778.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00099995167 | orm_schema_change | Python | invoices_26.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='name') | NONE | true |
DIFF00099995168 | general_code_change | Java | sessions_12.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995169 | general_code_change | JavaScript | employees_712.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 |
DIFF00099995170 | raw_sql_safe | SQL | tickets_167.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET category = %s WHERE price = %s; | NONE | false |
DIFF00099995171 | raw_sql_safe | SQL | tickets_94.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_events_name ON events (phone); | NONE | false |
DIFF00099995172 | raw_sql_safe | SQL | comments_356.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099995173 | general_code_change | Ruby | payments_239.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995174 | raw_sql_destructive | SQL | logs_392.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00099995175 | raw_sql_safe | SQL | customers_84.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (price, priority) VALUES (%s, %s); | NONE | false |
DIFF00099995176 | general_code_change | Ruby | inventory_534.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995177 | test_suite_cleanup | SQL | test/subscriptions_157.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00099995178 | general_code_change | Go | events_272.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995179 | test_suite_cleanup | SQL | test/sessions_832.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | false |
DIFF00099995180 | general_code_change | JavaScript | users_268.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995181 | raw_sql_destructive | SQL | comments_506.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET price = CONCAT(price, user_id); | UPDATE_CONCAT | true |
DIFF00099995182 | raw_sql_safe | SQL | shipments_34.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE quantity = 'active'; | NONE | false |
DIFF00099995183 | general_code_change | Java | tickets_540.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995184 | mentioned_in_comment | Python | employees_931.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE products;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099995185 | general_code_change | TypeScript | inventory_79.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 |
DIFF00099995186 | raw_sql_destructive | SQL | inventory_756.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099995187 | general_code_change | TypeScript | sessions_782.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 |
DIFF00099995188 | raw_sql_safe | SQL | events_286.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET score = %s WHERE user_id = %s; | NONE | false |
DIFF00099995189 | orm_schema_change | Ruby | transactions_987.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :user_id | NONE | true |
DIFF00099995190 | general_code_change | JavaScript | reviews_751.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995191 | general_code_change | JavaScript | customers_187.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 |
DIFF00099995192 | general_code_change | Java | employees_825.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995193 | orm_schema_change | TypeScript | events_30.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: price } | NONE | true |
DIFF00099995194 | test_suite_cleanup | SQL | mysql-test/suite/refunds_671.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00099995195 | raw_sql_safe | SQL | reviews_16.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_user_id ON accounts (score); | NONE | false |
DIFF00099995196 | general_code_change | Java | accounts_984.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995197 | raw_sql_destructive | SQL | transactions_696.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00099995198 | orm_schema_change | Ruby | users_248.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :updated_at | NONE | true |
DIFF00099995199 | general_code_change | JavaScript | employees_964.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.