- if (!(valueMap.get(i.getVarName()).equals(i.getValue())))
- if (!(writerMap.get(i.getVarName()).equals(i.getAppNum())))
+ if (!(valueMap.get(i.getVarName()).equals(i.getValue()))) // We have different values
+ if (!(writerMap.get(i.getVarName()).equals(i.getAppNum()))) {// We have different writers
+ errorMessage = "Conflict found between the two apps. App"+i.getAppNum()+" has written the value: "+i.getValue()+
+ " to the variable: "+i.getVarName()+" while App"+writerMap.get(i.getVarName())+" is overwriting the value: "
+ +valueMap.get(i.getVarName())+" to the same variable!";