code: protected void init(T[] ancestorDefinition, T[] recipientDefinition, List<T> sameDefinitionData,
        List<RelatedDefinition<T>> changedDefinitionData, List<T> newDefinitionData, List<T> removedDefinitionData)
     {
        for (int i = 0; i < recipientDefinition.length; i++)
        {
           boolean isNew = true;
           for (int j = 0; j < ancestorDefinition.length; j++)
           {
              if (recipientDefinition[i].getName().equals(ancestorDefinition[j].getName()))
              {
                 isNew = false;
                 if (recipientDefinition[i].equals(ancestorDefinition[j]))
                    sameDefinitionData.add(recipientDefinition[i]);
                 else
                 {
                    RelatedDefinition<T> relatedDefinition =
                       new RelatedDefinition<T>(ancestorDefinition[j], recipientDefinition[i]);
                    changedDefinitionData.add(relatedDefinition);
                 }
              }
           }
           if (isNew)
              newDefinitionData.add(recipientDefinition[i]);
        }
        for (int i = 0; i < ancestorDefinition.length; i++)
        {
           boolean isRemoved = true;
           for (int j = 0; j < recipientDefinition.length && isRemoved; j++)
           {
              if (recipientDefinition[j].getName().equals(ancestorDefinition[i].getName()))
              {
                 isRemoved = false;
                 break;
              }
           }
           if (isRemoved)
              removedDefinitionData.add(ancestorDefinition[i]);
        }
     }
docs: Compare definitions
  
  @param ancestorDefinition
  @param recipientDefinition
  @param sameDefinitionData
  @param changedDefinitionData
  @param newDefinitionData
  @param removedDefinitionData