I am attempting to mimic Ant's unzip task (using Java) however i can't work out how Ant handles duplicate files and that i haven't found any useful assets around the subject. I attempted to evaluate the outcomes of the zipped folder that contains replicates which was unzipped with Ant: it appears that Ant doesn't always go ahead and take first copy from the duplicate file it results in, nor will it always go ahead and take last, nor the main one using the latest timestamp.

So, what formula does Ant use to find out which copy of the duplicate file to extract?

If Ant includes a particular order of unzipping files (for example breadth-first, or depth-first, or by sorting the files alphabetically), that may also lead me within the right direction.