/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobId
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobResult
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobStillActiveException
 *  com.l7tech.gateway.common.AsyncAdminMethods$UnknownJobException
 *  com.l7tech.gateway.common.audit.AdminMessages
 *  com.l7tech.gateway.common.audit.AuditAdmin
 *  com.l7tech.gateway.common.audit.AuditAdmin$DownloadChunk
 *  com.l7tech.gateway.common.audit.AuditDetail
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.AuditPolicyException
 *  com.l7tech.gateway.common.audit.AuditRecord
 *  com.l7tech.gateway.common.audit.AuditRecordHeader
 *  com.l7tech.gateway.common.audit.AuditSearchCriteria
 *  com.l7tech.gateway.common.audit.AuditViewerPolicyNotAvailableException
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditRecord
 *  com.l7tech.gateway.common.cluster.ClusterProperty
 *  com.l7tech.gateway.common.uddi.UDDIPublishStatus
 *  com.l7tech.gateway.common.uddi.UDDIServiceControlRuntime
 *  com.l7tech.identity.fed.FederatedGroupMembership
 *  com.l7tech.identity.internal.InternalGroupMembership
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.util.Background
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.OpaqueId
 *  com.l7tech.util.Pair
 *  jakarta.persistence.metamodel.EntityType
 *  org.apache.commons.collections.map.LRUMap
 *  org.hibernate.SessionFactory
 *  org.springframework.beans.BeansException
 *  org.springframework.beans.factory.InitializingBean
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationContextAware
 *  org.springframework.context.ApplicationEvent
 */
package com.l7tech.server.audit;

import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.audit.AdminMessages;
import com.l7tech.gateway.common.audit.AuditAdmin;
import com.l7tech.gateway.common.audit.AuditDetail;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.AuditPolicyException;
import com.l7tech.gateway.common.audit.AuditRecord;
import com.l7tech.gateway.common.audit.AuditRecordHeader;
import com.l7tech.gateway.common.audit.AuditSearchCriteria;
import com.l7tech.gateway.common.audit.AuditViewerPolicyNotAvailableException;
import com.l7tech.gateway.common.audit.MessageSummaryAuditRecord;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.gateway.common.uddi.UDDIPublishStatus;
import com.l7tech.gateway.common.uddi.UDDIServiceControlRuntime;
import com.l7tech.identity.fed.FederatedGroupMembership;
import com.l7tech.identity.internal.InternalGroupMembership;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.GatewayKeyAccessFilter;
import com.l7tech.server.PersistenceEventInterceptor;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.admin.AsyncAdminMethodsImpl;
import com.l7tech.server.audit.AuditArchiver;
import com.l7tech.server.audit.AuditDownloadManager;
import com.l7tech.server.audit.AuditFilterPolicyManager;
import com.l7tech.server.audit.AuditLookupPolicyEvaluator;
import com.l7tech.server.audit.AuditRecordManager;
import com.l7tech.server.audit.Auditor;
import com.l7tech.server.audit.DefaultAuditThresholds;
import com.l7tech.server.audit.ap;
import com.l7tech.server.audit.aq;
import com.l7tech.server.audit.ar;
import com.l7tech.server.audit.as;
import com.l7tech.server.audit.at;
import com.l7tech.server.audit.b;
import com.l7tech.server.audit.d;
import com.l7tech.server.audit.e;
import com.l7tech.server.audit.f;
import com.l7tech.server.audit.g;
import com.l7tech.server.audit.i;
import com.l7tech.server.cluster.ClusterPropertyManager;
import com.l7tech.server.event.AdminInfo;
import com.l7tech.server.event.admin.AdminEvent;
import com.l7tech.server.event.admin.AuditViewGatewayAuditsData;
import com.l7tech.server.security.rbac.SecurityFilter;
import com.l7tech.server.security.sharedkey.SharedKeyRecord;
import com.l7tech.server.sla.CounterRecord;
import com.l7tech.util.Background;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.OpaqueId;
import com.l7tech.util.Pair;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimerTask;
import java.util.concurrent.FutureTask;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.collections.map.LRUMap;
import org.hibernate.SessionFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEvent;

public class AuditAdminImpl
extends AsyncAdminMethodsImpl
implements AuditAdmin,
InitializingBean,
ApplicationContextAware {
    private static final Logger e;
    private static final String f;
    private static final int g;
    private static final String h;
    private static final int i;
    private static final long j;
    private static final Collection<String> k;
    private final LRUMap l = new LRUMap(ConfigFactory.getIntProperty((String)B[42], (int)100));
    private AuditDownloadManager m;
    private AuditRecordManager n;
    private AuditLookupPolicyEvaluator o;
    private SecurityFilter p;
    private Config q;
    private ClusterPropertyManager r;
    private AuditArchiver s;
    private ApplicationContext t;
    private AuditFilterPolicyManager u;
    private GatewayKeyAccessFilter v;
    private PersistenceEventInterceptor w;
    private SessionFactory x;
    private Auditor y;
    private static final String z;
    private static final String[] B;

    public AuditAdminImpl() {
        Background.scheduleRepeated((TimerTask)new ap(this), (long)i, (long)j);
    }

    public void setAuditDownloadManager(AuditDownloadManager auditDownloadManager) {
        this.m = auditDownloadManager;
    }

    public void setAuditRecordManager(AuditRecordManager auditRecordManager) {
        this.n = auditRecordManager;
    }

    public void setAuditLookupPolicyEvaluator(AuditLookupPolicyEvaluator auditLookupPolicyEvaluator) {
        this.o = auditLookupPolicyEvaluator;
    }

    public void setSecurityFilter(SecurityFilter securityFilter) {
        this.p = securityFilter;
    }

    public void setServerConfig(Config config) {
        this.q = config;
    }

    public void setClusterPropertyManager(ClusterPropertyManager clusterPropertyManager) {
        this.r = clusterPropertyManager;
    }

    public void setAuditArchiver(AuditArchiver auditArchiver) {
        this.s = auditArchiver;
    }

    public void setPersistenceEventInterceptor(PersistenceEventInterceptor persistenceEventInterceptor) {
        this.w = persistenceEventInterceptor;
    }

    public void setSessionFactory(SessionFactory sessionFactory) {
        this.x = sessionFactory;
    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.t = applicationContext;
        this.y = new Auditor(this, applicationContext, e);
    }

    public AuditRecord findByPrimaryKey(String string, boolean bl2) throws FindException {
        if (bl2) {
            try {
                Goid goid = Goid.parseGoid((String)string);
                return (AuditRecord)this.n.findByPrimaryKey(goid);
            }
            catch (NumberFormatException numberFormatException) {
                throw new FindException(B[54] + string, (Throwable)numberFormatException);
            }
        }
        return this.o.findByGuid(string);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void a(AuditSearchCriteria auditSearchCriteria) {
        boolean bl2;
        Object object;
        AdminInfo adminInfo = AdminInfo.find();
        LRUMap lRUMap = this.l;
        synchronized (lRUMap) {
            object = (i)this.l.get((Object)adminInfo.getIdentityHeader());
            if (object != null) {
                bl2 = object.isNewCriteria(auditSearchCriteria);
            } else {
                this.l.put((Object)adminInfo.getIdentityHeader(), (Object)new i(this, adminInfo, auditSearchCriteria));
                bl2 = true;
            }
        }
        if (bl2) {
            lRUMap = auditSearchCriteria.getAuditQueryDetails();
            this.y.logAndAudit((AuditDetailMessage)AdminMessages.AUDIT_SEARCH_CRITERIA_FULL_DETAILS, (String)lRUMap.right);
            object = new AuditViewGatewayAuditsData(this, (String)lRUMap.left);
            this.t.publishEvent((ApplicationEvent)object);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void b() {
        LRUMap lRUMap = this.l;
        synchronized (lRUMap) {
            Iterator iterator = this.l.entrySet().iterator();
            while (iterator.hasNext()) {
                Map.Entry entry = (Map.Entry)iterator.next();
                i i2 = (i)entry.getValue();
                try {
                    if (!i2.isStale()) continue;
                    iterator.remove();
                }
                catch (NumberFormatException numberFormatException) {
                    throw AuditAdminImpl.a(numberFormatException);
                }
            }
        }
    }

    public AsyncAdminMethods.JobId<AuditRecordHeader[]> findHeaders(AuditSearchCriteria auditSearchCriteria) throws FindException {
        FutureTask<AuditRecordHeader[]> futureTask = new FutureTask<AuditRecordHeader[]>(AdminInfo.find(false).wrapCallable(new d(this, auditSearchCriteria)));
        Background.scheduleOneShot((TimerTask)new ar(this, futureTask), (long)0L);
        return this.registerJob(futureTask, AuditRecordHeader[].class);
    }

    public String getFindHeadersJobStatus(AsyncAdminMethods.JobId<AuditRecordHeader[]> jobId) {
        return super.getJobStatus(jobId);
    }

    public AuditRecordHeader[] getFindHeadersHeaderJobResult(AsyncAdminMethods.JobId<AuditRecordHeader[]> jobId) throws FindException, AsyncAdminMethods.UnknownJobException, AsyncAdminMethods.JobStillActiveException {
        AsyncAdminMethods.JobResult<AuditRecordHeader[]> jobResult = super.getJobResult(jobId);
        try {
            if (jobResult.result == null) {
                throw new FindException(jobResult.throwableMessage);
            }
        }
        catch (FindException findException) {
            throw AuditAdminImpl.a((Exception)((Object)findException));
        }
        return (AuditRecordHeader[])jobResult.result;
    }

    public Map<String, Pair<byte[], byte[]>> getDigestsForAuditRecords(Collection<String> collection, boolean bl2) throws FindException {
        try {
            if (bl2) {
                return this.o.getDigestForAuditRecords(collection);
            }
        }
        catch (FindException findException) {
            throw AuditAdminImpl.a((Exception)((Object)findException));
        }
        return this.n.getDigestForAuditRecords(collection);
    }

    public AsyncAdminMethods.JobId<Long> hasNewAudits(Date date, Level level) {
        FutureTask<Long> futureTask = new FutureTask<Long>(AdminInfo.find(false).wrapCallable(new e(this, date, level)));
        Background.scheduleOneShot((TimerTask)new as(this, futureTask), (long)0L);
        return this.registerJob(futureTask, Long.class);
    }

    public AsyncAdminMethods.JobResult<Long> getNewAuditsJobResult(AsyncAdminMethods.JobId<Long> jobId) throws AsyncAdminMethods.JobStillActiveException, AsyncAdminMethods.UnknownJobException {
        return super.getJobResult(jobId);
    }

    public String getNewAuditsJobStatus(AsyncAdminMethods.JobId<Long> jobId) {
        return super.getJobStatus(jobId);
    }

    public void deleteOldAuditRecords() throws DeleteException {
        this.n.deleteOldAuditRecords(-1L);
    }

    public void doAuditArchive() {
        try {
            if (this.s == null) {
                throw new NullPointerException(B[8]);
            }
        }
        catch (NumberFormatException numberFormatException) {
            throw AuditAdminImpl.a(numberFormatException);
        }
        this.s.runNow();
    }

    public boolean isAuditArchiveEnabled() {
        return this.s.isEnabled();
    }

    public ClusterProperty getFtpAuditArchiveConfig() {
        ClusterProperty clusterProperty;
        ClusterProperty clusterProperty2 = null;
        try {
            String[] stringArray = B;
            clusterProperty2 = (ClusterProperty)this.r.findByUniqueName(stringArray[63]);
        }
        catch (FindException findException) {
            String[] stringArray = B;
            e.log(Level.WARNING, stringArray[20] + findException.getMessage(), ExceptionUtils.getDebugException((Throwable)findException));
        }
        try {
            clusterProperty = clusterProperty2 != null ? clusterProperty2 : new ClusterProperty(B[63], null);
        }
        catch (FindException findException) {
            throw AuditAdminImpl.a((Exception)((Object)findException));
        }
        return clusterProperty;
    }

    /*
     * Loose catch block
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public void setFtpAuditArchiveConfig(ClusterProperty clusterProperty) throws UpdateException {
        block11: {
            ClusterProperty clusterProperty2;
            block10: {
                if (clusterProperty == null) throw new UpdateException(B[0] + String.valueOf(clusterProperty));
                try {
                    if (B[71].equals(clusterProperty.getName())) break block10;
                    throw new UpdateException(B[0] + String.valueOf(clusterProperty));
                    catch (FindException findException) {
                        throw AuditAdminImpl.a((Exception)((Object)findException));
                    }
                }
                catch (FindException findException) {
                    throw AuditAdminImpl.a((Exception)((Object)findException));
                }
            }
            try {
                clusterProperty2 = (ClusterProperty)this.r.findByUniqueName(B[63]);
            }
            catch (FindException findException) {
                clusterProperty2 = null;
            }
            try {
                if (clusterProperty2 == null) break block11;
                clusterProperty.setGoid(clusterProperty2.getGoid());
                this.r.update((PersistentEntity)clusterProperty);
                return;
            }
            catch (FindException findException) {
                throw AuditAdminImpl.a((Exception)((Object)findException));
            }
        }
        try {
            this.r.save((PersistentEntity)clusterProperty);
            return;
        }
        catch (SaveException saveException) {
            throw new UpdateException((Throwable)saveException);
        }
    }

    public void setAuditFilterPolicyManager(AuditFilterPolicyManager auditFilterPolicyManager) {
        this.u = auditFilterPolicyManager;
    }

    public void setKeyAccessFilter(GatewayKeyAccessFilter gatewayKeyAccessFilter) {
        this.v = gatewayKeyAccessFilter;
    }

    public void afterPropertiesSet() throws Exception {
        this.c();
    }

    private void c() {
        try {
            if (this.n == null) {
                throw new IllegalArgumentException(B[1]);
            }
        }
        catch (NumberFormatException numberFormatException) {
            throw AuditAdminImpl.a(numberFormatException);
        }
    }

    public OpaqueId downloadAllAudits(long l2, long l3, Goid[] goidArray, int n2) {
        try {
            return this.m.createDownloadContext(l2, l3, goidArray);
        }
        catch (IOException iOException) {
            throw new RuntimeException(B[25], iOException);
        }
    }

    public AuditAdmin.DownloadChunk downloadNextChunk(OpaqueId opaqueId) {
        AuditAdmin.DownloadChunk downloadChunk = null;
        byte[] byArray = this.m.nextDownloadChunk(opaqueId);
        if (byArray != null) {
            long l2 = this.m.getEstimatedTotalAudits(opaqueId);
            long l3 = this.m.getDownloadedAuditCount(opaqueId);
            downloadChunk = new AuditAdmin.DownloadChunk(l3, l2, byArray);
        }
        return downloadChunk;
    }

    public Date getLastAcknowledgedAuditDate() {
        Date date = null;
        String string = null;
        try {
            String[] stringArray = B;
            ClusterProperty clusterProperty = (ClusterProperty)this.r.findByUniqueName(stringArray[21]);
            if (clusterProperty != null) {
                string = clusterProperty.getValue();
                date = new Date(Long.parseLong(string));
            }
        }
        catch (FindException findException) {
            String[] stringArray = B;
            e.log(Level.WARNING, stringArray[33] + findException.getMessage() + stringArray[13], ExceptionUtils.getDebugException((Throwable)findException));
        }
        catch (NumberFormatException numberFormatException) {
            String[] stringArray = B;
            e.log(Level.WARNING, stringArray[40] + string + stringArray[13], ExceptionUtils.getDebugException((Throwable)numberFormatException));
        }
        return date;
    }

    public Date markLastAcknowledgedAuditDate() {
        Date date = new Date();
        String string = Long.toString(date.getTime());
        try {
            String[] stringArray = B;
            ClusterProperty clusterProperty = (ClusterProperty)this.r.findByUniqueName(stringArray[6]);
            if (clusterProperty == null) {
                clusterProperty = new ClusterProperty(stringArray[21], string);
                this.r.save((PersistentEntity)clusterProperty);
            } else {
                clusterProperty.setValue(string);
                this.r.update((PersistentEntity)clusterProperty);
            }
        }
        catch (FindException findException) {
            String[] stringArray = B;
            e.log(Level.WARNING, stringArray[47] + findException.getMessage() + stringArray[50], ExceptionUtils.getDebugException((Throwable)findException));
        }
        catch (SaveException saveException) {
            String[] stringArray = B;
            e.log(Level.WARNING, stringArray[2], saveException);
        }
        catch (UpdateException updateException) {
            e.log(Level.WARNING, B[57], updateException);
        }
        return date;
    }

    public int getSystemLogRefresh() {
        int n2 = 0;
        int n3 = 3;
        String[] stringArray = B;
        String string = this.q.getProperty(stringArray[69]);
        if (string != null) {
            try {
                n2 = Integer.parseInt(string);
            }
            catch (NumberFormatException numberFormatException) {
                n2 = n3;
                stringArray = B;
                e.warning(stringArray[34] + string + stringArray[62] + n3 + stringArray[13]);
            }
        } else {
            n2 = n3;
        }
        return n2;
    }

    public Level serverMessageAuditThreshold() {
        String[] stringArray = B;
        return this.a(stringArray[55], stringArray[3], DefaultAuditThresholds.DEFAULT_MESSAGE_THRESHOLD);
    }

    public Level serverDetailAuditThreshold() {
        String[] stringArray = B;
        return this.a(stringArray[11], stringArray[12], DefaultAuditThresholds.DEFAULT_ASSOCIATED_LOGS_THRESHOLD);
    }

    private Level a(String string, String string2, Level level) {
        String string3 = this.q.getProperty(string);
        Level level2 = null;
        if (string3 != null) {
            try {
                level2 = Level.parse(string3);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                String string4 = level.getName();
                String string5 = string3;
                String string6 = string2;
                String[] stringArray = B;
                e.warning(stringArray[72] + string6 + stringArray[41] + string5 + stringArray[64] + string4 + stringArray[31]);
            }
        }
        if (level2 == null) {
            level2 = level;
        }
        return level2;
    }

    public int serverMinimumPurgeAge() {
        String[] stringArray = B;
        String string = this.q.getProperty(stringArray[51]);
        int n2 = 168;
        try {
            return Integer.valueOf(string);
        }
        catch (NumberFormatException numberFormatException) {
            stringArray = B;
            throw new RuntimeException(stringArray[66] + string + stringArray[60] + n2 + stringArray[19]);
        }
    }

    public boolean isSigningEnabled() throws FindException {
        String string = this.r.getProperty(B[39]);
        return Boolean.valueOf(string);
    }

    public int getMaxDigestRecords() {
        return this.n.getAuditValidatedConfig().getIntProperty(B[37], 100);
    }

    public boolean isAuditViewerPolicyAvailable() {
        return this.u.isAuditViewerPolicyAvailable();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public String invokeAuditViewerPolicyForMessage(Goid goid, boolean bl2) throws FindException, AuditViewerPolicyNotAvailableException {
        ArrayList<Pair<Level, String>> arrayList = new ArrayList<Pair<Level, String>>();
        try {
            String[] stringArray;
            String string;
            Object[] objectArray;
            String string2;
            Level level;
            Pair pair;
            Pair pair2;
            ArrayList<Pair<Level, String>> arrayList2;
            block10: {
                block9: {
                    try {
                        Pair pair3;
                        arrayList2 = arrayList;
                        pair2 = pair3;
                        pair = pair3;
                        level = Level.INFO;
                        string2 = B[35];
                        Object[] objectArray2 = new Object[2];
                        objectArray2[0] = String.valueOf(goid);
                        Object[] objectArray3 = objectArray2;
                        objectArray = objectArray2;
                        int n2 = 1;
                        if (!bl2) break block9;
                        string = B[4];
                        break block10;
                    }
                    catch (FindException findException) {
                        throw AuditAdminImpl.a((Exception)((Object)findException));
                    }
                }
                stringArray = B;
                string = stringArray[30];
            }
            stringArray = B;
            objectArray3[n2] = string + stringArray[15];
            pair2((Object)level, (Object)MessageFormat.format(string2, objectArray));
            arrayList2.add((Pair<Level, String>)pair);
            AuditRecord auditRecord = (AuditRecord)this.n.findByPrimaryKey(goid);
            if (auditRecord == null) {
                String string3 = stringArray[16] + String.valueOf(goid);
                this.a(arrayList, string3);
                String string4 = null;
                return string4;
            }
            if (!(auditRecord instanceof MessageSummaryAuditRecord)) {
                String string5 = B[73] + String.valueOf(goid);
                this.a(arrayList, string5);
                String string6 = null;
                return string6;
            }
            MessageSummaryAuditRecord messageSummaryAuditRecord = (MessageSummaryAuditRecord)auditRecord;
            String string7 = bl2 ? messageSummaryAuditRecord.getRequestXml() : messageSummaryAuditRecord.getResponseXml();
            String string8 = this.a(string7, bl2, arrayList);
            return string8;
        }
        finally {
            this.a(arrayList);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public String invokeAuditViewerPolicyForMessage(String string, String string2, boolean bl2) throws AuditViewerPolicyNotAvailableException {
        ArrayList<Pair<Level, String>> arrayList = new ArrayList<Pair<Level, String>>();
        try {
            String string3;
            Object[] objectArray;
            String string4;
            Level level;
            Pair pair;
            Pair pair2;
            ArrayList<Pair<Level, String>> arrayList2;
            block6: {
                block5: {
                    try {
                        Pair pair3;
                        arrayList2 = arrayList;
                        pair2 = pair3;
                        pair = pair3;
                        level = Level.INFO;
                        string4 = B[10];
                        Object[] objectArray2 = new Object[2];
                        objectArray2[0] = String.valueOf(string);
                        Object[] objectArray3 = objectArray2;
                        objectArray = objectArray2;
                        int n2 = 1;
                        if (!bl2) break block5;
                        string3 = B[29];
                        break block6;
                    }
                    catch (AuditViewerPolicyNotAvailableException auditViewerPolicyNotAvailableException) {
                        throw AuditAdminImpl.a((Exception)((Object)auditViewerPolicyNotAvailableException));
                    }
                }
                String[] stringArray = B;
                string3 = stringArray[7];
            }
            objectArray3[n2] = string3 + B[65];
            pair2((Object)level, (Object)MessageFormat.format(string4, objectArray));
            arrayList2.add((Pair<Level, String>)pair);
            String string5 = this.a(string2, bl2, arrayList);
            return string5;
        }
        finally {
            this.a(arrayList);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public String invokeAuditViewerPolicyForDetail(Goid goid, long l2) throws FindException, AuditViewerPolicyNotAvailableException {
        try {
            if (l2 < 0L) {
                throw new IllegalArgumentException(B[59]);
            }
        }
        catch (FindException findException) {
            throw AuditAdminImpl.a((Exception)((Object)findException));
        }
        ArrayList<Pair<Level, String>> arrayList = new ArrayList<Pair<Level, String>>();
        try {
            String[] stringArray = B;
            arrayList.add((Pair<Level, String>)new Pair((Object)Level.INFO, (Object)MessageFormat.format(stringArray[67], String.valueOf(goid), l2 + 1L)));
            AuditRecord auditRecord = (AuditRecord)this.n.findByPrimaryKey(goid);
            if (auditRecord == null) {
                String string = stringArray[53] + String.valueOf(goid);
                this.a(arrayList, string);
                String string2 = null;
                return string2;
            }
            if (!(auditRecord instanceof MessageSummaryAuditRecord)) {
                stringArray = B;
                String string = stringArray[74] + String.valueOf(goid);
                this.a(arrayList, string, Level.FINE);
                String string3 = null;
                return string3;
            }
            MessageSummaryAuditRecord messageSummaryAuditRecord = (MessageSummaryAuditRecord)auditRecord;
            Set set = messageSummaryAuditRecord.getDetails();
            for (AuditDetail auditDetail : set) {
                String[] stringArray2;
                block17: {
                    try {
                        if (!USER_DETAIL_MESSAGES.contains(auditDetail.getMessageId()) || (long)auditDetail.getOrdinal() != l2) continue;
                    }
                    catch (FindException findException) {
                        throw AuditAdminImpl.a((Exception)((Object)findException));
                    }
                    stringArray2 = auditDetail.getParams();
                    try {
                        if (stringArray2 != null && stringArray2[0] != null) break block17;
                    }
                    catch (FindException findException) {
                        throw AuditAdminImpl.a((Exception)((Object)findException));
                    }
                    long l3 = l2;
                    int n2 = auditDetail.getMessageId();
                    stringArray = B;
                    String string = stringArray[22] + n2 + stringArray[5] + l3;
                    this.a(arrayList, string);
                    String string4 = null;
                    return string4;
                }
                String string = this.a(stringArray2[0], null, arrayList);
                return string;
            }
            Iterator iterator = null;
            return iterator;
        }
        finally {
            this.a(arrayList);
        }
    }

    public Collection<String> getAllEntityClassNames() {
        ArrayList<String> arrayList = new ArrayList<String>();
        Set set = this.x.getMetamodel().getEntities();
        Set<String> set2 = this.w.getIgnoredClassNames();
        Set<String> set3 = this.w.getNoAuditClassNames();
        for (jakarta.persistence.metamodel.EntityType entityType : set) {
            Class clazz = entityType.getJavaType();
            String string = clazz.getTypeName();
            try {
                try {
                    try {
                        try {
                            try {
                                try {
                                    try {
                                        if (k.contains(string) || set2 == null) continue;
                                    }
                                    catch (NumberFormatException numberFormatException) {
                                        throw AuditAdminImpl.a(numberFormatException);
                                    }
                                    if (set2.contains(string)) continue;
                                }
                                catch (NumberFormatException numberFormatException) {
                                    throw AuditAdminImpl.a(numberFormatException);
                                }
                                if (set3 == null) continue;
                            }
                            catch (NumberFormatException numberFormatException) {
                                throw AuditAdminImpl.a(numberFormatException);
                            }
                            if (set3.contains(string)) continue;
                        }
                        catch (NumberFormatException numberFormatException) {
                            throw AuditAdminImpl.a(numberFormatException);
                        }
                        if (string == null) continue;
                    }
                    catch (NumberFormatException numberFormatException) {
                        throw AuditAdminImpl.a(numberFormatException);
                    }
                    if (!EntityType.findTypeByEntity((Class)clazz).isDisplayedInGui()) continue;
                }
                catch (NumberFormatException numberFormatException) {
                    throw AuditAdminImpl.a(numberFormatException);
                }
                arrayList.add(string);
            }
            catch (NumberFormatException numberFormatException) {
                throw AuditAdminImpl.a(numberFormatException);
            }
        }
        return arrayList;
    }

    private String a(String string, Boolean bl2, List<Pair<Level, String>> list) throws AuditViewerPolicyNotAvailableException {
        try {
            return this.v.doWithRestrictedKeyAccess(new f(this, string, bl2));
        }
        catch (AuditViewerPolicyNotAvailableException auditViewerPolicyNotAvailableException) {
            String string2 = ExceptionUtils.getMessage((Throwable)auditViewerPolicyNotAvailableException);
            e.log(Level.FINE, string2, ExceptionUtils.getDebugException((Throwable)auditViewerPolicyNotAvailableException));
            this.a(list, string2);
            throw auditViewerPolicyNotAvailableException;
        }
        catch (AuditPolicyException auditPolicyException) {
            String string3 = ExceptionUtils.getMessage((Throwable)auditPolicyException);
            e.log(Level.FINE, string3, ExceptionUtils.getDebugException((Throwable)auditPolicyException));
            this.a(list, string3);
        }
        catch (Exception exception) {
            String string4 = B[52] + ExceptionUtils.getMessage((Throwable)exception);
            e.log(Level.FINE, string4, ExceptionUtils.getDebugException((Throwable)exception));
            this.a(list, string4);
        }
        return null;
    }

    private void a(List<Pair<Level, String>> list) {
        if (!list.isEmpty()) {
            for (final Pair<Level, String> pair : list) {
                this.t.publishEvent((ApplicationEvent)new AdminEvent(this, (String)pair.right){
                    static final long serialVersionUID = 4904759806579812943L;

                    @Override
                    public Level getMinimumLevel() {
                        return (Level)pair.left;
                    }
                });
            }
        }
    }

    private void a(List<Pair<Level, String>> list, String string) {
        this.a(list, string, Level.INFO);
    }

    private void a(List<Pair<Level, String>> list, String string, Level level) {
        list.add((Pair<Level, String>)new Pair((Object)level, (Object)string));
    }

    private ServerConfig d() {
        return ServerConfig.getInstance();
    }

    private String a(String string) {
        String string2 = null;
        String[] stringArray = B;
        if (string.contains(stringArray[68])) {
            string2 = stringArray[45];
        } else {
            stringArray = B;
            if (string.contains(stringArray[14])) {
                string2 = stringArray[24];
            } else {
                stringArray = B;
                if (string.contains(stringArray[28])) {
                    string2 = stringArray[46];
                } else {
                    stringArray = B;
                    if (string.contains(stringArray[56])) {
                        string2 = stringArray[43];
                    }
                }
            }
        }
        return string2;
    }

    /*
     * Exception decompiling
     */
    public String getExternalAuditsSchema(String var1_1, String var2_2, String var3_3) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Started 2 blocks at once
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.getStartingBlocks(Op04StructuredStatement.java:412)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:487)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    public AsyncAdminMethods.JobId<String> testAuditSinkSchema(String string, String string2, String string3) {
        FutureTask<String> futureTask = new FutureTask<String>(AdminInfo.find(false).wrapCallable(new g(this, string, string2, string3)));
        Background.scheduleOneShot((TimerTask)new at(this, futureTask), (long)0L);
        return this.registerJob(futureTask, String.class);
    }

    public AsyncAdminMethods.JobId<String> createExternalAuditDatabaseTables(String string, String string2, String string3, String string4, String string5) {
        FutureTask<String> futureTask = new FutureTask<String>(AdminInfo.find(false).wrapCallable(new b(this, string, string2, string3, string4, string5)));
        Background.scheduleOneShot((TimerTask)new aq(this, futureTask), (long)0L);
        return this.registerJob(futureTask, String.class);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[75];
                var3_1 = 0;
                var2_2 = "Km\u000522#N\"`\u001f&->Op#\u0003!1:Opw\ns.8Etj\u00176:jLmqS\u0015\n\u001a\ncq\u0010;7<Op#\u0010<0,Cev\u00012*#El9S cv\u0017:*jXg`\u001c!:jGcm\u00124;8\nkpS!;;_kq\u00167>Gq\u0001<,jYcu\u001a=9jInv\u0000';8\nrq\u001c#;8^{#T2+.Cv-\u001205$Euo\u001679/\u0004jj\u0014;;9^Vj\u001e6yd\u0007of\u0000 ?-O\u0007pf\u0002&;9^\u000e\"t\u001a'6jEpg\u001a=?&\n\u001dcv\u0017:*dKah\u001d<)&Ofd\u0016}6#Mjf\u0000'\n#Gg\bpf\u0000#1$Yg9Lv\u001f?~\u000b_fj\u0007\u0012,)Bku\u0016!\u007fjicm\u001d<*jXwmS!;;_gp\u00076:jKp`\u001b:(/\nal\u001e>?$N,$,-\\01$Lkd\\6*)\u0005qr\u001f|;2^gq\u001d22\u000b_fj\u0007 p9[nECv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\bb#d\u001ccv\u0017:*\u000bYql\u0010:?>OfO\u001c4-\u001eBpf\u0000;1&N\u0006ff\u000727&\u0002%-\tqr\u001f ;8\\gq\b\"n\u0016 -+Mg.LlS2+.Cv#\u00016=%Xf#\u0015<+$N\"e\u001c!~\u000b_fj\u0007\u0001;)EpgS$7>B\"j\u0017s\ncv\u0017:*\u0015Gcj\u001d+al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]2+.CvG\u0012'?\tKak\u0016\u0017;&K{\u0016\"+\u001c=;j]gf\u0018z~(S\"g\u00165??Fv Gq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzIs\u001dcv\u0017:*dKah\u001d<)&Ofd\u0016}6#Mjf\u0000'\n#Gg3LlS#?8Kof\u00076,jLmv\u001d7~,Ep#\u0012&:#^\"g\u0016'?#F\"q\u0016018N\"t\u001a'6jCf#3Vk\u001a ~.Kvb\u00112-/\nvz\u00036~#Y\"m\u001c'~9_rs\u001c!*/N,#S\u0017,#\\gqS02+Yq9\tqr\u001f ;8\\gq)KLS6,8Ep#\u0004;7&O\"s\u00016.+Xkm\u0014s*%\ng{\u0003<,>\ncv\u0017:*9,al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]2+.CvG\u0012'?\tKak\u0016\u0003;8Cmg$,-\\}peImm\u0015:9eOv`\\ /&\u0005g{\u00076,$KnB\u000677>Y]\u0006mq\u001202/\u0007pf\u0002&;9^\bpf\u0000#1$Yg\t\"j\u001d */Kf-\u0007qp\u0014\u001b1'OKGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nof\u0000 ?-O\"j\u0000sy8Rq\u001c#;8^{#T2+.CvU\u001a6)/XPf\u0015!;9BQf\u0010<0.Y%#\u001b2-jClu\u0012?7.\ntb\u001f&;j\rECv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\bb#d\u0004,p\u0002?\"cv\u0017:*d\\co\u001a7?>OQj\u0014=?>_pf]>?2Xg`\u001c!:9.al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\r/Kp`\u001b\u0010,#^gq\u001a2\rcv\u0017:*dYkd\u001d:0-SGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nkm\u000522#N\"o\u001c=9j\\co\u00066~m\u0012\"w\u001b!;9Bmo\u0017s(+FwfSt-al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\u001a+^c@\u001206/yky\u0016\u0003faA\u0015hg\u00110\u001d%Dlf\u0010'7%DOb\u001d29/X\u0005oz\u0000\"2\u0006mq\u001202/KGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nof\u0000 ?-O\"j\u0000sy;Q`\u001b63+\ndj\u001f6~$Ev#\u0015<+$N8#]}q)Ele\u001a4q/^a,\u0000\"2eOzw\u0016!0+FCv\u0017:*9\u0004qr\u001f\u001aHg\u00110~)Elm\u00160*#El#\u001d<*jLmv\u001d7d\u0002%-\u0014cv\u0017:*\u001a_pd\u0016\u001e7$Cov\u001e\u00129/*G{\u00106.>CmmS#,%Igp\u0000:0-\ncv\u0017:*j\\kf\u00046,jZmo\u001a0'p\n.LlS2+.Cv#\u00016=%Xf#\u0015<+$N\"e\u001c!~\u000b_fj\u0007\u0001;)EpgS$7>B\"j\u0017s\fKm\u000522#N\"l\u001a7d\u0015cv\u0017:*\u0007Oqp\u00124;\u001eBpf\u0000;1&N\u0003faA@Gq\u0001<,j_rg\u0012'7$M\"`\u001f&->Op#\u0003!1:Opw\nsy+_fj\u0007}?)All\u0004?;.Mg-\u001b:9\"Oqw':3/\r,-al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\u001a+^c@\u001206/yky\u0016\u0014mq\u0017:0+F\"n\u0006 *jHg#Mn~z\u001f%#\u001a ~$Ev#\u0012s(+FkgS=+'Hgq]s\u000b9CldS\fcv\u0017:*\u0015Ngw\u0012:2\u0012%/S&-#De#\u001768+_nwSt\u0019cv\u0017:*dKp`\u001b:(/X,e\u0007#p)Ele\u001a4\u0014%-S\u00047&F\"v\u00006~.Odb\u0006?*j\b\"n\u0016 -+Mg\u001eAl\u001d57-_pf\u0017s3#Dkn\u0006>~+Mg#\u000522?O\"$fCv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\u0012&:#^\"g\u0016'?#F\"n\u0016 -+Mg#\u001a=~:Eqj\u0007:1$\ny2\u000e}\u0005oz\u0000\"2\u0019cv\u0017:*\u001cCgt\u0016!\f/Lpf\u0000;\r/Imm\u0017 ?Gq\u0001<,jXgb\u0017:0-\nq`\u001b63+\ndj\u001f6dj\u0004,,\u0010<0,Ce,\u0016'=eYso\\6&>Opm\u0012?\u001f?Nkw\u0000}-;F\u0019cv\u0017:*dKp`\u001b:(/X,e\u0007#p)Ele\u001a4\bKm\u000522#N\"";
                var4_3 = "Km\u000522#N\"`\u001f&->Op#\u0003!1:Opw\ns.8Etj\u00176:jLmqS\u0015\n\u001a\ncq\u0010;7<Op#\u0010<0,Cev\u00012*#El9S cv\u0017:*jXg`\u001c!:jGcm\u00124;8\nkpS!;;_kq\u00167>Gq\u0001<,jYcu\u001a=9jInv\u0000';8\nrq\u001c#;8^{#T2+.Cv-\u001205$Euo\u001679/\u0004jj\u0014;;9^Vj\u001e6yd\u0007of\u0000 ?-O\u0007pf\u0002&;9^\u000e\"t\u001a'6jEpg\u001a=?&\n\u001dcv\u0017:*dKah\u001d<)&Ofd\u0016}6#Mjf\u0000'\n#Gg\bpf\u0000#1$Yg9Lv\u001f?~\u000b_fj\u0007\u0012,)Bku\u0016!\u007fjicm\u001d<*jXwmS!;;_gp\u00076:jKp`\u001b:(/\nal\u001e>?$N,$,-\\01$Lkd\\6*)\u0005qr\u001f|;2^gq\u001d22\u000b_fj\u0007 p9[nECv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\bb#d\u001ccv\u0017:*\u000bYql\u0010:?>OfO\u001c4-\u001eBpf\u0000;1&N\u0006ff\u000727&\u0002%-\tqr\u001f ;8\\gq\b\"n\u0016 -+Mg.LlS2+.Cv#\u00016=%Xf#\u0015<+$N\"e\u001c!~\u000b_fj\u0007\u0001;)EpgS$7>B\"j\u0017s\ncv\u0017:*\u0015Gcj\u001d+al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]2+.CvG\u0012'?\tKak\u0016\u0017;&K{\u0016\"+\u001c=;j]gf\u0018z~(S\"g\u00165??Fv Gq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzIs\u001dcv\u0017:*dKah\u001d<)&Ofd\u0016}6#Mjf\u0000'\n#Gg3LlS#?8Kof\u00076,jLmv\u001d7~,Ep#\u0012&:#^\"g\u0016'?#F\"q\u0016018N\"t\u001a'6jCf#3Vk\u001a ~.Kvb\u00112-/\nvz\u00036~#Y\"m\u001c'~9_rs\u001c!*/N,#S\u0017,#\\gqS02+Yq9\tqr\u001f ;8\\gq)KLS6,8Ep#\u0004;7&O\"s\u00016.+Xkm\u0014s*%\ng{\u0003<,>\ncv\u0017:*9,al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]2+.CvG\u0012'?\tKak\u0016\u0003;8Cmg$,-\\}peImm\u0015:9eOv`\\ /&\u0005g{\u00076,$KnB\u000677>Y]\u0006mq\u001202/\u0007pf\u0002&;9^\bpf\u0000#1$Yg\t\"j\u001d */Kf-\u0007qp\u0014\u001b1'OKGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nof\u0000 ?-O\"j\u0000sy8Rq\u001c#;8^{#T2+.CvU\u001a6)/XPf\u0015!;9BQf\u0010<0.Y%#\u001b2-jClu\u0012?7.\ntb\u001f&;j\rECv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\bb#d\u0004,p\u0002?\"cv\u0017:*d\\co\u001a7?>OQj\u0014=?>_pf]>?2Xg`\u001c!:9.al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\r/Kp`\u001b\u0010,#^gq\u001a2\rcv\u0017:*dYkd\u001d:0-SGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nkm\u000522#N\"o\u001c=9j\\co\u00066~m\u0012\"w\u001b!;9Bmo\u0017s(+FwfSt-al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\u001a+^c@\u001206/yky\u0016\u0003faA\u0015hg\u00110\u001d%Dlf\u0010'7%DOb\u001d29/X\u0005oz\u0000\"2\u0006mq\u001202/KGq\u0001<,jMgw\u0007:0-\nao\u0006 */X\"s\u0001<./XvzSt??Nkw]2=!Dmt\u001f6:-O,k\u001a46/YvW\u001a>;m\nof\u0000 ?-O\"j\u0000sy;Q`\u001b63+\ndj\u001f6~$Ev#\u0015<+$N8#]}q)Ele\u001a4q/^a,\u0000\"2eOzw\u0016!0+FCv\u0017:*9\u0004qr\u001f\u001aHg\u00110~)Elm\u00160*#El#\u001d<*jLmv\u001d7d\u0002%-\u0014cv\u0017:*\u001a_pd\u0016\u001e7$Cov\u001e\u00129/*G{\u00106.>CmmS#,%Igp\u0000:0-\ncv\u0017:*j\\kf\u00046,jZmo\u001a0'p\n.LlS2+.Cv#\u00016=%Xf#\u0015<+$N\"e\u001c!~\u000b_fj\u0007\u0001;)EpgS$7>B\"j\u0017s\fKm\u000522#N\"l\u001a7d\u0015cv\u0017:*\u0007Oqp\u00124;\u001eBpf\u0000;1&N\u0003faA@Gq\u0001<,j_rg\u0012'7$M\"`\u001f&->Op#\u0003!1:Opw\nsy+_fj\u0007}?)All\u0004?;.Mg-\u001b:9\"Oqw':3/\r,-al\u001e}2}^g`\u001b}-/Xtf\u0001}??Nkw]>?2kwg\u001a'\u001a+^c@\u001206/yky\u0016\u0014mq\u0017:0+F\"n\u0006 *jHg#Mn~z\u001f%#\u001a ~$Ev#\u0012s(+FkgS=+'Hgq]s\u000b9CldS\fcv\u0017:*\u0015Ngw\u0012:2\u0012%/S&-#De#\u001768+_nwSt\u0019cv\u0017:*dKp`\u001b:(/X,e\u0007#p)Ele\u001a4\u0014%-S\u00047&F\"v\u00006~.Odb\u0006?*j\b\"n\u0016 -+Mg\u001eAl\u001d57-_pf\u0017s3#Dkn\u0006>~+Mg#\u000522?O\"$fCv\u0017:*j\\kf\u00046,jZmo\u001a0'jClu\u001c8;.\ndl\u0001s\u001f?Nkw!6=%Xf#Tt%zW%$]s\u0017$\\mh\u00167~,Ep#\u0012&:#^\"g\u0016'?#F\"n\u0016 -+Mg#\u001a=~:Eqj\u0007:1$\ny2\u000e}\u0005oz\u0000\"2\u0019cv\u0017:*\u001cCgt\u0016!\f/Lpf\u0000;\r/Imm\u0017 ?Gq\u0001<,jXgb\u0017:0-\nq`\u001b63+\ndj\u001f6dj\u0004,,\u0010<0,Ce,\u0016'=eYso\\6&>Opm\u0012?\u001f?Nkw\u0000}-;F\u0019cv\u0017:*dKp`\u001b:(/X,e\u0007#p)Ele\u001a4\bKm\u000522#N\"".length();
                var1_4 = 66;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 109;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = AuditAdminImpl.b(v0, AuditAdminImpl.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "dQ0\u001d\rM{LA#\u0011\u000bM}JH=\u0017\u0000MdV\u0004;\u001a\u0015\u0014-DT$\u0018\u0010\u000elGH1T\u001f\u0002\u007f\u0005I1\u0007\n\fj@\u00045\u0001\u001d\u0004yV\nt7\u0018\u0003cJPt\u0004\u000b\u0002n@W'T8\u0018iLP\u0006\u0011\u001a\u0002\u007fA\u0004#\u001d\r\u0005-L@t^dQ0\u001d\rM{LA#\u0011\u000bM}JH=\u0017\u0000MdV\u0004;\u001a\u0015\u0014-DT$\u0018\u0010\u000elGH1T\u001f\u0002\u007f\u0005I1\u0007\n\fj@\u00045\u0001\u001d\u0004yV\nt7\u0018\u0003cJPt\u0004\u000b\u0002n@W'T8\u0018iLP\u0006\u0011\u001a\u0002\u007fA\u0004#\u001d\r\u0005-L@t";
                    var4_3 = "dQ0\u001d\rM{LA#\u0011\u000bM}JH=\u0017\u0000MdV\u0004;\u001a\u0015\u0014-DT$\u0018\u0010\u000elGH1T\u001f\u0002\u007f\u0005I1\u0007\n\fj@\u00045\u0001\u001d\u0004yV\nt7\u0018\u0003cJPt\u0004\u000b\u0002n@W'T8\u0018iLP\u0006\u0011\u001a\u0002\u007fA\u0004#\u001d\r\u0005-L@t^dQ0\u001d\rM{LA#\u0011\u000bM}JH=\u0017\u0000MdV\u0004;\u001a\u0015\u0014-DT$\u0018\u0010\u000elGH1T\u001f\u0002\u007f\u0005I1\u0007\n\fj@\u00045\u0001\u001d\u0004yV\nt7\u0018\u0003cJPt\u0004\u000b\u0002n@W'T8\u0018iLP\u0006\u0011\u001a\u0002\u007fA\u0004#\u001d\r\u0005-L@t".length();
                    var1_4 = 94;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 74;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = AuditAdminImpl.b(v0, AuditAdminImpl.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        AuditAdminImpl.B = var5;
        AuditAdminImpl.h = AuditAdminImpl.B[58];
        AuditAdminImpl.z = AuditAdminImpl.B[9];
        AuditAdminImpl.f = AuditAdminImpl.B[21];
        AuditAdminImpl.e = Logger.getLogger(AuditAdminImpl.class.getName());
        var0_6 = AuditAdminImpl.B;
        AuditAdminImpl.g = ConfigFactory.getIntProperty((String)var0_6[38], (int)20);
        AuditAdminImpl.i = ConfigFactory.getIntProperty((String)var0_6[18], (int)120000);
        AuditAdminImpl.j = ConfigFactory.getLongProperty((String)var0_6[26], (long)60000L);
        AuditAdminImpl.k = Arrays.asList(new String[]{AuditRecord.class.getName(), CounterRecord.class.getName(), SharedKeyRecord.class.getName(), UDDIPublishStatus.class.getName(), UDDIServiceControlRuntime.class.getName(), FederatedGroupMembership.class.getName(), InternalGroupMembership.class.getName()});
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] c(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x47);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 111;
                    case 1 -> 110;
                    case 2 -> 30;
                    case 3 -> 62;
                    case 4 -> 51;
                    case 5 -> 39;
                    default -> 71;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

