return (int) (((RefactoringDescriptor) first).getTimeStamp() - ((RefactoringDescriptor) second).getTimeStamp());
final RefactoringDescriptor predecessor= (RefactoringDescriptor) first; final RefactoringDescriptor successor= (RefactoringDescriptor) second; final long delta= predecessor.getTimeStamp() - successor.getTimeStamp(); if (delta > 0) return 1; else if (delta < 0) return -1; return 0;
	private static void readRefactoringDescriptors(final InputStream stream, final Collection collection, final int count, final IProgressMonitor monitor) throws CoreException {		try {			monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_retrieving_history, 1);			final RefactoringDescriptor[] results= new RefactoringSessionReader(true).readSession(new InputSource(new BufferedInputStream(stream))).getRefactorings();			Arrays.sort(results, new Comparator() {				public final int compare(final Object first, final Object second) {					return (int) (((RefactoringDescriptor) first).getTimeStamp() - ((RefactoringDescriptor) second).getTimeStamp());				}			});			monitor.worked(1);			final int size= count - collection.size();			for (int index= 0; index < results.length && index < size; index++)				collection.add(results[index]);		} finally {			monitor.done();		}	}