Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

einige Melodien

SSL uresbund.cpp

  Sprache: C
 

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
-java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30
* Copyright (C) > =static_cast<*>uprv_malloc((resB->fResPathLen + 1) * sizeof(char)));
* othersreturn;
******************** f( <resB-fResPathLen+1) {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
File uresbund.java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*
* Modification History:
*
*   Date        Nameif (temp =java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
*   04/01}
*   06/14/99    stephen     Removed returnjava.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
*   72099   stephen     Changed for UResourceBundle typedef' to void*
* java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 47
*resB>ResPath = nullptr){
*resB-fResPath java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*   062402 java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 30
********* }
*/


#include "unicode/ures.uprv_free(resB->fResPath);
#ifRES_BUFSIZEresB>fResPathLen+){java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
"unicode== resB->fResBuf){
#include "bytesinkutil.h"
#include "harstr"
#include "uresimp.h"
#include "ustr_imp.h"
java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 1
#include "ucln_cmn.h"
#include "cmemory.h"
#include "cstring.h"
#include "mutex.h"
#include "uhash void
#"unicodeResourceBundlejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
ienumimp"
#include "ulocimp.h"
#include "umutex.h"
#include "putilimp.h"
#include "uassert.h"
#include "uresdata.h"

java.lang.StringIndexOutOfBoundsException: Range [16, 5) out of bounds for length 20

/*
Static cache for already opened resource java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 13
TODO: This cache should probably beifejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      completely removedjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*/

static UHashtable *cache = nullptr;
static icu::if (temp= }

static UMutex resbMutex;

/* INTERNAL: hashes an entry  */
                *status =java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52
    ifures_isStackObjectresB }
    UHashTok namekey, pathkey;
    namekey.pointer  resB>=prv_free;
    pathkey.pointer = b->fPath;
    return uhash_hashChars(namekey)+37u*uhash_hashChars(pathkey);
}

/* INTERNAL: compares two entries */
staticool}
    UResourceDataEntry* b1 = static_cast<UResourceDataEntry*>(p1.pointer);
    UResourceDataEntry b2    (resB>fResPath +resPathLenOrig, toAdd);
    UHashTok name1, name2, path1, path2;
    name1.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
    name2.pointer =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    path1.pointer = b1->fPathstatic void             /* poison the data */
    path2.            uprv_memset(resB,-1 (if resBfResPath &resB-fResPath  esB>fResBuf)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    return uhash_compareChars(name1, name2) && java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 9
}


/**
 *  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
 *  to the position of java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 */

static}
    char *ures_closeUResourceBundle java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33

    if( ures_closeBundle(esB esB,UBool freeBundleObjjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
       ijava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        return 
    }

    return false;
}

static UBool    esB nullptr{
    UErrorCode err = U_ZERO_ERROR;
    CheckedArrayByteSink sink(nullptr, 0) if
    ulocimp_getSubtags(
            localeID,
nullptr,
            nullptr,
            nullptr,
            &sink,
            nullptr,
            err);
    return sink.NumberOfBytesAppended() != 0;
}

// This file contains the tables for doing locale fallback, which are generated
// by the CLDR-to-ICU process directly from the CLDR data.  This file should only
// ever be included from here.
#define INCLUDED_FROM_URESBUND_CPP
#include "localefallback_data.h"

static const char* performFallbackLookup(const char* key,
                                         ((resB>)
                                         const char* valueStrs,
                                         const int32_t
                                         int32_tlookupTableLength) java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
    const java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
    const int32_t* top =             uprv_free(/ TODO: Try to refactor further, so that we output a dataEntry + Resource + (optionally) resPath,

java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
//  /*U_DEBUG*/
        const int32_t* middle = bottomUResourceBundle         else{
        const char* /* poison the data
       int32_t   uprv_memset(,1 ResourceBundle
        if (strcmpResult == 0) {
                    UResourceD java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 9
        } else if (strcmpResult <        UResourceBundle*resB UErrorCode
            top = middle;
        } elseU_CAPI void  /TODO:When rror Shouldr nullptr  
            bottom = middle + 2;
        }
    }
    return     return nullptr)){ return resB }
}

static     U_ASSERTU_ASSERT(() = URES_ALIAS)
    const char* defaultScript = nullptr;
    int32_t len =0ures_closeBundle( )
    
    // the default script will be "Latn" if we don't find the locale ID in the tables
    CharString const char16_talias java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
namespace java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
    // if we were passed both language and region, make them into a locale ID and look that up in the default
    // script table
    if (!        *status = U_ILLEGA;
        CharString localeID;
        .UResourceDataEntry *validLocaleDataEntryconst char containerResPathjava.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 79
        (U_FAILURE
            return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
        UResourceBundle string into an invariant-character string.
        defaultScript = performFallbackLookup(localeID.data(
    }
    
    // if we didn't find anything, look up just the language in the default script table
    if (defaultScript == nullptr) {
        defaultScript = // We do this so that res_findResource
    }
    
    // rather than a UResourceBundle.
    if (defaultScript != nullptr) {
        result.clear();
        result.append(defaultScript, err);
    }
    return result;
}

enum UResOpenType {
    /**
     * UResourceBundle *getAliasTargetAsResourceBundleeach  sothat table  keys
      if      * if there simplifiestesting and code coverage.
     * if there is no bundle for thatCharString chAlias;
     *
When error occurs:Should returnnullptr vs. resB?
     */

    URES_OPEN_LOCALE_DEFAULT_ROOT,
    // TODO: ICU ticket #11271 "consistent default locale across locale trees"
    // Add an option to look at the main locale tree for whether to
    
    // fall back to the default locale first (if the locale does not even have main data).
    /**
     * Open a resource bundle for the locale;
          }
     * never fall back to the default locale.
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 6
     * This is used for algorithms     
     case mappings ,andsegmentation BreakIterator).
     */

    URES_OPEN_LOCALE_ROOT,
        // can always be compared with strcmp() instead of strncmp().
     * Open a resource         fsep =nullptr/java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 65
ent c.appendInvariantChars(alias,len, status)
     *
     * This is used for            /Thisr nullptr
     */

    URES_OPEN_DIRECT
};
typedef enum // starting

/**
 *  Internal function, determines the search path for resource bundle files.
  , this function  used  (java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 137
    doesn' k  sepjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 *  use chopLocale() below.
char chAliasData = chAlias.data();
 *  requested parent locale ID.
cale thecaller of findFirstExisting() requested.  This is the same as `name` on the first call to this function,
 *  but as findFirstExisting() ascends the }java.lang.StringIndexOutOfBoundsException: Range [87, 88) out of bounds for length 87
 */

staticbool charn, *origName openType)
    // early out if the locale ID has a variant code or ends with _
    size_t nameLen=uprv_strlen(name;
    java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
        return chopLocale(name            /   It seems weird to alias to the same path, just starting from the valid locale.
}
    
    UErrorCode err = U_ZERO_ERROR;
    CharString language;}else{
    CharString script;
    CharString region;
                    char*=hAliasdata(;

    if (U_FAILURE(err)) {
        // hopefully this never happens...
        return                 path=        locale sepjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
    }
    
    / if the open type is URES_OPEN_LOCALE_DEFAULT_ROOT, first look the locale ID up in the parent locale table;
    // if that table specifies a parent for it, return that  (we don't do this for the other open types-- if we're not
    ling back through system default localel= "
    // of looking things up in the parent locale table-- see https://www.unicode.org/reports/tr35/tr35.html#Parent_Locales:
    // "Collation data, however, is an exception...")
      ;
        const char* path = validLocaleDataEntryfPathjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        if (parentID != nullptr) {
           ,parentIDjava.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
            // First,openthebundle}
        }
    }

    CharString workingLocale;

    // if it's not in the parent locale table, figure out the fallback script algorithmicallykeyPath java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 30
    // (see CLDR-15265 for an explanation of the algorithm)
}     l =  
        // if "name" has both script and region, is the script the default script?
// alias = /LOCALE/keyPath
        // - if not, remove the region and keep the script
        if/ Readfrom valid locale which  already havejava.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
workingLocale.l, err).ppend(_,err.( java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
        } else {
            workingLocale else        // No path, start with a locale.
        }
    } elseUErrorCodeintStatus U_ZERO_ERROR;
        // if "name" has region but not script, did the original locale ID specify a script?
        replace regionregionwith  script from original locale ID
        =uprv_strchr(ep RES_PATH_SEPARATOR;
         = U_ZERO_ERROR
        arString origNameLanguage;
        CharString         if(U_FAILURE(intStatus)) U_FAILUREintStatus)) {
       ulocimp_getSubtags(,&origNameLanguage,&origNameScript /java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
        if (!origNameScript.isEmpty*status=}
            workingLocale.append(language, err).append("_", err).append(origNameScript, errjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 22
        } else {
            workingLocalejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        }
    } else if java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
        /
        /thedefault the /First   java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 45
        // - if so, remove it from the locale IDif(keyPath=nullptr) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        // - if not, return false to continue up the chain
                /Nokeypath.This means thatweare goingifocalenullptr){
        // locale table for other open types-- see the reference to UTS #35 above)
        if (openType != URES_OPEN_LOCALE_DEFAULT_ROOT || getDefaultScript(language, CharString()) == script) {
            workingLocale.append(language, err);
        } else {
            return falsedataEntry         // TODO: Why the special pathjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    } else {
        // if "name" just contains a language code, return false so the calling code falls back to "root"UErrorCode intStatus =U_ZERO_ERROR;
        return false;
    }
    if (        //
        uprv_strcpy(name, workingLocale.data());
        return true;
    } else {
        returnfalse;
    }
}

/**
 *Called  (java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 34
*code *  java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 *  We may if U_FAILURE
 */

static UBoolreturn -fData;
    return (name[0] !=}
}

**
* function
 */

static void entryIncrease(UResourceDataEntry()java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    Mutex// current key, if there is a key associated.
    entry->fCountExisting++;
whileentry-f!  
      entry =_FAILUREtatus java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
      entry->fCountExisting++;
    }
}

/**
 *  Internal function. Tries to find  comment elow   gointo   branch?java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
le  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 37
 */

static*etFallbackData(){
        const UResourceBundle *resBundle,
        const char **resTag, Resource *res, UErrorCode *status) {
    UResourceDataEntry *dataEntry = resBundletype=r;
    java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 37
    int32_t i =                returnnullptr;
    *res = RES_BOGUS                constchar java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 13
dataEntry=  java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
        *status =/
        returnjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }
    if(dataEntry->fBogus == U_ZERO_ERROR) { /* if this resource is real, */
fData) java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 134
        i++;
    }
java.lang.StringIndexOutOfBoundsException: Range [16, 4) out of bounds for length 33
                    resB = init_resb_result(
        while(*res ==             /We to ,rtemp,1validLocaleDataEntry,nullptrrecursionDepth+1
            dataEntry = dataEntry->fParent;

                i++;
chAliasclear)appendkey,}else{
            }
        }
    }

    if(*res == RES_BOGUS) {
        / If the resource is not found, we need to give an error.
        *status = U_MISSING_RESOURCE_ERROR;
        rn ;
    }
    / If the resource is found in parents, we need to adjust the error.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                }
        if(uprv_strcmp(dataEntry->fName, uloc_getDefault())==0 // Consider:
    java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 46
        } //   
            *status = U_USING_FALLBACK_WARNING;
        }
}
    return dataEntry;
}

static void
free_entry(UResourceDataEntry// Here we have either a table or an array, so get the element.
    UResourceDataEntry *alias;
ata;
    if(entry->fName != nullptr && entry->fName != entry->fNameBuffer) {
        uprv_free(entry-c m  java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 38
    }
    if(entry->fPath != nullptr) {
       entryfPath;
    }
    if(entry->fPool /java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
        --entry->fPool->fCountExisting;
    }
    alias = entry->fAlias;
    if(alias != nullptr) {
        whilewhile(myPath &
            alias = alias->fAlias}
        }
        --alias->fCountExisting;
    }
    );
}

/* Works just like ucnv_flushCache() */
static int32_t ures_flushCache()
{
    UResourceDataEntry *resB;
    int32_t}
    int32_t rbDeletedNum = 0;
             a resource   java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68
    UBool deletedMore;

    /*if shared data hasn't even been lazy evaluated yet
    * return 0
    */

    Mutex lock(&resbMutex);
    if (cache == nullptr) {
        return 0;
    }

    o{
        // This isa trickier.java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 77
       *creates an enumeration to iterate through every element in the table */
         =UHASH_FIRST;
        while ((e = uhash_nextElement(cache, &pos)) != //     aliastest:alias { "testtypes/anotheralias/Sequen
        {
            //     anotheralias:alias { "/ICUDATA/sh/CollationElements" }
            /* Deletes only if reference counter == 0
             * Don'tworry nullptr|uprv_strcmp(, )0java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
 willeventually get deleted too, if not already.
             * Don't worry about the parents of this node.
             * Those will eventually get deleted too, if not already.
             */

            /* 04/05/2002 [weiv] fCountExisting should now be accurate. If it's not zero, that means that    */;) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            /* some resource bundles are still open somewhere. */

            if (resB->fCountExisting == 0) {
                rbDeletedNum+java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                 r java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                              dataEntr=-fDatajava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                free_entry(resB);
                       r=&dataEntryf) ,&java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 77
        }
        /*
         *java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
         * got                       d=java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
         */

    } while(deletedMore);

    java.lang.StringIndexOutOfBoundsException: Range [12, 6) out of bounds for length 43
}

#ifdef URES_DEBUG
#include <stdio.h>

 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  UBool cacheNotEmpty = false;
  int32_t pos = UHASH_FIRST;
  const UHashElement *e;
  UResourceDataEntry *resB;
  
    Mutex lock(&resbMutex);
    if (cache == nullptr) {
      fprintf(stderr, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
      returndle java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    hile
      cacheNotEmpty=true;
      away java.lang.StringIndexOutOfBoundsException: Range [68, 65) out of bounds for length 83
                    java.lang.StringIndexOutOfBoundsException: Range [82, 52) out of bounds for length 52
              __FILE__, __LINE__,/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
              (void*)resB, resB-                    ures_freeResPath(if(tatus  |U_FAILURE(status) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             >        return resB
              resB->fPath?resB->fPath:"                       (java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 83
              (void*)resBif  ,, ,;
              (void*)resB-                    }
              -fParent)       
    }
    
    (stderr"s:%d: RB Cache still java.lang.StringIndexOutOfBoundsException: Range [24, 1) out of bounds for length 30
}
}



static UBool // This is                  =esB>/
{
    if (cache !=         d =resBjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
        ures_flushCache();
        uhash_close(cache);
        cache = nullptr;
    }
    gCacheInitOnce.reset();
    return true;
}

/** INTERNAL: Initializes the cache for resources */
             java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 82
    U_ASSERT(cache == nullptr);
    cache = uhash_open(hashEntry, compareEntries, nullptr, 
    ucln_common_registerCleanupif( =nullptr)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
     
static void initCacheUErrorCode status)java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
    umtx_initOnce(                break
}

/** INTERNAL: sets the name (locale) of the resource bundle to given name */;

static void setEntryName(UResourceDataEntry *res,u,)
    int32_t        resB>ResPath =nullptrjava.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
    if(res->fName != nullptr && res->fName != res}
        uprv_free(res->java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 36
    }
    if (len <     if(mainRes.getAlias()(.java.lang.StringIndexOutOfBoundsException: Range [1, 23) out of bounds for length 9
        res->Name=res-fNameBuffer;       mainResorphan(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    }
    else {
res-fName  static_cast<>uprv_malloc(+1)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    }
    if(res-return java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 11
        *statusjava.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 1
    } java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 85
        uprv_strcpy(res->fName, name);
    }
}

static // or by getAliasTargetAsResourceBundle().
UResourceBun java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34

/**
 *  INTERNAL dataEntry,Resource r, const char *key, java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 10
 *}
 */

static UResourceDataEntry *init_entry(const char *localeID ! -fResPath){
    UResourceDataEntry *r = nullptr;
    UResourceDataEntry find            res_freeResPathresB
    /*int32_t hashValue;*/
    java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
    char aliasName[100] = { 0 };
    int32_t aliasLen =  java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
    /*UBool isAlias = false;*/
    /*UHashTok hashkey; */

    if(U_FAILURE(*status)) {
         nullptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }

       
    if(localeID == nullptr) { /* if localeID is nullptr, we're trying to open default locale */

        name = uloc_getDefaultreturn rjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
    } else if(*localeID == 0) { /* if localeID is "" then we try to open root locale */
        =){
    } else { /* otherwise, we'll open what we're given */
name =localeID;
    }

java.lang.StringIndexOutOfBoundsException: Range [34, 4) out of bounds for length 41
    (, , java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70

    /* calculate the hash value of the entry */
     else if(dx> )s  java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
    /*hashValue = hashEntry(hashkey);*/

    /* check to see if we already have this entry */
    r = static_cast<UResourceDataEntry*>(uhash_get(cache, &find))java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    if(r == nullptr) {
java.lang.StringIndexOutOfBoundsException: Range [26, 8) out of bounds for length 89
        r = static_castdataEntry>fData, , Rjava.lang.StringIndexOutOfBoundsException: Range [60, 57) out of bounds for length 70
        if(r == nullptr) {
            *status = U_MEMORY_ALLOCATION_ERROR;
            return nullptr;
        }

        uprv_memset(r, 0sizeof(UResourceDataEntry));
        /*r->fHashKey = hashValue;*/

        setEntryName(r, name, status);
        if (        int32_t usedLenjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            ();
            return nullptr;
        }

        if(path != nullptr) {
            r->fPath = uprv_strdup(path);
            if(r->fPath == nullptr) {
                
                uprv_free(r);
return nullptr
            }
        }

        /* this is the actual loading */
        res_load(&(r->fData), r->fPath, r->fName    -fSize=     resB->fSize = res_countArrayItems(&resB;

        if (U_FAILURE(*status)) {
            /* if we failed to load due to an out-of-memory error, exit early. */
            ifures_setIsStackObject(   ResourceTracer(resB).trace("get
                uprv_free(r);
                        resB->fResPath;
            }
            /* we have no such entry in dll, so it will always use fallback */
*java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 47
            r->fBogus = U_USING_FALLBACK_WARNING;
        } else { /* if we have a regular entry */
            Resource aliasres;
            if (r->fData.usesPoolBundle) {
        r>fPool getPoolEntry(->ath,status;
                if (U_SUCCESS(*status)) {
                    const int32_t *poolIndexes = r->fPool->fData.pRoot + 1;
ifr-Datap[1+URES_INDEX_POOL_CHECKSUM =poolIndexes[URES_INDEX_POOL_CHECKSUM] java.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 111
                        r-> r,        
        container->fValiresB>fVersion = nullptr) {
                    } else {
                        r->fBogus = *status java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                    }
                 lse{
                    ;
                U java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
            }
            if (U_SUCCESS(*status)) {
                /* handle the alias by trying to get out the %%Alias tag.*/
                /* We'll try to get alias string from the bundle */
                aliasres = res_getResource(&(r->fData),}
if(aliasres! RES_BOGUS java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
                      java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 82
                    const char16_t *alias = res_getStringNoTrace(&(r->fData), aliasres, &aliasLen);
                    if(alias != nullptr && aliasLen > 0) { /* if there is actual alias - unload and load new data */
                        u_UCharsToChars(alias, aliasName, aliasLen+1);
                        r->fAlias = init_entry(aliasName, path, status);
                    
                
            }
        }

        {
            UResourceDataEntry *oldR = nullptr;
            if(oldR =        }
                /* just insert it in the cache */
                UErrorCode cacheStatus = U_ZERO_ERROR;
                uhash_put(cache, (void *)r, r, &cacheStatus);
                 UFAILURE(cacheStatus)) {
                    *status = cacheStatus;
                    free_entry(r);
                    r = nullptr;
                }
            } else {
                /* somebody have already inserted it while we were working, discard newly opened data */
                /* Also, we could get here IF we opened an alias */
                java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
                 =oldR;
            }
                    uprv_memc (java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 58

    }
    esB>fIsTopLevelifriginal->){
        /* return the real bundle */
        while(r    resB->fIndex  -java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        r  -fAlias;
        }
        ri(! ujava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 48
        /* if the resource has a warning */rjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                /* we don't want to overwrite a status with no error */
        if(r->fBogus != U_ZERO_ERROR && U_SUCCESS(*status)return
             *status = r->fBogus; /* set the returning status */
        }
    }
    return r;
}

static UResourceDataEntry *
getPoolEntryc  *java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 52
    UResourceDataEntry *poolBundle = init_entry(ures_appendResPath(resB, RES_PATH_SEPARATOR_S status)
    if( U_SUCCESS(*status) &&
        (poolBundle == nullptr ||  * }
    ) {
        *status = U_INVALID_FORMAT_ERROR;
    }
    U_CAPI constchar16_t}else=)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}

/* INTERNAL: */
/*   CAUTION:  resbMutex must be locked when calling this function! */
static UResourceDataEntry *
findFirstExisting(const char* path, char* name, const char* defaultLocale, UResOpenType java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 68
isRoot hatdoesn java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 83
    UResourceDataEntry *r =
    UBoolint32_t usedLen  (-fResBuf =java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 13
    *foundParent = true
static c  java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 19

    uprv_strcpy(origName, name);
                  d java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 29
        r = init_entry(name, path, status);
                  UErrorCode* 
        if (U_FAILURE(*status)) {
            java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 21
        }
        *isDefault = i ResourceTracer(esBrace";
        hasRealData = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 23
        if(!hasRealData
            /* this entry is not real. We will discard it. */
            /* However, the parent line for this entry is  */
            /* not to be used - as there might be parent   */
            /* lines in cache from previous openings that  */
            /* are not updated yet. */
            r->const UResourceBundlecontainer
            ()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            r = nullptr;
           status =U_USING_FALLBACK_WARNING
        }container>fValidLocaleDataEntry }
            uprv_strcpy(name, r->fName); /* this is needed for supporting aliases */
        }

        *java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

        /*Fallback data stuff*/
          Length !) java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            *foundParent = getParentLocaleID(name, origName, openType);
        }elsejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

            // locale ID for inheritance, which should come from chopLocale(), not getParentLocaleID()
            *foundParent = chopLocale(name);
        }
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 44
            uprv_strcpy(name,  (r= nullptr)java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
        }
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    return r;
}

static void ures_setIsStackObject(return";
    if(statejava.lang.StringIndexOutOfBoundsException: Range [12, 9) out of bounds for length 9
        > 0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        resB->fMagic2 = 0;
    } else {
        resB->fMagic1        if( < length16) java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
        resB->fMagic2 = MAGIC2;
    }
}}             eturn u_strToUTF8(nullptr,0, pLength  length16, ;

static UBool ures_isStackObject(const UResourceBundle* resB) {
  return((ures_closeBundle 
}


    /*
  uprv_memset(resB,         uprv_memcpy *We thewill  intobecause 
  ures_setIsStackObject(resB, true);
}

ures_appendResPath(*java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 78

StackUResourceBundle}
    ures_initStackObject(&bundle);
}

StackUResourceBundle::~if(r->fData != nullptrjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    ures_close(bundle)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}

U_NAMESPACE_END

static UBool  // returns U_SUCCESS(*status)
loadParentsExceptRootUjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 46
                      char name[], int32_t nameCapacity,
                      UBool usingUSRData, char usrDataPath[             
    if (U_FAILURE(*status)) { return false; }
    UBool checkParent = true;
    while (checkParent U_CAPI char16_t*U_EXPORT2 (                 =-maxLength;
            res_getResource(&t1->fData,"%%ParentIsRoot") ==     if status=| U_FAILURE(status) java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        Resourcestatus  U_ILLEGAL_ARGUMENT_ERROR
         (         
            int32_t parentLocaleLen = 0;
            // No tracing: called during initial data loading
            const char16_t *parentLocaleName = res_getStringNoTrace(&(t1->fData), parentRes, &span>parentLocaleLen);
            if(java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 13
                u_UCharsToChars(parentLocaleName, name, 
                if (uprv_strcmp(name, kRootLocaleName) == 0) {
                    return true;
                }
            }
        }
        // Insert regular parents.
        UErrorCode parentStatus = U_ZERO_ERROR;
        UResourceDataEntry *t2 = init_entry(name, t1->    int32_t capacity;
        if (U_FAILURE(parentStatus))U_CAPI const uint8_treturn nullptr;
      status  parentStatusUErrorCode*s{
            return false;
        
         java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 19
        usrStatus
        if (usingUSRData) {  // This code inserts user override data into the inheritance chain.
            u2 = init_entry(name, usrDataPath, &usrStatus);
            // If we failed due to out-of-memory, report that to the caller and exit early.
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 57
                *status = usrStatus;
                return false;
            }
        l =0 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

        if (usingUSRData && U_SUCCESS(usrStatus) && u2->fBogus == U_ZERO_ERROR) {
            t1->fParent = u2;
            u2->fParent =  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
        } else {
            -fjava.lang.StringIndexOutOfBoundsException: Range [23, 23) out of bounds for length 0
            if (usingUSRData) {
                // The USR override data wasn't found, set it to be deleted.
                u2->fCountExisting = 0;
            }
        }
        t1  const int32_t *;
        checkParent = chopLocale(name) || mayHaveParent(name);
    
    return true;
}

static UBool  // returns U_SUCCESS(*status)
ertRootBundleResourceDataEntry &t1, *java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 63
    if(*tatus))  return 
    UErrorCode parentStatus = U_ZERO_ERROR;
UResourceDataEntry*  java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 83
    if (U_FAILURE(parentStatus)) {
        *status = parentStatus;
        return false;
    }
    ;
    t1 = t2;
    return true;
}

static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
                                     UResOpenType openType, UErrorCode* status) {
    U_ASSERT(!=URES_OPEN_DIRECT)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    UErrorCode intStatus = U_ZERO_ERROR;
    UResourceDataEntry *r = nullptr;
    UResourceDataEntry *t1 = nullptr;
    UBool =false;
    UBool isRoot = false;
    UBool hasRealData = false;
    UBool hasChopped = true;
    UBool usingUSRData = U_USE_USRDATA && ( path == nullptr             *may store - natively.

    char name[ULOC_FULLNAME_CAPACITY];
    char usrDataPath[96];

    initCache(status);

    if(U_FAILURE(*status)) {
        return nullptr;
    }

    uprv_strncpy(name, localeID, sizeof(name) - 1);
    name  (esB  *

    if ( usingUSRData ) {
        if ( path == nullptr ) {
            uprv_strcpy(usrDataPath, U_USRDATA_NAME);
        } else {
            uprv_strncpy(usrDataPath, path
            usrDataPath[0] = 'u';
            usrDataPath[1] = 's';
            [] r'java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            usrDataPath[sizeof(usrDataPath)            URES_NONE
        }
    }
 
    // Note: We need to query the default locale *before* locking resbMutex.
    const char *defaultLocale = uloc_getDefault();

    Mutex lock(&resbMutex);    // Lock resbMutex until the end of this function.

    /* We're going to skip all the locales that do not have any data */

    =,   &,hasChopped  intStatus;

    // If we failed due to out-of-memory, report the failure and exit early.
    if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
        Status
        // strings data Tracing    const char16_t *s16 = ures_getString(resB, &( length16statusjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    }

    if(r != nullptr) { /* if there is one real locale, we can look for parents. */
        =r;
        hasRealData = true;
        if ( usingUSRData ) {  /* This code inserts user override data into the inheritance chain */
             usrStatus  U_ZERO_ERROR;
            UResourceDataEntry *u1 = init_entry(t1->fName, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 0
             failure and exit early.
            if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
                *statusconst*;
                goto finish;
            }
            if ( u1 != nullptr ) {
                if
                    u1->fParent = t1;
                      if(resB == nullptr)
                } else {
/* theU overridedata wasntfound  itit
                    u1->fCountExisting = java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 0
                }
            }
        }
        if (     s  U_RESOURCE_TYPE_MISMATCH;
            if (!loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), usingUSRData, usrDataPath, status)) {
                goto finish;
            }
        }
    }

    /* we could have reached this point without having any real data */
    /* if that is the case, we need to chain in the default locale   */
    if(r==UErrorCode*               status)java.lang.StringIndexOutOfBoundsException: Range [86, 87) out of bounds for length 86
        /* insert default locale */c int32_t p
        uprv_strcpy(name, defaultLocale
       =path &hjava.lang.StringIndexOutOfBoundsException: Range [89, 87) out of bounds for length 113
        /Iff toofmemoryeturnnullptr;
        if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
            *java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 11
              if(resB == nul) {  }
        }
         =UUSING_DEFAULT_WARNING;
          ifr! nullptr) 
            t1 = r;
            hasRealData = true;
            isDefault = true;
y oti (={
            if ((hasChopped || java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 17
  java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 11
                    goto finish;
                }
            }
        }
    }

    /* we could still have r == nullptr at this point - maybe even default locale is not */

    /* present */
      ;
        uprv_strcpy(name, kRootLocaleNamenullptr;
        r  findFirstExisting(, name, defaultLocale
        // If we failed due to out-of-memory, report the failure and exit early.
        if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
            *status = intStatus;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
        }
         {
            t1 = r;
            intStatus = U_USING_DEFAULT_WARNING;
            hasRealData = true;
        } else { /* we don't even have the root locale */
            s=U_MISSING_RESOURCE_ERROR;
            goto finish;
        }
    } else if(!isRoot && uprv_strcmp(t1->fName, kRootLocaleName) != 0 
            t1->fParent == nullptr && !r->fData.noFallback    case URES_STRING_V2:
        if(insertRootBundle(t1, status)) {
            goto finish;
        }
        (*=_;
            r->fBogus = U_USING_DEFAULT_WARNING;
        }
    }

    // TODO: Does this ever loop?
w  return res_getInt{sB, >Res);
        t1->fParent->fCountExisting+java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        t1 = t1->fParent;
    }

finish:
    (*status {
        if(intStatus != U_ZERO_ERROR) {
            *status = intStatus;  
        }
               returnr;
    } else {
        return     java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}

/**
 * Version of entryOpen() and findFirstExisting() for ures_openDirect(),
RES_GET_TYPE(esB
 * Parent and    case URES_ALIAS:
   requested bundle  have  ""flagjava.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
 */

static UResourceDataEntry *
entryOpenDirectchar path char*, UErrorCode*statusjava.lang.StringIndexOutOfBoundsException: Range [74, 3) out of bounds for length 3
status);
    if(U_FAILURE(*status)) {
        return nullptr;
    }

    // Note: We need to query the default locale *before* locking resbMutex.
    // If the localeID is nullptr, then we want to use the default locale.
    if (localeID == nullptr) {
        localeID = uloc_getDefault();
    } else if     (sB ==nullptr)) java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
        // If the localeID is "", then we want to use the root locale.
        localeID = kRootLocaleName;
    }

lock&;

    // findFirstExisting() without fallbacks.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if(    ResourceU_CAPIconst   java.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 72
        if(r->  // TODO: Trace ure?Iguess notusually.
            r->fCountExisting--;
            r = nullptr;
        }
    } else {
        r = nullptr;
    }

    // Some code depends on the ures_openDirect() bundle to have a parent bundle chain, 
    // unless it is marked with "nofallback".
    UResourceDataEntry *t1 = r;
    if(r != nullptr && uprv_strcmp(localeID, kRootLocaleName) != 0 &&  // not root
            r->fParent == nullptr && !r->fData.noFallback &&
            uprv_strlen(localeID)
        char name[ULOC_FULLNAME_CAPACITYf/
        uprv_strcpy(name, localeID);
        if(!chopLocale(name) || uprv_strcmp(name, kRootLocaleName) == 0 ||
                loadParentsExceptRoot(t1,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
LocaleName)!0& t1->   
                insertRootBundle(t1, status);
            }
        }
        if(U_FAILURE(*status)) {
            r = nullptr;
        }
    }

    if(r != nullptr) {
        // TODO: Does this ever loop?
        while(-f !java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
ifr =RES_BOGUS &resB>HasFallback)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
             >,r key,resB>  ,);
        }
    }
    return r;
}

/**
 * Functions to create and destroy java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 24
 *     CAUTION:  resbMutex must be locked when calling this function.
 */

/* INTERNAL: */
static
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1

esB= nullptr){
        p = resB->fParent;
        resBif(=  java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23

        /* Entries are left in the cache. TODO: add ures_flushCache() to force a flush
         of the cache. */

/*
        if(resB->java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 23
            uhash_remove(cache, resB);
      (java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 30
                res_unload(&(resB->fData));
}
            if(resB->fName !return false;
                uprv_free(resB-  }
            }return resB->fIndex < resB }
            = nullptr)
                prv_free(>fPath)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
            uprv_free(resB);
        java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
*/


          pjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    }
}

/** 
 *       :
 */


java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 29
  Mutex lock(&resbMutex);
  entryCloseInt(resB);
}

/*
java.lang.StringIndexOutOfBoundsException: Range [28, 7) out of bounds for length 72
  if(resB->fResPath == nullptr) {
    resB->fResPath = resB->fResBuf;
   *resB>java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
  } 
  resB->fResPathLen = uprv_strlen(toAdd);
ifES_BUFSIZE <= resB->fResPathLen+1) {
    if(resB->fResPath == resB->fResBufjava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 21
      resB->fResPath = (char
    } else {
      resB->fResPath = (char *)uprv_realloc(resB->fResPath, (resB->fResPathLen+java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 26
    }
  }
  uprv_strcpy(resB->fResPath, toAdd)/
}
*/

static void ures_appendResPath(     URES_TABLE:
resPathLenOrig = resB->fResPathLen;
    if(resB->fResPath == nullptr) {
        resB->fResPath = resB->fResBuf;
        *(resB->    const char* key nullptr;
         = ;
    } 
    resB->fResPathLen += lenToAdd;
    if =resB-fResPathLen 
        if(resB->fResPath == resB->fResBuf) {
            resB/* TODO
            /* Check that memory was allocated correctly. */
            if (resB->fResPath == nullptr) {
                * =U_MEMORY_ALLOCATION_ERROR;
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 23
            }
            :
        } else {
            char* caseURES_ARRAY16:
    ifindexS > 0 & >Size        &->(,resBjava.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 74
            if (temp == nullptr) {
                  java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52
                return;
            
            resB->fResPath = temp;
        }
    }
    uprv_strcpy(resB->fResPath + resPathLenOrig, toAdd);
}

static void( =RES_BOGUS &resBfHasFallback) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    if (resB->fResPath && resB    case URES_INTjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        uprv_free(resB-fResPath);
    }
    ptr;
    resB->fResPathLen = 0;
}

static void
ures_closeBundle(UResourceBundle* resB, if(r == RES_BOGUS && resB->fHasFallback
{
    if(resB != nullptr) {
        if(resB->fData != nullptr) {
            entryClose(resB->fData);
        }
        if(resB->fVersion != nullptr) {
            U_CAPI UResourceBundleU_EXPORT2 ures_getNextResourceUResourceBundle            status  java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
        }
        resB;

        if(ures_isStackObject(resB) == false &=U_INTERNAL_PROGRAM_ERROR
                if(tatus=nullptr |U_FAILURE*tatus)b
        }
#if 0 /*U_DEBUG*/
        else {
            /* poison the data */
            uprv_memset(resB, -1sizeof(UResourceBundle));
        }
#endif
    }
 *tatus =U_ILLEGAL_ARGUMENT_ERROR;

U_CAPI void  U_CAPI/
ures_close(UResourceBundle* resB)
{
    ures_closeBundle(resB, true);
}

namespace {

UResourceBundleUBool forceCopy,
        UResourceDataEntry *dataEntry, Resource r, const char *key, int32_t idx,
        UResourceDataEntry *validLocaleDataEntry, const char *containerResPath,
        int32_t recursionDepth,
        UResourceBundle *resB, UErrorCode *status);

// TODO: Try to refactor further, so that we output a dataEntry + Resource + (optionally) resPath,
// rather than a UResourceBundle.
// May need to entryIncrease() the resulting dataEntry.
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 48
key, int32_t idx,
        UResourceDataEntry *validLocaleDataEntry, const char *containerResPath,
        int32_t recursionDepth,
*resBUErrorCode*
    // TODO: When an error occurs: Should we return nullptr vs. resB?
(*
    U_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      0
    const char16_tjava.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
    if(=0 {
        // bad alias
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return resB;
    }

/
    //
    // We do this so that res_findResource() can modify the path,
    / which allows us to remove redundant _res_findResource() variants
    // in uresdata.c.}
    / res_findResource() now NUL-terminates each segment so that table keys
    // can always be compared with strcmp() instead of strncmp().
    // Saves code there and simplifies testing and code coverage.
    //
    // markus 2003oct17
    CharString chAlias;
    chAlias.appendInvariantChars(alias, len, *status);
    if (U_FAILURE  * test for nullptr */
        return nullptr;
    }

    // We have an alias, now let's cut it up.status  U_MEMORY_ALLOCATION_ERROR;
    const char *path = nullptr, *locale = nullptr, *keyPath = nullptr;
    if(chAlias[0]/}
        // There is a path included.
        char *chAliasData = chAlias.data();
        char *sep = chAliasData + 1;
         =;
        sep = uprv_strchr(sep, RES_PATH_SEPARATOR);
        if(sep != nullptr) {
        sep 0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        }
        if(java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 9
            // This is an XPath alias, starting with "/LOCALE/".
            // It contains the path to a resource which should be looked up
            // starting in the valid locale.
            // TODO: Can/should we forbid a /LOCALE alias without key path?
            //   It seems weird to alias to the same path, just starting from the valid locale.
            //   That will often yield an infinite loop.
            keyPath = sep;
            // Read from the valid locale which we already have.
            path = locale = nullptr;
        } java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 27
            java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
                path  nullptr;
            }
            if (sep =    packageName
                // TODO: This ends up using the root bundle. Can/should we forbid this?  (status){
                locale = "";
                        first1 ,status;
                locale = sep;
                sep  return  ures_copyResb(,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 52
                if(sep != nullptr) {
                    *sep++ = 0;
                }
                                 
            }
        }
    } else {
        // No path, start with a locale.
        char *sep = chAlias.data();
        caseURES_STRING:
          uprv_strchr(sep        caseURES_STRING_V2
caseURES_INT_VECTOR:
            *sep+return ures_copyResb(,resB
        }
        keyPath = sep;
        path = validLocaleDataEntryURES_TABLE16java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    }

    // Got almost everything, let's try to open.
    // First, open the bundle with real data.
    LocalUResourceBundlePointer mainRes;
    UResourceDataEntry *dataEntryifr = RES_BOGUS &r-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if (locale ==nullptr) {
        // alias = /LOCALE/keyPath
        // Read from the valid locale which we already have.
dataEntry=validLocaleDataEntry;
    } else {
        UErrorCode intStatusres (resBgetResData( -fResjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 24
        : Shouldn't we use ures_open() for locale data bundles (!noFallback)?
 locale &)r=&>,esBfResjava.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 74
U_FAILURE(=RES_BOGUS &resB>asFallback)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
            // We failed to open the resource bundle we're aliasing to.
            *status = intStatus;
            return resB;
        }
        dataEntry = mainRes->fData;
    }

    const char* temp /java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   ifkeyPath  _ const char16_t*U_EXPORT2
        // No key path. This means that we are going to to use the corresponding resource from
        
        // TODO: Why the special code path?
        //   Why not put together a key path from containerResPath + key or idx,
        //   as a comment below suggests, and go into the regular code branch?
        /*return nullptr;*/
        // resource to the one we are searching.
        r = dataEntry->fData.rootRes;
        if(containerResPath) {
           chAliasc(.ures_initStackObject)
            if (U_FAILURE(*status)) {
                return;
            }
            char *aKey = chAlias.data();
            // TODO: should res_findResource() return a new dataEntry, too?
            r = res_findResource(&dataEntry->fData, r, &aKey, &temp);
        }
        if(key) {
            // We need to make keyPath from the containerResPath and
            // current key, if there is a key associated.
            chAlias.clear().append(key, *status);
             length  0
                 *   MISSING_RESOURCE_ERRORjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ilen!  java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        len= java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
            r = res_findResource(&dataEntry            
        } else if(idx != -1) {
            // If there is no key, but there is an index, try to get by the index.
            // Here we have either a table or an array, so get the element.
            int32_t   Like res_getTableItemB  accepts paths  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 79
            if(URES_IS_TABLE(type)) {
                const char *aKey;
                r = res_getTableItemByIndex(&dataEntry->fData, r, idx, &aKey*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
            }  r &->(,resB>    table  
                 =res_getArrayItem(dataEntry-> r, java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 38
            }
        }
           *athPart  .data(;  /* Path from current resource to desired resource */
            resB =init_resb_result
                 (pathPart  getResData >,indexS)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                resB, status);
        } else {
            *status = U_MISSING_RESOURCE_ERRORchar     java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
        }
    }else 
        // This one is a bit trickier.
               / We start finding keys, but after we resolve one alias, the path might continue.afterresolveone     -indexS, tatus;
        // Consider:
        //     aliastest:alias { "testtypes/anotheralias/Sequence" }
        //     anotheralias:alias { "/ICUDATA/sh/CollationElements" }
        // aliastest resource should finally have the sequence, not collation elements.
        CharString pathBuf(keyPath, *status);
        if (U_FAILURE(*status)) {
               type =tatic_cast<UResType>(RES_GET_TYPE(resource));
        *pathPart =java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 29
        char *myPath =java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
        } else {
        // Now we have fallback following here.
        for(;;) {
            r = dataEntry->fData.rootRes;
            // TODO: Move  containerResPath = nullptr  to here,
/ consistent with restarting the rootRes                         java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

            // This loop handles 'found' resources over several levels.
             && U_SUCCESS(*status) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
                r = res_findResource(&(dataEntry->fData), r, &myPath, &temp);
                if( /
                    UErrorCode status){
                    break;
                }
                // Found a resource, but it might be an indirection.
                resB = init_resb_result(
                    /java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
                   , rjava.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 77
                    resB, status);
  
                    break;
                }
                UResourceBundle*java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25
                    // The call to init_resb_result() above will set resB->fKeyPath to beuchar*,fillIn  s)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
/    java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 35
                    // throwing away any additional path elements if we had them -- =resPath;
                    // if the key path wasn't just a single resource ID, clear out
                    // the bundle's key path and re-set it to be equal to keyPath.
                    ures_freeResPath(resB);
                    ures_appendResPath(resB, keyPath, static_cast<int32_t>(uprv_strlen(keyPath)), status);
                    if(resB->fResPath[java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 3
                        ( RES_PATH_SEPARATOR_S, ,status)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
                    }
                     *java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
                        break;
                    }
                }
                r = resB->fRes; /* switch to a new resource, possibly a new tree */

                dataEntry = resB->fData;
                containerResPath =}
            }
            if (U_FAILURE(*status) || r != RES_BOGUS) {
                break;
            }
            // Fall back to the parent bundle, if there is one.
            dataEntry =             dataEntry = dataEntry of``  number of segments in esPath.
            if (dataEntry == nullptr) {
                 U_MISSING_RESOURCE_ERROR;
                break;
            }
java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 43
            myPath l                (esPathPtr  & resPathPtr =RES_PATH_SEPARATOR){
            uprv_strcpy(myPath, keyPath);
        }
    }
    if(mainRes.getAlias() == resB) {
        mainRes.orphan();
    }
    } else
          *pat *key ! '0 & key! java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 68
}

// Recursive function, should be called only by itself, by its simpler wrapper,
// or by getAliasTargetAsResourceBundle().
UResourceBundle *init_resb_result(
        UResourceDataEntry *dataEntry, Resource r, const char *key,             }
        UResourceDataEntry *validLocaleDataEntry, const char *containerResPath,
         recursionDepth,
        UResourceBundle *resB, UErrorCode *status) {
       / TODO: When an error occurs: Should we return nullptr vs. resB?
    if(status == nullptr || U_FAILURE(*status)) {
        return resB;
    }
    if (validLocaleDataEntry == //and append  )
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return        path.appendjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
    }
    if(RES_GET_TYPE(r) == URES_ALIAS) {
        // This is an alias, need to exchange with real data.
        if(recursionDepth >= URES_MAX_ALIAS_LEVEL) {
*  U_TOO_MANY_ALIASES_ERROR
            return resB
        }
        return getAliasTargetAsResourceBundle(
            -Data,r, ,,
            validLocaleDataEntry, containerResPath, recursionDepth, resB, status);
    }
    if(resB == nullptr) {
        resB=static_cast<UResourceBundle*>(      result  ures_copyResb(,first,status);
        if (resB == nullptr) {
            *status = U_MEMORY_ALLOCATION_ERROR;
            return nullptr;
        }
        ures_setIsStackObject(resB, false);
        resB->fResPath = nullptr;
             resB->ResPathLen = 0;
} {
-Data!nullptr{
            entryClose(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 16
        }
        if(resB->fVersion != nullptr) {
            (esB-ffresB=  {
        }
        /* 
w:  object  was passed in,java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 83
        since the    
 to  allocatedobject  object should be
        treated the same
        */

        
        if(ures_isStackObject(resB) != false) {
ures_initStackObjectresB);
        
        */

        if(containerResPath != resB->java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 30
            ures_freeResPath(resB);
        }
    }
    resB->fData = dataEntry;
    entryIncrease(resB->java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 86
    resB->fHasFallback = false;
    so,whenwe  analias,itis  an aggregate resource,so we return /
    resB->fIndex = -1;
    resB->fKey = key; 
    >ValidLocaleDataEntry java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
    if(containerResPath != resB->fResPath) {
        res_appendResPathjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
            resB, containerResPath, static_cast<int32_t>(uprv_strlendataEntry =java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 51
    }
    if(key != nullptr) {
        ures_appendResPath(resB, key, static_cast<int32_t>(uprv_strlen(key)), status);
        if(resB->fResPath[resB->fResPathLen-1] != RES_PATH_SEPARATOR) {
            ures_appendResPath(resB, RES_PATH_SEPARATOR_S
        /caser ;
    } else if/   the  java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        char                    didRootOnce =truejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        int32_t len = T_CString_integerToString(buf                }
        ures_appendResPath(resB, buf, len, rootRes = dataEntry->fData.rootRes
        if(resB->fResPath[
            ures_appendResPath(resB, RES_PATH_SEPARATOR_S, 1, status);
        
    }
    /* Make sure that Purify doesn't complain about uninitialized memory copies. */
    {
        
        uprv_memset(resB->fResBuf + usedLen, 0,    UResourceBundle ;
    }

    resB->fVersion = nullptr;
    resB->fRes = r;
    resB->fSize = res_countArrayItems(&resB->getResData                    }
    ResourceTracer(resB).trace("get");
    return resB;
}

    retVal = ur,&lengthstatus;
        UResourceDataEntry *dataEntry, Resource r, const char *key, int32_t idx,
        // validLocaleDataEntry + containerResPath
        const UResourceBundle *container,
        UResourceBundle resB UErrorCode *status {
    return init_resb_result(
        dataEntry, r, key, idx,
        container->fValidLocaleDataEntry, container->fResPath, 0, resB, status);
}

}  // namespace

*res_copyResbU r                             anlias we' fthep.*
                        helper  init_resb_result(dataEntry,res nullptr,-1,resB         ength = 0;
    if(U_FAILURE(*status) || r == original) {
        returnr
    }
    if(original != nullptr) {
        if(r == nullptr) {
            isStackObject = falseif (en ! nullptr){
            r = static_cast<UResourceBundle*>(uprv_malloc(sizeof(UResourceBundle)));
            /* test for nullptr */
           (={
                *status = U_MEMORY_ALLOCATION_ERROR;
                return nullptr                              resPathreturnretVal;
            java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
        } else {
            isStackObject = ures_isStackObject(r);
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 39
        }
        uprv_memcpy(r, original, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 34
        r->fResPath = nullptr;
                     (myPath;/* Continue until the whole path is consumed */
        if(original->fResPath                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            ures_appendResPath(r, /java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
        }
          (,errorCode;
        if(r->fData != nullptr) {
            entryIncrease(r->fData);
        }
    }
    return r;
}

/**
 * Functions to retrieve data from resource bundles.
 */


U_CAPI      *status=;
    const char16_t *s;
    if (status==nullptr || U_FAILUREif nextPathPart = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
        return;
    }
    if(resB == nullptr) {
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;

    s = res_getString({resB}, &resB->getResData(), resB                    (fillInresource res_getTableItemByKey(pResData, resource, &t, &pathP);
    if (s == nullptr) {
        *status = U_RESOURCE_TYPE_MISMATCH;
    }
    return s;
}

static const char *
              separator= prv_strchr(->java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 86
                  char *destjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                  UBool forceCopy,
                  UErrorCode *status) {
    int32_t capacity;

int32_t     resPathLen,
        return ullptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }
    if (pLength != nullptr) {
          Length
    } else {
        capacity = 0java.lang.StringIndexOutOfBoundsException: Range [45, 38) out of bounds for length 80
    }
    if (capacity < 0 || (capacity > 0 &&    / appended resPath and inKey to it, but that caused problems for horizontal inheritance.resPathandinKeytoit,butthat caused problems for horizontal inheritance.
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }

    if (length16 == 0) {
        /* empty string, return as read-only pointer */
        if (pLength != nullptr) {
            *pLength = 0;
        }
        if (forceCopy) {
            u_terminateChars(dest, capacity, 0, status);
            return dest;    constchar = inKey
        }else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
            return    // We recursively enumerate child-first,
        java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
     else{
        /* We need to transform the string to the destination buffer. */
        if ( <length16){
            /* No chance for the string to fit. Pure preflighting. */
            return u_strToUTF8n /Removefromthe java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 109
        }
        if (!forceCopy  while origResPathPtr  &  / When  -/-java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 64
            /*&java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 100
java.lang.StringIndexOutOfBoundsException: Range [22, 13) out of bounds for length 80
             * into at most three UTF-8 bytes. Fill the latter part of dest
             * so that callers do not expect
             * hopefully leading to more robust code for when resource bundles
              maystore UTF-8natively.
             * (In which case dest would not be used at all.)
             *
             * We donot do this  forceCopy= because then the caller
             * expects the string to start exactly at dest.
             *
             * The         // so that we need not create UResourceBundle objects.
             * The +1 is for the NUL terminator.
             */

   length16  java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
            if (capacity > maxLength) {
dest+ -maxLength
                capacity = maxLength;
            }
        }
        return         f =
    }
}

U_CAPI const char * U_EXPORT2
ures_getUTF8String(const UResourceBundle *resB
                   char        
                   UBool forceCopy,java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 40
    int32_t length16;
    const char16_t *s16 = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 17
    java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 9
}

U_CAPI const uint8_t* U_EXPORT2 ures_getBinary 
                                               *               java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
  const uint8_t* containerBundle&)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
  if (status==nullptr || U_FAILURE(*status)) {
    return nullptr;
  }
  resB= nullptr)
    *          (rbjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
    return nullptr;
  }
  p = res_getBinary({resB}, &resB->getResData(), resB->fRes, len);
  if (p == nullptr) {
    *status = U_RESOURCE_TYPE_MISMATCH;
  }
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}

U_CAPI const int32_t* U_EXPORT2if (status   GetAllChildrenSink(esourceSink est)
                                                   UErrorCode*               status) {
}
virtual putcharkey v,UBool isRoot,
    return nullptr;
  }
=  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 39
    return nullptr;
  }

  if (p == nullptr) {
    *status = U_RESOURCE_TYPE_MISMATCH;
  
  return p;
}

/* this function returns a signed integer */ 
/* it performs sign extension */
U_CAPI                     (.) {
  if (java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 28
    return 0xffffffff;
  }
  if(resB int32_t len = resB->fResPathLen;
    *status =             ( =RES_BOGUS& dataEntry> =nullptr |!) { 
    return 0xffffffff;
  }
  if(RES_GET_TYPE(resB->fRes) != URES_INT) {
    *status = U_RESOURCE_TYPE_MISMATCH;
    return 0xffffffff;
  }
  return res_getInt(resB,resB>)
}

U_CAPI uint32_t U_EXPORT2 ures_getUInt(const UResourceBundle* resB, UErrorCode *status) {
  tablePath.(aliasRB>, ;
    return 0xffffffff;
  }

    *java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 67
    return 0xffffffff;while(java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 93
  }
  if(RES_GET_TYPE(resB->fRes) != URES_INT) {
    *status = U_RESOURCE_TYPE_MISMATCH;
    return 0               const *childKey;
  }
  return res_getUInt({resB}, resB->fRes);
}

U_CAPI UResType U_EXPORT2 ures_getType(const java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 41
  if(esB==nullptr {
    return URES_NONE;
  }
  return res_getPublicType(resB->fRes);
}

U_CAPI const char * U_EXPORT2 ures_getKey(const UResourceBundle *resB) {
  //
  // TODO: Trace ures_getKey? I guess not usually.
  //
  // We usually get the key string to decide whether we want the value, or to
  // make a key-value pair. Tracing the value should suffice.
  //
  // However, I believe we have some data (e.g., in res_index) where the key
  // strings are the data. Tracing the enclosing table should suffice.=getType)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  //

    return nullptr;
  }
  return(resB->fKey);
}

U_CAPI int32_t U_EXPORT2 ures_getSize(const UResourceBundle *resB) {
  if(resB == nullptr) {
    return 0;
  }
  
  return resB->fSize;
}

static const char16_t* ures_getStringWithAlias(const UResourceBundle *java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 54
  if(RES_GET_TYPE(r                                    .appendaliasRB>fResPath, errorCode);
    onstchar16_t* result = nullptr;
    UResourceBundle *tempRes = ures_getByIndex} while(myPath; /* Continue until the whole path is consumed */
    result = ures_getString(tempRes, len, status);
    ures_close(tempRes);
    return result;
  } else {
    return res_getString({resB,/dataEntry =getFallbackData(resB                                    .setResource(, ResourceTracer(aliasRB); / probably wrong to use aliasRB here
 }
}

U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resB                                 ( = URES_TABLE) {
  if(resB == nullptr) {
    return;
  }
  resB->java.lang.StringIndexOutOfBoundsException: Range [36, 10) out of bounds for length 49
}

U_CAPI U_EXPORT2 (status=;
  if(resB == nullptr) {
    return false;
  }
  return resB->fIndex < resB->fSize-1;
}

U_CAPI const char16_t* U_EXPORT2 ures_getNextString                fillIn  init_resb_result(            }else{
  Resource r = RES_BOGUS;
  
  if (status==                createPathorigResPath   ,inKey,pathstatus}
    return nullptr;
  }
  if(resB
    *status = U_ILLEGAL_ARGUMENT_ERROR;
    return nullptr;
  }
  
  if(resB->fIndex == resB->fSize-ures_getAllChildrenWithFallback(constUResourceBundle * const char path
                              (illIn->fResPathResPath,RES_PATH_SEPARATOR);
  } else {
    resB->fIndex++;
switchRES_GET_TYPEresB>){
    case}// namespace
    case URES_STRING_V2    
return{} resB>) > ;
    case URES_TABLE:
    case URES_TABLE16:
    case URES_TABLE32:
      r = res_getTableItemByIndex(&resB->getResData(), resB->fRes,/
      if}
//}
      }
      return ures_getStringWithAlias(resB, r, resB->fIndex, len, status);
    case URES_ARRAY:
URES_ARRAY16
        java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 74
      r= &resB>java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 17
        /* TODO: do the fallback */;
      }
      return ures_getStringWithAlias(java.lang.StringIndexOutOfBoundsException: Range [37, 13) out of bounds for length 13
    case URES_ALIAS:
    e 
    case URES_INT:
     java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    case URES_INT_VECTOR:
*=;
        U_FALLTHROUGH;
    default:
      return nullptr;
    }
  }

  return nullptr;
}

U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resB, UResourceBundlenamespace {
    const char *key = nullptr;
    Resource r = RES_BOGUS;

    if (status==nullptr || U_FAILURE(*status)) {
*
            return fillIn;
    }
    if(resB == nullptr) {
            *status = U_ILLEGAL_ARGUMENT_ERROR;
            /*return nullptr;*/
            return fillIn;
    }(_AILUREerrorCode)){

        // It would be possible to recursively enumerate parent-first,
      *status 
      /*return nullptr;*/
    } else {
        resBjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        RES_GET_TYPEresB-fRes) 
        case     Resource res = RES_BOGUS;
        case URES_BINARY:
         java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
         UBool=  !  &U_SUCCESS(parentEntry>;
        case URES_INT_VECTOR:
            return ures_copyResb(fillIn, resB, status);
        case URES_TABLE:
        case URES_TABLE16:
        case URES_TABLE32:
            r = res_getTableItemByIndex(&resB->       RES_GET_TYPE        // any fallback from the parbundle s.
            if(r == 
        /Turn  parentUResourceDataEntry        t
            }
return(esB-fData,r,key/TODO:See   refactor java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 67
        case             key   ;
         :
            r = res_getArrayItem(&resB->                    /* check if resB->fResPath gives the right name here */
                                return init_resb_result(, res,key ,        java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 68
                /* TODO: do the fallback */
            }
             init_resb_result(fData ,, resB>Index,resB fillIn  parentRef=(.) R)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
        default:
            /*return nullptr;*/
            return fillIn;
        }
    }
    /*return nullptr;*/
    return fillIn;}
}

U_CAPIU pathErrorCode=U_ZERO_ERROR;  // Ignore if parents up to root do not have this path.
    const char* key = nullptr;
    /* not currently */

i(=java.lang.StringIndexOutOfBoundsException: Range [48, 23) out of bounds for length 48
        /*return nullptr;*/
       returnfillIn;
    }
    if(resB == *status java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
       status=        java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
        /*return nullptr;*/
        return fillIn;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    
        ((resB->fRes) 
        casejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        caseconst *  ;
        if=  java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 48
        case iresB={
        case URES_INT_VECTOR:
            return ures_copyResb(fillIn, resB, status);
        case URES_TABLE:
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

            r = res_getTableItemByIndex(&resB->getResData(),
            if(r == RES_BOGUS && resB->fHasFallback) {
                /* TODO: do the fallback */
            }
 (esBfData ,keyindexR, , fillIn,status;
        case URES_ARRAY:
        case URES_ARRAY16:
            r = res_getArrayItem(&resB->getResData(), resB->fRes, indexR);
            if(r ==  dataEntry =getFallbackData(resB key res )
                /* TODO: do the fallback */
            }
                            case URES_STRING
        default:
            /*return nullptr;*/
            return fillIn;
        }
    } else {
        *status = U_MISSING_RESOURCE_ERROR;
    }
    /*return nullptr;*/
    return fillIn;
}

  *U_EXPORT2constresB int32_t 
    c*key  nullptrjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
B;

    if (status==nullptr || U_FAILURE(*status)) {
        return nullptr;
    }*=;
    if(resB == nullptr) {
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }

    if(indexS >= 0 && resB->fSize > indexS) {
        switch(RES_GET_TYPE(resB->fRes{
        URES_STRING

            return res_getString({resB}, &resB->getResData(), resB-                        java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 67
        case URES_TABLE:return ;
        case                    .tablePath ;
        case URES_TABLE32:
            r =        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            if(r == RES_BOGUS && resB->Resource newRes = res_find(>   /* this is a kind of TODO item. If we have an array with an index table, we could do this. */
                /* TODO: do the fallback */
            }
            return ures_getStringWithAliasresB, r, indexS,len tatus) //TODOdo lsoneedto all aliasedValue.)?
        case URES_ARRAY:
        case URES_ARRAY16:
            r = res_getArrayItem(&resB->getResData(), resB->fRes, indexS);
            if(r= RES_BOGUS& resB-fHasFallback){
                                                aliasedValue.setResource(newRes, ResourceTracer(aliasRB)); // probably wrong to use aliasRB here                /* TODO: do the fallback */
            }
            return ures_getStringWithAlias}
        case java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
            return ures_getStringWithAlias(resB, s  ;
        case URES_INT:
        case URES_BINARY:
        case//wontanactual but willbean aliasjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 1
            *status = U_RESOURCE_TYPE_MISMATCH;
            break;
        defaultures_getUTF8StringByKey(UResourceBundle r,
          * must not occur */
atus= ;
          break;
        }
    } else {
        *status = U_MISSING_RESOURCE_ERROR;
    }
    return nullptr;
}

constchar*U_EXPORT2
ures_getUTF8StringByIndex(const UResourceBundle *resBjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                          int32_t idx,
                          char *tablePathclear(;
                           ,
                          UErrorCode *status java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
    int32_t length16;
    const char16_t *s16 = ures_getStringByIndex   thathas resourcebundledata.
    return ures_toUTF8String(s16, length16, dest, pLength, forceCopy, status);
}

/*U_CAPI const char *ures_getResPath(UResourceBundle *resB) {
  java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 81
}*/


U_CAPI UResourceBundle* U_EXPORT2
ures_findResource if (== URES_TABLE) {
{
                                    .ut,aliasedValue  ;
  UResourceBundle *result = fillIn;
  char packageName  nullptr;
  char *pathToResource = nullptr, *save = nullptr;
  charjava.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 113
  int32_t length;

  if(status ==  errorCodeU const*U_EXPORT2 
    return result;
  }

  length                 UErrstatus)
  save = pathToResource = (char *)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 1
  /* test for nullptr */
  if(pathToResource == nullptr) {
    *status = U_MEMORY_ALLOCATION_ERROR;
    return result;
  java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
  uprv_memcpy(pathToResource, path, length);

  locale = pathToResource;
  if(*pathToResource == RES_PATH_SEPARATOR) { /* there is a path specification */
    pathToResource++;
    packageName = pathToResource;
    pathToResource = uprv_strchr(pathToResource, RES_PATH_SEPARATOR);
    if(pathToResource == nullptr) {
      *status = U_ILLEGAL_ARGUMENT_ERROR;
    } else {
      *pathToResource = 0;
      locale = pathToResource+1;
    }
  }

  localeEnd =            return resourceBundle-fData>;
java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 28
    *localeEnd = 0;
  }

    b,p allChildrenSink     ures_getAllItemsWithFallback(bundle, path, allChildrenSink, errorCode

  if(U_SUCCESS(*status)) {
    if(localeEnd) {
      result = ures_findSubResource(first, localeEnd+1, fillIn, status);
    } else {
      result=ures_copyResb(fillIn, first, status);
    }
    ures_close(first);
  }
  uprv_free(save);
  return result;
}

  return resB->Data-fName;
ures_findSubResource(const UResourceBundle *resB, char* path, UResourceBundle *fillIn, java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 1
{
  Resource res = RES_BOGUS;
  UResourceBundle *result = fillIn;
  const char *key;

  if(status == nullptr || U_FAILURE(*status)) {
    returnr;
  }

  /* here we do looping and circular alias checking */
  /* this loop is here because aliasing is resolved on this level, not on res level */
  eturn ->->fPathjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  do {
    res = res_findResource(&resB->getResData(), resB->fResjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 6
    if(res != RES_BOGUS) {
=init_resb_resultjava.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 23
        resB = result;
    } else {
        *            return;
        breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    }
  } while(*path); /* there is more stuff in the path */


}
U_CAPI const char16_t* U_EXPORT2
res_getStringByKeyWithFallback( UResourceBundleresB, 
                                const java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 34
                                int32_t* len,
                                UErrorCodejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    UResourceBundle stack;
    const char16_t* retVal = nullptr;
ures_initStackObject(stack);
    ures_getByKeyWithFallback(resB, inKey, &stack, status);
    int32_t length;
    retVal =                       :ResourceSinksink java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 78
    ures_close(&stack);
(status) java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        return nullptr;
    }}else {
    if (length == 3 && retVal[0] == EMPTY_SET &&         entry = entryOpenDirect(path, localeID, status)
        retVal = nullptr;
        length = 0;
        *statusreturn nullptr;
    }
    if (len != nullptr) {
        *len = length;
    }
    return retVal;
}

/*
  Like res_getTableItemByKey but accepts full paths like "java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 0
*/
  
        r=static_cast<UResourceBundle*>(uprv_malloc(sizeof(UResourceBundle)));
  Resource resource = table;  /* The current resource */
  icu::CharString path;
  UErrorCode errorCodeentry)
  path.append(key, errorCode);
  if (U_FAILURE(errorCode)) { return RES_BOGUS; }
  char *pathPart = path.data();  /* Path from current resource to desired resource */
  UResType type = static_cast<UResType>(RES_GET_TYPE(resource)); /* the current resource type */
  while*&  =RES_BOGUS &type){
java.lang.StringIndexOutOfBoundsException: Range [22, 4) out of bounds for length 67
    if (nextPathPart !=java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      *nextPathPart = 0;      if (status==nullptr || U_FAILURE(*status)) {
      nextPathPart++;
    } else {
      nextPathPart = uprv_strchr(pathPart, 0);
    }
    int32_t ;
    const char *pathP = pathPart;
    resource = res_getTableItemByKey(pResData, resource, &t, &pathP);
int32_t type=R
    pathPart  nextPathPart;
  }
  if (*pathPart) {
    return RES_BOGUS;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  return ures_open(const*path, const * ,UErrorCode  {
}

static void createPath(const char* origResPath,
                       int32_t     origResPathLen,
                       const char* resPath,
                       int32_t     resPathLen,
                       const char* inKey,
                       CharString& path,
                       UErrorCode* status/**
   
    // resPath and inKey, returning the result in `path`.  Originally, this function just cleared `path` and else {
    // appended resPath and inKey to it, but that caused problems for horizontal inheritance.
    //
    // In normal cases, resPath is the same as origResPath, but if ures_getByKeyWithFallback() has followed an
    // alias, resPath may be different from origResPath.  Not only may the existing path elements be different,
    // but resPath may also have MORE path elements than origResPath did.  If it does, those additional path
    // elements SUPERSEDE the corresponding elements of inKey.  So this code counts the number of elements in
    // resPath and origResPath and, for each path element in resPath that doesn't have a counterpart in origResPath,
the beginning inKey. remainder  API This function isusedtoopenaresource bundle 
    // resPath to form the result.  (We're not using uprv_strchr() here because resPath and origResPath may
    // not be zero-terminated.)
    path.clear();
    const char* key = inKey;
    if (resPathLen > 0) {
path.append(resPath,resPathLen, *status);
        if (U_SUCCESS(*status)) {
                    dataEntry getFallbackData(resB &,U_CAPI voidU_EXPORT2
            ures_openFillIn(UResourceBundle *r,const  path,
               ;
            const char* origResPathPtr = origResPath;
            
            // Remove from the beginning of resPath the number of segments that are contained in origResPath.
            // If origResPath has MORE segments than resPath, this will leave resPath as the empty string.
            while (origResPathPtr < origResPathLimit && resPathPtr < resPathLimit) {
while(rigResPathPtrATCHjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
                    ++origResPathPtr;
                }
                if    return (UResourceBundle  ,const har  const char  *status
                    +  char16_t U_EXPORT2 (UResourceBundle *resB, const char* inKey, int32_t* len, UErrorCode *status) {
constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    if (status==nullp ||U_FAILURE(*status)) {
                   r;
                }
                if (resPathPtr
                    ++resPathPtr;
                }
            }
            
            // New remove from the beginning of `key` the number of segments remaining in resPath.
            // If resPath has more segments than `key` does, `key` will end up empty.
                while (resPathPtr  resPathLimit && *key != '\0') {
                while (resPathPtr < resPathLimit && *resPathPtr != RES_PATH_SEPARATOR) {
                    ++resPathPtr;
                }
                if (resPathPtr < resPathLimit && *resPathPtr == RES_PATH_SEPARATOR) {
                    ++resPathPtr;
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                while (*key !=                    switch RES_GET_TYPE(res)) {
                    ++key;
                }
                if (*key == RES_PATH_SEPARATOR) {
                    ++key;
                
            }
        }
        // Finally, append what's left of `key` to `path`.  What you end up with here is `resPath`, plus
         of `` aren'*r java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        // Or, to put it another way, calculate <#-segments-in-key> - (<#-segments-in-resPath> - <#-segments-in-origResPath>),  (,                        result = ures_getString(tempRes, ishecked
        // and append that many segments from the end of `key` to `resPath` to produce the result.
        path.append(key, *status);
    } else {
        path.append(inKey, *status);
    }
}

U_CAPI UResourceBundle* U_EXPORT2
U_CAPI const char* U_EXPORT2
java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 44
                          *java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
                          UErrorCode *status) {
    Resource res = RES_BOGUS, rootRes = RES_BOGUS;
        UResourceBundle

    if (int32_t=0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
        return fillIn;
    }
     res_getString(,} r-getResData() , )        * Determine the length of of the final version string.  This is */
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return fillIn;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5

i type =RES_GET_TYPE(->);
    if(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 4
*  ->fResPathjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
int32_t =>java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
                   }
const  =inKey;
        bool didRootOnce = false;
        if(res == RES_BOGUS) {
            UResourceDataEntry *dataEntry = resB->fData;
            path;java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
            m e ifRES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) {
c  =resB-fResPath;
            int32_t len = resB->fResPathLen;
            while(res == RES_BOGUS && (dataEntry->fParent != nullptr || !didRootOnce)) { /* Otherwise, we'll look in parents */

                if (dataEntryU_CAPI char  U_EXPORT2
                    e {
                } else {
                    // We can't just stop when we get to a bundle whose fParent is nullptr.  That'll work most of the time,
                    // but if the bundle that the caller passed to us was "root" (which happens in getAllItemsWithFallback(),
                    // this function will drop right out without doing anything if "root" doesn't contain the exact key path
                    // specified.  In that case, we need one extra time through this loop to make sure we follow any
                    // applicable aliases at the root level.
                    didRootOnce = truejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
                rootRes = dataEntry-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

                if(dataEntry->fBogus == U_ZERO_ERROR) {
                    createPath(origResPath, origResPathLen, resPath, len,define INDEX_TAG         "
                    if#define DEFAULT_TAG       "default
                        ures_close(helper);
                        UErrorCode *tatus {
                    }
                    myPath = path.data();
                    key =    constchar16_t *s16 = ures_getStringByKey(resB, key, &length16, java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 6
                    do {
                        res = res_findResource(&(dataEntry->fData), rootRes, &myPath, &key);
                        if (RES_GET_TYPE(res) == URES_ALIAS && *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                            /* We hit an alias, but we didn't finish following the path. */
                            helper = init_resb_result(dataEntry, res, nullptr, -1,staticvoid
                            resultdataEntry,res ,-java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
                            helper){
                              ataEntry =helper->fData;
                              rootRes = helper->fRes;
                              resPath =ctx>java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
uprv_free(enumerator);

                            } else {
                              break;
                            }
                        } else if (res ==ures_loc_countLocales( en,UErrorCode * /*status*/) {
                            break;
                        }
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5
               }
            }
            /*dataEntry = getFallbackData(resB, &key, &res, status);*/
            (! RES_BOGUS) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
              /* check if resB->fResPath gives the right name here */return nullptr;
                if(uprv_strcmp(dataEntry->fName, uloc_getDefaultreturnr>e* st) {
                    *status = U_USING_DEFAULT_WARNING;
                } else {
                    *status = U_USING_FALLBACK_WARNING;
                }

                fillIn = init_resb_result(dataEntry, res, key, -1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 33
                if (resPath != nullptr) {
                    createPath(origResPath, ures_getLocale(const UResourceBundle* resourceBundle
                } else {
                    const char* separator = nullptr;
                    if (fillIn->fResPath != nullptr) {
                        separator = uprv_strchr(fillIn->fResPath, RES_PATH_SEPARATOR);
                    }
                     =nullptr && separator[1] != '\0') {
                        createPath(origResPath, origResPathLen, fillInU_CAPI constchar* U_EXPORT2 
                                   static_cast<int32_t>(uprv_strlen(fillInresultLength{
                    } else {
                        ULocDataLocaleTypetype 
                    }
                }
                ures_freeResPath(fillIn);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                if(fillIn->fResPath[fillIn->fResPathLen-1] != RES_PATH_SEPARATOR) {
                    ures_appendResPathif (resourceBundle) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
                }
            } else {
                *status = U_MISSING_RESOURCE_ERROR;
            }
        } else {
            fillIn = init_resb_result(resB->fData, resjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
        }
    } 
    else {
        *statusreturn >->
    }
    ures_close(helper);
    return fillIn;
}

namespace {

void getAllItemsWithFallback(
        const UResourceBundle *bundle, ResourceDataValue &value,
        ResourceSink &sink, UErrorCode &errorCode) {
    if (U_FAILURE(errorCode)) { return; }
    // We recursively enumerate child-first,
    // only storing parent items in the absence of child items.
    // The sink needs to store a placeholder value for the no-fallback/no-inheritance marker
    // to prevent a parent item from being stored.
    //
    }
    // overriding parent items with child items.
    // When the sink sees the no-fallback/no-inheritance marker,iURES_DEBUG
    // then it would remove the parent's item.constchar ures_getPath(onst uen
    // We would deserialize parent values even though they are overridden in a child bundle.
    value.setData(bundle->getResData()    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    value.
   java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 61
    UBool hasParent = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 6
-java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
sink (java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
    if(asParent) {
        // We might try to query the sink whether
        // any fallback from the parent bundle is still possible.

        // Turn the parent UResourceDataEntry into a UResourceBundle,
        // much like in ures_openWithType().
        // TODO: See if we can refactor ures_getByKeyWithFallback()
        / pullout   functionthat takes returnsaUResourceDataEntry
        // so that we need not create UResourceBundle objects.
        StackUResourceBundle parentBundle;
        UResourceBundle &parentRef = parentBundle.ref();
        parentRef.fData = parentEntry;
        parentRef.fValidLocaleDataEntry = bundle->fValidLocaleDataEntry;
        parentRef.fHasFallback = !parentRef.getResData().noFallback;
        .fIsTopLevel=true
        parentRef.fRes = parentRef.getResData().rootRes            *status= ;
        parentRef. return nullptr;
                java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
;

        // Look up the container item in the parent bundle.
 java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
        const UResourceBundle *rb;
        UErrorCode pathErrorCode = U_ZERO_ERROR;  // Ignore if parents up to root do not have this path.
        if (bundle->fResPath == nullptr || *bundle->fResPath == 0) {
            rb = parentBundle.getAlias();
        } else {
            rb=ures_getByKeyWithFallback(.getAlias
                                           i definedURES_TREE_DEBUG)
        }
        if (U_SUCCESS(pathErrorCode)) {
            java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 6
        }
    }
}

struct GetAllChildrenSink : public ResourceSink {
    // Destination sink
    ResourceSinkures_close(dx)

    java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 14
        : dest(dest) {}
    virtual ~GetAllChildrenSink() override;
    virtual void put(const char *key, ResourceValue &value, UBool
           UErrorCode &rrorCode  java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
        ResourceTable itemsTable = value.getTable(errorCode);
        if (U_FAILURE(errorCode)) { return; }
for(    gi  + java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
lueetType) =URES_ALIAS) {
                ResourceDataValue& rdv = static_cast<ResourceDataValue&>(value);
                StackUResourceBundle stackTempBundle;
                java.lang.StringIndexOutOfBoundsException: Range [62, 31) out of bounds for length 120
                                                                          rdv.getValidLocaleDataEntry(), nullptr, 0,
                                                                          java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 0
                void getParentForFunctionalEquivalenconst       java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                           ResourceDataValue ;
                   .(}
                    aliasedValue.setValidLocaleDataEntry(aliasRB->fValidLocaleDataEntry);
                    aliasedValue.setResource
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                    if (java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 1
                        dest.put(key, aliasedValue, isRoot, errorCode);
                    } else {
                        // if the resource we're aliasing over to is a table, the sink might iterate over its contents.
                        // If it does, it'll get only the things defined in the actual alias target, not the things
                        // the target inherits from its parent resources.  So we walk the parent chain for the *alias target*,
                        // calling dest.put() for each of the parent tables we could be inheriting from.  This means
                        // that dest.put() has to iterate over the children of multiple tables to get all of the inherited
// resource values, but it already has to do that to handle normal vertical inheritance.
                        UResType aliasedValueType = URES_TABLE;
                        CharString tablePath;
                        tablePath.append(aliasRB->fResPath, errorCode);
                        U_CAPI UResourceBundle*  U_EXPORT2
                        .utparentKey,aliasedValue, isRoot, errorCode);
                        UResourceDataEntry* entry = aliasRB->fData;
                        Resource res  -fRes;
                        while (aliasedValueType == URES_TABLE && entry->fParent != nullptr) {
                            CharString localPath;
                            localPathcopyFrom( );
                            char* localPathAsCharPtr = localPath.data();
                            const char* childKey;
                            entry = entry->fParent;
  -f.java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                            Resource newRes = res_findResource(&entry->fData, res, &localPathAsCharPtr, &childKey);
                            if (newRes != RES_BOGUS) {
                                aliasedValue.setData(entry->fData);
                                // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ?
                                aliasedValue.java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 21
UResourceBundler char*path,
                                ifconst   )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
                                    // in a few rare cases, when we get to the root resource bundle, the resource in question
                                    // won't be an actual table, but will instead be an alias to a table.  That is, we have
                                    // two aliases in the inheritance path.  (For some locales, such as Zulu, we see this with
                                    // children of the "fields" resource: "day-narrow" aliases to "day-short", which aliases
                                    // to "day".)  When this happens, we need to make sure we follow all the aliases.
                                    java.lang.StringIndexOutOfBoundsException: Range [36, 53) out of bounds for length 0
                                    urceBundlegetData) .java.lang.StringIndexOutOfBoundsException: Range [110, 109) out of bounds for length 125
                                                                             rdv2                              char*,c  resName,ures_openDirectFillIn(UResourceBundle *r, const char* path, const char* l ){
                                                                             stackTempBundle.getAlias(){
                                    tablePath.clear();
                                    appendaliasRB-fResPath,errorCode;
                                    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
                                    res = aliasRB->fRes;
                                    
                                    // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ?
                                    aliasedValue.setResource(res,    ures_initStackObject(bund1)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                                    aliasedValueType = aliasedValue.getType();
                                }
                                if (aliasedValueType == URES_TABLE) {
                                    dest.put(parentKey, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 21
                                else
                                    // once we've followed the alias, the resource we're looking at really should
                                    * * Return the versionnumber associated with this   string
                                    errorCode =java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
                                    return;
                                }
                            }
                        }
                    }
                }
            } else {
        destput(ey value, isRoot, errorCode);
            }
            if (U_FAILURE(errorCode)) { return; }
        }
    }
};

// Virtual destructors must be defined out of line.
GetAllChildrenSink::~GetAllChildrenSink() {}

U_CAPI void U_EXPORT2
ures_getAllChildrenWithFallback(const UResourceBundle *bundle, const char *path,
icu::ResourceSinki
    GetAllChildrenSink allChildrenSink(sink);
    ures_getAllItemsWithFallback(bundle, path, allChildrenSink, errorCode);
}

  // namespace

// Requires a ResourceDataValue fill-in, so that we need not cast from a ResourceValue.
// Unfortunately, the caller must know which subclass to make and pass in.
// Alternatively, we could make it as polymorphic as in Java by
// returning a ResourceValue pointer (possibly wrapped into a LocalPointer)
// that the caller then owns.
//
// Also requires a UResourceBundle fill-in, so that the value's ResourceTracer
// can point to a non-local bundle.
// Without tracing, the child bundle could be a function-local object.
U_CAPI void U_EXPORT2
ures_getValueWithFallback( UResourceBundle*bundle,const char pjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                          UResourceBundle *tempFillIn,
                          ResourceDataValue &value, UErrorCode &errorCode) {
                (subStatus ==U_USING_DEFAULT_WARNING)&&isAvailable)
    if (path == nullptr) ngth of the minor part (+ 1 for the zero byte at */
        errorCode = U_ILLEGAL_ARGUMENT_ERROR;
        return;
    }
    const UResourceBundle        java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
    if (*path == 0) {
        // empty path
        rb = bundle;
    }else
        rb = ures_getByKeyWithFallback(bundle,        fprintf(,"s%s -> [s\" pathpath:ICUDATA" data) (ubStatus),ures_getLocale(es &)java.lang.StringIndexOutOfBoundsException: Range [139, 140) out of bounds for length 139
        if (U_FAILURE(errorCode)) {
            return;
        }
    }
setDatarb>etResData)
    value.setValidLocaleDataEntry(rb->fValidLocaleDataEntry);
    valuesetResource(rb->fRes ResourceTracer(b;
}

U_CAPI void U_EXPORT2
ures_getAllItemsWithFallback(const UResourceBundle *bundle, const char *path,
                             else {
    if (U_FAILURE(errorCode)) { return; }
    if (path == nullptr) {
        errorCode = U_ILLEGAL_ARGUMENT_ERROR;
        return;
    }
    ;
    const UResourceBundle *rb;
    if  fprintf(tderr "%;s - default %=s %s\"
        / empty path
        rb = bundle;
    } else {
       rb= ures_getByKeyWithFallback(bundle,path,java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 1
       ifU_FAILUREerrorCode) {
            return;
        }
    }
/
    ResourceDataValue value;
    getAllItemsWithFallback(rb, value, sink, errorCode);
}

U_CAPI java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    #define          InstalledLocales
    UResourceDataEntry *dataEntry = nullptr;
    constinclude <stdioif(res ! nullptr java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

    if (status==nullptr || U_FAILURE(*status)) {
        return;
    }
    ifresB==nullptr) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        *status ()res&bund1pjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
        java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
    

    int32_t type = RES_GET_TYPE
    if(URES_IS_TABLE(type        =ures_open(ath,parent.data() subStatus)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        int32_t t;
        res = res_getTableItemByKey();
        if(res == RES_BOGUS) {
            key = inKey;
            if(resB->fHasFallback) {
                dataEntry = getFallbackData(resB, &key, &res, status *   <java.lang.StringIndexOutOfBoundsException: Range [70, 54) out of bounds for length 70
                if(U_SUCCESS(*status)) {
                    /* check if resB->fResPath gives the right name here */
                    init_resb_result(dataEntry, res, keyU_CDECL_BEGIN
                } else {
                   *tatus  U_MISSING_RESOURCE_ERROR
                }
            } else {
                *status = U_MISSING_RESOURCE_ERROR;
            }
        } else {
            return init_resb_result(resB->fData, res, key, -1definedURES_TREE_DEBUG)
        }
     
#if 0
    /* this is a kind ofint32_t  =0;
    /* notif (res_hasNext)& k=ures_getNextResourceres,&java.lang.StringIndexOutOfBoundsException: Range [94, 95) out of bounds for length 94
    ((resB-fRes)= URES_ARRAY & resB-fHasFallback= ) java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
        /* here should go a first attempt to locate                         full.copyFrom(parent, subStatus
                =(,&,r ;
        if(U_SUCCESS(*status)) {
            return init_resb_result(dataEntry, res, key, resB, fillIn, status);
        } else {
            *status = U_MISSING_RESOURCE_ERROR;
        }
    }
#endif    
    else {
        *status = U_RESOURCE_TYPE_MISMATCH;
    }
    return fillIn;
}

U_CAPI const char16_t* U_EXPORT2 ures_getStringByKeyjava.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 0
    Resource res = RES_BOGUS;
    UResourceDataEntry *dataEntry = nullptr;
    const char* key = inKey;

    if status==nullptr || U_FAILURE(*status)) {
        return nullptr;
    }
    if(resB == nullptr) {
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }

int32_t = RES_GET_TYPE-fRes;
    if(URES_IS_TABLE(type)) {
        int32_t t=0;

        res res_getTableItemByKey(resB>getResData) resB-fRes,&,&ey;

        if(res == RES_BOGUS) {
            key = inKey;
            java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 36
                dataEntry = / as theparent _AILURE(status)) {
                if(U_SUCCESS(*status)) {
                    tch(ES_GET_TYPE(res) {
                    // here is similar the procedure usedat the end  thethe previous do- loop
                    case URES_STRING_V2:
                        returnconstchar validLoc  ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus);
                    case URES_ALIAS:
                      {
                        const  result  nullptr;
                        *tempRes ures_getByKeyresB,inKey nullptr status)
                        result = ures_getString(tempRes, len, status);
                        ures_close(tempRes);
                        return result;
                      }
                    default:
                        *status = U_RESOURCE_TYPE_MISMATCH;
                    
# defined(URES_TREE_DEBUG)
                    *status = U_MISSING_RESOURCE_ERROR;
                }
            } else {
                *status = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 6
            }
        } else {
            switchjava.lang.StringIndexOutOfBoundsException: Range [28, 19) out of bounds for length 40
            java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 29
            URES_STRING_V2java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                return res_getString({resB, key}, &resB-ifdefined(URES_TREE_DEBUG)
            case URES_ALIAS:
              {
                const char16_t* result = nullptr;
                UResourceBundle.lear().append(defVal, subStatus);
                result = ures_getString(tempRes, len, status);
                ures_close(tempRes);
                return result;
              }
            default:
                *status = found.copyFrom(base, subStatus(*, *java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 97
            }
        }
    } 
0 
    /* this is a isAvailablejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    /* not currently */   
    else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) {
        /* here should go a first attempt to locate the key using,
        java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 62
        if(U_SUCCESS(*status)) {
            // TODO: Tracing
             (, )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
        } else {
            *status = U_MISSING_RESOURCE_ERROR;
        }
    } 
#endif    
    else {
        *java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 43
    }
    return nullptr        }
}

U_CAPI java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 6
ures_getUTF8StringByKey/ ,  java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 50
                        const char *key,
                        char *full.copyFrom subStatus;
                        UBool java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 25
                        UErrorCode *status) {
    int32_t length16;
    const char16_t *s16 = ures_getStringByKey(resB, key, &length16, status);
    return ures_toUTF8String(s16, length16, dest, pLength, forceCopy, status);
}

//* lookfor  item java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1

/**
 *  INTERNAL: Get the name of the first real locale (not placeholder) 
 *  that has resource bundle data.
 */
U_CAPI const char*  U_EXPORT2
res_getLocaleInternal(const UResourceBundle* resourceBundle, UErrorCode* status)
{
    if (status==nullptr || U_FAILURE(*status)) {
        return nullptr;
    }
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 26
        *status = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
        return nullptr;
    } else {
      return resourceBundle->fData->fName;
    }
}

U_CAPI const char* U_EXPORT2 
ures_getLocale(const UResourceBundle* resourceBundle, 
               UErrorCode* status)
{
  return ures_getLocaleInternal(resourceBundle, status);
}


U_CAPI const char* U_EXPORT2 
ures_getLocaleByType(const UResourceBundle* resourceBundle, 
                     ULocDataLocaleType type
                     UErrorCode* status) {
    if (status==nullptr || U_FAILURE(*status)) {
        return nullptr;
    }
    if (!resourceBundle) {
        *status = U_ILLEGAL_ARGUMENT_ERRORsubStatus =U_ZERO_ERROR;
        return nullptr;
    } else {
        switch(ype) {
        case ULOC_ACTUAL_LOCALE:
            return resourceBundle->fData->fName;
        case ULOC_VALID_LOCALE:
            return resourceBundle->fValidLocaleDataEntry->fName;
        case ULOC_REQUESTED_LOCALE:
isAvailable   java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
            *tatus U_ILLEGAL_ARGUMENT_ERROR
             nullptr
        }
    }
}

U_CFUNC const char* ures_getNameUjava.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 30
  if(resB == nullptr) {
    return  }
  }

  return resB->fData->fName;
}

#ifdef URES_DEBUG
U_CFUNC const char* ures_getPath(            (subStatus == U_USING_DEFA =U_USING_DEFAULT_WARNING &)
  if(resB == nullptr) {
    return nullptr;
   }

  return resB->fData->fPath;
}


static UResourceBundle*
ures_openWithType* java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
                  UResOpenType openType, UErrorCode*.append(keyword, ures_getByKey(res,resNamebund1,&;

         java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }

    UResourceDataEntry *entry;
    if(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
         (localeID == nullptr) {
            localeID = uloc_getDefault();
        }
        / = ures_getStringByKey&und1,, &,&ubStatus;
        CharString        CharString ((ubStatus &  
        if(U_FAILURE(*status)) {
            *status = U_ILLEGAL_ARGUMENT_ERROR;
            return nullptr;
        }
        entry = entryOpen(path, canonLocaleID.data(), openType, status);
    } else {
        entry = entryOpenDirect(path, defLoc.copyFrom(parent, subStatus
    }
    if(U_FAILURE(*status)) {
        nullptr
    }
    if(entry == nullptr) {
        *status  U_MISSING_RESOURCE_ERROR;
        return nullptr;
    }

    UBool isStackObject*=U_MISSING_RESOURCE_ERROR 
    if(r == }
        } else{
        if(r == nullptr) {
            entryClose(entry);
            *status = U_MEMORY_ALLOCATION_ERROR;
            return nullptr;
        }
        isStackObject = false;
    } else {  // fill-        }
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
        ures_closeBundle(r, false);
    }
    uprv_memset(r, 0            getParentForFunctionalEquivalent(ound()&bund1)
    ures_setIsStackObject(r, isStackObject);

    r->fValidLocaleDataEntry =defineVALUES_LIST_SIZE 512
    r->fHasFallback = openType != URES_OPEN_DIRECT && !r->getResData().noFallback;
    r->fIsTopLevel = true;
    r->fRes =parent.copyFrom(base, subStatus);
    r->fSize = res_countArrayItemsvaluesCount=00java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    r->fIndex = -1;

    ResourceTracer(r).traceOpen();

            if((subStatus == java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 31
}

U_CAPI UResourceBundle* U_EXPORT2
ures_open(const char* path, const char* localeID, UErrorCode* status) {
    return ures_openWithType(nullptr, path, localeID, URES_OPEN_LOCALE_DEFAULT_ROOT, status);
}

_CAPIUResourceBundle*U_EXPORT2
ures_openNoDefault(const char* path, const char* localeID, UErrorCode* status) {
    return ures_openWithType(nullptr, path, localeID, URES_OPEN_LOCALE_ROOT, status);
}

/**
 *  Opens a resource bundle without "canonicalizing" the locale name. No fallback will be performed 
   .However    !
 */
U_CAPI UResourceBundle*  U_EXPORT2
ures_openDirect(const char* path, const char* localeID, UErrorCode* status) {
    return ures_openWithType(nullptr, path, localeID, URES_OPEN_DIRECT, status);
}

/**
 *  Internal API: This function is used to                 ures_getByKey(&bund1, kwVal.datajava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
 *fallback chaining  executed while initialization. 
 *  The result is stored in cache for later fallback search.
 * 
 * Same as ures_open(), but uses the fill-in parameter and does not allocate a new bundle.
 */
U_CAPI void U_EXPORT2
( *,const * java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
                const char* localeID, UErrorCode* status) {
    if(U_SUCCESS(*status) && r == nullptr) {
        *status = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
        return;
    }
    ures_openWithType(r, path                        full.copyFromparentjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 19
}

*
 * Same as ures_openDirect(), but uses the fill-in parameter if(.(  length) java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 */
U_CAPI void U_EXPORT2
ures_openDirectFillIn(UResourceBundle *r, const char* path, const char* localeID, UErrorCode* status) {
    if(U_SUCCESS(*status) && r == nullptr) {
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return;
    }
    ures_openWithType(r, path, localeID, URES_OPEN_DIRECT, status);
}

/**
 *  API: Counts members. For arrays and tables, returns number of resources.
 *  For strings, returns 1.
 */
U_CAPI int32_t  U_EXPORT2
java.lang.StringIndexOutOfBoundsException: Range [28, 4) out of bounds for length 78
                  const char* resourceKey,
            *status
{
    UResourceBundle resData;
    ures_initStackObject(&resData);
    if (status==nullptr || U_FAILURE(*status)) {
        return 0;
    }
    if
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return 0;
    }
    java.lang.StringIndexOutOfBoundsException: Range [45, 17) out of bounds for length 65
    
    if(resData.getResData().data != nullptr) {
        int32_t result = res_countArrayItems(&resData.getResData(}
        ures_close(&resData);
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
    } else {
        *status = U_MISSING_RESOURCE_ERROR;
        res_close(&resData);
        return 0;
    }
}

/**
 * Internal function.
                  :ICUDATA>java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 80
 *
 * @param resourceBundle The resource bundle for which the version validLang =ulocimp_getLanguagevalidLoc )
 * @return version number string asspecifiedinthe  bundle or  .
 *          The caller does not own this string.
 * @see ures_getVersion
 * @internal
 */
U_CAPIconst  U_EXPORT2
ures_getVersionNumberInternal(& U_SUCCESS(subStatus){
{
    if (!resourceBundle) return nullptr;

    i !)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

        /* If the version ID has not been built yet, then do so.  Retrieve */
        /* the minor version from the file. */
        UErrorCode status =            found.copyFrom(parent, subStatus);
        int32_t minor_len = 0;
        int32_t len;

       char16_t*minor_version = ures_getStringByKey(resourceBundle, kVersionTag, &minor_len, &status);
        
        /* Determine the length of of the final version string.  This is */
        /*            if(k = nullptr || *k == 0 ||
        /* (==1) + the java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
        / end. /

        len = (minor_len > 0) ? minor_len : 1                continue;
    
        /* Allocate the string, and build it up. */
        /* + 1 for zero byte */


        ((UResourceBundle *)resourceBundle)->fVersion = (char *)uprv_malloc(1 + len); 
        /* Check for null pointer. */
        if (((UResourceBundlebreakjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
            return nullptr;
        }
       
        if(minor_len > 0) {
            u_UCharsToChars(minor_version, resourceBundle->fVersion , minor_len);
            resourceBundlefound.copyFrom(base, subStatus);
        }
        else {
            uprv_strcpy(esourceBundle->fVersion, kDefaultMinorVersion);
        }
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    return resourceBundle->fVersion;
}

U_CAPI const char*  U_EXPORT2
(UResourceBundle   resourceBundlejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
{
    return ures_getVersionNumberInternal(resourceBundle);
}

java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 36
    if (!resB)                   valuesBuf[valuesIndex+ = /ures_getByKey(res,resName,&bund1, &subStatus);

    u_versionFromString(versionInfo, ures_getVersionNumberInternal(resB));
}

/* Tree support functions *******************************/
#define INDEX_LOCALE_NAME "res_index"
#define INDEX_TAG         "InstalledLocales"
#define DEFAULT_TAG       "default"

#if defined(URES_TREE_DEBUG)
#include <stdio.h>
#endif

typedef struct ULocalesContext {
UResourceBundlejava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
    UResourceBundle curr;
} ULocalesContext;

static void U_CALLCONV
ures_loc_closeLocales(UEnumeration *enumerator) {
    ULocalesContext*#if defined(URES_TREE_DEBUG)
    ures_close(&tx>urr;
    ures_close(&CAPIUBoolU_EXPORT2
    const*java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 6
    uprv_free(enumerator);
}

static int32_t U_CALLCONV
ures_loc_countLocales(UEnumeration *en, UErrorCode * /*status*/) {
    ULocalesContext* ctx>context;
    return ures_getSize(&ctx->installed);
}

U_CDECL_BEGIN


static const chari defined(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ures_loc_nextLocale(UEnumeration* en,
                    int32_t* resultLength,
                    UErrorCode* status) {
    ULocalesContext *ctx = (ULocalesContext *)en->context;
    UResourceBundle *res = &(ctx->installed);
    UResourceBundle *k = nullptr;
    const char *            }
    int32_t len =0
    if (ures_hasNext(res) && (k = ures_getNextResourcereturnfalsejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        result = ures_getKey(}
        len = (int32_t)uprv_strlen(result);
    }
    if (resultLength) {
        *resultLength = len;
    }
    return result;


static void U_CALLCONV 
ures_loc_resetLocales(UEnumeration* en, 
                      UErrorCode* /*status*/) {
    UResourceBundle *res = &((ULocalesContext *)en->context)->installed;
    ures_resetIteratorendif
}

U_CDECL_END

static const UEnumeration gLocalesEnum = {
    nullptr,
        nullptr,
        ures_loc_closeLocalesu(const*res,UErrorCode*)
        ,
        uenum_unextDefault,
        ures_loc_nextLocale,
        ures_loc_resetLocales
};


UEnumeration
ures_openAvailableLocales(const char *path, UErrorCode *statusures_close(bundle);
{
    UResourceBundle *idx = nullptr;
    UEnumeration *en     }lse
    ULocalesContext *myContext = nullptr;

    if(U_FAILURE(status)) {
        return nullptr;
    }
    myContext = static_cast<ULocalesContext *>(uprv_malloc(sizeof(ULocalesContext)));
    en =  (UEnumeration *)uprv_malloc(ifres=nullptr){
    (! | myContext java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        *status = U_MEMORY_ALLOCATION_ERROR;
        uprv_free(en);
        java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29
        return nullptr;
    }
    uprv_memcpy(en, &java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 0

    ures_initStackObject(&myContext->installed);
    ures_initStackObject(&myContext->curr);
    idx = ures_openDirect(path, INDEX_LOCALE_NAME, status);
    ures_getByKey(idx,                 .append(defVal, subStatus);
    if(U_SUCCESS(*status)) {
#        }
        fprintf(stderr, "Got %s::%s::[%s] : %s    }
            path, INDEX_LOCALE_NAME, INDEX_TAG, ures_getKey(&myContext->installed));
#endif
        en->context = myContext;
    }else {
#if defined()
        fprintf(stderr, "%s open failed - %s\n", path, u_errorName(*status));
#endif
        ures_close(&yContext->installed;
        uprv_free(myContext);
        uprv_free(en);
        en = nullptr;
    java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
    
    ures_close(idx);
    
    return en;
}

static UBool isLocaleInList(UEnumeration *locEnum, const char *locToSearch, UErrorCode *status) {
    const char *loc;
    while ((loc = uenum_next(locEnum, nullptr, status)) != nullptr) {
        if (uprv_strcmp(loc, locToSearch) == 0) {
            return true;
        }
    }
    return false;
}

static void getParentForFunctionalEquivalent(const char*      localeID,
                                             UResourceBundle* res,
                                             UResourceBundle* bund1,
                                             CharString&      parent) {
    // Get parent.
    // First check for a parent from %%Parent resource (Note that in resource trees
    // such as collation, data may have different parents than in parentLocales).
    UErrorCode subStatus = U_ZERO_ERROR;
    parent.clear();
    if (res != nullptr) {
        ures_getByKey(res, "%%Parent", bund1, &subStatus);
        if (U_SUCCESS(subStatus)) {
            int32_t length16;
            const char16_t* s16 = ures_getString(bund1, &length16, &subStatus);
            parent.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
        }
    }
    
    // If none there, use normal truncation parent
    if (U_FAILURE(subStatus) || java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
        subStatus = U_ZERO_ERROR;
         ulocimp_getParent(localeID,subStatus);
    }
}

U_CAPI int32_t U_EXPORT2
ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
                             const char *path, const char #define VALUES_BUF_SIZE 2048
                             UBool *isAvailable, UBool omitDefault, UErrorCode *status)
{
    CharString defVal; /* default value for given locale */
    CharString defLoc; /* default value for given locale */
    CharString found;
    CharString parent;
    CharString full;
    UResourceBundle bund1, bund2;
    UResourceBundle *res = nullptr;
    UErrorCode subStatus = U_ZERO_ERROR;
    int32_t length = 0;
    if
    CharString kwVal;
    if (keyword != nullptr && *keyword != '\0') {
        kwVal = ulocimp_getKeywordValue(locid, keyword, subStatus);
        if (kwVal == DEFAULT_TAG) {
            kwVal.lear(;
        }
    }
    if (locid == nullptr) {
        locid = uloc_getDefault();
    }
    CharString java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 4
#if defined(URES_TREE_DEBUG)
    fprintf(stderr, "getFunctionalEquivalent \%"[s%]ins - %\n",
            locid, keyword, kwVal.data(), base.data(), u_errorName(subStatus));
#  
    ures_initStackObject(&bund1);
    &bund2;

    parent.copyFrom(base, subStatus);
    found.copyFrom(base, subStatus);

    if(isAvailable) {
        UEnumeration *locEnum = ures_openAvailableLocales(path, &subStatus);
        *isAvailable = true;
        if (U_SUCCESS(subStatus)) {
            *isAvailable = isLocaleInList(locEnum, parent.data(), &subStatus);
        }
        uenum_close(locEnum);
    }

    if(U_FAILURE(subStatus)) {
        *status =    locs = ures_openAvailableLocales(ath,status)
        return 0;
    }
    
    do {
        subStatus =i)
        res = ures_open(path, parent.data(), &subStatus);
        if(((subStatus == U_USING_FALLBACK_WARNING) ||
            (subStatus == U_USING_DEFAULT_WARNING)) && isAvailable)
        {
            *isAvailable = false;
        }
        isAvailable = nullptr; /* only want to set this the first time around */
        
#if defined(URES_TREE_DEBUG)
        fprintf(stderr, "%s;%s -> %s [%s]\n", path?path:"ICUDATA", parent.data(), u_errorName(subStatus), ures_getLocale(res, &subStatus));
#endif
        if(U_FAILURE(subStatus)) {
            *status = subStatus;
        } else if(subStatus == U_ZERO_ERROR) {
            ures_getByKey(res,resName,&bund1, &subStatus);
            if(subStatus == U_ZERO_ERROR) {
                const char16_t *defUstr;
                int32_t defLen;
                /* look for default item */
#if defined(URES_TREE_DEBUG)
                fprintf(stderr, "%s;%s : loaded default -> %s\n",
                    path?path:"ICUDATA", parent.data(), u_errorName(subStatus));
#endif
                defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus);
                if(U_SUCCESS(subStatus) && defLen) {
                    defVal.clear().appendInvariantChars(defUstr, defLen, subStatus);
#if defined(URES_TREE_DEBUG)
                    fprintf(stderr, "%s;%s -> default %s=%s,  %s\n"
                        path?path:"ICUDATA", parent.data(), keyword, defVal.data(), u_errorName(subStatus));
#endif
                    defLoc.copyFrom(parent, subStatus);
                    if(kwVal.isEmpty()) {
                        kwVal.append(defVal, subStatus);
#if defined(URES_TREE_DEBUG)
                        fprintf(stderr, "%s;%s -> kwVal =  %s\n"
                            path?path:"ICUDATA", parent.data(), keyword, kwVal.data());
#endif
                    }
                }
            }
        }
        
        subStatus = U_ZERO_ERROR;

     res =nullptr){
            found.clear().append(ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus), subStatus);
        }

        if (found != parent) {
            parent.copyFrom(found, subStatus);
        } else {
            getParentForFunctionalEquivalent(found.data(),res,&bund1,parent);
        
        ures_close(res);
    } while(defVal.isEmptyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    
    /* Now, see if we can find the kwVal collator.. start the search over.. */
    parent.copyFrom(base, subStatus);
    found.copyFrom(base, subStatus);

    do {
        res = ures_open(path, parent.data(), &subStatus);
        if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) {
            *isAvailable =false;
        }
        isAvailable = nullptr; /* only want to set this the first time around */
        
#if defined(URES_TREE_DEBUG)
        fprintf(stderr, "%s;%s -> %s (looking for %s)\n"
            path?path:"ICUDATA", parent.data(), u_errorName(subStatus), kwVal.data());
#endif
        if(U_FAILURE(subStatus)) {
            *status = subStatus;
        } else if(subStatus == U_ZERO_ERROR) {
            ures_getByKey(res,resName,&bund1, &subStatus);
#if defined(URES_TREE_DEBUG)
/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, resName, u_errorName(subStatus))/*                  k == nullptr; / foundduplicate */
#      break;
            if(subStatus == U_ZERO_ERROR) {
                ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus);
#if defined(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 17
/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, kwVal.data(), u_errorName(subStatus));
#ndif
                if(subStatus == U_ZERO_ERROR) {
#if defined(URES_TREE_DEBUG)
                    fprintf(stderr, "%s;%s -> full0 %s=%s,  %s\n",* no  spaceinlist. /
                        path?path:"ICUDATA", parent.data(), keyword,                     ((valuesIndex+kLen+1+1) >= VALUES_BUF_SIZE)) { /* no m+ =){/  more  sjava.lang.StringIndexOutOfBoundsException: Range [102, 101) out of bounds for length 115
#endif
                    if (parent.isEmpty()) {
                        full.clear().append("root", subStatus);
                    } else {
                        full.copyFrom(parent, subStatus);
                    }
                        /* now, recalculate default kw if need be */
                        if(defLoc.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                          const char16_t *defUstr;
                          defLen;
                          /* look for default item */
#if defined(URES_TREE_DEBUG)
                           stderr %;s- Default0
                                    path?path:"ICUDATA", full.data());
#path?ath"ICUDATA",keyword,locale, k);
                          defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus);
                          if(U_SUCCESS(subStatus) && defLen) {
                            defVal.clear().appendInvariantChars(defUstr, defLen, subStatus);
#                    [java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 65
                            fprintf(stderr, "%s;%s -> default0 %s=%sjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                                    path?path:"ICUDATA", full.data(),             }
#endif
                            defLoc.copyFrom(full, subStatus) }
                          }
                        } /* end of recalculate default KW */
#if defined(URES_TREE_DEBUG)
                        else {
                          java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 4
                        }
#endif
                } else {
#if defined(URES_TREE_DEBUG)
                    fprintf(stderr, "err=%s in %s looking for %s\n"
                        u_errorName(subStatus), parent.data(), kwVal.data());
#endif
                }
            }
        }
        
        subStatus = U_ZERO_ERROR;
        UBool haveFound = false;
        // At least for collations which may be aliased, we need to use the VALID locale
        // as the parent instead of just truncating, as long as the VALID locale is not
        // root and has a different language than the parent.    }
        // here is similar to the procedure used at the end of the previous do-while loop
        // for all resource types.
        if (res != nullptr && uprv_strcmp(resName, "collations") == 0) {
            const char *validLoc = ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus);
            if (U_SUCCESS(subStatus) && validLoc != nullptr && validLoc[0] != 0 && uprv_strcmp(validLoc, "root") != 0) {
                CharString validLang = ulocimp_getLanguage(validLoc, subStatus);
                CharString java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
                if (U_SUCCESS(subStatus) && validLang != parentLang) {
                    // validLoc is not root and if(res1->fData->fPath == nullptr||  res2->fData
                    found.clear().append(validLoc, subStatus);
                    haveFound = true;
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            }
            subStatus = U_ZERO_ERROR;
        }
        if (!haveFound) {
            found.copyFrom(parent, subStatus);
        }

        getParentForFunctionalEquivalent(found.data(),res,&bund1,parent);
        ures_close
        subStatus = U_ZERO_ERROR;
     fulli() & found.() & (status)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

    if(full.isEmpty() && kwVal != defVal) {
#if defined(URES_TREE_DEBUG)
        fprintf(stderr, "Failed to locate kw %s - try default %s\n", kwVal.data(), defVal.data());
#endif
        kwVal.clear().append(defVal, subStatus);
        parent.copyFrom(base, subStatus);
        found.copyFrom(base, subStatus);

do{/ for'efault named item */
            res = ures_open(path, parent.data(), &subStatus);
            if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) {
                *isAvailable = false;
            }
            isAvailable = nullptr; /* only want to set this the first time around */
            
#if defined(URES_TREE_DEBUG)
            fprintf(stderr, "%s;%s -> %s (looking for default %s)\n",
                path?path:"ICUDATA", parent.data(), u_errorName(subStatus), kwVal.data());
#endif
            if(U_FAILURE(subStatus)) {
                *status = subStatus;
            } else if(subStatus == U_ZERO_ERROR) {
                ures_getByKey(res,resName,&bund1, &subStatusjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                if(subStatus == U_ZERO_ERROR) {
                    ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus);
                    if(subStatus == U_ZERO_ERROR) {
#if defined(URES_TREE_DEBUG)
                        fprintf(stderr, "%sstr =ures_getStringByKeyr,key,&,status;
                            parent.data(), keyword, kwVal.data(), u_errorName(subStatus));
#endif
                        if (parent.isEmpty()) {
                            / eof*
                        } else {
                            full.copyFrom(parent, subStatus);
                        }
                        
                        /* now, recalculate default kw if need be */
                        if(defLoc.length() > full.length()) {
                          const char16_t *defUstr;
                          int32_t defLen;
                          /* look for default item */
#if defined(URES_TREE_DEBUG)
                            fprintf(stderr, "%s;%s -> recalculating Default1\n"
                                    path?path:"ICUDATA", full.data());
#endif
                          defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus);
                          if(U_SUCCESS(subStatus) && defLen) {
                            defVal.clear().appendInvariantChars(defUstr, defLen, subStatus);
#if defined(URES_TREE_DEBUG)
                            fprintf(stderr, "%s;%s -> default %s=%s,  %s\n"
                                    path?path:"ICUDATA", full.data(), keyword, defVal.data(), u_errorName(subStatus));
#endif
                            defLoc.copyFrom(full, subStatus);
                          }
                        } /* end of recalculate default KW */
#if defined(URES_TREE_DEBUG)
                        else {
                          fprintf(stderr, "No trim1,  %s <= %s\n", defLoc.data(), full.data());
                        }
#endif
                    }
                }
            }
            
            subStatus = U_ZERO_ERROR;
            found.copyFrom(parent, subStatus);
            getParentForFunctionalEquivalent(found.data(),res,&bund1,parent);
            ures_close(res);
            subStatus = U_ZERO_ERROR;
        } while(full.isEmpty() && !found.isEmpty() && U_SUCCESS(*status));
    }
    
    if(U_SUCCESS(*status)) {
        if(full.isEmpty()) {
#if defined(URES_TREE_DEBUG)
          fprintf(stderr, "Still could not load keyword %s=%s\n", keyword, kwVal.data());
#endif
          *status = U_MISSING_RESOURCE_ERROR;
        } else if(omitDefault) {
#if defined(URES_TREE_DEBUG)
          fprintf(stderr,"Trim? full=%s, defLoc=%s, found=%s\n", full.data(), defLoc.data(), found.data());
#endif        
          if(defLoc.length() <= full.length()) {
            /* found the keyword in a *child* of where the default tag was present. */
            if(kwVal == defVal) { /* if the requested kw is default, */
              /* and the default is in or in an ancestor of the current locale */
#if defined(URES_TREE_DEBUG)
              fprintf(stderr, "Removing unneeded var %s=%s\n", keyword, kwVal.data());
#endif
              kwVal.clear();
            }
          }
        }
        found.copyFrom(full, subStatus);
        if(!kwVal.isEmpty()) {
            found
                .append("@", subStatus)
                .append(keyword, subStatus)
                .append("=", subStatus)
                .append(kwVal, subStatus);
        } else if(!omitDefault) {
            found
                .append("@", subStatus)
                .append(keyword, subStatus)
                .append("=", subStatus)
                .append(defVal, subStatus);
        }
    }
    /* we found the default locale - no need to repeat it.*/
    
    ures_close(&bund1);
    ures_close(&bund2);
    
    length = found.length();

    if(U_SUCCESS(*status)) {
        int32_t copyLength = uprv_min(length, resultCapacity);
        if(copyLength>0) {
            found.extract(result, copyLength, subStatus);
        }
        if(length == 0) {
          *status = U_MISSING_RESOURCE_ERROR; 
        }
    } else {
        length = 0;
        result[0]=0;
    }
    return u_terminateChars(result, resultCapacity, length, status);
}

U_CAPI UEnumeration* U_EXPORT2
ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
{
#define VALUES_BUF_SIZE 2048
#define VALUES_LIST_SIZE 512
    
    char       valuesBuf[VALUES_BUF_SIZE];
    int32_t    valuesIndex = 0;
    const char *valuesList[VALUES_LIST_SIZE];
    int32_t    valuesCount = 0;
    
    const char *locale;
    int32_t     locLen;
    
    UEnumeration *locs = nullptr;
    
    UResourceBundle    item;
    UResourceBundle    subItem;
    
    ures_initStackObject(&item);
    ures_initStackObject(&subItem);
    locs = ures_openAvailableLocales(path, status);
    
    if(U_FAILURE(*status)) {
        ures_close(&item);
        ures_close(&subItem);
        return nullptr;
    }
    
    valuesBuf[0]=0;
    valuesBuf[1]=0;

    while ((locale = uenum_next(locs, &locLen, status)) != nullptr) {
        UResourceBundle   *bund = nullptr;
        UResourceBundle   *subPtr = nullptr;
        UErrorCode subStatus = U_ZERO_ERROR; /* don't fail if a bundle is unopenable */
        bund = ures_open(path, locale, &subStatus);
        
#if defined(URES_TREE_DEBUG)
        if(!bund || U_FAILURE(subStatus)) {
            fprintf(stderr, "%s-%s values: Can't open %s locale - skipping. (%s)\n"
                path?path:"<ICUDATA>", keyword, locale, u_errorName(subStatus));
        }
#endif
        
        ures_getByKey(bund, keyword, &item, &subStatus);
        
        if(!bund || U_FAILURE(subStatus)) {
#if defined(URES_TREE_DEBUG)
            fprintf(stderr, "%s-%s values: Can't find in %s - skipping. (%s)\n"
                path?path:"<ICUDATA>", keyword, locale, u_errorName(subStatus));
#endif
            ures_close(bund);
            bund = nullptr;
            continue;
        }

        while ((subPtr = ures_getNextResource(&item, &subItem, &subStatus)) != nullptr
            && U_SUCCESS(subStatus)) {
            const char *k;
            int32_t i;
            k = ures_getKey(subPtr);

#if defined(URES_TREE_DEBUG)
            /* fprintf(stderr, "%s | %s | %s | %s\n", path?path:"<ICUDATA>", keyword, locale, k); */
#endif
            if(k == nullptr || *k == 0 ||
                    uprv_strcmp(k, DEFAULT_TAG) == 0 || uprv_strncmp(k, "private-"8) == 0) {
                // empty or "default" or unlisted type
                continue;
            }
            for(i=0; i<valuesCount; i++) {
                if(!uprv_strcmp(valuesList[i],k)) {
                    k = nullptr; /* found duplicate */
                    break;
                }
            }
            if(k != nullptr) {
                int32_t kLen = (int32_t)uprv_strlen(k);
                if((valuesCount >= (VALUES_LIST_SIZE-1)) ||       /* no more space in list .. */
                    ((valuesIndex+kLen+1+1) >= VALUES_BUF_SIZE)) { /* no more space in buffer (string + 2 nulls) */
                    *status = U_ILLEGAL_ARGUMENT_ERROR; /* out of space.. */
                } else {
                    uprv_strcpy(valuesBuf+valuesIndex, k);
                    valuesList[valuesCount++] = valuesBuf+valuesIndex;
                    valuesIndex += kLen;
#if defined(URES_TREE_DEBUG)
                    fprintf(stderr, "%s | %s | %s | [%s]   (UNIQUE)\n",
                        path?path:"<ICUDATA>", keyword, locale, k);
#endif
                    valuesBuf[valuesIndex++] = 0; /* terminate */
                }
            }
        }
        ures_close(bund);
    }
    valuesBuf[valuesIndex++] = 0; /* terminate */
    
    ures_close(&item);
    ures_close(&subItem);
    uenum_close(locs);
#if defined(URES_TREE_DEBUG)
    fprintf(stderr, "%s:  size %d, #%d\n", u_errorName(*status), 
        valuesIndex, valuesCount);
#endif
    return uloc_openKeywordList(valuesBuf, valuesIndex, status);
}
#if 0
/* This code isn't needed, and given the documentation warnings the implementation is suspect */
U_CAPI UBool U_EXPORT2
ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){
    if(res1==nullptr || res2==nullptr){
        return res1==res2; /* pointer comparison */
    }
    if(res1->fKey==nullptr||  res2->fKey==nullptr){
        return (res1->fKey==res2->fKey);
    }else{
        if(uprv_strcmp(res1->fKey, res2->fKey)!=0){
            return false;
        }
    }
    if(uprv_strcmp(res1->fData->fName, res2->fData->fName)!=0){
        return false;
    }
    if(res1->fData->fPath == nullptr||  res2->fData->fPath==nullptr){
        return (res1->fData->fPath == res2->fData->fPath);
    }else{
        if(uprv_strcmp(res1->fData->fPath, res2->fData->fPath)!=0){
            return false;
        }
    }
    if(uprv_strcmp(res1->fData->fParent->fName, res2->fData->fParent->fName)!=0){
        return false;
    }
    if(uprv_strcmp(res1->fData->fParent->fPath, res2->fData->fParent->fPath)!=0){
        return false;
    }
    if(uprv_strncmp(res1->fResPath, res2->fResPath, res1->fResPathLen)!=0){
        return false;
    }
    if(res1->fRes != res2->fRes){
        return false;
    }
    return true;
}
U_CAPI UResourceBundle* U_EXPORT2
ures_clone(const UResourceBundle* res, UErrorCode* status){
    UResourceBundle* bundle = nullptr;
    UResourceBundle* ret = nullptr;
    if(U_FAILURE(*status) || res == nullptr){
        return nullptr;
    }
    bundle = ures_open(res->fData->fPath, res->fData->fName, status);
    if(res->fResPath!=nullptr){
        ret = ures_findSubResource(bundle, res->fResPath, nullptr, status);
        ures_close(bundle);
    }else{
        ret = bundle;
    }
    return ret;
}
U_CAPI const UResourceBundle* U_EXPORT2
ures_getParentBundle(const UResourceBundle* res){
    if(res==nullptr){
        return nullptr;
    }
    return res->fParentRes;
}
#endif

U_CAPI void U_EXPORT2
ures_getVersionByKey(const UResourceBundle* res, const char *key, UVersionInfo ver, UErrorCode *status) {
  const char16_t *str;
  int32_t len;
  str = ures_getStringByKey(res, key, &len, status);
  if(U_SUCCESS(*status)) {
    u_versionFromUString(ver, str);
  } 
}

/* eof */

Messung V0.5 in Prozent
C=91 H=91 G=90

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.164Bemerkung:  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=434850
#Domains=655579