Long[] customCriteriaIds3 =
new Long[] {Long.parseLong("INSERT_CUSTOM_TARGETING_KEY_ID_HERE"),
Long.parseLong("INSERT_CUSTOM_TARGETING_VALUE_ID_HERE")};
// Create custom criteria.
CustomCriteria customCriteria1 = new CustomCriteria();
customCriteria1.setKeyId(customCriteriaIds1[0]);
customCriteria1.setValueIds(new long[] {customCriteriaIds1[1]});
customCriteria1.setOperator(CustomCriteriaComparisonOperator.IS);
CustomCriteria customCriteria2 = new CustomCriteria();
customCriteria2.setKeyId(customCriteriaIds2[0]);
customCriteria2.setValueIds(new long[] {customCriteriaIds2[1]});
customCriteria2.setOperator(CustomCriteriaComparisonOperator.IS_NOT);
CustomCriteria customCriteria3 = new CustomCriteria();
customCriteria3.setKeyId(customCriteriaIds3[0]);
customCriteria3.setValueIds(new long[] {customCriteriaIds3[1]});
customCriteria3.setOperator(CustomCriteriaComparisonOperator.IS);
// Create the custom criteria set that will resemble:
//
// (customCriteria1.key == customCriteria1.value OR
// (customCriteria2.key != customCriteria2.value AND