Program: 50069
Project: 50069
Buggy source:
public void writeData(DataOutput out) throws IOException {
  getGroupConfig().writeData(out);
  out.writeInt(port);
  boolean hasMapConfigs=mapConfigs != null && !mapConfigs.isEmpty();
  boolean hasMapExecutors=mapExecutors != null && !mapExecutors.isEmpty();
  boolean hasMapTopicConfigs=mapTopicConfigs != null && !mapTopicConfigs.isEmpty();
  boolean hasMapQueueConfigs=mapQueueConfigs != null && !mapQueueConfigs.isEmpty();
  boolean hasMapMergePolicyConfigs=mapMergePolicyConfigs != null && !mapMergePolicyConfigs.isEmpty();
  boolean hasProperties=properties != null && !properties.isEmpty();
  out.writeByte(ByteUtil.toByte(reuseAddress,portAutoIncrement,superClient));
  out.writeByte(ByteUtil.toByte(hasMapConfigs,hasMapExecutors,hasMapTopicConfigs,hasMapQueueConfigs,hasMapMergePolicyConfigs,hasProperties));
  networkConfig.writeData(out);
  executorConfig.writeData(out);
  if (hasMapConfigs) {
    out.writeInt(mapConfigs.size());
    for (    final Entry<String,MapConfig> entry : mapConfigs.entrySet()) {
      final String name=entry.getKey();
      final MapConfig mapConfig=entry.getValue();
      mapConfig.setName(name);
      mapConfig.writeData(out);
    }
  }
  if (hasMapExecutors) {
    out.writeInt(mapExecutors.size());
    for (    final Entry<String,ExecutorConfig> entry : mapExecutors.entrySet()) {
      final String name=entry.getKey();
      final ExecutorConfig executorConfig=entry.getValue();
      executorConfig.setName(name);
      executorConfig.writeData(out);
    }
  }
  if (hasMapTopicConfigs) {
    out.writeInt(mapTopicConfigs.size());
    for (    final Entry<String,TopicConfig> entry : mapTopicConfigs.entrySet()) {
      final String name=entry.getKey();
      final TopicConfig topicConfig=entry.getValue();
      topicConfig.setName(name);
      topicConfig.writeData(out);
    }
  }
  if (hasMapQueueConfigs) {
    out.writeInt(mapQueueConfigs.size());
    for (    final Entry<String,QueueConfig> entry : mapQueueConfigs.entrySet()) {
      final String name=entry.getKey();
      final QueueConfig queueConfig=entry.getValue();
      queueConfig.setName(name);
      queueConfig.writeData(out);
    }
  }
  if (hasMapMergePolicyConfigs) {
  }
  if (hasProperties) {
    out.writeInt(properties.size());
    for (    final Entry<Object,Object> entry : properties.entrySet()) {
      final String key=(String)entry.getKey();
      final String value=(String)entry.getValue();
      out.writeUTF(key);
      out.writeUTF(value);
    }
  }
}

Fixed version (ground truth):
public void writeData(DataOutput out) throws IOException {
  getGroupConfig().writeData(out);
  out.writeInt(port);
  boolean hasMapConfigs=mapConfigs != null && !mapConfigs.isEmpty();
  boolean hasMapExecutors=mapExecutors != null && !mapExecutors.isEmpty();
  boolean hasMapTopicConfigs=mapTopicConfigs != null && !mapTopicConfigs.isEmpty();
  boolean hasMapQueueConfigs=mapQueueConfigs != null && !mapQueueConfigs.isEmpty();
  boolean hasMapMergePolicyConfigs=mapMergePolicyConfigs != null && !mapMergePolicyConfigs.isEmpty();
  boolean hasProperties=properties != null && !properties.isEmpty();
  out.writeByte(ByteUtil.toByte(checkCompatibility,reuseAddress,portAutoIncrement,superClient));
  out.writeByte(ByteUtil.toByte(hasMapConfigs,hasMapExecutors,hasMapTopicConfigs,hasMapQueueConfigs,hasMapMergePolicyConfigs,hasProperties));
  networkConfig.writeData(out);
  executorConfig.writeData(out);
  if (hasMapConfigs) {
    out.writeInt(mapConfigs.size());
    for (    final Entry<String,MapConfig> entry : mapConfigs.entrySet()) {
      final String name=entry.getKey();
      final MapConfig mapConfig=entry.getValue();
      mapConfig.setName(name);
      mapConfig.writeData(out);
    }
  }
  if (hasMapExecutors) {
    out.writeInt(mapExecutors.size());
    for (    final Entry<String,ExecutorConfig> entry : mapExecutors.entrySet()) {
      final String name=entry.getKey();
      final ExecutorConfig executorConfig=entry.getValue();
      executorConfig.setName(name);
      executorConfig.writeData(out);
    }
  }
  if (hasMapTopicConfigs) {
    out.writeInt(mapTopicConfigs.size());
    for (    final Entry<String,TopicConfig> entry : mapTopicConfigs.entrySet()) {
      final String name=entry.getKey();
      final TopicConfig topicConfig=entry.getValue();
      topicConfig.setName(name);
      topicConfig.writeData(out);
    }
  }
  if (hasMapQueueConfigs) {
    out.writeInt(mapQueueConfigs.size());
    for (    final Entry<String,QueueConfig> entry : mapQueueConfigs.entrySet()) {
      final String name=entry.getKey();
      final QueueConfig queueConfig=entry.getValue();
      queueConfig.setName(name);
      queueConfig.writeData(out);
    }
  }
  if (hasMapMergePolicyConfigs) {
  }
  if (hasProperties) {
    out.writeInt(properties.size());
    for (    final Entry<Object,Object> entry : properties.entrySet()) {
      final String key=(String)entry.getKey();
      final String value=(String)entry.getValue();
      out.writeUTF(key);
      out.writeUTF(value);
    }
  }
}