Program: 11814
Project: 11814
Buggy source:
/** 
 * @since 2.3
 * @param eObject
 * @param eReference
 * @param diagnostics
 * @param context
 * @return
 */
protected boolean validate_KeyUnique(EObject eObject,EReference eReference,DiagnosticChain diagnostics,Map<Object,Object> context){
  boolean result=true;
  Map<List<Object>,EObject> keys=new HashMap<List<Object>,EObject>();
  EAttribute[] eAttributes=(EAttribute[])((BasicEList<?>)eReference.getEKeys()).data();
  @SuppressWarnings("String_Node_Str") List<EObject> values=(List<EObject>)eObject.eGet(eReference);
  for (  EObject value : values) {
    ArrayList<Object> key=new ArrayList<Object>();
    for (int i=0, size=eAttributes.length; i < size; ++i) {
      EAttribute eAttribute=eAttributes[i];
      if (eAttribute == null) {
        break;
      }
 else {
        key.add(value.eGet(eAttribute));
      }
    }
    EObject otherValue=keys.put(key,value);
    if (otherValue != null) {
      result=false;
      if (diagnostics == null) {
        break;
      }
 else {
        String uriFragmentSegment=((InternalEObject)eObject).eURIFragmentSegment(eReference,value);
        int index=uriFragmentSegment.indexOf('[',0);
        if (index != -1) {
          uriFragmentSegment=uriFragmentSegment.substring(index);
        }
        diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,DIAGNOSTIC_SOURCE,EOBJECT__EVERY_KEY_UNIQUE,getEcoreResourceLocator().getString("String_Node_Str",new Object[]{getFeatureLabel(eReference,context),uriFragmentSegment,getObjectLabel(value,context),getObjectLabel(otherValue,context)}),new Object[]{eObject,eReference,value,otherValue}));
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @since 2.3
 * @param eObject
 * @param eReference
 * @param diagnostics
 * @param context
 * @return whether every key is unique.
 */
protected boolean validate_KeyUnique(EObject eObject,EReference eReference,DiagnosticChain diagnostics,Map<Object,Object> context){
  boolean result=true;
  Map<List<Object>,EObject> keys=new HashMap<List<Object>,EObject>();
  EAttribute[] eAttributes=(EAttribute[])((BasicEList<?>)eReference.getEKeys()).data();
  @SuppressWarnings("String_Node_Str") List<EObject> values=(List<EObject>)eObject.eGet(eReference);
  for (  EObject value : values) {
    ArrayList<Object> key=new ArrayList<Object>();
    for (int i=0, size=eAttributes.length; i < size; ++i) {
      EAttribute eAttribute=eAttributes[i];
      if (eAttribute == null) {
        break;
      }
 else {
        key.add(value.eGet(eAttribute));
      }
    }
    EObject otherValue=keys.put(key,value);
    if (otherValue != null) {
      result=false;
      if (diagnostics == null) {
        break;
      }
 else {
        String uriFragmentSegment=((InternalEObject)eObject).eURIFragmentSegment(eReference,value);
        int index=uriFragmentSegment.indexOf('[',0);
        if (index != -1) {
          uriFragmentSegment=uriFragmentSegment.substring(index);
        }
        diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,DIAGNOSTIC_SOURCE,EOBJECT__EVERY_KEY_UNIQUE,getEcoreResourceLocator().getString("String_Node_Str",new Object[]{getFeatureLabel(eReference,context),uriFragmentSegment,getObjectLabel(value,context),getObjectLabel(otherValue,context)}),new Object[]{eObject,eReference,value,otherValue}));
      }
    }
  }
  return result;
}