protected static String calculateMD5ForSong(final Song aSong, final FindDuplicateOption aOption, final HashCalculator aCalculator)
                                         throws Exception {
        aCalculator.resetInit();

        if (aOption.isAlbum()) {
            aCalculator.updateHash(String.valueOf(aSong.getAlbum()));
        }

        if (aOption.isAlbumArtist()) {
            aCalculator.updateHash(String.valueOf(aSong.getAlbumArtist()));
        }

        if (aOption.isArtist()) {
            aCalculator.updateHash(String.valueOf(aSong.getArtist()));
        }

        if (aOption.isComposer()) {
            aCalculator.updateHash(String.valueOf(aSong.getComposer()));
        }

        if (aOption.isGenre()) {
            aCalculator.updateHash(String.valueOf(aSong.getGenre()));
        }

        if (aOption.isName()) {
            aCalculator.updateHash(String.valueOf(aSong.getName()));
        }

        if (aOption.isTitle()) {
            aCalculator.updateHash(String.valueOf(aSong.getTitle()));
        }

        if (aOption.isYear()) {
            aCalculator.updateHash(String.valueOf(aSong.getYear()));
        }

        if (aOption.isLength()) {
            aCalculator.updateHash(String.valueOf(aSong.getDurationMillis()));
        }

        return aCalculator.finalizeHash();
    }