#fixed code
                                @Override
    public Result<Account> importAccount(String prikey, String password) {
        if (!ECKey.isValidPrivteHex(prikey)) {
            return Result.getFailed(AccountErrorCode.PARAMETER_ERROR);
        }
        Account account;
        try {
            account = AccountTool.createAccount(prikey);
        } catch (NulsException e) {
            return Result.getFailed(AccountErrorCode.FAILED);
        }
        if (StringUtils.validPassword(password)) {
            try {
                account.encrypt(password);
            } catch (NulsException e) {
                Log.error(e);
            }
        }
        AccountPo po = new AccountPo(account);
        accountStorageService.saveAccount(po);
        LOCAL_ADDRESS_LIST.add(account.getAddress().toString());
        accountLedgerService.importAccountLedger(account.getAddress().getBase58());
        return Result.getSuccess().setData(account);
    }
#vulnerable code 
                                @Override
    public Result<Account> importAccount(String prikey, String password) {
        if (!ECKey.isValidPrivteHex(prikey)) {
            return Result.getFailed(AccountErrorCode.PARAMETER_ERROR);
        }
        Account account;
        try {
            account = AccountTool.createAccount(prikey);
        } catch (NulsException e) {
            return Result.getFailed(AccountErrorCode.FAILED);
        }
        Account accountDB = getAccountByAddress(account.getAddress().toString());
        if (null != accountDB) {
            return Result.getFailed(AccountErrorCode.ACCOUNT_EXIST);
        }
        if (StringUtils.validPassword(password)) {
            try {
                account.encrypt(password);
            } catch (NulsException e) {
                Log.error(e);
            }
        }
        AccountPo po = new AccountPo(account);
        accountStorageService.saveAccount(po);
        LOCAL_ADDRESS_LIST.add(account.getAddress().toString());
        accountLedgerService.importAccountLedger(account.getAddress().getBase58());
        return Result.getSuccess().setData(account);
    } 
                            #location 18 
                            #vulnerability type THREAD_SAFETY_VIOLATION