public static List<IFileCompareResultBean> findEqualFiles(final File dirToSearch)
	{
		final List<File> allFiles = FileSearchExtensions.findFilesRecursive(dirToSearch, "*");
		final List<IFileCompareResultBean> equalFiles = new ArrayList<>();
		for (int i = 0; i < allFiles.size(); i++)
		{
			final File toCompare = allFiles.get(i);
			for (final File file : allFiles)
			{
				if (toCompare.equals(file))
				{
					continue;
				}
				final IFileCompareResultBean compareResultBean = CompareFileExtensions
					.simpleCompareFiles(toCompare, file);
				final boolean equal = CompareFileExtensions.validateEquality(compareResultBean);
				// if equal is true and the list does not contain the same
				// compareResultBean then add it.
				if (equal && !equalFiles.contains(compareResultBean))
				{
					equalFiles.add(compareResultBean);
				}
			}
		}
		return equalFiles;
	}
public static List < IFileCompareResultBean > findEqualFiles ( final File dirToSearch ) { final List < File > allFiles = FileSearchExtensions . findFilesRecursive ( dirToSearch , "*" ) ; final List < IFileCompareResultBean > equalFiles = new ArrayList < > ( ) ; for ( int i = 0 ; i < allFiles . size ( ) ; i ++ ) { final File toCompare = allFiles . get ( i ) ; for ( final File file : allFiles ) { if ( toCompare . equals ( file ) ) { continue ; } final IFileCompareResultBean compareResultBean = CompareFileExtensions . simpleCompareFiles ( toCompare , file ) ; final boolean equal = CompareFileExtensions . validateEquality ( compareResultBean ) ; if ( equal && ! equalFiles . contains ( compareResultBean ) ) { equalFiles . add ( compareResultBean ) ; } } } return equalFiles ; }
Find equal files.

@param dirToSearch
the dir to search

@return the list with the result beans