# Global Metrics

path: .metrics.nexits.sum
old: 26.0
new: 4.0
path: .metrics.nexits.average
old: 0.9629629629629628
new: 4.0
path: .metrics.cognitive.sum
old: 251.0
new: 10.0
path: .metrics.cognitive.average
old: 9.296296296296296
new: 10.0
path: .metrics.cyclomatic.sum
old: 216.0
new: 12.0
path: .metrics.cyclomatic.average
old: 6.75
new: 3.0
path: .metrics.loc.lloc
old: 441.0
new: 12.0
path: .metrics.loc.blank
old: 58.0
new: 0.0
path: .metrics.loc.ploc
old: 857.0
new: 779.0
path: .metrics.loc.sloc
old: 1051.0
new: 866.0
path: .metrics.loc.cloc
old: 136.0
new: 833.0
path: .metrics.nom.functions
old: 27.0
new: 1.0
path: .metrics.nom.total
old: 27.0
new: 1.0
path: .metrics.nargs.average
old: 1.4074074074074074
new: 1.0
path: .metrics.nargs.sum
old: 38.0
new: 1.0
path: .metrics.mi.mi_original
old: -47.04545056023089
new: 3.426486824699296
path: .metrics.mi.mi_sei
old: -95.13600133269496
new: -19.60168963550131
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 2.0037934647364306
path: .metrics.halstead.n2
old: 438.0
new: 1464.0
path: .metrics.halstead.difficulty
old: 112.29566210045662
new: 12.778688524590164
path: .metrics.halstead.N1
old: 2892.0
new: 2337.0
path: .metrics.halstead.length
old: 4985.0
new: 3896.0
path: .metrics.halstead.n1
old: 47.0
new: 24.0
path: .metrics.halstead.level
old: 0.008905063484156915
new: 0.0782552918537524
path: .metrics.halstead.estimated_program_length
old: 4104.422408134164
new: 15505.023663265149
path: .metrics.halstead.bugs
old: 9.739436369239144
new: 2.16846724419784
path: .metrics.halstead.volume
old: 44475.37707131633
new: 41060.56272807689
path: .metrics.halstead.effort
old: 4994391.915390935
new: 524700.1417464907
path: .metrics.halstead.purity_ratio
old: 0.8233545452626205
new: 3.9797288663411567
path: .metrics.halstead.N2
old: 2093.0
new: 1559.0
path: .metrics.halstead.time
old: 277466.2175217186
new: 29150.00787480504
path: .metrics.halstead.vocabulary
old: 485.0
new: 1488.0

# Spaces Data

## Minimal test - lines (44, 47)

path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.25
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 18.0
new: 4.0
path: .spaces[0].metrics.loc.lloc
old: 3.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 17.0
new: 4.0
path: .spaces[0].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 2.0
new: 0.0
path: .spaces[0].metrics.nom.functions
old: 2.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 1.0
new: null
path: .spaces[0].metrics.cognitive.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.mi.mi_original
old: 94.53267271268182
new: 134.61441294714626
path: .spaces[0].metrics.mi.mi_visual_studio
old: 55.28226474425837
new: 78.7218789164598
path: .spaces[0].metrics.mi.mi_sei
old: 61.19006542957504
new: 118.60851385841868
path: .spaces[0].metrics.halstead.level
old: 0.08571428571428572
new: 1.0
path: .spaces[0].metrics.halstead.n2
old: 12.0
new: 3.0
path: .spaces[0].metrics.halstead.effort
old: 2796.7616322939493
new: 13.931568569324174
path: .spaces[0].metrics.halstead.n1
old: 14.0
new: 2.0
path: .spaces[0].metrics.halstead.time
old: 155.37564623855275
new: 0.7739760316291208
path: .spaces[0].metrics.halstead.difficulty
old: 11.666666666666666
new: 1.0
path: .spaces[0].metrics.halstead.N1
old: 31.0
new: 3.0
path: .spaces[0].metrics.halstead.bugs
old: 0.06616815837771658
new: 0.0019299471801733172
path: .spaces[0].metrics.halstead.estimated_program_length
old: 96.32251891746031
new: 6.754887502163468
path: .spaces[0].metrics.halstead.N2
old: 20.0
new: 3.0
path: .spaces[0].metrics.halstead.volume
old: 239.72242562519568
new: 13.931568569324174
path: .spaces[0].metrics.halstead.length
old: 51.0
new: 6.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.88867684151883
new: 1.1258145836939113
path: .spaces[0].metrics.halstead.vocabulary
old: 26.0
new: 5.0
path: .spaces[0].metrics.nargs.average
old: 0.0
new: null

### Code

    static const struct codepair {
      unsigned short keysym;
      unsigned short ucs;
    } keysymtab[] = {

## Minimal test - lines (838, 866)

path: .spaces[1].metrics.cyclomatic.average
old: 1.0
new: 5.0
path: .spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 10.0
path: .spaces[1].metrics.cognitive.sum
old: 0.0
new: 10.0
path: .spaces[1].metrics.cognitive.average
old: 0.0
new: 10.0
path: .spaces[1].metrics.loc.ploc
old: 8.0
new: 20.0
path: .spaces[1].metrics.loc.blank
old: 0.0
new: 4.0
path: .spaces[1].metrics.loc.cloc
old: 0.0
new: 5.0
path: .spaces[1].metrics.loc.sloc
old: 8.0
new: 29.0
path: .spaces[1].metrics.loc.lloc
old: 3.0
new: 12.0
path: .spaces[1].metrics.halstead.difficulty
old: 6.352941176470588
new: 27.6
path: .spaces[1].metrics.halstead.effort
old: 1799.6308575432872
new: 17822.02396034357
path: .spaces[1].metrics.halstead.length
old: 61.0
new: 119.0
path: .spaces[1].metrics.halstead.n1
old: 8.0
new: 23.0
path: .spaces[1].metrics.halstead.vocabulary
old: 25.0
new: 43.0
path: .spaces[1].metrics.halstead.N2
old: 27.0
new: 48.0
path: .spaces[1].metrics.halstead.time
old: 99.97949208573816
new: 990.1124422413094
path: .spaces[1].metrics.halstead.N1
old: 34.0
new: 71.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.5325716114959962
new: 1.60067636039545
path: .spaces[1].metrics.halstead.bugs
old: 0.04931749767399079
new: 0.2274312268350503
path: .spaces[1].metrics.halstead.n2
old: 17.0
new: 20.0
path: .spaces[1].metrics.halstead.volume
old: 283.2752275762582
new: 645.7255058095496
path: .spaces[1].metrics.halstead.estimated_program_length
old: 93.48686830125575
new: 190.48048688705853
path: .spaces[1].metrics.halstead.level
old: 0.1574074074074074
new: 0.036231884057971016
path: .spaces[1].metrics.mi.mi_sei
old: 79.81048470684169
new: 71.45052208590087
path: .spaces[1].metrics.mi.mi_visual_studio
old: 62.995127736519365
new: 47.078280792325
path: .spaces[1].metrics.mi.mi_original
old: 107.7216684294481
new: 80.50386015487575
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 4.0
path: .spaces[1].metrics.nexits.average
old: 0.0
new: 4.0

### Code

    long keysym2ucs(KeySym keysym) {
      int min = 0;
      int max = sizeof(keysymtab) / sizeof(struct codepair) - 1;
      int mid;

      /* first check for Latin-1 characters (1:1 mapping) */
      if ((keysym >= 0x0020 && keysym <= 0x007e) ||
          (keysym >= 0x00a0 && keysym <= 0x00ff))
        return keysym;

      /* also check for directly encoded 24-bit UCS characters */
      if ((keysym & 0xff000000) == 0x01000000) return keysym & 0x00ffffff;

      /* binary search in table */
      while (max >= min) {
        mid = (min + max) / 2;
        if (keysymtab[mid].keysym < keysym)
          min = mid + 1;
        else if (keysymtab[mid].keysym > keysym)
          max = mid - 1;
        else {
          /* found it */
          return keysymtab[mid].ucs;
        }
      }

      /* no matching Unicode value found */
      return -1;
    }