# Global Metrics

path: .metrics.cognitive.average
old: 0.4473684210526316
new: 0.1
path: .metrics.cognitive.sum
old: 17.0
new: 2.0
path: .metrics.nargs.average
old: 0.8157894736842105
new: 1.95
path: .metrics.nargs.sum
old: 31.0
new: 39.0
path: .metrics.cyclomatic.sum
old: 55.0
new: 30.0
path: .metrics.cyclomatic.average
old: 1.25
new: 1.3043478260869563
path: .metrics.nom.total
old: 38.0
new: 20.0
path: .metrics.nom.functions
old: 38.0
new: 20.0
path: .metrics.mi.mi_visual_studio
old: 5.857822865384121
new: 18.79185239335042
path: .metrics.mi.mi_sei
old: -16.31989264266953
new: -8.272174756917824
path: .metrics.mi.mi_original
old: 10.016877099806848
new: 32.13406759262922
path: .metrics.loc.sloc
old: 492.0
new: 212.0
path: .metrics.loc.ploc
old: 261.0
new: 169.0
path: .metrics.loc.cloc
old: 168.0
new: 12.0
path: .metrics.loc.lloc
old: 107.0
new: 42.0
path: .metrics.loc.blank
old: 63.0
new: 31.0
path: .metrics.nexits.average
old: 0.6052631578947368
new: 0.55
path: .metrics.nexits.sum
old: 23.0
new: 11.0
path: .metrics.halstead.effort
old: 332075.42998597375
new: 194946.3685008587
path: .metrics.halstead.time
old: 18448.634999220765
new: 10830.35380560326
path: .metrics.halstead.N2
old: 526.0
new: 358.0
path: .metrics.halstead.purity_ratio
old: 1.1319165993843086
new: 1.2624449366202124
path: .metrics.halstead.vocabulary
old: 206.0
new: 155.0
path: .metrics.halstead.difficulty
old: 33.05464480874317
new: 32.79389312977099
path: .metrics.halstead.bugs
old: 1.5984654036060395
new: 1.120698640068144
path: .metrics.halstead.n2
old: 183.0
new: 131.0
path: .metrics.halstead.N1
old: 781.0
new: 459.0
path: .metrics.halstead.length
old: 1307.0
new: 817.0
path: .metrics.halstead.volume
old: 10046.256189028469
new: 5944.593639109052
path: .metrics.halstead.estimated_program_length
old: 1479.4149953952913
new: 1031.4175132187136
path: .metrics.halstead.n1
old: 23.0
new: 24.0
path: .metrics.halstead.level
old: 0.03025293436931724
new: 0.030493482309124766

# Spaces Data

## Minimal test - lines (27, 48)

path: .spaces[0].metrics.nom.total
old: 0.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 3.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 20.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 22.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[0].metrics.nargs.average
old: null
new: 0.6666666666666666
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.25
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 51.28532747206784
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 51.3295871254947
path: .spaces[0].metrics.mi.mi_original
old: null
new: 87.69790997723601
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 15.0
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.7873108123454844
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 477.56140372336625
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 39.0
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 23.0
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 91.0
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 337.4075135002044
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 6073.335243003679
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 12.717391304347826
path: .spaces[0].metrics.halstead.level
old: null
new: 0.07863247863247863
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 52.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 162.64528392343908
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 38.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.1109592676345384
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0

### Code

    class nsPrinterInfo : public nsIPrinterInfo {
     public:
      NS_DECL_CYCLE_COLLECTING_ISUPPORTS
      NS_DECL_CYCLE_COLLECTION_CLASS(nsPrinterInfo)
      NS_DECL_NSIPRINTERINFO
      nsPrinterInfo() = delete;
      nsPrinterInfo(nsPrinterBase& aPrinter,
                    const nsPrinterBase::PrinterInfo& aPrinterInfo)
          : mDefaultSettings(
                CreatePlatformPrintSettings(aPrinterInfo.mDefaultSettings)) {
        mPaperList.SetCapacity(aPrinterInfo.mPaperList.Length());
        for (const PaperInfo& info : aPrinterInfo.mPaperList) {
          mPaperList.AppendElement(MakeRefPtr(aPrinter, info));
        }
      }

     private:
      virtual ~nsPrinterInfo() = default;

      nsTArray> mPaperList;
      RefPtr mDefaultSettings;
    };

## Minimal test - lines (130, 143)

path: .spaces[6].metrics.mi.mi_visual_studio
old: 51.46244413875424
new: 56.17288262757547
path: .spaces[6].metrics.mi.mi_sei
old: 90.55542825166786
new: 62.97994789809368
path: .spaces[6].metrics.mi.mi_original
old: 88.00077947726976
new: 96.05562929315406
path: .spaces[6].metrics.halstead.volume
old: 260.05594662738457
new: 467.0655486964791
path: .spaces[6].metrics.halstead.n2
old: 16.0
new: 28.0
path: .spaces[6].metrics.halstead.difficulty
old: 6.1875
new: 8.035714285714286
path: .spaces[6].metrics.halstead.N2
old: 22.0
new: 45.0
path: .spaces[6].metrics.halstead.time
old: 89.39423165316344
new: 208.51140566807103
path: .spaces[6].metrics.halstead.vocabulary
old: 25.0
new: 38.0
path: .spaces[6].metrics.halstead.bugs
old: 0.04577202003023776
new: 0.08050328937469162
path: .spaces[6].metrics.halstead.level
old: 0.16161616161616163
new: 0.12444444444444444
path: .spaces[6].metrics.halstead.N1
old: 34.0
new: 44.0
path: .spaces[6].metrics.halstead.length
old: 56.0
new: 89.0
path: .spaces[6].metrics.halstead.purity_ratio
old: 1.6523093752318
new: 1.8856766153537812
path: .spaces[6].metrics.halstead.effort
old: 1609.096169756942
new: 3753.205302025279
path: .spaces[6].metrics.halstead.estimated_program_length
old: 92.5293250129808
new: 167.82521876648653
path: .spaces[6].metrics.halstead.n1
old: 9.0
new: 10.0
path: .spaces[6].metrics.nargs.sum
old: 0.0
new: 5.0
path: .spaces[6].metrics.nargs.average
old: 0.0
new: 5.0
path: .spaces[6].metrics.nexits.average
old: 0.5
new: 1.0
path: .spaces[6].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[6].metrics.loc.blank
old: 4.0
new: 1.0
path: .spaces[6].metrics.loc.cloc
old: 9.0
new: 0.0
path: .spaces[6].metrics.loc.ploc
old: 14.0
new: 13.0
path: .spaces[6].metrics.loc.sloc
old: 27.0
new: 14.0
path: .spaces[6].metrics.loc.lloc
old: 8.0
new: 2.0
path: .spaces[6].metrics.nom.functions
old: 2.0
new: 1.0
path: .spaces[6].metrics.nom.total
old: 2.0
new: 1.0

### Code

    nsresult nsPrinterBase::AsyncPromiseAttributeGetter(
        JSContext* aCx, Promise** aResultPromise, AsyncAttribute aAttribute,
        BackgroundTask aBackgroundTask, Args... aArgs) {
      MOZ_ASSERT(NS_IsMainThread());

      static constexpr EnumeratedArray
          attributeKeys{"SupportsDuplex"_ns, "SupportsColor"_ns,
                        "SupportsMonochrome"_ns, "SupportsCollation"_ns,
                        "PrinterInfo"_ns};
      return mozilla::AsyncPromiseAttributeGetter(
          *this, mAsyncAttributePromises[aAttribute], aCx, aResultPromise,
          attributeKeys[aAttribute], aBackgroundTask, std::forward(aArgs)...);
    }

## Minimal test - lines (196, 199)

path: .spaces[13].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[13].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[13].metrics.mi.mi_original
old: 152.79727628688778
new: 126.77537335305064
path: .spaces[13].metrics.mi.mi_visual_studio
old: 89.35513233151332
new: 74.13764523570212
path: .spaces[13].metrics.mi.mi_sei
old: 144.8408406278255
new: 107.29917031068469
path: .spaces[13].metrics.loc.ploc
old: 1.0
new: 4.0
path: .spaces[13].metrics.loc.sloc
old: 1.0
new: 4.0
path: .spaces[13].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[13].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[13].metrics.halstead.bugs
old: 0.006944786620971931
new: 0.014723738740209763
path: .spaces[13].metrics.halstead.difficulty
old: 3.0
new: 4.666666666666667
path: .spaces[13].metrics.halstead.level
old: 0.3333333333333333
new: 0.21428571428571427
path: .spaces[13].metrics.halstead.vocabulary
old: 9.0
new: 13.0
path: .spaces[13].metrics.halstead.volume
old: 31.69925001442312
new: 62.907475208398566
path: .spaces[13].metrics.halstead.purity_ratio
old: 2.0264662506490403
new: 2.068309379925304
path: .spaces[13].metrics.halstead.estimated_program_length
old: 20.264662506490403
new: 35.161259458730164
path: .spaces[13].metrics.halstead.length
old: 10.0
new: 17.0
path: .spaces[13].metrics.halstead.n1
old: 6.0
new: 7.0
path: .spaces[13].metrics.halstead.N1
old: 7.0
new: 9.0
path: .spaces[13].metrics.halstead.N2
old: 3.0
new: 8.0
path: .spaces[13].metrics.halstead.effort
old: 95.09775004326936
new: 293.56821763919334
path: .spaces[13].metrics.halstead.n2
old: 3.0
new: 6.0
path: .spaces[13].metrics.halstead.time
old: 5.2832083357371875
new: 16.30934542439963

### Code

    nsPrinterBase::nsPrinterBase(const CommonPaperInfoArray* aPaperInfoArray)
        : mCommonPaperInfo(aPaperInfoArray) {
      MOZ_DIAGNOSTIC_ASSERT(aPaperInfoArray, "Localized paper info was null");
    }

## Minimal test - lines (51, 54)

path: .spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.022090106845947536
path: .spaces[1].metrics.halstead.n1
old: 0.0
new: 10.0
path: .spaces[1].metrics.halstead.purity_ratio
old: null
new: 2.487794823864071
path: .spaces[1].metrics.halstead.length
old: 1.0
new: 23.0
path: .spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 18.0
path: .spaces[1].metrics.halstead.level
old: null
new: 0.17777777777777778
path: .spaces[1].metrics.halstead.effort
old: 0.0
new: 539.4840470615992
path: .spaces[1].metrics.halstead.time
old: 0.0
new: 29.97133594786662
path: .spaces[1].metrics.halstead.N1
old: 0.0
new: 14.0
path: .spaces[1].metrics.halstead.n2
old: 1.0
new: 8.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: null
new: 57.219280948873624
path: .spaces[1].metrics.halstead.N2
old: 1.0
new: 9.0
path: .spaces[1].metrics.halstead.difficulty
old: 0.0
new: 5.625
path: .spaces[1].metrics.halstead.volume
old: 0.0
new: 95.90827503317318
path: .spaces[1].metrics.loc.sloc
old: 1.0
new: 4.0
path: .spaces[1].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[1].metrics.loc.ploc
old: 1.0
new: 4.0
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nexits.average
old: null
new: 1.0
path: .spaces[1].metrics.nargs.average
old: null
new: 1.0
path: .spaces[1].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[1].metrics.mi.mi_original
old: null
new: 124.58239156503284
path: .spaces[1].metrics.mi.mi_visual_studio
old: null
new: 72.85519974563324
path: .spaces[1].metrics.mi.mi_sei
old: null
new: 104.1353663603516

### Code

    nsPrinterInfo::GetPaperList(nsTArray>& aPaperList) {
      aPaperList = mPaperList.Clone();
      return NS_OK;
    }

## Minimal test - lines (152, 157)

path: .spaces[8].metrics.mi.mi_original
old: 155.2836050228807
new: 117.39641421745958
path: .spaces[8].metrics.mi.mi_visual_studio
old: 90.80912574437468
new: 68.65287381137988
path: .spaces[8].metrics.mi.mi_sei
old: 148.4278547652622
new: 93.76819247706726
path: .spaces[8].metrics.halstead.n2
old: 2.0
new: 8.0
path: .spaces[8].metrics.halstead.purity_ratio
old: 1.944234353490973
new: 1.7777777777777777
path: .spaces[8].metrics.halstead.estimated_program_length
old: 13.60964047443681
new: 48.0
path: .spaces[8].metrics.halstead.level
old: 0.4
new: 0.18181818181818185
path: .spaces[8].metrics.halstead.time
old: 2.7293728408893374
new: 33.0
path: .spaces[8].metrics.halstead.effort
old: 49.12871113600807
new: 594.0
path: .spaces[8].metrics.halstead.N2
old: 2.0
new: 11.0
path: .spaces[8].metrics.halstead.difficulty
old: 2.5
new: 5.5
path: .spaces[8].metrics.halstead.vocabulary
old: 7.0
new: 16.0
path: .spaces[8].metrics.halstead.volume
old: 19.651484454403228
new: 108.0
path: .spaces[8].metrics.halstead.N1
old: 5.0
new: 16.0
path: .spaces[8].metrics.halstead.bugs
old: 0.004471319041702271
new: 0.023554273231619065
path: .spaces[8].metrics.halstead.length
old: 7.0
new: 27.0
path: .spaces[8].metrics.halstead.n1
old: 5.0
new: 8.0
path: .spaces[8].metrics.loc.ploc
old: 1.0
new: 6.0
path: .spaces[8].metrics.loc.sloc
old: 1.0
new: 6.0
path: .spaces[8].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[8].metrics.nargs.sum
old: 0.0
new: 2.0

### Code

    NS_IMETHODIMP nsPrinterBase::GetSupportsColor(JSContext* aCx,
                                                  Promise** aResultPromise) {
      return AsyncPromiseAttributeGetter(aCx, aResultPromise,
                                         AsyncAttribute::SupportsColor,
                                         &nsPrinterBase::SupportsColor);
    }

## Minimal test - lines (87, 92)

path: .spaces[4].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[4].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[4].metrics.loc.ploc
old: 3.0
new: 6.0
path: .spaces[4].metrics.loc.sloc
old: 3.0
new: 6.0
path: .spaces[4].metrics.nargs.average
old: 3.0
new: 1.0
path: .spaces[4].metrics.nargs.sum
old: 3.0
new: 1.0
path: .spaces[4].metrics.mi.mi_sei
old: 112.94277476562348
new: 93.65905175462076
path: .spaces[4].metrics.mi.mi_original
old: 130.687221869187
new: 117.25018748494028
path: .spaces[4].metrics.mi.mi_visual_studio
old: 76.42527594689298
new: 68.56736110230426
path: .spaces[4].metrics.halstead.N2
old: 9.0
new: 11.0
path: .spaces[4].metrics.halstead.N1
old: 12.0
new: 15.0
path: .spaces[4].metrics.halstead.difficulty
old: 5.4
new: 7.857142857142857
path: .spaces[4].metrics.halstead.effort
old: 392.2995455534695
new: 835.0102661411407
path: .spaces[4].metrics.halstead.time
old: 21.79441919741497
new: 46.38945923006337
path: .spaces[4].metrics.halstead.vocabulary
old: 11.0
new: 17.0
path: .spaces[4].metrics.halstead.level
old: 0.18518518518518515
new: 0.1272727272727273
path: .spaces[4].metrics.halstead.bugs
old: 0.017863118611865587
new: 0.02955788047486927
path: .spaces[4].metrics.halstead.length
old: 21.0
new: 26.0
path: .spaces[4].metrics.halstead.estimated_program_length
old: 27.11941547876375
new: 52.87076540327685
path: .spaces[4].metrics.halstead.n2
old: 5.0
new: 7.0
path: .spaces[4].metrics.halstead.purity_ratio
old: 1.291400737083988
new: 2.0334909770491096
path: .spaces[4].metrics.halstead.volume
old: 72.64806399138324
new: 106.27403387250882
path: .spaces[4].metrics.halstead.n1
old: 6.0
new: 10.0

### Code

    inline void ImplCycleCollectionUnlink(
        EnumeratedArray& aArray) {
      for (Value& element : aArray) {
        ImplCycleCollectionUnlink(element);
      }
    }

## Minimal test - lines (166, 171)

path: .spaces[10].metrics.nargs.average
old: 3.0
new: 2.0
path: .spaces[10].metrics.nargs.sum
old: 3.0
new: 2.0
path: .spaces[10].metrics.cognitive.average
old: 7.0
new: 0.0
path: .spaces[10].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[10].metrics.cyclomatic.average
old: 5.0
new: 1.0
path: .spaces[10].metrics.cyclomatic.sum
old: 5.0
new: 1.0
path: .spaces[10].metrics.loc.lloc
old: 8.0
new: 1.0
path: .spaces[10].metrics.loc.ploc
old: 14.0
new: 6.0
path: .spaces[10].metrics.loc.sloc
old: 14.0
new: 6.0
path: .spaces[10].metrics.halstead.n2
old: 10.0
new: 8.0
path: .spaces[10].metrics.halstead.length
old: 54.0
new: 27.0
path: .spaces[10].metrics.halstead.vocabulary
old: 20.0
new: 16.0
path: .spaces[10].metrics.halstead.effort
old: 2100.457054115258
new: 594.0
path: .spaces[10].metrics.halstead.n1
old: 10.0
new: 8.0
path: .spaces[10].metrics.halstead.time
old: 116.69205856195876
new: 33.0
path: .spaces[10].metrics.halstead.purity_ratio
old: 1.2303437388471712
new: 1.7777777777777777
path: .spaces[10].metrics.halstead.level
old: 0.1111111111111111
new: 0.18181818181818185
path: .spaces[10].metrics.halstead.estimated_program_length
old: 66.43856189774725
new: 48.0
path: .spaces[10].metrics.halstead.bugs
old: 0.05467069768420645
new: 0.023554273231619065
path: .spaces[10].metrics.halstead.difficulty
old: 9.0
new: 5.5
path: .spaces[10].metrics.halstead.N1
old: 36.0
new: 16.0
path: .spaces[10].metrics.halstead.volume
old: 233.3841171239176
new: 108.0
path: .spaces[10].metrics.halstead.N2
old: 18.0
new: 11.0
path: .spaces[10].metrics.mi.mi_original
old: 98.7433057891762
new: 117.39641421745958
path: .spaces[10].metrics.mi.mi_visual_studio
old: 57.74462326852409
new: 68.65287381137988
path: .spaces[10].metrics.mi.mi_sei
old: 67.26472488803654
new: 93.76819247706726

### Code

    NS_IMETHODIMP nsPrinterBase::GetSupportsCollation(JSContext* aCx,
                                                      Promise** aResultPromise) {
      return AsyncPromiseAttributeGetter(aCx, aResultPromise,
                                         AsyncAttribute::SupportsCollation,
                                         &nsPrinterBase::SupportsCollation);
    }

## Minimal test - lines (202, 212)

path: .spaces[14].metrics.nexits.average
old: 1.0
new: 2.0
path: .spaces[14].metrics.nexits.sum
old: 1.0
new: 2.0
path: .spaces[14].metrics.cognitive.average
old: 0.0
new: 2.0
path: .spaces[14].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[14].metrics.mi.mi_original
old: 152.79727628688778
new: 102.0719814065912
path: .spaces[14].metrics.mi.mi_visual_studio
old: 89.35513233151332
new: 59.69121719683695
path: .spaces[14].metrics.mi.mi_sei
old: 144.8408406278255
new: 71.96516883460468
path: .spaces[14].metrics.cyclomatic.sum
old: 1.0
new: 4.0
path: .spaces[14].metrics.cyclomatic.average
old: 1.0
new: 4.0
path: .spaces[14].metrics.halstead.vocabulary
old: 9.0
new: 26.0
path: .spaces[14].metrics.halstead.bugs
old: 0.006944786620971931
new: 0.07913212333433817
path: .spaces[14].metrics.halstead.n2
old: 3.0
new: 12.0
path: .spaces[14].metrics.halstead.estimated_program_length
old: 20.264662506490403
new: 96.32251891746031
path: .spaces[14].metrics.halstead.level
old: 0.3333333333333333
new: 0.07453416149068323
path: .spaces[14].metrics.halstead.difficulty
old: 3.0
new: 13.416666666666666
path: .spaces[14].metrics.halstead.purity_ratio
old: 2.0264662506490403
new: 1.6607330847837989
path: .spaces[14].metrics.halstead.volume
old: 31.69925001442312
new: 272.62550365218334
path: .spaces[14].metrics.halstead.N2
old: 3.0
new: 23.0
path: .spaces[14].metrics.halstead.effort
old: 95.09775004326936
new: 3657.725507333459
path: .spaces[14].metrics.halstead.n1
old: 6.0
new: 14.0
path: .spaces[14].metrics.halstead.N1
old: 7.0
new: 35.0
path: .spaces[14].metrics.halstead.time
old: 5.2832083357371875
new: 203.20697262963665
path: .spaces[14].metrics.halstead.length
old: 10.0
new: 58.0
path: .spaces[14].metrics.loc.ploc
old: 1.0
new: 11.0
path: .spaces[14].metrics.loc.sloc
old: 1.0
new: 11.0
path: .spaces[14].metrics.loc.lloc
old: 1.0
new: 3.0

### Code

    const PaperInfo* nsPrinterBase::FindCommonPaperSize(
        const gfx::SizeDouble& aSize) const {
      for (const PaperInfo& paper : *mCommonPaperInfo) {
        if (std::abs(paper.mSize.width - aSize.width) <= kPaperSizePointsEpsilon &&
            std::abs(paper.mSize.height - aSize.height) <=
                kPaperSizePointsEpsilon) {
          return &paper;
        }
      }
      return nullptr;
    }

## Minimal test - lines (76, 84)

path: .spaces[3].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[3].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[3].metrics.nargs.sum
old: 3.0
new: 4.0
path: .spaces[3].metrics.nargs.average
old: 3.0
new: 4.0
path: .spaces[3].metrics.halstead.volume
old: 72.64806399138324
new: 230.3215461889135
path: .spaces[3].metrics.halstead.N2
old: 9.0
new: 21.0
path: .spaces[3].metrics.halstead.time
old: 21.79441919741497
new: 134.3542352768662
path: .spaces[3].metrics.halstead.effort
old: 392.2995455534695
new: 2418.3762349835915
path: .spaces[3].metrics.halstead.difficulty
old: 5.4
new: 10.5
path: .spaces[3].metrics.halstead.estimated_program_length
old: 27.11941547876375
new: 96.2114326716684
path: .spaces[3].metrics.halstead.length
old: 21.0
new: 49.0
path: .spaces[3].metrics.halstead.level
old: 0.18518518518518515
new: 0.09523809523809525
path: .spaces[3].metrics.halstead.vocabulary
old: 11.0
new: 26.0
path: .spaces[3].metrics.halstead.n2
old: 5.0
new: 13.0
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.291400737083988
new: 1.963498625952416
path: .spaces[3].metrics.halstead.n1
old: 6.0
new: 13.0
path: .spaces[3].metrics.halstead.N1
old: 12.0
new: 28.0
path: .spaces[3].metrics.halstead.bugs
old: 0.017863118611865587
new: 0.06005668036854915
path: .spaces[3].metrics.mi.mi_sei
old: 112.94277476562348
new: 78.38018601842775
path: .spaces[3].metrics.mi.mi_original
old: 130.687221869187
new: 106.65968477774416
path: .spaces[3].metrics.mi.mi_visual_studio
old: 76.42527594689298
new: 62.37408466534745
path: .spaces[3].metrics.loc.ploc
old: 3.0
new: 9.0
path: .spaces[3].metrics.loc.lloc
old: 1.0
new: 2.0
path: .spaces[3].metrics.loc.sloc
old: 3.0
new: 9.0

### Code

    inline void ImplCycleCollectionTraverse(
        nsCycleCollectionTraversalCallback& aCallback,
        EnumeratedArray& aArray, const char* aName,
        uint32_t aFlags = 0) {
      aFlags |= CycleCollectionEdgeNameArrayFlag;
      for (Value& element : aArray) {
        ImplCycleCollectionTraverse(aCallback, element, aName, aFlags);
      }
    }

## Minimal test - lines (173, 178)

path: .spaces[11].metrics.loc.ploc
old: 3.0
new: 6.0
path: .spaces[11].metrics.loc.sloc
old: 3.0
new: 6.0
path: .spaces[11].metrics.mi.mi_original
old: 136.4466010057673
new: 117.2839377794295
path: .spaces[11].metrics.mi.mi_visual_studio
old: 79.79333392150134
new: 68.58709811662543
path: .spaces[11].metrics.mi.mi_sei
old: 121.25180248456726
new: 93.6059232777044
path: .spaces[11].metrics.halstead.vocabulary
old: 8.0
new: 17.0
path: .spaces[11].metrics.halstead.difficulty
old: 3.0
new: 4.888888888888889
path: .spaces[11].metrics.halstead.estimated_program_length
old: 17.509775004326936
new: 52.529325012980806
path: .spaces[11].metrics.halstead.length
old: 8.0
new: 27.0
path: .spaces[11].metrics.halstead.n1
old: 6.0
new: 8.0
path: .spaces[11].metrics.halstead.N1
old: 6.0
new: 16.0
path: .spaces[11].metrics.halstead.volume
old: 24.0
new: 110.36149671375917
path: .spaces[11].metrics.halstead.bugs
old: 0.0057689982812296325
new: 0.022091773291324876
path: .spaces[11].metrics.halstead.level
old: 0.3333333333333333
new: 0.20454545454545453
path: .spaces[11].metrics.halstead.n2
old: 2.0
new: 9.0
path: .spaces[11].metrics.halstead.N2
old: 2.0
new: 11.0
path: .spaces[11].metrics.halstead.purity_ratio
old: 2.188721875540867
new: 1.945530556036326
path: .spaces[11].metrics.halstead.time
old: 4.0
new: 29.97472750250249
path: .spaces[11].metrics.halstead.effort
old: 72.0
new: 539.5450950450448
path: .spaces[11].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[11].metrics.nargs.average
old: 0.0
new: 2.0

### Code

    NS_IMETHODIMP nsPrinterBase::GetPrinterInfo(JSContext* aCx,
                                                Promise** aResultPromise) {
      return AsyncPromiseAttributeGetter(aCx, aResultPromise,
                                         AsyncAttribute::PrinterInfo,
                                         &nsPrinterBase::CreatePrinterInfo);
    }

## Minimal test - lines (94, 127)

path: .spaces[5].metrics.halstead.n1
old: 6.0
new: 13.0
path: .spaces[5].metrics.halstead.N1
old: 7.0
new: 91.0
path: .spaces[5].metrics.halstead.n2
old: 4.0
new: 26.0
path: .spaces[5].metrics.halstead.difficulty
old: 4.5
new: 17.0
path: .spaces[5].metrics.halstead.effort
old: 194.3327935509107
new: 14286.442197584658
path: .spaces[5].metrics.halstead.estimated_program_length
old: 23.509775004326936
new: 170.3171490075026
path: .spaces[5].metrics.halstead.length
old: 13.0
new: 159.0
path: .spaces[5].metrics.halstead.vocabulary
old: 10.0
new: 39.0
path: .spaces[5].metrics.halstead.bugs
old: 0.011183458773318396
new: 0.19625834740329823
path: .spaces[5].metrics.halstead.time
old: 10.796266308383927
new: 793.6912331991476
path: .spaces[5].metrics.halstead.purity_ratio
old: 1.808444231102072
new: 1.0711770377830352
path: .spaces[5].metrics.halstead.volume
old: 43.18506523353571
new: 840.3789527990975
path: .spaces[5].metrics.halstead.N2
old: 6.0
new: 68.0
path: .spaces[5].metrics.halstead.level
old: 0.2222222222222222
new: 0.058823529411764705
path: .spaces[5].metrics.nom.total
old: 1.0
new: 4.0
path: .spaces[5].metrics.nom.functions
old: 1.0
new: 4.0
path: .spaces[5].metrics.nargs.sum
old: 1.0
new: 12.0
path: .spaces[5].metrics.nargs.average
old: 1.0
new: 3.0
path: .spaces[5].metrics.loc.sloc
old: 1.0
new: 34.0
path: .spaces[5].metrics.loc.lloc
old: 1.0
new: 6.0
path: .spaces[5].metrics.loc.blank
old: 0.0
new: 5.0
path: .spaces[5].metrics.loc.ploc
old: 1.0
new: 29.0
path: .spaces[5].metrics.mi.mi_visual_studio
old: 88.41486984730174
new: 45.30814286221187
path: .spaces[5].metrics.mi.mi_sei
old: 142.52120506831432
new: 36.685641627248984
path: .spaces[5].metrics.mi.mi_original
old: 151.189427438886
new: 77.47692429438229
path: .spaces[5].metrics.cyclomatic.average
old: 1.0
new: 1.2
path: .spaces[5].metrics.cyclomatic.sum
old: 1.0
new: 6.0

### Code

    namespace mozilla {

    template <>
    void ResolveOrReject(Promise& aPromise, nsPrinterBase&,
                         const MarginDouble& aResult) {
      auto margin = MakeRefPtr(aResult);
      aPromise.MaybeResolve(margin);
    }

    template <>
    void ResolveOrReject(Promise& aPromise, nsPrinterBase& aPrinter,
                         const nsTArray& aResult) {
      nsTArray> result;
      result.SetCapacity(aResult.Length());
      for (const PaperInfo& info : aResult) {
        result.AppendElement(MakeRefPtr(aPrinter, info));
      }
      aPromise.MaybeResolve(result);
    }

    template <>
    void ResolveOrReject(Promise& aPromise, nsPrinterBase& aPrinter,
                         const PrintSettingsInitializer& aResult) {
      aPromise.MaybeResolve(
          RefPtr(CreatePlatformPrintSettings(aResult)));
    }

    template <>
    void ResolveOrReject(Promise& aPromise, nsPrinterBase& aPrinter,
                         const nsPrinterBase::PrinterInfo& aResult) {
      aPromise.MaybeResolve(MakeRefPtr(aPrinter, aResult));
    }

    }  // namespace mozilla

## Minimal test - lines (159, 164)

path: .spaces[9].metrics.mi.mi_visual_studio
old: 57.09100659127928
new: 68.65287381137988
path: .spaces[9].metrics.mi.mi_sei
old: 65.65224697651172
new: 93.76819247706726
path: .spaces[9].metrics.mi.mi_original
old: 97.62562127108755
new: 117.39641421745958
path: .spaces[9].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[9].metrics.loc.sloc
old: 15.0
new: 6.0
path: .spaces[9].metrics.loc.ploc
old: 14.0
new: 6.0
path: .spaces[9].metrics.loc.lloc
old: 8.0
new: 1.0
path: .spaces[9].metrics.cyclomatic.average
old: 5.0
new: 1.0
path: .spaces[9].metrics.cyclomatic.sum
old: 5.0
new: 1.0
path: .spaces[9].metrics.halstead.N2
old: 18.0
new: 11.0
path: .spaces[9].metrics.halstead.bugs
old: 0.05467069768420645
new: 0.023554273231619065
path: .spaces[9].metrics.halstead.level
old: 0.1111111111111111
new: 0.18181818181818185
path: .spaces[9].metrics.halstead.n2
old: 10.0
new: 8.0
path: .spaces[9].metrics.halstead.length
old: 54.0
new: 27.0
path: .spaces[9].metrics.halstead.time
old: 116.69205856195876
new: 33.0
path: .spaces[9].metrics.halstead.effort
old: 2100.457054115258
new: 594.0
path: .spaces[9].metrics.halstead.volume
old: 233.3841171239176
new: 108.0
path: .spaces[9].metrics.halstead.vocabulary
old: 20.0
new: 16.0
path: .spaces[9].metrics.halstead.difficulty
old: 9.0
new: 5.5
path: .spaces[9].metrics.halstead.purity_ratio
old: 1.2303437388471712
new: 1.7777777777777777
path: .spaces[9].metrics.halstead.N1
old: 36.0
new: 16.0
path: .spaces[9].metrics.halstead.estimated_program_length
old: 66.43856189774725
new: 48.0
path: .spaces[9].metrics.halstead.n1
old: 10.0
new: 8.0
path: .spaces[9].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[9].metrics.cognitive.average
old: 7.0
new: 0.0
path: .spaces[9].metrics.nargs.sum
old: 3.0
new: 2.0
path: .spaces[9].metrics.nargs.average
old: 3.0
new: 2.0

### Code

    NS_IMETHODIMP nsPrinterBase::GetSupportsMonochrome(JSContext* aCx,
                                                       Promise** aResultPromise) {
      return AsyncPromiseAttributeGetter(aCx, aResultPromise,
                                         AsyncAttribute::SupportsMonochrome,
                                         &nsPrinterBase::SupportsMonochrome);
    }

## Minimal test - lines (145, 150)

path: .spaces[7].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[7].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[7].metrics.halstead.N1
old: 12.0
new: 16.0
path: .spaces[7].metrics.halstead.length
old: 17.0
new: 27.0
path: .spaces[7].metrics.halstead.estimated_program_length
old: 31.26112492884004
new: 48.0
path: .spaces[7].metrics.halstead.n1
old: 7.0
new: 8.0
path: .spaces[7].metrics.halstead.n2
old: 5.0
new: 8.0
path: .spaces[7].metrics.halstead.N2
old: 5.0
new: 11.0
path: .spaces[7].metrics.halstead.time
old: 11.850292710717154
new: 33.0
path: .spaces[7].metrics.halstead.bugs
old: 0.011899986460347829
new: 0.023554273231619065
path: .spaces[7].metrics.halstead.volume
old: 60.94436251225965
new: 108.0
path: .spaces[7].metrics.halstead.effort
old: 213.3052687929088
new: 594.0
path: .spaces[7].metrics.halstead.level
old: 0.2857142857142857
new: 0.18181818181818185
path: .spaces[7].metrics.halstead.vocabulary
old: 12.0
new: 16.0
path: .spaces[7].metrics.halstead.difficulty
old: 3.5
new: 5.5
path: .spaces[7].metrics.halstead.purity_ratio
old: 1.838889701696473
new: 1.7777777777777777
path: .spaces[7].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[7].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[7].metrics.mi.mi_visual_studio
old: 70.25830265315135
new: 68.65287381137988
path: .spaces[7].metrics.mi.mi_original
old: 120.1416975368888
new: 117.39641421745958
path: .spaces[7].metrics.mi.mi_sei
old: 97.83061896724747
new: 93.76819247706726
path: .spaces[7].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[7].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[7].metrics.loc.lloc
old: 3.0
new: 1.0

### Code

    NS_IMETHODIMP nsPrinterBase::GetSupportsDuplex(JSContext* aCx,
                                                   Promise** aResultPromise) {
      return AsyncPromiseAttributeGetter(aCx, aResultPromise,
                                         AsyncAttribute::SupportsDuplex,
                                         &nsPrinterBase::SupportsDuplex);
    }

## Minimal test - lines (57, 63)

path: .spaces[2].metrics.halstead.estimated_program_length
old: null
new: 66.43856189774725
path: .spaces[2].metrics.halstead.bugs
old: 0.0
new: 0.03486426967756468
path: .spaces[2].metrics.halstead.purity_ratio
old: null
new: 2.0132897544771895
path: .spaces[2].metrics.halstead.N1
old: 0.0
new: 18.0
path: .spaces[2].metrics.halstead.vocabulary
old: 1.0
new: 20.0
path: .spaces[2].metrics.halstead.N2
old: 1.0
new: 15.0
path: .spaces[2].metrics.halstead.volume
old: 0.0
new: 142.62362713128297
path: .spaces[2].metrics.halstead.length
old: 1.0
new: 33.0
path: .spaces[2].metrics.halstead.n1
old: 0.0
new: 10.0
path: .spaces[2].metrics.halstead.level
old: null
new: 0.13333333333333333
path: .spaces[2].metrics.halstead.n2
old: 1.0
new: 10.0
path: .spaces[2].metrics.halstead.difficulty
old: 0.0
new: 7.5
path: .spaces[2].metrics.halstead.effort
old: 0.0
new: 1069.6772034846224
path: .spaces[2].metrics.halstead.time
old: 0.0
new: 59.42651130470124
path: .spaces[2].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[2].metrics.nargs.average
old: null
new: 1.0
path: .spaces[2].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[2].metrics.mi.mi_sei
old: null
new: 88.07929047862262
path: .spaces[2].metrics.mi.mi_visual_studio
old: null
new: 66.34688177588062
path: .spaces[2].metrics.mi.mi_original
old: null
new: 113.45316783675584
path: .spaces[2].metrics.loc.ploc
old: 1.0
new: 7.0
path: .spaces[2].metrics.loc.sloc
old: 1.0
new: 7.0
path: .spaces[2].metrics.loc.lloc
old: 0.0
new: 4.0
path: .spaces[2].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[2].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[2].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[2].metrics.nexits.average
old: null
new: 1.0

### Code

    nsPrinterInfo::GetDefaultSettings(nsIPrintSettings** aDefaultSettings) {
      NS_ENSURE_ARG_POINTER(aDefaultSettings);
      MOZ_ASSERT(mDefaultSettings);
      RefPtr settings = mDefaultSettings;
      settings.forget(aDefaultSettings);
      return NS_OK;
    }

## Minimal test - lines (180, 184)

path: .spaces[12].metrics.mi.mi_sei
old: 98.28542574174926
new: 97.44440779997328
path: .spaces[12].metrics.mi.mi_original
old: 120.45694557033428
new: 119.94457250366315
path: .spaces[12].metrics.mi.mi_visual_studio
old: 70.44265822826566
new: 70.14302485594337
path: .spaces[12].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[12].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[12].metrics.halstead.n2
old: 5.0
new: 9.0
path: .spaces[12].metrics.halstead.level
old: 0.2857142857142857
new: 0.18181818181818185
path: .spaces[12].metrics.halstead.bugs
old: 0.011428621282029669
new: 0.024811025885586473
path: .spaces[12].metrics.halstead.difficulty
old: 3.5
new: 5.5
path: .spaces[12].metrics.halstead.vocabulary
old: 12.0
new: 18.0
path: .spaces[12].metrics.halstead.purity_ratio
old: 1.9538203080525025
new: 2.0378089294986292
path: .spaces[12].metrics.halstead.volume
old: 57.3594000115385
new: 116.75790004038474
path: .spaces[12].metrics.halstead.N1
old: 11.0
new: 17.0
path: .spaces[12].metrics.halstead.time
old: 11.153216668910265
new: 35.676025012339785
path: .spaces[12].metrics.halstead.n1
old: 7.0
new: 9.0
path: .spaces[12].metrics.halstead.length
old: 16.0
new: 28.0
path: .spaces[12].metrics.halstead.effort
old: 200.75790004038475
new: 642.1684502221161
path: .spaces[12].metrics.halstead.estimated_program_length
old: 31.26112492884004
new: 57.05865002596162
path: .spaces[12].metrics.halstead.N2
old: 5.0
new: 11.0
path: .spaces[12].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[12].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[12].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[12].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[12].metrics.loc.ploc
old: 6.0
new: 5.0
path: .spaces[12].metrics.loc.sloc
old: 6.0
new: 5.0
path: .spaces[12].metrics.loc.lloc
old: 3.0
new: 1.0

### Code

    void nsPrinterBase::QueryMarginsForPaper(Promise& aPromise,
                                             const nsString& aPaperId) {
      return SpawnPrintBackgroundTask(*this, aPromise, "MarginsForPaper"_ns,
                                      &nsPrinterBase::GetMarginsForPaper, aPaperId);
    }