for (int m = 0; m < alarmEvents.size(); m++) {
try {
Activity activity = (Activity) getActivities().get(m + messageEvents.size());
if (alarmEvents.get(m) == null) {
throw new ProcessStructuralException("An activity in this Pick container is not associated " +
"with any AlarmEvent, please check that all activities created in this container " +
"is properly associated with an event.");
}
result.put(activity, alarmEvents.get(m));
} catch (IndexOutOfBoundsException iobe) {
throw new ProcessStructuralException("There are more Activity objects in this Pick container " +
"than AlarmEvent, activities and container have been wrongly created or associated", iobe);
}
}
return result;
}