Program: 58217
Project: 58217
Buggy source:
/** 
 * Handles the creation of   {@link SelectedElementRep} according to the data in a selectionDelta
 * @param selectionDelta the selection data that should be handled
 */
protected void handleConnectedElementRep(ISelectionDelta selectionDelta){
  try {
    int iStorageIndex=-1;
    int iID=-1;
    EIDType idType;
    if (selectionDelta.size() > 0) {
      for (      SelectionDeltaItem item : selectionDelta) {
        if (!(item.getSelectionType() == SelectionType.MOUSE_OVER)) {
          continue;
        }
        if (selectionDelta.getIDType() == EIDType.EXPRESSION_INDEX) {
          iStorageIndex=item.getPrimaryID();
          iID=item.getSecondaryID();
          idType=EIDType.EXPRESSION_INDEX;
        }
 else         if (selectionDelta.getSecondaryIDType() == EIDType.EXPRESSION_INDEX) {
          iStorageIndex=item.getSecondaryID();
          iID=item.getPrimaryID();
          idType=EIDType.EXPRESSION_INDEX;
        }
 else         if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX) {
          iID=item.getPrimaryID();
          iStorageIndex=iID;
          idType=EIDType.EXPERIMENT_INDEX;
        }
 else         if (selectionDelta.getIDType() == EIDType.UNSPECIFIED) {
          iStorageIndex=item.getPrimaryID();
          iID=item.getPrimaryID();
          idType=EIDType.UNSPECIFIED;
        }
 else         throw new InvalidAttributeValueException("String_Node_Str" + selectionDelta.getIDType());
        if (iStorageIndex == -1)         throw new IllegalArgumentException("String_Node_Str");
        ArrayList<SelectedElementRep> alRep=createElementRep(idType,iStorageIndex);
        if (alRep == null) {
          continue;
        }
        for (        SelectedElementRep rep : alRep) {
          if (rep == null) {
            continue;
          }
          for (          Integer iConnectionID : item.getConnectionIDs()) {
            connectedElementRepresentationManager.addSelection(iConnectionID,rep);
          }
        }
      }
    }
  }
 catch (  InvalidAttributeValueException e) {
    generalManager.getLogger().log(new Status(IStatus.WARNING,IGeneralManager.PLUGIN_ID,"String_Node_Str",e));
  }
}

Fixed version (ground truth):
/** 
 * Handles the creation of   {@link SelectedElementRep} according to the data in a selectionDelta
 * @param selectionDelta the selection data that should be handled
 */
protected void handleConnectedElementRep(ISelectionDelta selectionDelta){
  try {
    int iStorageIndex=-1;
    int iID=-1;
    IDType idType;
    if (selectionDelta.size() > 0) {
      for (      SelectionDeltaItem item : selectionDelta) {
        if (!(item.getSelectionType() == SelectionType.MOUSE_OVER)) {
          continue;
        }
        if (selectionDelta.getIDType() == contentIDType) {
          iStorageIndex=item.getPrimaryID();
          iID=item.getSecondaryID();
          idType=contentIDType;
        }
 else         if (selectionDelta.getIDType() == storageIDType) {
          iID=item.getPrimaryID();
          iStorageIndex=iID;
          idType=storageIDType;
        }
 else         throw new InvalidAttributeValueException("String_Node_Str" + selectionDelta.getIDType());
        if (iStorageIndex == -1)         throw new IllegalArgumentException("String_Node_Str");
        ArrayList<SelectedElementRep> alRep=createElementRep(idType,iStorageIndex);
        if (alRep == null) {
          continue;
        }
        for (        SelectedElementRep rep : alRep) {
          if (rep == null) {
            continue;
          }
          for (          Integer iConnectionID : item.getConnectionIDs()) {
            connectedElementRepresentationManager.addSelection(iConnectionID,rep);
          }
        }
      }
    }
  }
 catch (  InvalidAttributeValueException e) {
    generalManager.getLogger().log(new Status(IStatus.WARNING,IGeneralManager.PLUGIN_ID,"String_Node_Str",e));
  }
}