code: private void normalizeMapping(ImmutableSet<CQIE> unfoldingProgram) {
  
          // Normalizing language tags. Making all LOWER CASE
  
          for (CQIE mapping : unfoldingProgram) {
              Function head = mapping.getHead();
              for (Term term : head.getTerms()) {
                  if (!(term instanceof Function))
                      continue;
  
                  Function typedTerm = (Function) term;
                  if (typedTerm.getTerms().size() == 2 && typedTerm.getFunctionSymbol().getName().equals(RDF.LANGSTRING.getIRIString())) {
                      // changing the language, its always the second inner term (literal,lang)
                      Term originalLangTag = typedTerm.getTerm(1);
                      if (originalLangTag instanceof ValueConstant) {
                          ValueConstant originalLangConstant = (ValueConstant) originalLangTag;
                          Term normalizedLangTag = termFactory.getConstantLiteral(originalLangConstant.getValue().toLowerCase(),
                                  originalLangConstant.getType());
                          typedTerm.setTerm(1, normalizedLangTag);
                      }
                  }
              }
          }
  
          // Normalizing equalities
          for (CQIE cq: unfoldingProgram)
              eqNormalizer.enforceEqualities(cq);
      }
docs: Normalize language tags (make them lower-case) and equalities
  (remove them by replacing all equivalent terms with one representative)