Solution for swapping ArrayList data members with another
In Solution 3, assuming you initialize mp31 and mp32 to null, you can replace this

//Check if we found track 1
if(vectorMain.contains(mp31)){
    //Set temp var new track number
    mp31.setTrackNo(t2);
}


With:

//Check if we found track 1
if(mp31 != null) {
    //Set temp var new track number
    mp31.setTrackNo(t2);
}


There is really no need to check if the arraylist contains the object since you used the get(...) method on the arraylist to get it in the first place. Therefore, you know that if the object has been initialized (is not null), the arraylist contains the object.

Also, I would change the method signature for getMainIndex to also take the list to search in as an argument to the method. In that case, you don't need to have two methods (with probably a lot of duplicated code) getMainIndex and getFavIndex can be the same method, getIndexInList(int trackNumber, List&lt;MP3Track&gt; list).



I am not sure how your getMainIndex method works at the moment, but I assume the code mp31 = vectorMain.get(getMainIndex(t1)); within the loop is the same thing as mp31 = track;. Therefore, you can replace this entire loop:

for(MP3Track track : vectorMain){
    if(track.getTrackNo() == t1){
        //If track 1 found assign it to temp var
        mp31 = vectorMain.get(getMainIndex(t1));
    }
    if(track.getTrackNo() == t2){
        //If track 2 found assign it to temp var
        mp32 = vectorMain.get(getMainIndex(t2));
    }
}


With either:

for(MP3Track track : vectorMain){
    if(track.getTrackNo() == t1){
        //If track 1 found assign it to temp var
        mp31 = track;
    }
    if(track.getTrackNo() == t2){
        //If track 2 found assign it to temp var
        mp32 = track;
    }
}


Or:

int index = getMainIndex(t1);
if (index != -1)
    mp31 = vectorMain.get(index);
index = getMainIndex(t2);
if (index != -1)
    mp32 = vectorMain.get(index);




As for Solution 2, this code here does not guarantee uniqueness of trackNo if two songs have the same title:

for(MP3Track track : vectorMain){
    if(track.getTrackNo() == t1){
        s1 = track.getTitle();
    }
    if(track.getTrackNo() == t2){
        s2 = track.getTitle();
    }
}

for(MP3Track track : vectorMain){
    if(track.getTitle().equals(s1)){
        track.setTrackNo(t2);
    }
    if(track.getTitle().equals(s2)){
        track.setTrackNo(t1);
    }
}


What you are essentially doing here is that you first scan through the list to get the title of the matching songs, and then you search for their title to change their track number. Why not change their track number within the first loop? You don't need all the three loops you have in Solution 2. Instead, search through vectorMain once and change the track numbers there, then search through vectorFav and change it there.



Some other comments:

I am not sure about how exactly you are using these two vectors and your MP3Track objects, or your trackNumber values. It seems to me as if whenever you swap track numbers, you do it in both of the lists. Therefore, perhaps you should use the same object references in both of the list. Don't create new MP3Track objects to place in vectorFav, you can re-use the same objects. That way, it will be enough to search only the vectorMain for the tracks, because it's the same object it will also update in vectorFav. As I said, I don't know exactly how you are using the trackNumber values so this might fit for you at the moment, but if it doesn't fit then you might want to change your design of the project.

As far as I have seen of the usage of getMainIndex and getFavIndex, you only use those methods to first get the index in the list, and then get the MP3Track object itself. Consider returning an MP3Track (the object itself) instead of an int (the index of the object in the list). Then you should also rename the method to reflect this change in behavior.