Compares cells of both products omitting ids
@param p the product to compare
@param featLinks the links between the features of the 2 JSONFormat objects
@param exactContent
@return true if cells of both products are the same, omits ids
546927
public boolean sameProduct(JProduct p, Map<String, String> featLinks, boolean exactContent) {
		List<JCell> tempCells = new ArrayList<>(this.cells);
		if(p.getCells().size() != this.cells.size()){
			return false;
		}
		for(JCell pC : p.getCells()){
			for(JCell thisC: this.cells){
				if(tempCells.contains(thisC)){
					if(thisC.sameCell(pC, featLinks, exactContent)){
						tempCells.remove(thisC);
					}
				}
			}
		}
//		if(tempCells.isEmpty()){
//			System.out.println(id);
//		}
		return tempCells.isEmpty();
	}
1268728
private void verifyKeyExistenceMatchesExpectation(JsonObject jsonDataToValidate) {
        boolean jsonDataContainsKey = jsonDataToValidate.containsKey(validationKey);
        if (expCheckType == JsonCheckType.KEY_DOES_NOT_EXIST) {
            assertFalse("The provided content contains a \"" + validationKey + "\" key but should not. The content to validate was: [" + jsonDataToValidate + "].", jsonDataContainsKey);
        } else {
            assertTrue("The provided content does not contain a \"" + validationKey + "\" key but should. The content to validate was: [" + jsonDataToValidate + "].", jsonDataContainsKey);
        }
    }
1070402
protected void checkLinkConcistency(CmsObject cms) {

        Locale masterLocale = CmsLocaleManager.MASTER_LOCALE;

        for (I_CmsXmlContentValue contentValue : getValues(masterLocale)) {
            if (contentValue instanceof CmsXmlVfsFileValue) {
                CmsLink link = ((CmsXmlVfsFileValue)contentValue).getLink(cms);
                link.checkConsistency(cms);
            }
        }
        initDocument();
    }
606410
protected final boolean isSatisfied(AnalyzedToken aToken,
      Map<String, List<String>> uFeatures) {

    if (allFeatsIn && equivalencesMatched.isEmpty()) {
      return false;
    }
    if (uFeatures == null) {
      throw new RuntimeException("isSatisfied called without features being set");
    }
    unificationFeats = uFeatures;

    boolean unified = true;
    if (allFeatsIn) {
      unified = checkNext(aToken, uFeatures);
    } else {
      while (equivalencesMatched.size() <= tokCnt) {
        equivalencesMatched.add(new ConcurrentHashMap<>());
      }
      for (Map.Entry<String, List<String>> feat : uFeatures.entrySet()) {
        List<String> types = feat.getValue();
        if (types == null || types.isEmpty()) {
          types = equivalenceFeatures.get(feat.getKey());
        }
        for (String typeName : types) {
          PatternToken testElem = equivalenceTypes
              .get(new EquivalenceTypeLocator(feat.getKey(), typeName));
          if (testElem == null) {
            return false;
          }
          if (testElem.isMatched(aToken)) {
            if (!equivalencesMatched.get(tokCnt).containsKey(feat.getKey())) {
              Set<String> typeSet = new HashSet<>();
              typeSet.add(typeName);
              equivalencesMatched.get(tokCnt).put(feat.getKey(), typeSet);
            } else {
              equivalencesMatched.get(tokCnt).get(feat.getKey()).add(typeName);
            }
          }
        }
        unified = equivalencesMatched.get(tokCnt).containsKey(feat.getKey());
        if (!unified) {
          equivalencesMatched.remove(tokCnt);
          break;
        }
      }
      if (unified) {
        if (tokCnt == 0 || tokSequence.isEmpty()) {
          tokSequence.add(new AnalyzedTokenReadings(aToken, 0));
          List<Map<String, Set<String>>> equivList = new ArrayList<>();
          equivList.add(equivalencesMatched.get(tokCnt));
          tokSequenceEquivalences.add(equivList);
        } else {
          tokSequence.get(0).addReading(aToken);
          tokSequenceEquivalences.get(0).add(equivalencesMatched.get(tokCnt));
        }
        tokCnt++;
      }
    }
    return unified;
  }
1343736
public boolean matchContent(Fingerprint fp) {
    for (Tag tag : CONTENT_TAGS) {
      if (!getTag(tag).equals(fp.getTag(tag))) {
        return false;
      }
    }
    return true;
  }
1358308
protected boolean checkTopicsForInvalidDuplicates(final ContentSpec contentSpec) {
        boolean valid = true;

        // Find all Topics that have two or more different revisions
        final List<ITopicNode> allTopicNodes = contentSpec.getAllTopicNodes();
        final Map<Integer, Map<Integer, Set<ITopicNode>>> invalidTopicNodes = new HashMap<Integer, Map<Integer, Set<ITopicNode>>>();

        for (final ITopicNode topicNode1 : allTopicNodes) {
            if (!topicNode1.isTopicAnExistingTopic()) continue;

            for (final ITopicNode topicNode2 : allTopicNodes) {
                // If the Topic isn't an existing topic and doesn't match the first spec topic's id, then continue
                if (topicNode1 == topicNode2 || !topicNode2.isTopicAnExistingTopic() || !topicNode1.getDBId().equals(topicNode2.getDBId()))
                    continue;

                // Check if the revisions between the two topics are the same
                if (topicNode1.getRevision() == null && topicNode2.getRevision() != null || topicNode1.getRevision() != null &&
                        topicNode2.getRevision() == null || topicNode1.getRevision() != null && !topicNode1.getRevision().equals(
                        topicNode2.getRevision())) {
                    if (!invalidTopicNodes.containsKey(topicNode1.getDBId())) {
                        invalidTopicNodes.put(topicNode1.getDBId(), new HashMap<Integer, Set<ITopicNode>>());
                    }

                    final Map<Integer, Set<ITopicNode>> revisionsToTopicNode = invalidTopicNodes.get(topicNode1.getDBId());
                    if (!revisionsToTopicNode.containsKey(topicNode1.getRevision())) {
                        revisionsToTopicNode.put(topicNode1.getRevision(), new HashSet<ITopicNode>());
                    }

                    revisionsToTopicNode.get(topicNode1.getRevision()).add(topicNode1);

                    valid = false;
                }
            }
        }

        // Loop through and generate an error message for each invalid topic
        for (final Entry<Integer, Map<Integer, Set<ITopicNode>>> entry : invalidTopicNodes.entrySet()) {
            final Integer topicId = entry.getKey();
            final Map<Integer, Set<ITopicNode>> revisionsToTopicNode = entry.getValue();

            final List<String> revNumbers = new ArrayList<String>();
            final List<Integer> revisions = new ArrayList<Integer>(revisionsToTopicNode.keySet());
            Collections.sort(revisions, new NullNumberSort<Integer>());

            for (final Integer revision : revisions) {
                final List<ITopicNode> topicNodes = new ArrayList<ITopicNode>(revisionsToTopicNode.get(revision));

                // Build up the line numbers message
                final StringBuilder lineNumbers = new StringBuilder();
                if (topicNodes.size() > 1) {
                    // Sort the Topics by line numbers
                    Collections.sort(topicNodes, new TopicNodeLineNumberComparator());

                    for (int i = 0; i < topicNodes.size(); i++) {
                        if (i == topicNodes.size() - 1) {
                            lineNumbers.append(" and ");
                        } else if (lineNumbers.length() != 0) {
                            lineNumbers.append(", ");
                        }

                        lineNumbers.append(topicNodes.get(i).getLineNumber());
                    }
                } else if (topicNodes.size() == 1) {
                    lineNumbers.append(topicNodes.get(0).getLineNumber());
                }

                // Build the revision message
                revNumbers.add(
                        String.format(ProcessorConstants.ERROR_TOPIC_WITH_DIFFERENT_REVS_REV_MSG, (revision == null ? "Latest" : revision),
                                lineNumbers));
            }

            final StringBuilder message = new StringBuilder(String.format(ProcessorConstants.ERROR_TOPIC_WITH_DIFFERENT_REVS_MSG, topicId));
            for (final String revNumber : revNumbers) {
                message.append(String.format(ProcessorConstants.CSLINE_MSG, revNumber));
            }

            log.error(message.toString());
        }

        return valid;
    }
396936
@Override
  public void isEqualTo(@NullableDecl Object other) {
    if (Objects.equal(actual(), other)) {
      return;
    }

    // Fail but with a more descriptive message:

    if (!(other instanceof Map)) {
      super.isEqualTo(other);
      return;
    }

    boolean mapEquals = containsEntriesInAnyOrder((Map<?, ?>) other, "is equal to", false);
    if (mapEquals) {
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s is equal to <%s>. It is equal according to the contract of "
                      + "Map.equals(Object), but this implementation returned false",
                  actualAsString(), other)));
    }
  }
699966
@Override
    public boolean isContainedIn(ImmutableCQ cq1, ImmutableCQ cq2) {
        return cq2.getAnswerVariables().equals(cq1.getAnswerVariables())
                && !cq2.getAtoms().stream().anyMatch(a -> !cq1.getAtoms().contains(a));
    }
896080
private boolean exactMatch(String str, int i) {
    int end = str.length() - i;
    for (String p : _patterns) {
      int start = end - p.length();
      if (start >= 0 && str.regionMatches(start, p, 0, p.length())) {
        return true;
      }
    }
    return false;
  }
392417
boolean matchXmlDeclaration(
            final boolean blockMatching,
            final int markupLevel, final int markupBlockIndex) {

        checkMarkupLevel(markupLevel);

        if (this.markupSelectorItem.anyLevel() || markupLevel == 0 || (this.prev != null && this.prev.matchedMarkupLevels[markupLevel - 1])) {
            // This text has not matched yet, but might match, so we should check

            this.matchesThisLevel = this.markupSelectorItem.matchesXmlDeclaration(markupBlockIndex, this.markupBlockMatchingCounter);

            if (matchesPreviousOrCurrentLevel(markupLevel)) {
                // This filter was already matched by a previous level (through an "open" event), so just delegate to next.

                if (this.next != null) {
                    return this.next.matchXmlDeclaration(blockMatching, markupLevel, markupBlockIndex);
                }
                return (blockMatching? true : this.matchesThisLevel);

            } else if (this.matchesThisLevel) {
                // This filter was not matched before. So the fact that it matches now means we need to consume it,
                // therefore not delegating.

                return (this.next == null);

            }

        } else if (matchesPreviousOrCurrentLevel(markupLevel)) {
            // This filter was already matched by a previous level (through an "open" event), so just delegate to next.

            if (this.next != null) {
                return this.next.matchXmlDeclaration(blockMatching, markupLevel, markupBlockIndex);
            }
            return blockMatching;

        }

        return false;

    }
776118
public boolean contentOfEquals(Map<String, Object> one, Object two) {
        if (one == null) {
            return two == null;
        } else {
            return one.equals(two);
        }
    }
371886
public static boolean isSibling(String p1, String p2)
   {
      int pos1 = p1.lastIndexOf('/');
      int pos2 = p2.lastIndexOf('/');
      return (pos1 == pos2 && pos1 >= 0 && p1.regionMatches(0, p2, 0, pos1));
   }
690338
@Override
  public int compare(Point pointOne, Point pointTwo) {
    if (pointOne ==  null) {
      throw new JMetalException("PointOne is null") ;
    } else if (pointTwo == null) {
      throw new JMetalException("PointTwo is null") ;
    } else if (pointOne.getDimension() != pointTwo.getDimension()) {
      throw new JMetalException("Points have different size: "
          + pointOne.getDimension()+ " and "
          + pointTwo.getDimension()) ;
    }

    for (int i = pointOne.getDimension()-1; i >= 0; i--) {
      if (isBetter(pointOne.getValue(i), pointTwo.getValue(i))) {
        return -1;
      } else if (isBetter(pointTwo.getValue(i), pointOne.getValue(i))) {
        return 1;
      }
    }
    return 0;
  }
925811
private static boolean isMatch(DataMedia dataMedia, String namespace, String name) {
        boolean isMatch = true;
        if (StringUtils.isEmpty(namespace)) {
            isMatch &= StringUtils.isEmpty(dataMedia.getNamespace());
        } else {
            if (dataMedia.getNamespaceMode().getMode().isSingle()) {
                isMatch &= dataMedia.getNamespace().equalsIgnoreCase(namespace);
            } else if (dataMedia.getNamespaceMode().getMode().isMulti()) {
                isMatch &= (indexIgnoreCase(dataMedia.getNamespaceMode().getMultiValue(), namespace) != -1);
            } else if (dataMedia.getNamespaceMode().getMode().isWildCard()) {
                isMatch &= isWildCardMatch(dataMedia.getNamespace(), namespace);
            } else {
                throw new UnsupportedOperationException("unsupport mode:" + dataMedia.getNameMode().getMode());
            }
        }

        if (StringUtils.isEmpty(name)) {
            isMatch &= StringUtils.isEmpty(dataMedia.getName());
        } else {
            if (dataMedia.getNameMode().getMode().isSingle()) {
                isMatch &= dataMedia.getName().equalsIgnoreCase(name);
            } else if (dataMedia.getNameMode().getMode().isMulti()) {
                isMatch &= (indexIgnoreCase(dataMedia.getNameMode().getMultiValue(), name) != -1);
            } else if (dataMedia.getNameMode().getMode().isWildCard()) {
                isMatch &= isWildCardMatch(dataMedia.getName(), name);
            } else {
                throw new UnsupportedOperationException("unsupport mode:" + dataMedia.getNameMode().getMode());
            }
        }

        return isMatch;
    }
369389
public boolean equalsExact(Adresse other) {
        return this.ort.equalsExact(other.ort) && (this.strasse.equals(other.strasse)) &&
                this.hausnummer.equalsIgnoreCase(other.hausnummer);
    }
392287
public static boolean hasMatchingLabels(FlatRow row) {
    int inLabelCount = 0;
    int outLabelCount = 0;
    for (FlatRow.Cell cell : row.getCells()) {
      for (String label : cell.getLabels()) {
        // TODO(kevinsi4508): Make sure {@code label} is a {@link WhileMatchFilter} label.
        // TODO(kevinsi4508): Handle multiple {@link WhileMatchFilter} labels.
        if (label.endsWith(WHILE_MATCH_FILTER_IN_LABEL_SUFFIX)) {
          inLabelCount++;
        } else if (label.endsWith(WHILE_MATCH_FILTER_OUT_LABEL_SUFFIX)) {
          outLabelCount++;
        }
      }
    }

    // Checks if there is mismatching {@link WhileMatchFilter} label.
    if (inLabelCount != outLabelCount) {
      return false;
    }

    return true;
  }
848649
public boolean isLinked(String featureTable, String tileTable) {
		FeatureTileLink link = getLink(featureTable, tileTable);
		return link != null;
	}