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 |
|---|---|---|---|---|---|---|---|
DIFF00099996800 | orm_schema_change | JavaScript | logs_412.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('order_id')) | NONE | true |
DIFF00099996801 | general_code_change | JavaScript | orders_497.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 |
DIFF00099996802 | raw_sql_destructive | SQL | accounts_132.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET price = CONCAT(price, score); | UPDATE_CONCAT | true |
DIFF00099996803 | general_code_change | Ruby | transactions_505.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996804 | raw_sql_destructive | SQL | orders_76.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00099996805 | raw_sql_safe | SQL | customers_379.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_email ON employees (user_id); | NONE | false |
DIFF00099996806 | obfuscated_destructive | SQL | logs_970.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
users
DROP
COLUMN
is_active; | DROP_COLUMN | true |
DIFF00099996807 | obfuscated_destructive | SQL | reviews_728.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
payments; | DELETE_UNQUALIFIED | true |
DIFF00099996808 | raw_sql_destructive | SQL | refunds_848.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00099996809 | general_code_change | Python | events_857.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996810 | raw_sql_destructive | SQL | notifications_557.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | true |
DIFF00099996811 | raw_sql_destructive | SQL | events_73.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00099996812 | general_code_change | Java | employees_379.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996813 | mentioned_in_comment | Python | logs_314.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE shipments SET user_id = CONCAT(user_id, created_at);") | UPDATE_CONCAT | false |
DIFF00099996814 | general_code_change | Go | events_995.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996815 | general_code_change | JavaScript | logs_349.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996816 | raw_sql_destructive | SQL | employees_225.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET email = CONCAT(email, amount); | UPDATE_CONCAT | true |
DIFF00099996817 | test_suite_cleanup | SQL | test/inventory_720.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099996818 | orm_schema_change | Python | payments_671.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='user_id') | NONE | true |
DIFF00099996819 | general_code_change | Python | comments_744.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996820 | general_code_change | Python | sessions_658.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996821 | mentioned_in_comment | Python | comments_278.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE transactions SET user_id = CONCAT(user_id, user_id);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099996822 | general_code_change | Ruby | payments_456.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996823 | orm_schema_change | Python | employees_47.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='balance') | NONE | true |
DIFF00099996824 | raw_sql_safe | SQL | reviews_350.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (amount, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099996825 | general_code_change | Python | subscriptions_525.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996826 | raw_sql_destructive | SQL | employees_685.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET created_at = CONCAT(created_at, description); | UPDATE_CONCAT | true |
DIFF00099996827 | orm_schema_change | Python | logs_915.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='name') | NONE | true |
DIFF00099996828 | obfuscated_destructive | SQL | notifications_562.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
RENAME
COLUMN
category
TO
contact_email; | ALTER_RENAME | true |
DIFF00099996829 | mentioned_in_comment | Python | refunds_617.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE tickets RENAME COLUMN metadata TO contact_email;") | ALTER_RENAME | false |
DIFF00099996830 | general_code_change | Python | sessions_105.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996831 | orm_schema_change | TypeScript | comments_66.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: score } | NONE | true |
DIFF00099996832 | orm_schema_change | Python | notifications_282.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='phone') | NONE | true |
DIFF00099996833 | mentioned_in_comment | Python | sessions_593.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE accounts SET role = CONCAT(role, metadata);") | UPDATE_CONCAT | false |
DIFF00099996834 | raw_sql_safe | SQL | orders_408.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE email = 'active'; | NONE | false |
DIFF00099996835 | general_code_change | JavaScript | payments_489.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 |
DIFF00099996836 | orm_schema_change | TypeScript | users_939.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: user_id } | NONE | true |
DIFF00099996837 | general_code_change | Ruby | reviews_93.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996838 | test_suite_cleanup | SQL | spec/refunds_149.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00099996839 | orm_schema_change | JavaScript | comments_76.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('created_at')) | NONE | true |
DIFF00099996840 | general_code_change | TypeScript | users_61.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 |
DIFF00099996841 | raw_sql_safe | SQL | refunds_415.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (email, priority) VALUES (%s, %s); | NONE | false |
DIFF00099996842 | general_code_change | Java | notifications_600.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996843 | general_code_change | TypeScript | shipments_329.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 |
DIFF00099996844 | general_code_change | Go | comments_278.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996845 | raw_sql_safe | SQL | events_957.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099996846 | orm_schema_change | JavaScript | products_446.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'quantity') | NONE | true |
DIFF00099996847 | raw_sql_destructive | SQL | subscriptions_109.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN price TO contact_email; | ALTER_RENAME | true |
DIFF00099996848 | raw_sql_safe | SQL | employees_958.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE created_at = 'active'; | NONE | false |
DIFF00099996849 | mentioned_in_comment | Python | employees_397.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE orders;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099996850 | general_code_change | Go | events_918.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996851 | raw_sql_destructive | SQL | customers_343.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00099996852 | mentioned_in_comment | Python | logs_208.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE refunds SET order_id = CONCAT(order_id, quantity); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099996853 | orm_schema_change | JavaScript | reviews_108.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('phone')) | NONE | true |
DIFF00099996854 | test_suite_cleanup | SQL | tests/sessions_282.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET quantity = CONCAT(quantity, created_at); | UPDATE_CONCAT | false |
DIFF00099996855 | general_code_change | Go | products_618.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996856 | raw_sql_safe | SQL | tickets_696.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099996857 | raw_sql_destructive | SQL | employees_131.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN price; | DROP_COLUMN | true |
DIFF00099996858 | raw_sql_safe | SQL | invoices_758.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_score ON payments (score); | NONE | false |
DIFF00099996859 | obfuscated_destructive | SQL | events_976.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUnCatE taBlE USers; | TRUNCATE | true |
DIFF00099996860 | raw_sql_safe | SQL | reviews_599.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (updated_at, email) VALUES (%s, %s); | NONE | false |
DIFF00099996861 | general_code_change | Python | subscriptions_863.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996862 | raw_sql_safe | SQL | payments_571.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET phone = %s WHERE email = %s; | NONE | false |
DIFF00099996863 | obfuscated_destructive | SQL | reviews_443.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table subscriptions rename column description to amount_cents; | ALTER_RENAME | true |
DIFF00099996864 | mentioned_in_comment | Python | reviews_125.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE comments DROP COLUMN priority;") | DROP_COLUMN | false |
DIFF00099996865 | obfuscated_destructive | SQL | inventory_797.sql | schema cleanup | @@ -1,3 +1,3 @@
+truNcAte TaBLe InVOICes; | TRUNCATE | true |
DIFF00099996866 | mentioned_in_comment | Python | subscriptions_551.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE comments RENAME COLUMN category TO amount_cents;") | ALTER_RENAME | false |
DIFF00099996867 | mentioned_in_comment | Python | notifications_574.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts DROP COLUMN email; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099996868 | obfuscated_destructive | SQL | refunds_399.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtEr TABLE pRoduCTS rENAMe COLumn PhONE to UseR_ROle; | ALTER_RENAME | true |
DIFF00099996869 | mentioned_in_comment | Python | sessions_750.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE users DROP COLUMN status;") | DROP_COLUMN | false |
DIFF00099996870 | mentioned_in_comment | Python | notifications_47.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments RENAME COLUMN name TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099996871 | raw_sql_safe | SQL | comments_270.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_quantity ON shipments (email); | NONE | false |
DIFF00099996872 | raw_sql_safe | SQL | refunds_821.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET status = %s WHERE order_id = %s; | NONE | false |
DIFF00099996873 | general_code_change | JavaScript | subscriptions_371.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 |
DIFF00099996874 | obfuscated_destructive | SQL | tickets_771.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
employees
SET
email
=
CONCAT(email,
created_at); | UPDATE_CONCAT | true |
DIFF00099996875 | general_code_change | Go | sessions_698.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996876 | general_code_change | JavaScript | events_630.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 |
DIFF00099996877 | raw_sql_safe | SQL | logs_352.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE price = 'active'; | NONE | false |
DIFF00099996878 | general_code_change | Python | inventory_592.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996879 | general_code_change | JavaScript | notifications_403.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996880 | raw_sql_safe | SQL | orders_45.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE quantity = 'active'; | NONE | false |
DIFF00099996881 | raw_sql_destructive | SQL | comments_866.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00099996882 | obfuscated_destructive | SQL | events_867.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from comments; | DELETE_UNQUALIFIED | true |
DIFF00099996883 | orm_schema_change | JavaScript | transactions_648.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'score') | NONE | true |
DIFF00099996884 | general_code_change | TypeScript | orders_759.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 |
DIFF00099996885 | orm_schema_change | JavaScript | comments_142.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'description') | NONE | true |
DIFF00099996886 | obfuscated_destructive | SQL | users_774.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00099996887 | obfuscated_destructive | SQL | comments_83.sql | schema cleanup | @@ -1,3 +1,3 @@
+deLeTe FROm SUBSCRiPtioNs; | DELETE_UNQUALIFIED | true |
DIFF00099996888 | obfuscated_destructive | SQL | shipments_883.sql | schema cleanup | @@ -1,3 +1,3 @@
+DroP TabLe UseRS; | DROP_TABLE | true |
DIFF00099996889 | raw_sql_safe | SQL | accounts_395.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099996890 | general_code_change | Java | transactions_147.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996891 | test_suite_cleanup | SQL | tests/events_648.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN price TO contact_email; | ALTER_RENAME | false |
DIFF00099996892 | general_code_change | Python | inventory_63.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996893 | obfuscated_destructive | SQL | shipments_642.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications drop column user_id; | DROP_COLUMN | true |
DIFF00099996894 | mentioned_in_comment | Python | payments_460.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE refunds RENAME COLUMN created_at TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099996895 | raw_sql_safe | SQL | notifications_137.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE created_at = 'active'; | NONE | false |
DIFF00099996896 | general_code_change | Ruby | employees_89.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996897 | raw_sql_destructive | SQL | payments_171.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00099996898 | raw_sql_safe | SQL | employees_664.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099996899 | raw_sql_destructive | SQL | reviews_864.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN email TO state; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.