Program: 20572
Project: 20572
Buggy source:
private void readEvents(){
  if (descriptor.getType().getEvents() == null)   return;
  for (  XmlEventAnnotation event : descriptor.getType().getEvents()) {
    log.debug("String_Node_Str" + getName() + "String_Node_Str"+ event.getName());
    SchemaField fieldEvent=getFieldComposedEntity(event.getName());
    String eventName=lastCapitalWords(event.getName());
    eventName=firstToLower(eventName);
    if (fieldEvent != null) {
      if (!event.getName().equals(eventName)) {
        String fieldName=event.getName().substring(0,event.getName().length() - eventName.length());
        fieldName=firstToLower(fieldName);
        SchemaField field=getFieldComposedEntity(fieldName);
        if (field != null) {
          if (log.isWarnEnabled())           log.warn("String_Node_Str" + event.getName() + "String_Node_Str"+ fieldEvent.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ fieldEvent.getName()+ "String_Node_Str"+ eventName+ "String_Node_Str"+ field.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ field.getName()+ "String_Node_Str");
        }
      }
      addEvent(SchemaEvent.DEFAULT_EVENT_NAME,fieldEvent);
      continue;
    }
    if (event.getName().equals(eventName)) {
      addEvent(eventName,null);
    }
 else {
      String fieldName=event.getName().substring(0,event.getName().length() - eventName.length());
      fieldName=firstToLower(fieldName);
      SchemaField field=getFieldComposedEntity(fieldName);
      if (field == null) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str" + getName() + "String_Node_Str"+ eventName+ "String_Node_Str"+ getName()+ "String_Node_Str"+ fieldName+ "String_Node_Str");
        continue;
      }
      addEvent(eventName,field);
    }
  }
  SchemaEventVirtual eventInfo;
  for (  SchemaEvent event : events.values()) {
    if (!(event instanceof SchemaEventVirtual)) {
      eventInfo=new SchemaEventVirtual(this,event.getName(),event);
      setEvent(event.getName(),eventInfo);
      eventInfo.configure();
    }
  }
}

Fixed version (ground truth):
private void readEvents(){
  if (descriptor.getType().getEvents() == null)   return;
  for (  XmlEventAnnotation event : descriptor.getType().getEvents()) {
    log.debug("String_Node_Str" + getName() + "String_Node_Str"+ event.getName());
    SchemaField fieldEvent=getField(event.getName());
    String eventName=lastCapitalWords(event.getName());
    eventName=firstToLower(eventName);
    if (fieldEvent != null) {
      if (!event.getName().equals(eventName)) {
        String fieldName=event.getName().substring(0,event.getName().length() - eventName.length());
        fieldName=firstToLower(fieldName);
        SchemaField field=getField(fieldName);
        if (field != null) {
          if (log.isWarnEnabled())           log.warn("String_Node_Str" + event.getName() + "String_Node_Str"+ fieldEvent.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ fieldEvent.getName()+ "String_Node_Str"+ eventName+ "String_Node_Str"+ field.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ field.getName()+ "String_Node_Str");
        }
      }
      addEvent(SchemaEvent.DEFAULT_EVENT_NAME,fieldEvent);
      continue;
    }
    if (event.getName().equals(eventName)) {
      addEvent(eventName,null);
    }
 else {
      String fieldName=event.getName().substring(0,event.getName().length() - eventName.length());
      fieldName=firstToLower(fieldName);
      SchemaField field=getField(fieldName);
      if (field == null) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str" + getName() + "String_Node_Str"+ eventName+ "String_Node_Str"+ getName()+ "String_Node_Str"+ fieldName+ "String_Node_Str");
        continue;
      }
      addEvent(eventName,field);
    }
  }
  SchemaEventVirtual eventInfo;
  for (  SchemaEvent event : events.values()) {
    if (!(event instanceof SchemaEventVirtual)) {
      eventInfo=new SchemaEventVirtual(this,event.getName(),event);
      setEvent(event.getName(),eventInfo);
      eventInfo.configure();
    }
  }
}