Program: 115732
Project: 115732
Buggy source:
public static List<CartridgeBean> getAvailableCartridges(String cartridgeSearchString,boolean multiTenant,ConfigurationContext configurationContext) throws RestAPIException {
  List<CartridgeBean> cartridges=new ArrayList<CartridgeBean>();
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + cartridgeSearchString + "String_Node_Str"+ multiTenant);
  }
  try {
    Pattern searchPattern=getSearchStringPattern(cartridgeSearchString);
    String[] availableCartridges=CloudControllerServiceClient.getInstance().getRegisteredCartridges();
    if (availableCartridges != null) {
      for (      String cartridgeType : availableCartridges) {
        Cartridge cartridgeInfo=null;
        try {
          cartridgeInfo=CloudControllerServiceClient.getInstance().getCartridge(cartridgeType);
        }
 catch (        Exception e) {
          if (log.isWarnEnabled()) {
            log.warn("String_Node_Str" + cartridgeType + "String_Node_Str"+ e.getMessage());
          }
        }
        if (cartridgeInfo == null) {
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + cartridgeType);
          }
          continue;
        }
        if (!multiTenant && cartridgeInfo.getMultiTenant()) {
          continue;
        }
 else         if (multiTenant && !cartridgeInfo.getMultiTenant()) {
          continue;
        }
        if (!StratosApiV41Utils.cartridgeMatches(cartridgeInfo,searchPattern)) {
          continue;
        }
        CartridgeBean cartridge=convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
        cartridges.add(cartridge);
      }
    }
 else {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    String msg="String_Node_Str" + e.getMessage();
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + cartridges.size());
  }
  return cartridges;
}

Fixed version (ground truth):
public static List<CartridgeBean> getAvailableCartridges(String cartridgeSearchString,Boolean multiTenant,ConfigurationContext configurationContext) throws RestAPIException {
  List<CartridgeBean> cartridges=new ArrayList<CartridgeBean>();
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + cartridgeSearchString + "String_Node_Str"+ multiTenant);
  }
  try {
    Pattern searchPattern=getSearchStringPattern(cartridgeSearchString);
    String[] availableCartridges=CloudControllerServiceClient.getInstance().getRegisteredCartridges();
    if (availableCartridges != null) {
      for (      String cartridgeType : availableCartridges) {
        Cartridge cartridgeInfo=null;
        try {
          cartridgeInfo=CloudControllerServiceClient.getInstance().getCartridge(cartridgeType);
        }
 catch (        Exception e) {
          if (log.isWarnEnabled()) {
            log.warn("String_Node_Str" + cartridgeType + "String_Node_Str"+ e.getMessage());
          }
        }
        if (cartridgeInfo == null) {
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + cartridgeType);
          }
          continue;
        }
        if (multiTenant != null && !multiTenant && cartridgeInfo.getMultiTenant()) {
          continue;
        }
 else         if (multiTenant != null && multiTenant && !cartridgeInfo.getMultiTenant()) {
          continue;
        }
        if (!StratosApiV41Utils.cartridgeMatches(cartridgeInfo,searchPattern)) {
          continue;
        }
        CartridgeBean cartridge=convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
        cartridges.add(cartridge);
      }
    }
 else {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    String msg="String_Node_Str" + e.getMessage();
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + cartridges.size());
  }
  return cartridges;
}