if(exitingVertex.getAnnotation("unit") == null || exitingVertex.getAnnotation("unit").equals("0")){
Map<String, String> existingProcessAnnotations = exitingVertex.getAnnotations();
Map<String, String> newProcessAnnotations = updateKeyValuesInMap(existingProcessAnnotations, annotationsToUpdate);
boolean RECREATE_AND_REPLACE = true; //has to be true since already an entry for the same pid exists
Process newProcess = putProcess(newProcessAnnotations, RECREATE_AND_REPLACE);
<BUG>putWasTriggeredByEdge(newProcess, exitingVertex, eventId, time, DEV_AUDIT, getOperation(syscall));
}else{ //is a unit i.e. unit annotation is non-null and non-zero.</BUG>
LinkedList<Process> oldProcessUnitStack = processUnitStack.get(pid);
Process oldContainingProcess = getContainingProcessVertex(pid);
Map<String, String> oldContainingProcessAnnotations = oldContainingProcess.getAnnotations();

if(exitingVertex.getAnnotation("unit") == null || exitingVertex.getAnnotation("unit").equals("0")){
Map<String, String> existingProcessAnnotations = exitingVertex.getAnnotations();
Map<String, String> newProcessAnnotations = updateKeyValuesInMap(existingProcessAnnotations, annotationsToUpdate);
boolean RECREATE_AND_REPLACE = true; //has to be true since already an entry for the same pid exists
Process newProcess = putProcess(newProcessAnnotations, RECREATE_AND_REPLACE);
WasTriggeredBy newProcessToOldProcess = new WasTriggeredBy(newProcess, exitingVertex);
putEdge(newProcessToOldProcess, getOperation(syscall), time, eventId, DEV_AUDIT);
}else{ //is a unit i.e. unit annotation is non-null and non-zero.
LinkedList<Process> oldProcessUnitStack = processUnitStack.get(pid);
Process oldContainingProcess = getContainingProcessVertex(pid);
Map<String, String> oldContainingProcessAnnotations = oldContainingProcess.getAnnotations();
