For detail discussion, please refer to http://openejb.979440.n4.nabble.com/patch-for-review-td2267551.html#a2267551
The patch changes the sort algorithm, and try to make the sorted order is stable.
I did not have DependOn sample on hand, but anyway, all the reference test cases passed with few modification.
Optimize the swap function by using double link list.
Use double-link queue to improve the sort efficiency, commit changes to trunk at revision: 997202, and 3.1.2-SNAPSHOT at revision: 997210