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 |
|---|---|---|---|---|---|---|---|
DIFF00000007900 | general_code_change | JavaScript | shipments_338.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 |
DIFF00000007901 | general_code_change | Python | refunds_494.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007902 | orm_schema_change | TypeScript | tickets_699.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: updated_at } | NONE | true |
DIFF00000007903 | obfuscated_destructive | SQL | orders_188.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
refunds
SET
score
=
CONCAT(score,
address); | UPDATE_CONCAT | true |
DIFF00000007904 | general_code_change | Python | reviews_829.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007905 | raw_sql_destructive | SQL | employees_18.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000007906 | general_code_change | JavaScript | customers_550.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 |
DIFF00000007907 | general_code_change | Ruby | comments_980.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007908 | mentioned_in_comment | Python | payments_715.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE inventory SET balance = CONCAT(balance, metadata);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000007909 | raw_sql_destructive | SQL | events_320.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000007910 | raw_sql_destructive | SQL | products_941.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00000007911 | test_suite_cleanup | SQL | tests/reviews_546.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET order_id = CONCAT(order_id, created_at); | UPDATE_CONCAT | false |
DIFF00000007912 | raw_sql_safe | SQL | employees_412.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007913 | raw_sql_safe | SQL | users_778.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE score = 'active'; | NONE | false |
DIFF00000007914 | raw_sql_destructive | SQL | users_91.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN quantity TO state; | ALTER_RENAME | true |
DIFF00000007915 | raw_sql_destructive | SQL | invoices_687.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000007916 | orm_schema_change | JavaScript | logs_242.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'name') | NONE | true |
DIFF00000007917 | general_code_change | JavaScript | tickets_3.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007918 | orm_schema_change | JavaScript | customers_863.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'created_at') | NONE | true |
DIFF00000007919 | obfuscated_destructive | SQL | payments_735.sql | schema cleanup | @@ -1,3 +1,3 @@
+DrOp tABlE CuStomERs; | DROP_TABLE | true |
DIFF00000007920 | general_code_change | JavaScript | subscriptions_692.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007921 | general_code_change | JavaScript | employees_561.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 |
DIFF00000007922 | orm_schema_change | Python | logs_960.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='is_active') | NONE | true |
DIFF00000007923 | raw_sql_destructive | SQL | invoices_96.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000007924 | raw_sql_safe | SQL | accounts_261.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (phone, category) VALUES (%s, %s); | NONE | false |
DIFF00000007925 | general_code_change | JavaScript | subscriptions_311.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007926 | general_code_change | JavaScript | sessions_856.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007927 | orm_schema_change | TypeScript | users_549.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: amount } | NONE | true |
DIFF00000007928 | general_code_change | JavaScript | orders_381.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007929 | mentioned_in_comment | Python | products_692.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM transactions;") | DELETE_UNQUALIFIED | false |
DIFF00000007930 | general_code_change | JavaScript | comments_119.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 |
DIFF00000007931 | test_suite_cleanup | SQL | spec/employees_657.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000007932 | general_code_change | Python | users_525.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007933 | obfuscated_destructive | SQL | orders_41.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000007934 | mentioned_in_comment | Python | comments_565.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE notifications; -- now deprecated""" | DROP_TABLE | false |
DIFF00000007935 | general_code_change | Python | subscriptions_938.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007936 | mentioned_in_comment | Python | orders_544.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE inventory RENAME COLUMN price TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007937 | general_code_change | Ruby | orders_238.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007938 | raw_sql_safe | SQL | accounts_765.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007939 | raw_sql_safe | SQL | invoices_629.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000007940 | general_code_change | JavaScript | transactions_349.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 |
DIFF00000007941 | orm_schema_change | Python | tickets_828.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='email') | NONE | true |
DIFF00000007942 | mentioned_in_comment | Python | comments_476.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE sessions SET order_id = CONCAT(order_id, is_active);") | UPDATE_CONCAT | false |
DIFF00000007943 | general_code_change | Java | inventory_117.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007944 | orm_schema_change | Python | sessions_355.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='address') | NONE | true |
DIFF00000007945 | raw_sql_destructive | SQL | inventory_408.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000007946 | general_code_change | Ruby | events_323.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007947 | obfuscated_destructive | SQL | transactions_826.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000007948 | mentioned_in_comment | Python | tickets_412.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE transactions SET price = CONCAT(price, metadata);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000007949 | general_code_change | Python | subscriptions_792.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007950 | test_suite_cleanup | SQL | mysql-test/suite/refunds_592.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00000007951 | raw_sql_destructive | SQL | tickets_911.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000007952 | raw_sql_destructive | SQL | products_284.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000007953 | raw_sql_safe | SQL | shipments_896.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000007954 | raw_sql_safe | SQL | users_18.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE role = 'active'; | NONE | false |
DIFF00000007955 | mentioned_in_comment | Python | subscriptions_478.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN name TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000007956 | raw_sql_safe | SQL | users_815.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = %s WHERE order_id = %s; | NONE | false |
DIFF00000007957 | test_suite_cleanup | SQL | tests/comments_553.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | false |
DIFF00000007958 | obfuscated_destructive | SQL | customers_629.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000007959 | raw_sql_destructive | SQL | sessions_609.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE transactions SET created_at = CONCAT(created_at, updated_at); | UPDATE_CONCAT | true |
DIFF00000007960 | orm_schema_change | Python | accounts_10.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='email') | NONE | true |
DIFF00000007961 | general_code_change | Java | customers_688.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007962 | orm_schema_change | Python | users_430.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='status') | NONE | true |
DIFF00000007963 | test_suite_cleanup | SQL | spec/accounts_281.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | false |
DIFF00000007964 | obfuscated_destructive | SQL | customers_255.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table tickets rename column is_active to amount_cents; | ALTER_RENAME | true |
DIFF00000007965 | obfuscated_destructive | SQL | shipments_135.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
accounts
DROP
COLUMN
updated_at; | DROP_COLUMN | true |
DIFF00000007966 | obfuscated_destructive | SQL | sessions_510.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
notifications; | DELETE_UNQUALIFIED | true |
DIFF00000007967 | obfuscated_destructive | SQL | subscriptions_147.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table comments; | DROP_TABLE | true |
DIFF00000007968 | general_code_change | JavaScript | invoices_677.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007969 | general_code_change | TypeScript | shipments_966.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 |
DIFF00000007970 | raw_sql_safe | SQL | subscriptions_1.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (quantity, balance) VALUES (%s, %s); | NONE | false |
DIFF00000007971 | obfuscated_destructive | SQL | subscriptions_18.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
refunds
SET
status
=
CONCAT(status,
priority); | UPDATE_CONCAT | true |
DIFF00000007972 | mentioned_in_comment | Python | transactions_502.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE orders RENAME COLUMN amount TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007973 | raw_sql_destructive | SQL | users_810.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000007974 | orm_schema_change | Ruby | employees_923.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :phone | NONE | true |
DIFF00000007975 | orm_schema_change | TypeScript | notifications_532.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: quantity } | NONE | true |
DIFF00000007976 | orm_schema_change | JavaScript | events_830.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'price') | NONE | true |
DIFF00000007977 | orm_schema_change | TypeScript | products_854.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: description } | NONE | true |
DIFF00000007978 | general_code_change | Python | comments_575.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007979 | orm_schema_change | Python | inventory_827.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='metadata') | NONE | true |
DIFF00000007980 | orm_schema_change | Python | accounts_705.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='name') | NONE | true |
DIFF00000007981 | general_code_change | Ruby | customers_498.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007982 | raw_sql_safe | SQL | employees_391.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE user_id = 'active'; | NONE | false |
DIFF00000007983 | raw_sql_destructive | SQL | inventory_56.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000007984 | raw_sql_safe | SQL | inventory_404.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007985 | general_code_change | JavaScript | shipments_944.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007986 | obfuscated_destructive | SQL | invoices_10.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
orders; | TRUNCATE | true |
DIFF00000007987 | general_code_change | Go | comments_486.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007988 | general_code_change | Go | refunds_716.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007989 | general_code_change | JavaScript | tickets_550.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 |
DIFF00000007990 | raw_sql_safe | SQL | accounts_332.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET metadata = %s WHERE updated_at = %s; | NONE | false |
DIFF00000007991 | orm_schema_change | JavaScript | products_50.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000007992 | mentioned_in_comment | Python | notifications_313.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE notifications SET name = CONCAT(name, order_id);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000007993 | test_suite_cleanup | SQL | spec/reviews_501.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET is_active = CONCAT(is_active, status); | UPDATE_CONCAT | false |
DIFF00000007994 | orm_schema_change | Ruby | subscriptions_563.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :email | NONE | true |
DIFF00000007995 | test_suite_cleanup | SQL | tests/reviews_222.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00000007996 | raw_sql_safe | SQL | accounts_881.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (price, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000007997 | general_code_change | Python | products_122.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007998 | obfuscated_destructive | SQL | customers_746.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000007999 | orm_schema_change | JavaScript | sessions_249.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('amount')) | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.