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
DIFF00000005800
obfuscated_destructive
SQL
comments_373.sql
schema cleanup
@@ -1,3 +1,3 @@ +deLETE FROm PAYmEnTs;
DELETE_UNQUALIFIED
true
DIFF00000005801
general_code_change
TypeScript
inventory_893.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
DIFF00000005802
mentioned_in_comment
Python
shipments_422.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM payments;")
DELETE_UNQUALIFIED
false
DIFF00000005803
obfuscated_destructive
SQL
notifications_237.sql
schema cleanup
@@ -1,3 +1,3 @@ +droP Table PaYmENTs;
DROP_TABLE
true
DIFF00000005804
raw_sql_safe
SQL
employees_951.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (category, phone) VALUES (%s, %s);
NONE
false
DIFF00000005805
mentioned_in_comment
Python
sessions_643.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE customers;")
DROP_TABLE
false
DIFF00000005806
general_code_change
JavaScript
refunds_79.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005807
mentioned_in_comment
Python
orders_528.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE accounts;' manually, handled by migration tool
DROP_TABLE
false
DIFF00000005808
raw_sql_destructive
SQL
employees_673.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00000005809
raw_sql_destructive
SQL
subscriptions_886.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE events DROP COLUMN price;
DROP_COLUMN
true
DIFF00000005810
mentioned_in_comment
Python
transactions_284.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE employees SET address = CONCAT(address, is_active);")
UPDATE_CONCAT
false
DIFF00000005811
general_code_change
Ruby
accounts_203.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000005812
mentioned_in_comment
Python
employees_903.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE reviews; -- now deprecated"""
TRUNCATE
false
DIFF00000005813
raw_sql_destructive
SQL
transactions_643.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00000005814
general_code_change
Java
logs_808.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005815
raw_sql_destructive
SQL
notifications_796.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
true
DIFF00000005816
general_code_change
Go
sessions_671.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005817
raw_sql_safe
SQL
notifications_546.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM comments WHERE balance = 'active';
NONE
false
DIFF00000005818
obfuscated_destructive
SQL
payments_969.sql
schema cleanup
@@ -1,3 +1,3 @@ +drop table sessions;
DROP_TABLE
true
DIFF00000005819
test_suite_cleanup
SQL
tests/accounts_172.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
false
DIFF00000005820
obfuscated_destructive
SQL
comments_598.sql
schema cleanup
@@ -1,3 +1,3 @@ +AlteR TablE oRDErS REnAMe CoLUmN aMOUNT to USeR_rOlE;
ALTER_RENAME
true
DIFF00000005821
obfuscated_destructive
SQL
sessions_25.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE orders;
DROP_TABLE
true
DIFF00000005822
test_suite_cleanup
SQL
mysql-test/suite/shipments_583.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
false
DIFF00000005823
test_suite_cleanup
SQL
spec/events_442.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN metadata;
DROP_COLUMN
false
DIFF00000005824
general_code_change
JavaScript
subscriptions_556.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
DIFF00000005825
mentioned_in_comment
Python
subscriptions_879.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE accounts DROP COLUMN score; -- now deprecated"""
DROP_COLUMN
false
DIFF00000005826
orm_schema_change
Ruby
notifications_547.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :refunds, :amount
NONE
true
DIFF00000005827
orm_schema_change
JavaScript
users_401.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('invoices', 'category')
NONE
true
DIFF00000005828
raw_sql_destructive
SQL
invoices_769.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
true
DIFF00000005829
obfuscated_destructive
SQL
notifications_555.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions RENAME COLUMN is_active TO amount_cents;
ALTER_RENAME
true
DIFF00000005830
general_code_change
Go
notifications_395.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005831
orm_schema_change
TypeScript
sessions_183.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Sessions { // removed field: email }
NONE
true
DIFF00000005832
obfuscated_destructive
SQL
comments_806.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM reviews;
DELETE_UNQUALIFIED
true
DIFF00000005833
orm_schema_change
JavaScript
logs_432.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('subscriptions', 'user_id')
NONE
true
DIFF00000005834
raw_sql_safe
SQL
comments_527.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_amount ON users (user_id);
NONE
false
DIFF00000005835
raw_sql_safe
SQL
payments_389.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM accounts WHERE address = 'active';
NONE
false
DIFF00000005836
general_code_change
Java
reviews_781.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005837
raw_sql_safe
SQL
customers_772.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_tickets_quantity ON tickets (phone);
NONE
false
DIFF00000005838
test_suite_cleanup
SQL
test/products_775.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE inventory;
DROP_TABLE
false
DIFF00000005839
raw_sql_destructive
SQL
tickets_502.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM payments;
DELETE_UNQUALIFIED
true
DIFF00000005840
obfuscated_destructive
SQL
comments_352.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE reviews DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00000005841
raw_sql_destructive
SQL
employees_843.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE reviews SET name = CONCAT(name, updated_at);
UPDATE_CONCAT
true
DIFF00000005842
orm_schema_change
Python
shipments_968.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='subscriptions', name='priority')
NONE
true
DIFF00000005843
raw_sql_destructive
SQL
shipments_883.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE notifications DROP COLUMN order_id;
DROP_COLUMN
true
DIFF00000005844
test_suite_cleanup
SQL
spec/comments_858.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE payments DROP COLUMN balance;
DROP_COLUMN
false
DIFF00000005845
obfuscated_destructive
SQL
orders_740.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE refunds SET quantity = CONCAT(quantity, category);
UPDATE_CONCAT
true
DIFF00000005846
general_code_change
JavaScript
employees_530.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
DIFF00000005847
orm_schema_change
JavaScript
employees_789.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('comments', table => table.dropColumn('description'))
NONE
true
DIFF00000005848
test_suite_cleanup
SQL
spec/customers_13.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN amount;
DROP_COLUMN
false
DIFF00000005849
general_code_change
Python
notifications_62.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000005850
orm_schema_change
Python
accounts_708.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='shipments', name='email')
NONE
true
DIFF00000005851
mentioned_in_comment
Python
orders_6.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE orders SET balance = CONCAT(balance, created_at);")
UPDATE_CONCAT
false
DIFF00000005852
orm_schema_change
JavaScript
logs_154.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('tickets', table => table.dropColumn('role'))
NONE
true
DIFF00000005853
raw_sql_destructive
SQL
refunds_95.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
true
DIFF00000005854
mentioned_in_comment
Python
comments_714.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM events;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000005855
raw_sql_destructive
SQL
accounts_550.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
true
DIFF00000005856
orm_schema_change
Ruby
reviews_392.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :customers, :quantity
NONE
true
DIFF00000005857
raw_sql_destructive
SQL
inventory_331.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM shipments;
DELETE_UNQUALIFIED
true
DIFF00000005858
general_code_change
Ruby
comments_274.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000005859
raw_sql_destructive
SQL
events_424.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
true
DIFF00000005860
obfuscated_destructive
SQL
payments_49.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN phone TO amount_cents;
ALTER_RENAME
true
DIFF00000005861
raw_sql_destructive
SQL
events_604.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
true
DIFF00000005862
raw_sql_safe
SQL
logs_733.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE description = 'active';
NONE
false
DIFF00000005863
general_code_change
JavaScript
notifications_160.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005864
general_code_change
Ruby
subscriptions_761.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000005865
general_code_change
JavaScript
shipments_986.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
DIFF00000005866
general_code_change
Go
customers_633.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005867
general_code_change
JavaScript
orders_493.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005868
general_code_change
JavaScript
customers_299.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
DIFF00000005869
general_code_change
Go
reviews_487.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005870
orm_schema_change
Python
transactions_598.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='accounts', name='name')
NONE
true
DIFF00000005871
general_code_change
JavaScript
accounts_721.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
DIFF00000005872
raw_sql_destructive
SQL
payments_396.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
true
DIFF00000005873
test_suite_cleanup
SQL
mysql-test/suite/payments_469.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN created_at;
DROP_COLUMN
false
DIFF00000005874
orm_schema_change
Python
comments_981.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='transactions', name='category')
NONE
true
DIFF00000005875
test_suite_cleanup
SQL
mysql-test/suite/logs_426.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE orders;
TRUNCATE
false
DIFF00000005876
raw_sql_destructive
SQL
payments_909.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE inventory SET score = CONCAT(score, role);
UPDATE_CONCAT
true
DIFF00000005877
general_code_change
JavaScript
notifications_473.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005878
obfuscated_destructive
SQL
payments_892.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPdate traNsActIoNs sEt AdDRESS = cONcaT(addreSS, NAME);
UPDATE_CONCAT
true
DIFF00000005879
test_suite_cleanup
SQL
tests/tickets_30.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
false
DIFF00000005880
obfuscated_destructive
SQL
notifications_757.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM transactions;
DELETE_UNQUALIFIED
true
DIFF00000005881
general_code_change
Java
reviews_398.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005882
mentioned_in_comment
Python
comments_293.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE notifications;")
DROP_TABLE
false
DIFF00000005883
mentioned_in_comment
Python
inventory_197.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE logs DROP COLUMN status; -- now deprecated"""
DROP_COLUMN
false
DIFF00000005884
test_suite_cleanup
SQL
test/subscriptions_276.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE invoices;
DROP_TABLE
false
DIFF00000005885
general_code_change
Python
comments_458.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000005886
raw_sql_safe
SQL
invoices_867.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE notifications ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00000005887
raw_sql_safe
SQL
tickets_120.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE notifications ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00000005888
obfuscated_destructive
SQL
employees_924.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table payments;
TRUNCATE
true
DIFF00000005889
raw_sql_destructive
SQL
comments_429.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE invoices;
DROP_TABLE
true
DIFF00000005890
test_suite_cleanup
SQL
mysql-test/suite/inventory_194.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
false
DIFF00000005891
general_code_change
Java
orders_422.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005892
orm_schema_change
JavaScript
events_864.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('created_at'))
NONE
true
DIFF00000005893
mentioned_in_comment
Python
payments_174.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE reviews SET status = CONCAT(status, description);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00000005894
general_code_change
JavaScript
customers_350.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
DIFF00000005895
raw_sql_destructive
SQL
tickets_705.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00000005896
test_suite_cleanup
SQL
spec/notifications_203.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE shipments SET is_active = CONCAT(is_active, phone);
UPDATE_CONCAT
false
DIFF00000005897
raw_sql_safe
SQL
payments_284.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_customers_category ON customers (balance);
NONE
false
DIFF00000005898
raw_sql_safe
SQL
transactions_865.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM accounts WHERE updated_at = 'active';
NONE
false
DIFF00000005899
general_code_change
Ruby
sessions_186.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false