class EqualityCheck implements ReviewParticipant {

    @Override
    public Review review(PropertyFileDescriptor descriptor, Property master, Property slave) {
        if(master==null||slave==null)
            return null;
        String masterValue = master.getValue();
        String slaveValue = slave.getValue();
        if(masterValue!=null)
        {
            if(masterValue.equals(slaveValue))
            {
            	if(terminologyProvider!=null) {
            		Map<String, Property> terminology = terminologyProvider.getTerminology(descriptor.getVariant());
            		Property terminologyEntry = terminology.get(slave.getValue());
            		if(terminologyEntry!=null && slave.getValue().equals(terminologyEntry.getValue())){
            			// equality is ok if it is like that in terminology. That could be the case for e.g. a product name
            			// or short terms like "OK"
            			return null;
            		}            		
            	}
                Review review = PropertiesFactory.eINSTANCE.createReview();
                review.setCreated(System.currentTimeMillis());
                review.setMessage("Template and translated string are identical");
				review.setReviewType(getReviewType());
                review.setSeverity(Severity.WARNING);
                review.setUser("Jabylon");
                return review;
            }
        }
        return null;
    }

}