Program: 135837
Project: 135837
Buggy source:
@Override public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  ExecutorService exec=Executors.newFixedThreadPool(CPUS);
  exec.submit(new Runnable(){
    @Override public void run(){
      if (change == null) {
        log.info("String_Node_Str");
        return;
      }
      Map<InstanceIdentifier<?>,DataObject> updatedData=change.getUpdatedData();
      Map<InstanceIdentifier<?>,DataObject> createdData=change.getCreatedData();
      Map<InstanceIdentifier<?>,DataObject> originalData=change.getOriginalData();
      Set<InstanceIdentifier<?>> deletedData=change.getRemovedPaths();
      for (      InstanceIdentifier<?> iid : deletedData) {
        if (iid.getTargetType().equals(Node.class)) {
          Node node=((Node)originalData.get(iid));
          InstanceIdentifier<Node> iiN=(InstanceIdentifier<Node>)iid;
          HostNode hostNode=node.getAugmentation(HostNode.class);
          if (hostNode != null) {
synchronized (hosts) {
              try {
                hosts.removeLocally(iiN);
              }
 catch (              ClassCastException ex) {
              }
            }
          }
        }
 else         if (iid.getTargetType().equals(Link.class)) {
          linkRemoved((InstanceIdentifier<Link>)iid,(Link)originalData.get(iid));
        }
      }
      for (      Map.Entry<InstanceIdentifier<?>,DataObject> entrySet : updatedData.entrySet()) {
        InstanceIdentifier<?> iiD=entrySet.getKey();
        final DataObject dataObject=entrySet.getValue();
        if (dataObject instanceof Addresses) {
          packetReceived((Addresses)dataObject,iiD);
        }
 else         if (dataObject instanceof Node) {
synchronized (hosts) {
            hosts.putLocally((InstanceIdentifier<Node>)iiD,Host.createHost((Node)dataObject));
          }
        }
      }
      for (      Map.Entry<InstanceIdentifier<?>,DataObject> entrySet : createdData.entrySet()) {
        InstanceIdentifier<?> iiD=entrySet.getKey();
        final DataObject dataObject=entrySet.getValue();
        if (dataObject instanceof Addresses) {
          packetReceived((Addresses)dataObject,iiD);
        }
 else         if (dataObject instanceof Node) {
synchronized (hosts) {
            hosts.putLocally((InstanceIdentifier<Node>)iiD,Host.createHost((Node)dataObject));
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  exec.submit(new Runnable(){
    @Override public void run(){
      if (change == null) {
        log.info("String_Node_Str");
        return;
      }
      Map<InstanceIdentifier<?>,DataObject> updatedData=change.getUpdatedData();
      Map<InstanceIdentifier<?>,DataObject> createdData=change.getCreatedData();
      Map<InstanceIdentifier<?>,DataObject> originalData=change.getOriginalData();
      Set<InstanceIdentifier<?>> deletedData=change.getRemovedPaths();
      for (      InstanceIdentifier<?> iid : deletedData) {
        if (iid.getTargetType().equals(Node.class)) {
          Node node=((Node)originalData.get(iid));
          InstanceIdentifier<Node> iiN=(InstanceIdentifier<Node>)iid;
          HostNode hostNode=node.getAugmentation(HostNode.class);
          if (hostNode != null) {
synchronized (hosts) {
              try {
                hosts.removeLocally(iiN);
              }
 catch (              ClassCastException ex) {
              }
            }
          }
        }
 else         if (iid.getTargetType().equals(Link.class)) {
          linkRemoved((InstanceIdentifier<Link>)iid,(Link)originalData.get(iid));
        }
      }
      for (      Map.Entry<InstanceIdentifier<?>,DataObject> entrySet : updatedData.entrySet()) {
        InstanceIdentifier<?> iiD=entrySet.getKey();
        final DataObject dataObject=entrySet.getValue();
        if (dataObject instanceof Addresses) {
          packetReceived((Addresses)dataObject,iiD);
        }
 else         if (dataObject instanceof Node) {
synchronized (hosts) {
            hosts.putLocally((InstanceIdentifier<Node>)iiD,Host.createHost((Node)dataObject));
          }
        }
      }
      for (      Map.Entry<InstanceIdentifier<?>,DataObject> entrySet : createdData.entrySet()) {
        InstanceIdentifier<?> iiD=entrySet.getKey();
        final DataObject dataObject=entrySet.getValue();
        if (dataObject instanceof Addresses) {
          packetReceived((Addresses)dataObject,iiD);
        }
 else         if (dataObject instanceof Node) {
synchronized (hosts) {
            hosts.putLocally((InstanceIdentifier<Node>)iiD,Host.createHost((Node)dataObject));
          }
        }
      }
    }
  }
);
}