code: private IConceptSet filterEquivalents(final IConceptSet concepts) {
          int[] cArray = concepts.toArray();
          boolean[] toExclude = new boolean[cArray.length];
  
          for(int i = 0; i < cArray.length; i++) {
              if(toExclude[i]) continue;
              final IConceptSet iAncestors = IConceptSet.FACTORY.createConceptSet(getAncestors(no, cArray[i]));
              for(int j = i+1; j < cArray.length; j++) {
                  if(iAncestors.contains(cArray[j])) {
                      final IConceptSet jAncestors = IConceptSet.FACTORY.createConceptSet(getAncestors(no, cArray[j]));
                      if(jAncestors.contains(cArray[i])) {
                          // These concepts are equivalent to mark the second concept as excluded
                          toExclude[j] = true;
                      }
                  }
              }
          }
  
          IConceptSet res = IConceptSet.FACTORY.createConceptSet();
          for(int i = 0; i < cArray.length; i++) {
              if(!toExclude[i]) {
                  res.add(cArray[i]);
              }
          }
  
          return res;
      }
docs: Identifies any equivalent concepts and retains only one of them.
  
  @param concepts
  @return