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
DIFF00099997600
raw_sql_safe
SQL
refunds_142.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE reviews SET quantity = %s WHERE updated_at = %s;
NONE
false
DIFF00099997601
raw_sql_safe
SQL
events_89.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO comments (role, phone) VALUES (%s, %s);
NONE
false
DIFF00099997602
raw_sql_safe
SQL
accounts_419.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (quantity, name) VALUES (%s, %s);
NONE
false
DIFF00099997603
raw_sql_safe
SQL
customers_10.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE score = 'active';
NONE
false
DIFF00099997604
raw_sql_destructive
SQL
comments_405.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions RENAME COLUMN address TO contact_email;
ALTER_RENAME
true
DIFF00099997605
general_code_change
Python
products_9.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099997606
raw_sql_destructive
SQL
payments_955.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE events DROP COLUMN address;
DROP_COLUMN
true
DIFF00099997607
test_suite_cleanup
SQL
tests/refunds_69.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE subscriptions;
TRUNCATE
false
DIFF00099997608
raw_sql_destructive
SQL
products_73.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM notifications;
DELETE_UNQUALIFIED
true
DIFF00099997609
raw_sql_destructive
SQL
shipments_374.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00099997610
raw_sql_safe
SQL
transactions_939.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM shipments WHERE status = 'active';
NONE
false
DIFF00099997611
general_code_change
Python
comments_30.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099997612
mentioned_in_comment
Python
tickets_583.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM employees;")
DELETE_UNQUALIFIED
false
DIFF00099997613
general_code_change
Python
comments_838.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099997614
test_suite_cleanup
SQL
mysql-test/suite/accounts_361.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
false
DIFF00099997615
raw_sql_safe
SQL
refunds_65.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM logs WHERE name = 'active';
NONE
false
DIFF00099997616
general_code_change
JavaScript
notifications_799.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997617
orm_schema_change
JavaScript
accounts_592.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('orders', table => table.dropColumn('balance'))
NONE
true
DIFF00099997618
raw_sql_safe
SQL
subscriptions_268.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM inventory WHERE metadata = 'active';
NONE
false
DIFF00099997619
raw_sql_safe
SQL
shipments_33.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE employees SET metadata = %s WHERE score = %s;
NONE
false
DIFF00099997620
raw_sql_destructive
SQL
refunds_675.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
true
DIFF00099997621
test_suite_cleanup
SQL
tests/comments_787.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099997622
general_code_change
JavaScript
products_335.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997623
general_code_change
TypeScript
inventory_789.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
DIFF00099997624
general_code_change
Java
customers_91.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099997625
raw_sql_destructive
SQL
events_841.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE employees;
DROP_TABLE
true
DIFF00099997626
general_code_change
Go
refunds_512.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099997627
raw_sql_destructive
SQL
orders_484.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM payments;
DELETE_UNQUALIFIED
true
DIFF00099997628
orm_schema_change
Python
comments_396.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='users', name='created_at')
NONE
true
DIFF00099997629
raw_sql_destructive
SQL
accounts_519.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE events;
DROP_TABLE
true
DIFF00099997630
general_code_change
JavaScript
invoices_922.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997631
raw_sql_destructive
SQL
orders_749.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE accounts SET user_id = CONCAT(user_id, name);
UPDATE_CONCAT
true
DIFF00099997632
raw_sql_destructive
SQL
payments_216.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
true
DIFF00099997633
general_code_change
JavaScript
sessions_743.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
DIFF00099997634
obfuscated_destructive
SQL
transactions_537.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
true
DIFF00099997635
raw_sql_safe
SQL
employees_614.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_tickets_order_id ON tickets (amount);
NONE
false
DIFF00099997636
raw_sql_safe
SQL
notifications_918.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM comments WHERE score = 'active';
NONE
false
DIFF00099997637
raw_sql_destructive
SQL
orders_67.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00099997638
orm_schema_change
JavaScript
accounts_788.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('users', 'score')
NONE
true
DIFF00099997639
raw_sql_destructive
SQL
users_178.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
true
DIFF00099997640
general_code_change
Java
transactions_896.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099997641
orm_schema_change
Python
sessions_141.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='products', name='metadata')
NONE
true
DIFF00099997642
orm_schema_change
JavaScript
payments_771.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('comments', 'quantity')
NONE
true
DIFF00099997643
raw_sql_destructive
SQL
notifications_672.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00099997644
general_code_change
JavaScript
payments_413.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997645
mentioned_in_comment
Python
employees_821.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool
TRUNCATE
false
DIFF00099997646
mentioned_in_comment
Python
notifications_187.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE payments RENAME COLUMN user_id TO state;")
ALTER_RENAME
false
DIFF00099997647
test_suite_cleanup
SQL
tests/logs_689.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN balance;
DROP_COLUMN
false
DIFF00099997648
obfuscated_destructive
SQL
subscriptions_754.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALtEr TABle CusTOmErS dRop ColuMn bAlancE;
DROP_COLUMN
true
DIFF00099997649
obfuscated_destructive
SQL
users_354.sql
schema cleanup
@@ -1,3 +1,3 @@ +drop table payments;
DROP_TABLE
true
DIFF00099997650
test_suite_cleanup
SQL
spec/logs_688.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments DROP COLUMN amount;
DROP_COLUMN
false
DIFF00099997651
orm_schema_change
JavaScript
events_566.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('reviews', table => table.dropColumn('order_id'))
NONE
true
DIFF00099997652
raw_sql_destructive
SQL
products_640.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM users;
DELETE_UNQUALIFIED
true
DIFF00099997653
general_code_change
JavaScript
events_447.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
DIFF00099997654
test_suite_cleanup
SQL
test/users_593.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE products DROP COLUMN score;
DROP_COLUMN
false
DIFF00099997655
general_code_change
JavaScript
subscriptions_212.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997656
mentioned_in_comment
Python
logs_989.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM payments;")
DELETE_UNQUALIFIED
false
DIFF00099997657
mentioned_in_comment
Python
accounts_349.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE events; -- now deprecated"""
DROP_TABLE
false
DIFF00099997658
raw_sql_destructive
SQL
customers_96.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE notifications RENAME COLUMN priority TO contact_email;
ALTER_RENAME
true
DIFF00099997659
mentioned_in_comment
Python
shipments_351.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE transactions DROP COLUMN created_at; -- now deprecated"""
DROP_COLUMN
false
DIFF00099997660
raw_sql_safe
SQL
refunds_987.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_customers_is_active ON customers (price);
NONE
false
DIFF00099997661
general_code_change
Python
logs_578.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099997662
general_code_change
JavaScript
accounts_969.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
DIFF00099997663
test_suite_cleanup
SQL
test/notifications_833.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE customers DROP COLUMN is_active;
DROP_COLUMN
false
DIFF00099997664
mentioned_in_comment
Python
sessions_390.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM users;")
DELETE_UNQUALIFIED
false
DIFF00099997665
orm_schema_change
TypeScript
products_834.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Products { // removed field: category }
NONE
true
DIFF00099997666
general_code_change
Java
comments_222.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099997667
test_suite_cleanup
SQL
test/shipments_987.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
false
DIFF00099997668
mentioned_in_comment
Python
transactions_719.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE employees DROP COLUMN status;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099997669
orm_schema_change
Python
employees_189.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='events', name='price')
NONE
true
DIFF00099997670
general_code_change
JavaScript
employees_7.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
DIFF00099997671
general_code_change
JavaScript
accounts_754.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
DIFF00099997672
obfuscated_destructive
SQL
employees_972.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table orders drop column name;
DROP_COLUMN
true
DIFF00099997673
raw_sql_safe
SQL
payments_889.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM notifications WHERE address = 'active';
NONE
false
DIFF00099997674
mentioned_in_comment
Python
orders_775.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: TRUNCATE TABLE payments;")
TRUNCATE
false
DIFF00099997675
raw_sql_safe
SQL
tickets_679.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM accounts WHERE priority = 'active';
NONE
false
DIFF00099997676
general_code_change
Java
orders_877.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099997677
mentioned_in_comment
Python
shipments_767.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE invoices SET phone = CONCAT(phone, category);")
UPDATE_CONCAT
false
DIFF00099997678
general_code_change
Python
accounts_186.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099997679
general_code_change
Java
transactions_193.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099997680
raw_sql_destructive
SQL
shipments_69.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE shipments SET user_id = CONCAT(user_id, score);
UPDATE_CONCAT
true
DIFF00099997681
general_code_change
JavaScript
notifications_576.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997682
raw_sql_safe
SQL
employees_21.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE employees ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099997683
test_suite_cleanup
SQL
mysql-test/suite/products_976.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN email TO full_name;
ALTER_RENAME
false
DIFF00099997684
raw_sql_safe
SQL
events_791.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_inventory_quantity ON inventory (metadata);
NONE
false
DIFF00099997685
general_code_change
JavaScript
payments_496.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
DIFF00099997686
raw_sql_safe
SQL
sessions_727.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_products_email ON products (category);
NONE
false
DIFF00099997687
raw_sql_safe
SQL
sessions_588.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM reviews WHERE updated_at = 'active';
NONE
false
DIFF00099997688
raw_sql_destructive
SQL
customers_740.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE comments;
TRUNCATE
true
DIFF00099997689
general_code_change
JavaScript
payments_29.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099997690
test_suite_cleanup
SQL
spec/logs_707.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE sessions;
DROP_TABLE
false
DIFF00099997691
test_suite_cleanup
SQL
spec/orders_36.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN role TO amount_cents;
ALTER_RENAME
false
DIFF00099997692
orm_schema_change
JavaScript
refunds_748.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('notifications', 'order_id')
NONE
true
DIFF00099997693
general_code_change
Go
refunds_589.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099997694
orm_schema_change
TypeScript
accounts_497.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Events { // removed field: created_at }
NONE
true
DIFF00099997695
obfuscated_destructive
SQL
logs_432.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE refunds;
DROP_TABLE
true
DIFF00099997696
orm_schema_change
JavaScript
logs_447.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'priority')
NONE
true
DIFF00099997697
general_code_change
TypeScript
users_115.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
DIFF00099997698
obfuscated_destructive
SQL
refunds_190.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN email;
DROP_COLUMN
true
DIFF00099997699
obfuscated_destructive
SQL
refunds_15.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM users;
DELETE_UNQUALIFIED
true