Program: 18347
Project: 18347
Buggy source:
/** 
 * Handle local configuration events. If the event is a pending event stop it. Else broadcast it to the cluster.
 * @param event
 */
public void configurationEvent(ConfigurationEvent event){
  if (eventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) {
    LOGGER.warn("String_Node_Str");
    return;
  }
  String pid=event.getPid();
  Configuration conf=null;
  try {
    conf=configurationAdmin.getConfiguration(pid);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",pid,e);
    return;
  }
  Dictionary localDictionary=conf.getProperties();
  if (localDictionary.get(Constants.SYNC_PROPERTY) != null) {
    Long syncTimestamp=new Long((String)localDictionary.get(Constants.SYNC_PROPERTY));
    Long currentTimestamp=System.currentTimeMillis();
    if ((currentTimestamp - syncTimestamp) <= SYNC_TIMEOUT) {
      return;
    }
  }
  Set<Group> groups=groupManager.listLocalGroups();
  if (groups != null && !groups.isEmpty()) {
    for (    Group group : groups) {
      if (isAllowed(group,Constants.CATEGORY,pid,EventType.OUTBOUND)) {
        Map<String,Properties> configurationTable=clusterManager.getMap(Constants.CONFIGURATION_MAP + Configurations.SEPARATOR + group.getName());
        try {
          if (event.getType() == ConfigurationEvent.CM_DELETED) {
            configurationTable.remove(pid);
          }
 else {
            Properties localProperties=dictionaryToProperties(filter(localDictionary));
            configurationTable.put(pid,localProperties);
            RemoteConfigurationEvent remoteConfigurationEvent=new RemoteConfigurationEvent(pid);
            remoteConfigurationEvent.setSourceGroup(group);
            eventProducer.produce(remoteConfigurationEvent);
          }
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str",pid,e);
        }
      }
 else       LOGGER.warn("String_Node_Str",pid);
    }
  }
}

Fixed version (ground truth):
/** 
 * Handle local configuration events. If the event is a pending event stop it. Else broadcast it to the cluster.
 * @param event
 */
public void configurationEvent(ConfigurationEvent event){
  if (eventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) {
    LOGGER.warn("String_Node_Str");
    return;
  }
  String pid=event.getPid();
  Dictionary localDictionary=null;
  if (event.getType() != ConfigurationEvent.CM_DELETED) {
    Configuration conf=null;
    try {
      conf=configurationAdmin.getConfiguration(pid);
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",pid,e);
      return;
    }
    localDictionary=conf.getProperties();
    if (localDictionary.get(Constants.SYNC_PROPERTY) != null) {
      Long syncTimestamp=new Long((String)localDictionary.get(Constants.SYNC_PROPERTY));
      Long currentTimestamp=System.currentTimeMillis();
      if ((currentTimestamp - syncTimestamp) <= SYNC_TIMEOUT) {
        return;
      }
    }
  }
  Set<Group> groups=groupManager.listLocalGroups();
  if (groups != null && !groups.isEmpty()) {
    for (    Group group : groups) {
      if (isAllowed(group,Constants.CATEGORY,pid,EventType.OUTBOUND)) {
        Map<String,Properties> configurationTable=clusterManager.getMap(Constants.CONFIGURATION_MAP + Configurations.SEPARATOR + group.getName());
        try {
          if (event.getType() == ConfigurationEvent.CM_DELETED) {
            configurationTable.remove(pid);
          }
 else {
            Properties localProperties=dictionaryToProperties(filter(localDictionary));
            configurationTable.put(pid,localProperties);
            RemoteConfigurationEvent remoteConfigurationEvent=new RemoteConfigurationEvent(pid);
            remoteConfigurationEvent.setSourceGroup(group);
            eventProducer.produce(remoteConfigurationEvent);
          }
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str",pid,e);
        }
      }
 else       LOGGER.warn("String_Node_Str",pid);
    }
  }
}