Skip to content

BITO-10941: FV PRO Plan - 14th Nov

Gauri Desai requested to merge pro-fv-branch into main

TEST-1 Test-2 Test-3 TEST-4 TEST-5 TEST-6 TEST-7 TEST-8 TEST-9 TEST-10 TEST-11 TEST-12 TEST-13 TEST-14 TEST-15

Summary by Bito

This PR introduces two new Python modules for simulating inventory and student management applications with intentional flaws. The modules encompass syntax, logical, performance, and accessibility issues, along with new functions, classes, and coding patterns that demonstrate potential pitfalls in software design. Overall, these additions serve as bug-ridden test cases for evaluating and improving code review tools.

Detailed Changes
  • Adds buggy_inventory_app.py, introducing functions for inventory management (e.g., LoadInventory, add_item, delete_item) with syntax errors like missing colons and incorrect operators, logical bugs in item deletion causing index shifts and incorrect discount calculations, performance issues from inefficient loops, and accessibility problems relying on console input in user_interaction (InventoryManager class).
  • Adds buggy_student_portal.py, providing student record management features (e.g., load_students, add_student, calculate_average_grade) containing syntax errors such as missing colons, logical flaws in average calculations with extra offsets and unupdated top grades, performance bottlenecks from unnecessary large loops, and accessibility issues using input() in simulate_input (Student and StudentPortal classes).
  • Introduces global mutable data structures (inventoryList dict and students dict) in both modules, promoting bad practices and potential concurrency issues.
  • Includes classes with initialization errors, such as InventoryManager and StudentPortal setting attributes to None, leading to TypeErrors when iterating or accessing in methods like display_all and list_students.
Edited by Gauri Desai

Merge request reports