}
public static boolean expressionsContainTheSameAtoms(
TCGOCLExpression in_oCheckedExpression,
TCGOCLExpression in_oWarrantedExpression) {
OCLTreeTCGOCLAtomCollectorVisitor oFirstCollector =
new OCLTreeTCGOCLAtomCollectorVisitor();
OCLTreeTCGOCLAtomCollectorVisitor oSecondCollector =
new OCLTreeTCGOCLAtomCollectorVisitor();
OCLTreeExpressionIterator.run(in_oCheckedExpression, oFirstCollector);
OCLTreeExpressionIterator.run(in_oWarrantedExpression, oSecondCollector);
if(oFirstCollector.getExpressions().size() != oSecondCollector.getExpressions().size()) {
return false;
}
List<TCGOCLAtom> colAlreadyMatchedSecondAtoms =
new ArrayList<TCGOCLAtom>();
for(TCGOCLAtom oFirstAtom : oFirstCollector.getExpressions()) {
boolean bFound = false;
for(TCGOCLAtom oSecondAtom : oSecondCollector.getExpressions()) {
if(expressionsContainReferenceToTheSameObject(
oFirstAtom, oSecondAtom) &&
// if(oFirstAtom.getElement().equals(oSecondAtom.getElement()) &&
!colAlreadyMatchedSecondAtoms.contains(oSecondAtom)) {
bFound = true;