code: private Map<Feature, Feature> diffFeatures(List<Feature> pcm1Features, List<Feature> pcm2Features, PCMElementComparator comparator, DiffResult result) {
          List<Feature> commonFeatures = new ArrayList<Feature>();
          List<Feature> featuresOnlyInPCM1 = new ArrayList<Feature>();
          List<Feature> featuresOnlyInPCM2 = new ArrayList<Feature>(pcm2Features);
  
          Map<Feature, Feature> equivalentFeatures = new HashMap<Feature, Feature>();
  
          for (Feature f1 : pcm1Features) {
              boolean similarFeature = false;
              for (Feature f2 : pcm2Features) {
                  similarFeature = comparator.similarFeature(f1, f2);
                  if (similarFeature) {
                      commonFeatures.add(f1);
                      featuresOnlyInPCM2.remove(f2);
                      equivalentFeatures.put(f1, f2);
                      break;
                  }
              }
  
              if (!similarFeature) {
                  featuresOnlyInPCM1.add(f1);
              }
          }
  
          result.setCommonFeatures(commonFeatures);
          result.setFeaturesOnlyInPCM1(featuresOnlyInPCM1);
          result.setFeaturesOnlyInPCM2(featuresOnlyInPCM2);
  
          return equivalentFeatures;
      }
docs: Compare the features of two PCMs
  @param pcm1Features
  @param pcm2Features
  @param comparator
  @param result
  @return equivalent features