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
DIFF00000000600
test_suite_cleanup
SQL
test/accounts_491.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN quantity;
DROP_COLUMN
false
DIFF00000000601
orm_schema_change
Ruby
payments_816.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :shipments, :phone
NONE
true
DIFF00000000602
obfuscated_destructive
SQL
refunds_511.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE employees DROP COLUMN created_at;
DROP_COLUMN
true
DIFF00000000603
raw_sql_safe
SQL
users_434.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE reviews SET role = %s WHERE category = %s;
NONE
false
DIFF00000000604
mentioned_in_comment
Python
products_640.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE accounts RENAME COLUMN amount TO user_role; -- now deprecated"""
ALTER_RENAME
false
DIFF00000000605
raw_sql_safe
SQL
notifications_92.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_payments_name ON payments (price);
NONE
false
DIFF00000000606
obfuscated_destructive
SQL
events_891.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE orders SET phone = CONCAT(phone, score);
UPDATE_CONCAT
true
DIFF00000000607
general_code_change
Ruby
comments_267.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000608
raw_sql_safe
SQL
comments_749.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO events (category, priority) VALUES (%s, %s);
NONE
false
DIFF00000000609
test_suite_cleanup
SQL
test/comments_672.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE orders;
TRUNCATE
false
DIFF00000000610
raw_sql_safe
SQL
inventory_385.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE customers SET user_id = %s WHERE price = %s;
NONE
false
DIFF00000000611
mentioned_in_comment
Python
products_249.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE notifications RENAME COLUMN metadata TO state;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00000000612
general_code_change
JavaScript
orders_781.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
DIFF00000000613
test_suite_cleanup
SQL
spec/reviews_674.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM employees;
DELETE_UNQUALIFIED
false
DIFF00000000614
raw_sql_destructive
SQL
inventory_982.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
true
DIFF00000000615
mentioned_in_comment
Python
users_641.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE refunds DROP COLUMN address;")
DROP_COLUMN
false
DIFF00000000616
raw_sql_safe
SQL
refunds_870.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM tickets WHERE balance = 'active';
NONE
false
DIFF00000000617
orm_schema_change
Python
payments_921.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='transactions', name='description')
NONE
true
DIFF00000000618
raw_sql_destructive
SQL
comments_492.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00000000619
orm_schema_change
Python
transactions_615.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='logs', name='metadata')
NONE
true
DIFF00000000620
general_code_change
Ruby
invoices_396.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000621
mentioned_in_comment
Python
reviews_846.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE tickets;' manually, handled by migration tool
TRUNCATE
false
DIFF00000000622
general_code_change
Go
subscriptions_221.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000000623
mentioned_in_comment
Python
orders_845.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE subscriptions SET role = CONCAT(role, score); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00000000624
test_suite_cleanup
SQL
tests/employees_319.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
false
DIFF00000000625
test_suite_cleanup
SQL
spec/comments_143.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE customers;
DROP_TABLE
false
DIFF00000000626
orm_schema_change
JavaScript
customers_311.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('logs', table => table.dropColumn('quantity'))
NONE
true
DIFF00000000627
raw_sql_safe
SQL
customers_895.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE refunds ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00000000628
orm_schema_change
Python
tickets_384.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='invoices', name='status')
NONE
true
DIFF00000000629
general_code_change
JavaScript
comments_834.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000630
raw_sql_destructive
SQL
employees_782.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE orders RENAME COLUMN amount TO full_name;
ALTER_RENAME
true
DIFF00000000631
test_suite_cleanup
SQL
test/payments_802.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM logs;
DELETE_UNQUALIFIED
false
DIFF00000000632
general_code_change
TypeScript
inventory_938.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
DIFF00000000633
mentioned_in_comment
Python
accounts_598.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE sessions;")
DROP_TABLE
false
DIFF00000000634
raw_sql_destructive
SQL
payments_498.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE events RENAME COLUMN created_at TO amount_cents;
ALTER_RENAME
true
DIFF00000000635
raw_sql_safe
SQL
invoices_926.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO reviews (updated_at, status) VALUES (%s, %s);
NONE
false
DIFF00000000636
raw_sql_safe
SQL
tickets_696.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE refunds SET metadata = %s WHERE quantity = %s;
NONE
false
DIFF00000000637
general_code_change
Java
invoices_200.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000638
test_suite_cleanup
SQL
test/customers_666.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE employees;
DROP_TABLE
false
DIFF00000000639
test_suite_cleanup
SQL
test/shipments_143.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN email TO amount_cents;
ALTER_RENAME
false
DIFF00000000640
orm_schema_change
JavaScript
events_755.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('sessions', table => table.dropColumn('status'))
NONE
true
DIFF00000000641
orm_schema_change
TypeScript
comments_10.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Tickets { // removed field: description }
NONE
true
DIFF00000000642
raw_sql_safe
SQL
payments_28.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE transactions ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00000000643
mentioned_in_comment
Python
events_649.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE accounts; -- now deprecated"""
DROP_TABLE
false
DIFF00000000644
orm_schema_change
Python
events_130.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='users', name='is_active')
NONE
true
DIFF00000000645
test_suite_cleanup
SQL
tests/comments_731.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
false
DIFF00000000646
mentioned_in_comment
Python
shipments_351.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE sessions; -- now deprecated"""
DROP_TABLE
false
DIFF00000000647
test_suite_cleanup
SQL
mysql-test/suite/transactions_486.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
false
DIFF00000000648
obfuscated_destructive
SQL
events_433.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN status;
DROP_COLUMN
true
DIFF00000000649
mentioned_in_comment
Python
invoices_918.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM logs;")
DELETE_UNQUALIFIED
false
DIFF00000000650
raw_sql_safe
SQL
users_124.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE role = 'active';
NONE
false
DIFF00000000651
test_suite_cleanup
SQL
mysql-test/suite/users_921.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE logs RENAME COLUMN email TO state;
ALTER_RENAME
false
DIFF00000000652
raw_sql_safe
SQL
subscriptions_758.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_orders_metadata ON orders (priority);
NONE
false
DIFF00000000653
raw_sql_safe
SQL
subscriptions_445.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO customers (address, balance) VALUES (%s, %s);
NONE
false
DIFF00000000654
test_suite_cleanup
SQL
test/refunds_774.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
false
DIFF00000000655
raw_sql_safe
SQL
tickets_959.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM reviews WHERE score = 'active';
NONE
false
DIFF00000000656
obfuscated_destructive
SQL
events_333.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN address;
DROP_COLUMN
true
DIFF00000000657
raw_sql_safe
SQL
comments_604.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE events SET priority = %s WHERE email = %s;
NONE
false
DIFF00000000658
raw_sql_destructive
SQL
payments_613.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE reviews;
TRUNCATE
true
DIFF00000000659
orm_schema_change
JavaScript
tickets_526.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'email')
NONE
true
DIFF00000000660
orm_schema_change
JavaScript
products_764.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('shipments', table => table.dropColumn('score'))
NONE
true
DIFF00000000661
raw_sql_safe
SQL
logs_908.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE metadata = 'active';
NONE
false
DIFF00000000662
obfuscated_destructive
SQL
users_404.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table subscriptions rename column price to amount_cents;
ALTER_RENAME
true
DIFF00000000663
test_suite_cleanup
SQL
test/payments_19.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
false
DIFF00000000664
raw_sql_safe
SQL
transactions_608.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE accounts SET email = %s WHERE quantity = %s;
NONE
false
DIFF00000000665
general_code_change
Java
reviews_879.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000666
orm_schema_change
JavaScript
invoices_561.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('sessions', table => table.dropColumn('updated_at'))
NONE
true
DIFF00000000667
orm_schema_change
JavaScript
notifications_774.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('refunds', table => table.dropColumn('category'))
NONE
true
DIFF00000000668
orm_schema_change
Ruby
orders_81.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :orders, :created_at
NONE
true
DIFF00000000669
obfuscated_destructive
SQL
transactions_296.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE refunds;
DROP_TABLE
true
DIFF00000000670
obfuscated_destructive
SQL
customers_586.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
true
DIFF00000000671
general_code_change
Ruby
refunds_984.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000672
raw_sql_safe
SQL
logs_712.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO orders (phone, address) VALUES (%s, %s);
NONE
false
DIFF00000000673
raw_sql_destructive
SQL
invoices_263.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE tickets SET updated_at = CONCAT(updated_at, amount);
UPDATE_CONCAT
true
DIFF00000000674
raw_sql_destructive
SQL
notifications_836.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN priority TO contact_email;
ALTER_RENAME
true
DIFF00000000675
obfuscated_destructive
SQL
users_555.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE customers SET phone = CONCAT(phone, status);
UPDATE_CONCAT
true
DIFF00000000676
raw_sql_destructive
SQL
sessions_317.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN description TO amount_cents;
ALTER_RENAME
true
DIFF00000000677
orm_schema_change
JavaScript
comments_565.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('inventory', table => table.dropColumn('status'))
NONE
true
DIFF00000000678
general_code_change
Java
orders_410.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000679
general_code_change
Java
invoices_803.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000680
general_code_change
TypeScript
shipments_503.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
DIFF00000000681
raw_sql_destructive
SQL
customers_378.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE products;
TRUNCATE
true
DIFF00000000682
obfuscated_destructive
SQL
shipments_247.sql
schema cleanup
@@ -1,3 +1,3 @@ +update users set is_active = concat(is_active, score);
UPDATE_CONCAT
true
DIFF00000000683
general_code_change
Ruby
reviews_81.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000684
mentioned_in_comment
Python
transactions_70.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE reviews SET priority = CONCAT(priority, description);")
UPDATE_CONCAT
false
DIFF00000000685
raw_sql_destructive
SQL
invoices_297.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE accounts DROP COLUMN role;
DROP_COLUMN
true
DIFF00000000686
raw_sql_destructive
SQL
refunds_969.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM subscriptions;
DELETE_UNQUALIFIED
true
DIFF00000000687
general_code_change
Ruby
invoices_134.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000688
general_code_change
Python
invoices_801.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000000689
general_code_change
Python
accounts_537.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000000690
raw_sql_destructive
SQL
invoices_656.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE accounts DROP COLUMN role;
DROP_COLUMN
true
DIFF00000000691
orm_schema_change
JavaScript
transactions_150.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('payments', 'email')
NONE
true
DIFF00000000692
test_suite_cleanup
SQL
test/shipments_600.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE sessions;
DROP_TABLE
false
DIFF00000000693
obfuscated_destructive
SQL
reviews_468.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE payments;
TRUNCATE
true
DIFF00000000694
mentioned_in_comment
Python
notifications_460.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE invoices DROP COLUMN status; -- now deprecated"""
DROP_COLUMN
false
DIFF00000000695
general_code_change
TypeScript
employees_313.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
DIFF00000000696
general_code_change
Python
sessions_109.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000000697
general_code_change
JavaScript
invoices_764.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
DIFF00000000698
raw_sql_safe
SQL
comments_76.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE orders ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00000000699
orm_schema_change
JavaScript
tickets_121.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('transactions', 'balance')
NONE
true