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
DIFF00099999600
mentioned_in_comment
Python
customers_802.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE subscriptions RENAME COLUMN status TO state;")
ALTER_RENAME
false
DIFF00099999601
mentioned_in_comment
Python
payments_570.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE customers SET updated_at = CONCAT(updated_at, user_id); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00099999602
raw_sql_destructive
SQL
users_808.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
true
DIFF00099999603
raw_sql_destructive
SQL
inventory_433.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products DROP COLUMN created_at;
DROP_COLUMN
true
DIFF00099999604
orm_schema_change
Ruby
tickets_405.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :refunds, :score
NONE
true
DIFF00099999605
mentioned_in_comment
Python
invoices_566.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE tickets RENAME COLUMN created_at TO amount_cents;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099999606
general_code_change
Ruby
invoices_920.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999607
raw_sql_destructive
SQL
orders_410.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE reviews;
DROP_TABLE
true
DIFF00099999608
raw_sql_destructive
SQL
notifications_107.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
true
DIFF00099999609
general_code_change
Python
customers_419.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999610
orm_schema_change
TypeScript
tickets_564.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Products { // removed field: is_active }
NONE
true
DIFF00099999611
obfuscated_destructive
SQL
accounts_330.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN priority;
DROP_COLUMN
true
DIFF00099999612
test_suite_cleanup
SQL
spec/notifications_65.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
false
DIFF00099999613
general_code_change
Ruby
sessions_742.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999614
mentioned_in_comment
Python
events_527.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM users;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099999615
raw_sql_safe
SQL
shipments_727.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO invoices (email, updated_at) VALUES (%s, %s);
NONE
false
DIFF00099999616
raw_sql_safe
SQL
transactions_387.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE payments ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099999617
raw_sql_safe
SQL
inventory_375.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_events_phone ON events (category);
NONE
false
DIFF00099999618
raw_sql_safe
SQL
tickets_852.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM payments WHERE price = 'active';
NONE
false
DIFF00099999619
mentioned_in_comment
Python
transactions_261.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM comments; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099999620
raw_sql_safe
SQL
reviews_342.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM inventory WHERE price = 'active';
NONE
false
DIFF00099999621
obfuscated_destructive
SQL
shipments_62.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
true
DIFF00099999622
general_code_change
Java
transactions_277.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999623
mentioned_in_comment
Python
shipments_797.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE orders RENAME COLUMN email TO amount_cents;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099999624
raw_sql_safe
SQL
invoices_44.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET name = %s WHERE created_at = %s;
NONE
false
DIFF00099999625
raw_sql_safe
SQL
employees_181.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_logs_phone ON logs (address);
NONE
false
DIFF00099999626
general_code_change
Python
users_724.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999627
raw_sql_safe
SQL
employees_42.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM subscriptions WHERE score = 'active';
NONE
false
DIFF00099999628
orm_schema_change
Python
inventory_102.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='products', name='user_id')
NONE
true
DIFF00099999629
orm_schema_change
TypeScript
notifications_27.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Comments { // removed field: priority }
NONE
true
DIFF00099999630
obfuscated_destructive
SQL
products_600.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE employees;
TRUNCATE
true
DIFF00099999631
test_suite_cleanup
SQL
test/shipments_840.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE logs RENAME COLUMN metadata TO contact_email;
ALTER_RENAME
false
DIFF00099999632
raw_sql_safe
SQL
notifications_501.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE products SET balance = %s WHERE priority = %s;
NONE
false
DIFF00099999633
raw_sql_destructive
SQL
employees_141.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE employees;
DROP_TABLE
true
DIFF00099999634
raw_sql_destructive
SQL
shipments_932.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
true
DIFF00099999635
obfuscated_destructive
SQL
notifications_102.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM inventory;
DELETE_UNQUALIFIED
true
DIFF00099999636
test_suite_cleanup
SQL
test/users_985.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
false
DIFF00099999637
obfuscated_destructive
SQL
notifications_174.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN status TO full_name;
ALTER_RENAME
true
DIFF00099999638
general_code_change
TypeScript
users_629.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
DIFF00099999639
obfuscated_destructive
SQL
orders_84.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE employees DROP COLUMN amount;
DROP_COLUMN
true
DIFF00099999640
raw_sql_destructive
SQL
customers_908.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE events RENAME COLUMN score TO amount_cents;
ALTER_RENAME
true
DIFF00099999641
obfuscated_destructive
SQL
transactions_30.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE events;
TRUNCATE
true
DIFF00099999642
raw_sql_destructive
SQL
invoices_399.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM logs;
DELETE_UNQUALIFIED
true
DIFF00099999643
raw_sql_destructive
SQL
payments_354.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
true
DIFF00099999644
raw_sql_safe
SQL
products_236.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE invoices ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00099999645
mentioned_in_comment
Python
reviews_92.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE users; -- now deprecated"""
DROP_TABLE
false
DIFF00099999646
general_code_change
Ruby
logs_337.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999647
orm_schema_change
JavaScript
events_590.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('products', 'category')
NONE
true
DIFF00099999648
test_suite_cleanup
SQL
tests/products_852.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN metadata;
DROP_COLUMN
false
DIFF00099999649
general_code_change
TypeScript
customers_203.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
DIFF00099999650
mentioned_in_comment
Python
products_973.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE shipments SET created_at = CONCAT(created_at, amount); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00099999651
general_code_change
Python
transactions_47.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999652
orm_schema_change
Ruby
logs_158.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :events, :is_active
NONE
true
DIFF00099999653
orm_schema_change
TypeScript
tickets_220.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Transactions { // removed field: address }
NONE
true
DIFF00099999654
mentioned_in_comment
Python
refunds_887.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE customers;")
DROP_TABLE
false
DIFF00099999655
orm_schema_change
JavaScript
users_266.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('comments', table => table.dropColumn('quantity'))
NONE
true
DIFF00099999656
general_code_change
Go
accounts_218.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999657
mentioned_in_comment
Python
inventory_988.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE employees; -- now deprecated"""
DROP_TABLE
false
DIFF00099999658
raw_sql_safe
SQL
users_545.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM sessions WHERE user_id = 'active';
NONE
false
DIFF00099999659
test_suite_cleanup
SQL
test/payments_650.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE employees;
DROP_TABLE
false
DIFF00099999660
general_code_change
Python
logs_357.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999661
raw_sql_safe
SQL
shipments_964.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (created_at, user_id) VALUES (%s, %s);
NONE
false
DIFF00099999662
raw_sql_safe
SQL
events_911.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM users WHERE balance = 'active';
NONE
false
DIFF00099999663
general_code_change
Ruby
events_314.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999664
obfuscated_destructive
SQL
customers_395.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from subscriptions;
DELETE_UNQUALIFIED
true
DIFF00099999665
general_code_change
Python
users_124.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999666
raw_sql_safe
SQL
notifications_447.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE refunds SET priority = %s WHERE phone = %s;
NONE
false
DIFF00099999667
mentioned_in_comment
Python
accounts_537.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE employees SET status = CONCAT(status, status); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00099999668
obfuscated_destructive
SQL
refunds_595.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00099999669
raw_sql_safe
SQL
sessions_256.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_shipments_amount ON shipments (updated_at);
NONE
false
DIFF00099999670
orm_schema_change
JavaScript
reviews_638.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('reviews', 'balance')
NONE
true
DIFF00099999671
raw_sql_safe
SQL
sessions_159.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM payments WHERE name = 'active';
NONE
false
DIFF00099999672
raw_sql_destructive
SQL
comments_651.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE subscriptions SET score = CONCAT(score, price);
UPDATE_CONCAT
true
DIFF00099999673
general_code_change
Go
notifications_769.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999674
mentioned_in_comment
Python
payments_341.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM users;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099999675
general_code_change
Java
customers_375.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999676
general_code_change
Ruby
refunds_127.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999677
raw_sql_safe
SQL
inventory_121.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE products ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00099999678
raw_sql_safe
SQL
comments_759.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET balance = %s WHERE user_id = %s;
NONE
false
DIFF00099999679
orm_schema_change
JavaScript
inventory_712.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('employees', table => table.dropColumn('category'))
NONE
true
DIFF00099999680
general_code_change
JavaScript
refunds_330.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
DIFF00099999681
test_suite_cleanup
SQL
tests/logs_232.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN category TO amount_cents;
ALTER_RENAME
false
DIFF00099999682
general_code_change
Ruby
customers_452.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999683
test_suite_cleanup
SQL
mysql-test/suite/transactions_30.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
false
DIFF00099999684
orm_schema_change
JavaScript
subscriptions_399.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('transactions', table => table.dropColumn('is_active'))
NONE
true
DIFF00099999685
raw_sql_safe
SQL
transactions_894.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM logs WHERE email = 'active';
NONE
false
DIFF00099999686
general_code_change
Go
reviews_67.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999687
orm_schema_change
Python
products_452.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='shipments', name='user_id')
NONE
true
DIFF00099999688
general_code_change
JavaScript
refunds_74.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099999689
raw_sql_destructive
SQL
reviews_514.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE tickets RENAME COLUMN status TO user_role;
ALTER_RENAME
true
DIFF00099999690
orm_schema_change
Python
employees_920.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='comments', name='category')
NONE
true
DIFF00099999691
raw_sql_destructive
SQL
users_302.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE subscriptions;
TRUNCATE
true
DIFF00099999692
orm_schema_change
JavaScript
invoices_159.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('user_id'))
NONE
true
DIFF00099999693
general_code_change
Ruby
employees_587.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999694
test_suite_cleanup
SQL
mysql-test/suite/reviews_606.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM employees;
DELETE_UNQUALIFIED
false
DIFF00099999695
test_suite_cleanup
SQL
tests/users_947.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE tickets RENAME COLUMN status TO contact_email;
ALTER_RENAME
false
DIFF00099999696
general_code_change
TypeScript
refunds_480.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
DIFF00099999697
obfuscated_destructive
SQL
transactions_746.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE notifications RENAME COLUMN quantity TO contact_email;
ALTER_RENAME
true
DIFF00099999698
mentioned_in_comment
Python
shipments_423.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool
TRUNCATE
false
DIFF00099999699
raw_sql_safe
SQL
events_240.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_subscriptions_metadata ON subscriptions (category);
NONE
false