I have a method that is intended to remove duplicate objects from an ArrayList. The objects are of a custom class, IndividualEntry and the method looks like this:

```
 private static ArrayList<IndividualEntry> cleanList(ArrayList<IndividualEntry> inputList){
        ArrayList<IndividualEntry> thisList = inputList;
        IndividualEntry thisEntry;
        IndividualEntry thatEntry;
        for(int i = 0; i<thisList.size();i++){
            thisEntry = thisList.get(i);
            System.out.println("First entry is "+thisEntry);
        for(int j = (i+1); j<thisList.size(); j++){
            thatEntry = thisList.get(j);
            System.out.println("Second entry is "+thatEntry);
            if(thisEntry.equals(thatEntry)){
                thisList.remove(thatEntry);
            System.out.println("Entry removed: "+thatEntry);
            }
        }
            }
        return thisList;
    }

```

The method is successfully removing SOME duplicates. The ArrayList before this method runs looks like this (each letter representing a unique object):

A
B
B
C
A
B
B
A
A
B
B
B
B
C

After I run the method it comes out as:

C
A
B
B
B
C

I don't understand why this method would be rearranging the results and still including duplicates, but my suspicion is that it's due to the `thisList` getting changed within the inner for loop but the overall for loop still using the original value of `thisList`. Is that correct? What would be the fix for this?