Program: 134858
Project: 134858
Buggy source:
/** 
 * @see #getComponent
 */
private Component getComponent(int id,URI curl,boolean activate,StatusHolder status,boolean allowServices) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx {
  AcsJCannotGetComponentEx ex2=null;
  String name=extractName(curl);
  try {
    checkCURL(curl);
  }
 catch (  AcsJBadParameterEx e) {
    ex2=new AcsJCannotGetComponentEx(e);
    ex2.setCURL(name);
    throw ex2;
  }
  if (status == null) {
    AcsJNullPointerEx ex=new AcsJNullPointerEx();
    ex.setVariable("String_Node_Str");
    ex2=new AcsJCannotGetComponentEx(ex);
    ex2.setCURL(name);
    throw ex2;
  }
  String requestorName=null;
  if (id != 0) {
    requestorName=getRequestorName(id);
    logger.log(Level.INFO,"String_Node_Str" + requestorName + "String_Node_Str"+ curl+ "String_Node_Str");
  }
 else   logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  Component component=null;
  if (allowServices && name.equals("String_Node_Str")) {
    if (managerComponentReference != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(managerComponentReference);
  }
 else   if (allowServices && name.equals("String_Node_Str")) {
    if (remoteDirectoryComponentReference != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(remoteDirectoryComponentReference);
  }
 else   if (allowServices && !name.startsWith(CURL_URI_SCHEMA) && isServiceComponent(name)) {
    Object obj=lookup(name,null);
    if (obj != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(obj);
  }
 else {
    securityCheck(id,AccessRights.NONE);
    try {
      component=internalRequestComponent(id,curl,status,activate);
    }
 catch (    Throwable ce) {
      ex2=new AcsJCannotGetComponentEx(ce);
    }
  }
  if (component != null && component.getObject() != null) {
    if (requestorName != null)     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str"+ requestorName+ "String_Node_Str");
 else     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  }
 else   if (ex2 != null && status.getStatus() == ComponentStatus.COMPONENT_NOT_ACTIVATED) {
    if (requestorName != null)     logger.log(Level.INFO,"String_Node_Str" + requestorName + "String_Node_Str"+ curl+ "String_Node_Str");
 else     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  }
 else {
    if (ex2 == null)     ex2=new AcsJCannotGetComponentEx();
    if (requestorName != null)     logger.log(Level.WARNING,"String_Node_Str" + curl + "String_Node_Str"+ requestorName+ "String_Node_Str",ex2);
 else     logger.log(Level.WARNING,"String_Node_Str" + curl + "String_Node_Str",ex2);
  }
  if (ex2 != null) {
    ex2.setCURL(name);
    throw ex2;
  }
  return component;
}

Fixed version (ground truth):
/** 
 * @see #getComponent
 */
private Component getComponent(int id,URI curl,boolean activate,StatusHolder status,boolean allowServices) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx {
  AcsJCannotGetComponentEx ex2=null;
  String name=extractName(curl);
  try {
    checkCURL(curl);
  }
 catch (  AcsJBadParameterEx e) {
    ex2=new AcsJCannotGetComponentEx(e);
    ex2.setCURL(name);
    throw ex2;
  }
  if (status == null) {
    AcsJNullPointerEx ex=new AcsJNullPointerEx();
    ex.setVariable("String_Node_Str");
    ex2=new AcsJCannotGetComponentEx(ex);
    ex2.setCURL(name);
    throw ex2;
  }
  String requestorName=null;
  if (id != 0) {
    requestorName=getRequestorName(id);
    logger.log(Level.INFO,"String_Node_Str" + requestorName + "String_Node_Str"+ curl+ "String_Node_Str");
  }
 else   logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  Component component=null;
  if (allowServices && name.equals("String_Node_Str")) {
    if (managerComponentReference != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(managerComponentReference);
  }
 else   if (allowServices && name.equals("String_Node_Str")) {
    if (remoteDirectoryComponentReference != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(remoteDirectoryComponentReference);
  }
 else   if (allowServices && !name.startsWith(CURL_URI_SCHEMA) && isServiceComponent(name)) {
    Object obj=lookup(name,null);
    if (obj != null)     status.setStatus(ComponentStatus.COMPONENT_ACTIVATED);
 else     status.setStatus(ComponentStatus.COMPONENT_DOES_NO_EXIST);
    component=new ServiceComponent(obj);
  }
 else {
    securityCheck(id,AccessRights.NONE);
    try {
      component=internalRequestComponent(id,curl,status,activate);
    }
 catch (    Throwable ce) {
      ex2=new AcsJCannotGetComponentEx(ce);
    }
  }
  if (component != null && component.getObject() != null) {
    if (requestorName != null)     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str"+ requestorName+ "String_Node_Str");
 else     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  }
 else   if (ex2 == null && status.getStatus() == ComponentStatus.COMPONENT_NOT_ACTIVATED) {
    if (requestorName != null)     logger.log(Level.INFO,"String_Node_Str" + requestorName + "String_Node_Str"+ curl+ "String_Node_Str");
 else     logger.log(Level.INFO,"String_Node_Str" + curl + "String_Node_Str");
  }
 else {
    if (ex2 == null)     ex2=new AcsJCannotGetComponentEx();
    if (requestorName != null)     logger.log(Level.WARNING,"String_Node_Str" + curl + "String_Node_Str"+ requestorName+ "String_Node_Str",ex2);
 else     logger.log(Level.WARNING,"String_Node_Str" + curl + "String_Node_Str",ex2);
  }
  if (ex2 != null) {
    ex2.setCURL(name);
    throw ex2;
  }
  return component;
}