The code has almost nothing in common with Ripple. Both Ripple and NEM are codes written 100% from scratch though. One thing special about NEM is it is written in Java and was written with test driven development by industry professionals from day one.
NEM is a blockchain that uses a PoI consensus algo, which is more similar to PoS but has added the history of an accounts actions as an additional factor. NEM has one minute block times and can handle right now about 2 tx/s.
Mijin is a private fork of NEM, so it is a permission blockchain. Think of like having your own little private Dash testnet where you and a group of your friends equally control all the masternodes. Mijin has been configured for 15 second blocks and at least 100 tx/s (maybe the devs have that up to 1000 tx/s but I need to confirm that). The Mijin blockchain doesn't just offer a currency token. It offers a naming system for reputation of businesses, assets that can be configured by quantity fixed or editable, descriptions, transferring rights between issuer and only 2nd party or with any 3rd parties, messaging in unencrypted, encrypted, or hex format, taxes on specific assets made to any address in fixed or percentage amounts. In addition to that it has advanced blockchain based editable multisig with notifications pushed by the network to the wallet, and a ton of other security features.
So the Mijin fork is actually very different from Ripple. I just used Ripple as an example because they have signed deals with many banks, but unlike NEM, started off with a lot of VC money from Google. But in someways, Mijin with its advanced features could perform many of the same functions as Ripple and then some once the exchange aspect of NEM is finished being coded. So in utility Mijin could do many of the same things, but Ripple is a ledger, not a blockchain, where as NEM is most definitely a blockchain.
The one thing that makes the Mijin/NEM combination from Ripple or Bitcoin is that once a bank or business builds an app for one, they can use the same APIs to access the other. The Mijin private forks are designed for speed and security and all businesses deploying them to have a full control over their blockchain, assets, and trading partner. But in building their platforms, those exact same APIs can be used to access the open, decentralized and public NEM blockchain. Businesses now are getting 2 for the price of 1. They have the ability in a private ledger to trade with special trusted partners, or can also trade on the NEM chain with anybody, anywhere in the world.