Created attachment 25 [details] Duplicated sorted CPU list When I click the column header to sort the CPU list, the sorted list is generated with one more duplicated CPU entry for each CPU product. The expected result should be no duplicated entry and the list is sorted according to the criteria. Step to reproduction: 1. click the CPU List tab 2. click any one of the column header to call the "CPUController" function The problem is only happened in CPU list and doesn't throw any exception. I found the potential problem is that the class "SpecList" needs to get the sorted CPU data for calculation, so the class "DIYTab" creates a new "CPUController" instance for "SpecList". Due to the ArrayList for holding CPU information is a static field, create a new "CPUController" instance will affect the ArrayList. I suggest to change the function about get sorted data to be static function, so that the "SpecList" instance can get the sorted data for calculation without created a duplicated "CPUController".
The bug is now be fixed by changing the getSortedList function in the CPUController Class, into a static function. The DIYTab class will now create a new specList object, and call the findList function in the specList to get the CPU data. It prevents creating a new CPUController object before getting the data, and solves the problem of putting duplicate tuples into the cpuList.
Created attachment 27 [details] Capture of CPU List after the bug is fixed