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 |
|---|---|---|---|---|---|---|---|
DIFF00099998900 | raw_sql_destructive | SQL | inventory_382.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099998901 | test_suite_cleanup | SQL | tests/sessions_314.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET order_id = CONCAT(order_id, name); | UPDATE_CONCAT | false |
DIFF00099998902 | test_suite_cleanup | SQL | spec/shipments_809.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN score; | DROP_COLUMN | false |
DIFF00099998903 | orm_schema_change | JavaScript | users_185.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('description')) | NONE | true |
DIFF00099998904 | mentioned_in_comment | Python | tickets_867.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE products RENAME COLUMN metadata TO state;") | ALTER_RENAME | false |
DIFF00099998905 | mentioned_in_comment | Python | users_212.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE transactions DROP COLUMN amount;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099998906 | mentioned_in_comment | Python | logs_684.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE sessions; -- now deprecated""" | DROP_TABLE | false |
DIFF00099998907 | general_code_change | Java | customers_663.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998908 | test_suite_cleanup | SQL | test/payments_318.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00099998909 | mentioned_in_comment | Python | inventory_782.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE customers SET amount = CONCAT(amount, is_active);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099998910 | obfuscated_destructive | SQL | subscriptions_922.sql | schema cleanup | @@ -1,3 +1,3 @@
+update sessions set status = concat(status, address); | UPDATE_CONCAT | true |
DIFF00099998911 | orm_schema_change | Python | events_361.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='shipments', name='role') | NONE | true |
DIFF00099998912 | obfuscated_destructive | SQL | users_114.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE events SET score = CONCAT(score, updated_at); | UPDATE_CONCAT | true |
DIFF00099998913 | raw_sql_safe | SQL | inventory_636.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET quantity = %s WHERE description = %s; | NONE | false |
DIFF00099998914 | general_code_change | Ruby | orders_294.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998915 | raw_sql_destructive | SQL | invoices_958.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET email = CONCAT(email, priority); | UPDATE_CONCAT | true |
DIFF00099998916 | test_suite_cleanup | SQL | tests/customers_118.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET quantity = CONCAT(quantity, category); | UPDATE_CONCAT | false |
DIFF00099998917 | mentioned_in_comment | Python | accounts_40.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE orders;") | DROP_TABLE | false |
DIFF00099998918 | general_code_change | TypeScript | subscriptions_898.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 |
DIFF00099998919 | raw_sql_destructive | SQL | products_932.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN status TO contact_email; | ALTER_RENAME | true |
DIFF00099998920 | mentioned_in_comment | Python | logs_835.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM users; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099998921 | mentioned_in_comment | Python | users_262.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE notifications RENAME COLUMN description TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099998922 | raw_sql_destructive | SQL | accounts_904.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099998923 | raw_sql_destructive | SQL | products_353.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00099998924 | mentioned_in_comment | Python | orders_351.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN quantity;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099998925 | raw_sql_safe | SQL | invoices_129.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET name = %s WHERE description = %s; | NONE | false |
DIFF00099998926 | raw_sql_safe | SQL | refunds_830.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE name = 'active'; | NONE | false |
DIFF00099998927 | obfuscated_destructive | SQL | users_507.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
logs; | TRUNCATE | true |
DIFF00099998928 | raw_sql_destructive | SQL | events_208.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00099998929 | raw_sql_destructive | SQL | subscriptions_877.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00099998930 | general_code_change | Python | users_531.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998931 | raw_sql_safe | SQL | invoices_480.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (category, category) VALUES (%s, %s); | NONE | false |
DIFF00099998932 | general_code_change | Java | customers_355.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998933 | obfuscated_destructive | SQL | notifications_769.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
comments
DROP
COLUMN
priority; | DROP_COLUMN | true |
DIFF00099998934 | general_code_change | Ruby | products_217.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998935 | test_suite_cleanup | SQL | tests/accounts_128.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE shipments SET balance = CONCAT(balance, priority); | UPDATE_CONCAT | false |
DIFF00099998936 | orm_schema_change | Python | events_881.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='created_at') | NONE | true |
DIFF00099998937 | general_code_change | Python | inventory_636.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998938 | mentioned_in_comment | Python | users_888.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE subscriptions SET status = CONCAT(status, price); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099998939 | obfuscated_destructive | SQL | tickets_967.sql | schema cleanup | @@ -1,3 +1,3 @@
+update events set created_at = concat(created_at, description); | UPDATE_CONCAT | true |
DIFF00099998940 | orm_schema_change | JavaScript | reviews_945.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('user_id')) | NONE | true |
DIFF00099998941 | mentioned_in_comment | Python | transactions_345.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE products SET category = CONCAT(category, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099998942 | raw_sql_safe | SQL | notifications_802.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE phone = 'active'; | NONE | false |
DIFF00099998943 | obfuscated_destructive | SQL | subscriptions_143.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
transactions
DROP
COLUMN
price; | DROP_COLUMN | true |
DIFF00099998944 | mentioned_in_comment | Python | shipments_78.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE transactions SET description = CONCAT(description, status); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099998945 | general_code_change | JavaScript | users_101.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998946 | test_suite_cleanup | SQL | tests/products_859.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN balance TO contact_email; | ALTER_RENAME | false |
DIFF00099998947 | orm_schema_change | Ruby | logs_56.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :order_id | NONE | true |
DIFF00099998948 | test_suite_cleanup | SQL | mysql-test/suite/reviews_140.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00099998949 | general_code_change | Go | subscriptions_961.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998950 | general_code_change | JavaScript | inventory_425.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998951 | raw_sql_destructive | SQL | logs_857.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00099998952 | orm_schema_change | TypeScript | users_749.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: priority } | NONE | true |
DIFF00099998953 | mentioned_in_comment | Python | employees_385.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM products;") | DELETE_UNQUALIFIED | false |
DIFF00099998954 | general_code_change | JavaScript | refunds_56.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 |
DIFF00099998955 | test_suite_cleanup | SQL | test/products_278.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00099998956 | orm_schema_change | Ruby | employees_903.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :score | NONE | true |
DIFF00099998957 | general_code_change | TypeScript | refunds_826.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 |
DIFF00099998958 | orm_schema_change | Ruby | shipments_414.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :balance | NONE | true |
DIFF00099998959 | raw_sql_safe | SQL | subscriptions_463.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099998960 | orm_schema_change | JavaScript | transactions_580.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'address') | NONE | true |
DIFF00099998961 | general_code_change | Python | comments_447.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998962 | mentioned_in_comment | Python | inventory_336.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM products; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099998963 | raw_sql_destructive | SQL | users_853.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET updated_at = CONCAT(updated_at, created_at); | UPDATE_CONCAT | true |
DIFF00099998964 | raw_sql_safe | SQL | sessions_518.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (status, category) VALUES (%s, %s); | NONE | false |
DIFF00099998965 | orm_schema_change | Ruby | sessions_724.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :email | NONE | true |
DIFF00099998966 | general_code_change | TypeScript | shipments_357.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 |
DIFF00099998967 | general_code_change | Go | inventory_286.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998968 | general_code_change | JavaScript | orders_311.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998969 | raw_sql_safe | SQL | subscriptions_944.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (status, price) VALUES (%s, %s); | NONE | false |
DIFF00099998970 | obfuscated_destructive | SQL | orders_770.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
subscriptions; | TRUNCATE | true |
DIFF00099998971 | test_suite_cleanup | SQL | spec/sessions_546.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00099998972 | orm_schema_change | JavaScript | refunds_44.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'created_at') | NONE | true |
DIFF00099998973 | raw_sql_destructive | SQL | customers_652.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099998974 | orm_schema_change | Python | shipments_418.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='address') | NONE | true |
DIFF00099998975 | raw_sql_safe | SQL | subscriptions_871.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE is_active = 'active'; | NONE | false |
DIFF00099998976 | mentioned_in_comment | Python | subscriptions_244.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE shipments RENAME COLUMN email TO amount_cents;") | ALTER_RENAME | false |
DIFF00099998977 | raw_sql_destructive | SQL | subscriptions_304.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN name; | DROP_COLUMN | true |
DIFF00099998978 | orm_schema_change | Python | products_271.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='phone') | NONE | true |
DIFF00099998979 | raw_sql_safe | SQL | accounts_7.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE user_id = 'active'; | NONE | false |
DIFF00099998980 | test_suite_cleanup | SQL | test/comments_255.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET category = CONCAT(category, balance); | UPDATE_CONCAT | false |
DIFF00099998981 | mentioned_in_comment | Python | transactions_785.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE logs; -- now deprecated""" | DROP_TABLE | false |
DIFF00099998982 | raw_sql_safe | SQL | employees_660.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099998983 | raw_sql_destructive | SQL | transactions_767.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN role; | DROP_COLUMN | true |
DIFF00099998984 | general_code_change | JavaScript | employees_404.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998985 | raw_sql_destructive | SQL | reviews_507.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN created_at TO amount_cents; | ALTER_RENAME | true |
DIFF00099998986 | raw_sql_safe | SQL | tickets_10.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099998987 | general_code_change | Java | accounts_683.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998988 | raw_sql_safe | SQL | notifications_535.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_status ON orders (name); | NONE | false |
DIFF00099998989 | orm_schema_change | JavaScript | subscriptions_262.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'description') | NONE | true |
DIFF00099998990 | general_code_change | Java | products_884.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998991 | raw_sql_destructive | SQL | logs_681.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00099998992 | general_code_change | TypeScript | invoices_82.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 |
DIFF00099998993 | general_code_change | Ruby | subscriptions_210.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998994 | orm_schema_change | JavaScript | sessions_35.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'description') | NONE | true |
DIFF00099998995 | general_code_change | TypeScript | sessions_473.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 |
DIFF00099998996 | mentioned_in_comment | Python | inventory_433.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE logs DROP COLUMN price;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099998997 | test_suite_cleanup | SQL | spec/customers_72.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099998998 | raw_sql_safe | SQL | logs_107.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_events_phone ON events (email); | NONE | false |
DIFF00099998999 | orm_schema_change | Python | inventory_605.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='is_active') | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.