Program: 15186
Project: 15186
Buggy source:
public static boolean register(final Component component,String part,String name,String hostName,Integer port) throws ServiceRegistrationException {
  final ServiceBuilder builder=component.getBuilder();
  String partition=part;
  if (!component.getComponentId().isPartitioned()) {
    partition=name;
  }
 else   if (component.getComponentId().isCloudLocal()) {
    partition=Components.lookup(Eucalyptus.class).getComponentId().name();
  }
 else   if (partition == null) {
    LOG.error("String_Node_Str");
    partition=name;
  }
  InetAddress addr;
  try {
    addr=InetAddress.getByName(hostName);
  }
 catch (  UnknownHostException ex1) {
    LOG.error("String_Node_Str" + hostName + "String_Node_Str"+ ex1.getMessage(),ex1);
    throw new ServiceRegistrationException(builder.getClass().getSimpleName() + "String_Node_Str" + hostName+ "String_Node_Str"+ ex1.getMessage(),ex1);
  }
  LOG.info("String_Node_Str" + builder.getClass().getSimpleName() + "String_Node_Str"+ partition+ "String_Node_Str"+ name+ "String_Node_Str"+ hostName+ "String_Node_Str"+ port);
  if (!builder.checkAdd(partition,name,hostName,port)) {
    LOG.info(builder.getClass().getSimpleName() + "String_Node_Str");
    return false;
  }
  try {
    final ServiceConfiguration newComponent=builder.add(partition,name,hostName,port);
    try {
      Runnable followRunner=new Runnable(){
        public void run(){
          try {
            try {
              component.startTransition(newComponent).get();
            }
 catch (            Exception ex) {
              LOG.error(ex,ex);
            }
            component.enableTransition(newComponent).get();
          }
 catch (          ServiceRegistrationException ex1) {
            LOG.error(ex1,ex1);
          }
catch (          IllegalStateException ex1) {
            LOG.error(ex1,ex1);
          }
catch (          ExecutionException ex) {
            LOG.error(ex,ex);
          }
catch (          InterruptedException ex) {
            Thread.currentThread().interrupt();
          }
        }
      }
;
      try {
        Threads.lookup(ConfigurationService.class,ComponentRegistrationHandler.class).submit(followRunner).get(5000,TimeUnit.MILLISECONDS);
      }
 catch (      InterruptedException ex) {
        Thread.currentThread().interrupt();
      }
catch (      TimeoutException ex) {
        LOG.error(ex,ex);
      }
    }
 catch (    Throwable ex) {
      builder.remove(newComponent);
      LOG.info(builder.getClass().getSimpleName() + "String_Node_Str" + ex.getMessage());
    }
    return true;
  }
 catch (  Throwable e) {
    e=Exceptions.filterStackTrace(e);
    LOG.info(builder.getClass().getSimpleName() + "String_Node_Str" + e.getMessage());
    LOG.error(e,e);
    throw new ServiceRegistrationException(builder.getClass().getSimpleName() + "String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static boolean register(final Component component,String part,String name,String hostName,Integer port) throws ServiceRegistrationException {
  final ServiceBuilder builder=component.getBuilder();
  String partition=part;
  if (!component.getComponentId().isPartitioned()) {
    partition=name;
  }
 else   if (component.getComponentId().isCloudLocal()) {
    partition=Components.lookup(Eucalyptus.class).getComponentId().name();
  }
 else   if (partition == null) {
    LOG.error("String_Node_Str");
    partition=name;
  }
  InetAddress addr;
  try {
    addr=InetAddress.getByName(hostName);
  }
 catch (  UnknownHostException ex1) {
    LOG.error("String_Node_Str" + hostName + "String_Node_Str"+ ex1.getMessage(),ex1);
    throw new ServiceRegistrationException(builder.getClass().getSimpleName() + "String_Node_Str" + hostName+ "String_Node_Str"+ ex1.getMessage(),ex1);
  }
  LOG.info("String_Node_Str" + builder.getClass().getSimpleName() + "String_Node_Str"+ partition+ "String_Node_Str"+ name+ "String_Node_Str"+ hostName+ "String_Node_Str"+ port);
  if (!builder.checkAdd(partition,name,hostName,port)) {
    LOG.info(builder.getClass().getSimpleName() + "String_Node_Str");
    return false;
  }
  try {
    final ServiceConfiguration newComponent=builder.add(partition,name,hostName,port);
    try {
      doServiceStart(newComponent);
    }
 catch (    Throwable ex) {
      builder.remove(newComponent);
      LOG.info(builder.getClass().getSimpleName() + "String_Node_Str" + ex.getMessage());
    }
    return true;
  }
 catch (  Throwable e) {
    e=Exceptions.filterStackTrace(e);
    LOG.info(builder.getClass().getSimpleName() + "String_Node_Str" + e.getMessage());
    LOG.error(e,e);
    throw new ServiceRegistrationException(builder.getClass().getSimpleName() + "String_Node_Str" + e.getMessage(),e);
  }
}