Program: 48125
Project: 48125
Buggy source:
private Collection<InterfaceDefinition> getInterfaces(final NetworkConfig networkConfig) throws UnknownHostException {
  final Map<String,String> addressDomainMap;
  final TcpIpConfig tcpIpConfig=networkConfig.getJoin().getTcpIpConfig();
  if (tcpIpConfig.isEnabled()) {
    addressDomainMap=new LinkedHashMap<String,String>();
    final Collection<String> possibleAddresses=TcpIpJoiner.getConfigurationMembers(node.config);
    for (    String possibleAddress : possibleAddresses) {
      final String s=AddressUtil.getAddressHolder(possibleAddress).getAddress();
      if (AddressUtil.isIpAddress(s)) {
        if (!addressDomainMap.containsKey(s)) {
          addressDomainMap.put(s,null);
        }
      }
 else {
        try {
          final Collection<String> addresses=resolveDomainNames(s);
          for (          String address : addresses) {
            addressDomainMap.put(address,s);
          }
        }
 catch (        UnknownHostException e) {
          logger.severe("String_Node_Str" + s);
        }
      }
    }
  }
 else {
    addressDomainMap=Collections.emptyMap();
  }
  final Collection<InterfaceDefinition> interfaces=new HashSet<InterfaceDefinition>();
  if (networkConfig.getInterfaces().isEnabled()) {
    final Collection<String> configInterfaces=networkConfig.getInterfaces().getInterfaces();
    for (    String configInterface : configInterfaces) {
      if (AddressUtil.isIpAddress(configInterface)) {
        String hostname=findHostnameMatchingInterface(addressDomainMap,configInterface);
        interfaces.add(new InterfaceDefinition(hostname,configInterface));
      }
 else {
        logger.info("String_Node_Str" + configInterface + "String_Node_Str");
      }
    }
    log(Level.INFO,"String_Node_Str" + "String_Node_Str" + interfaces);
  }
 else   if (tcpIpConfig.isEnabled()) {
    for (    Entry<String,String> entry : addressDomainMap.entrySet()) {
      interfaces.add(new InterfaceDefinition(entry.getValue(),entry.getKey()));
    }
    log(Level.INFO,"String_Node_Str" + "String_Node_Str" + interfaces);
  }
  return interfaces;
}

Fixed version (ground truth):
private Collection<InterfaceDefinition> getInterfaces(final NetworkConfig networkConfig) throws UnknownHostException {
  final Map<String,String> addressDomainMap;
  final TcpIpConfig tcpIpConfig=networkConfig.getJoin().getTcpIpConfig();
  if (tcpIpConfig.isEnabled()) {
    addressDomainMap=new LinkedHashMap<String,String>();
    final Collection<String> possibleAddresses=TcpIpJoiner.getConfigurationMembers(node.config);
    for (    String possibleAddress : possibleAddresses) {
      final String s=AddressUtil.getAddressHolder(possibleAddress).getAddress();
      if (AddressUtil.isIpAddress(s)) {
        if (!addressDomainMap.containsKey(s)) {
          addressDomainMap.put(s,null);
        }
      }
 else {
        try {
          final Collection<String> addresses=resolveDomainNames(s);
          for (          String address : addresses) {
            addressDomainMap.put(address,s);
          }
        }
 catch (        UnknownHostException e) {
          logger.warning("String_Node_Str" + s + "String_Node_Str");
        }
      }
    }
  }
 else {
    addressDomainMap=Collections.emptyMap();
  }
  final Collection<InterfaceDefinition> interfaces=new HashSet<InterfaceDefinition>();
  if (networkConfig.getInterfaces().isEnabled()) {
    final Collection<String> configInterfaces=networkConfig.getInterfaces().getInterfaces();
    for (    String configInterface : configInterfaces) {
      if (AddressUtil.isIpAddress(configInterface)) {
        String hostname=findHostnameMatchingInterface(addressDomainMap,configInterface);
        interfaces.add(new InterfaceDefinition(hostname,configInterface));
      }
 else {
        logger.info("String_Node_Str" + configInterface + "String_Node_Str");
      }
    }
    log(Level.INFO,"String_Node_Str" + "String_Node_Str" + interfaces);
  }
 else   if (tcpIpConfig.isEnabled()) {
    for (    Entry<String,String> entry : addressDomainMap.entrySet()) {
      interfaces.add(new InterfaceDefinition(entry.getValue(),entry.getKey()));
    }
    log(Level.INFO,"String_Node_Str" + "String_Node_Str" + interfaces);
  }
  return interfaces;
}