# Global Metrics

path: .metrics.nom.functions
old: 14.0
new: 4.0
path: .metrics.nom.total
old: 14.0
new: 4.0
path: .metrics.mi.mi_sei
old: -5.239744627682782
new: 29.183741565874392
path: .metrics.mi.mi_original
old: 20.620927175896867
new: 59.038375271989736
path: .metrics.mi.mi_visual_studio
old: 12.059021740290566
new: 34.52536565613435
path: .metrics.nargs.average
old: 6.357142857142857
new: 2.5
path: .metrics.nargs.sum
old: 89.0
new: 10.0
path: .metrics.halstead.bugs
old: 2.786674542799984
new: 0.4176817579491297
path: .metrics.halstead.N1
old: 889.0
new: 229.0
path: .metrics.halstead.estimated_program_length
old: 621.3669386801487
new: 229.1368500605771
path: .metrics.halstead.n2
old: 83.0
new: 36.0
path: .metrics.halstead.volume
old: 10003.75649918465
new: 2016.1714627603376
path: .metrics.halstead.level
old: 0.013087354146956796
new: 0.045454545454545456
path: .metrics.halstead.purity_ratio
old: 0.41618683099809023
new: 0.6347281165112939
path: .metrics.halstead.vocabulary
old: 104.0
new: 48.0
path: .metrics.halstead.N2
old: 604.0
new: 132.0
path: .metrics.halstead.length
old: 1493.0
new: 361.0
path: .metrics.halstead.difficulty
old: 76.40963855421687
new: 22.0
path: .metrics.halstead.effort
old: 764383.418287097
new: 44355.77218072742
path: .metrics.halstead.time
old: 42465.745460394275
new: 2464.209565595968
path: .metrics.halstead.n1
old: 21.0
new: 12.0
path: .metrics.loc.blank
old: 38.0
new: 11.0
path: .metrics.loc.sloc
old: 381.0
new: 79.0
path: .metrics.loc.lloc
old: 73.0
new: 12.0
path: .metrics.loc.ploc
old: 225.0
new: 63.0
path: .metrics.loc.cloc
old: 118.0
new: 5.0
path: .metrics.cognitive.sum
old: 20.0
new: 0.0
path: .metrics.cognitive.average
old: 1.4285714285714286
new: 0.0
path: .metrics.cyclomatic.average
old: 1.8
new: 1.0
path: .metrics.cyclomatic.sum
old: 27.0
new: 7.0

# Spaces Data

## Minimal test - lines (13, 77)

path: .spaces[0].metrics.mi.mi_original
old: 75.34776254928758
new: 62.57371832024715
path: .spaces[0].metrics.mi.mi_sei
old: 54.86011332590867
new: 15.184860275017442
path: .spaces[0].metrics.mi.mi_visual_studio
old: 44.0630190346711
new: 36.59281773113869
path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 6.0
path: .spaces[0].metrics.cyclomatic.average
old: 5.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 7.0
new: 2.5
path: .spaces[0].metrics.nargs.sum
old: 7.0
new: 10.0
path: .spaces[0].metrics.halstead.vocabulary
old: 40.0
new: 45.0
path: .spaces[0].metrics.halstead.N1
old: 119.0
new: 229.0
path: .spaces[0].metrics.halstead.level
old: 0.033950617283950615
new: 0.04296875
path: .spaces[0].metrics.halstead.effort
old: 29940.19983854632
new: 45628.31256179651
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.906629034743362
new: 0.5867914732422489
path: .spaces[0].metrics.halstead.n1
old: 18.0
new: 12.0
path: .spaces[0].metrics.halstead.bugs
old: 0.32140197546507465
new: 0.4256327305511126
path: .spaces[0].metrics.halstead.n2
old: 22.0
new: 33.0
path: .spaces[0].metrics.halstead.time
old: 1663.3444354747955
new: 2534.9062534331397
path: .spaces[0].metrics.halstead.volume
old: 1016.4882661234864
new: 1960.591555389694
path: .spaces[0].metrics.halstead.estimated_program_length
old: 173.16614563598216
new: 209.48455594748285
path: .spaces[0].metrics.halstead.N2
old: 72.0
new: 128.0
path: .spaces[0].metrics.halstead.difficulty
old: 29.454545454545453
new: 23.272727272727273
path: .spaces[0].metrics.halstead.length
old: 191.0
new: 357.0
path: .spaces[0].metrics.loc.sloc
old: 37.0
new: 65.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 7.0
path: .spaces[0].metrics.loc.cloc
old: 3.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 30.0
new: 58.0
path: .spaces[0].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 7.0
new: 0.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 4.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 4.0

### Code

    namespace mozilla {
    class WebAuthnTokenManager final
        : public java::WebAuthnTokenManager::Natives {
     public:
      static void WebAuthnMakeCredentialFinish(
          jni::ByteArray::Param aClientDataJson, jni::ByteArray::Param aKeyHandle,
          jni::ByteArray::Param aAttestationObject) {
        mozilla::dom::AndroidWebAuthnResult result;

        result.mClientDataJSON.Assign(
            reinterpret_cast(
                aClientDataJson->GetElements().Elements()),
            aClientDataJson->Length());
        result.mKeyHandle.Assign(
            reinterpret_cast(aKeyHandle->GetElements().Elements()),
            aKeyHandle->Length());
        result.mAttObj.Assign(reinterpret_cast(
                                  aAttestationObject->GetElements().Elements()),
                              aAttestationObject->Length());

        mozilla::dom::AndroidWebAuthnTokenManager::GetInstance()
            ->HandleRegisterResult(std::move(result));
      }

      static void WebAuthnMakeCredentialReturnError(jni::String::Param aErrorCode) {
        mozilla::dom::AndroidWebAuthnResult result(aErrorCode->ToString());
        mozilla::dom::AndroidWebAuthnTokenManager::GetInstance()
            ->HandleRegisterResult(std::move(result));
      }

      static void WebAuthnGetAssertionFinish(jni::ByteArray::Param aClientDataJson,
                                             jni::ByteArray::Param aKeyHandle,
                                             jni::ByteArray::Param aAuthData,
                                             jni::ByteArray::Param aSignature,
                                             jni::ByteArray::Param aUserHandle) {
        mozilla::dom::AndroidWebAuthnResult result;

        result.mClientDataJSON.Assign(
            reinterpret_cast(
                aClientDataJson->GetElements().Elements()),
            aClientDataJson->Length());
        result.mKeyHandle.Assign(
            reinterpret_cast(aKeyHandle->GetElements().Elements()),
            aKeyHandle->Length());
        result.mAuthData.Assign(
            reinterpret_cast(aAuthData->GetElements().Elements()),
            aAuthData->Length());
        result.mSignature.Assign(
            reinterpret_cast(aSignature->GetElements().Elements()),
            aSignature->Length());
        result.mUserHandle.Assign(
            reinterpret_cast(aUserHandle->GetElements().Elements()),
            aUserHandle->Length());

        mozilla::dom::AndroidWebAuthnTokenManager::GetInstance()->HandleSignResult(
            std::move(result));
      }

      static void WebAuthnGetAssertionReturnError(jni::String::Param aErrorCode) {
        mozilla::dom::AndroidWebAuthnResult result(aErrorCode->ToString());
        mozilla::dom::AndroidWebAuthnTokenManager::GetInstance()->HandleSignResult(
            std::move(result));
      }
    };
    }  // namespace mozilla