/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.mime.ContentTypeHeader
 *  com.l7tech.common.mime.PartInfo
 *  com.l7tech.gateway.common.audit.AuditDetail
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditDetail
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditRecord
 *  com.l7tech.gateway.common.mapping.MessageContextMapping
 *  com.l7tech.gateway.common.mapping.MessageContextMapping$MappingType
 *  com.l7tech.gateway.common.mapping.MessageContextMappingKeys
 *  com.l7tech.gateway.common.mapping.MessageContextMappingValues
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.identity.IdentityProvider
 *  com.l7tech.identity.User
 *  com.l7tech.message.HttpResponseKnob
 *  com.l7tech.message.Message
 *  com.l7tech.message.MimeKnob
 *  com.l7tech.message.TcpKnob
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.policy.assertion.credential.LoginCredentials
 *  com.l7tech.security.token.SecurityTokenType
 *  com.l7tech.util.Charsets
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.Functions$Nullary
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.Pair
 *  javax.wsdl.Binding
 *  javax.wsdl.Operation
 */
package com.l7tech.server.audit;

import com.l7tech.common.mime.ContentTypeHeader;
import com.l7tech.common.mime.PartInfo;
import com.l7tech.gateway.common.audit.AuditDetail;
import com.l7tech.gateway.common.audit.MessageSummaryAuditDetail;
import com.l7tech.gateway.common.audit.MessageSummaryAuditRecord;
import com.l7tech.gateway.common.mapping.MessageContextMapping;
import com.l7tech.gateway.common.mapping.MessageContextMappingKeys;
import com.l7tech.gateway.common.mapping.MessageContextMappingValues;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.identity.IdentityProvider;
import com.l7tech.identity.User;
import com.l7tech.message.HttpResponseKnob;
import com.l7tech.message.Message;
import com.l7tech.message.MimeKnob;
import com.l7tech.message.TcpKnob;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.credential.LoginCredentials;
import com.l7tech.security.token.SecurityTokenType;
import com.l7tech.server.audit.al;
import com.l7tech.server.audit.am;
import com.l7tech.server.identity.AuthenticationResult;
import com.l7tech.server.identity.IdentityProviderFactory;
import com.l7tech.server.mapping.MessageContextMappingManager;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.util.Charsets;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.Functions;
import com.l7tech.util.IOUtils;
import com.l7tech.util.Pair;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.text.MessageFormat;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.wsdl.Binding;
import javax.wsdl.Operation;

public class MessageSummaryAuditFactory
implements PropertyChangeListener {
    private final String a;
    private static final Logger b;
    private static final Charset c;
    private MessageContextMappingManager d;
    private boolean e;
    private IdentityProviderFactory f;
    private static final String[] g;

    public MessageSummaryAuditFactory(String string) {
        if (string == null) {
            String[] stringArray = g;
            throw new IllegalArgumentException(stringArray[13]);
        }
        this.a = string;
        this.e = ConfigFactory.getBooleanProperty((String)g[3], (boolean)false);
    }

    public MessageSummaryAuditRecord makeEvent(PolicyEnforcementContext policyEnforcementContext, AssertionStatus assertionStatus) {
        String string;
        String string2;
        AssertionStatus assertionStatus2;
        CharSequence charSequence;
        String string3;
        Level level;
        MessageSummaryAuditRecord messageSummaryAuditRecord;
        MessageSummaryAuditRecord messageSummaryAuditRecord2;
        am am2;
        long l2;
        long l3;
        Object object;
        User user;
        Object object2;
        Object object3;
        CharSequence charSequence2;
        AuthenticationContext authenticationContext;
        boolean bl2;
        String string4 = null;
        Object object4 = -1;
        String string5 = null;
        Object object5 = -1;
        Goid goid = null;
        String string6 = null;
        String string7 = null;
        Goid goid2 = PublishedService.DEFAULT_GOID;
        String string8 = null;
        SecurityTokenType securityTokenType = null;
        String string9 = null;
        PublishedService publishedService = policyEnforcementContext.getService();
        if (publishedService != null) {
            goid2 = publishedService.getGoid();
            string8 = publishedService.displayName();
        }
        if (bl2 = (authenticationContext = policyEnforcementContext.getDefaultAuthenticationContext()).isAuthenticated()) {
            charSequence2 = new StringBuffer();
            object3 = new StringBuffer();
            object2 = authenticationContext.getAllAuthenticationResults();
            for (AuthenticationResult authenticationResult : object2) {
                String string10;
                block28: {
                    block27: {
                        string10 = authenticationResult.getUser().getLogin();
                        try {
                            if (string10 != null && string10.length() >= 1) break block27;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw MessageSummaryAuditFactory.a(illegalArgumentException);
                        }
                        string10 = authenticationResult.getUser().getName();
                    }
                    try {
                        if (((StringBuffer)charSequence2).length() > 0) {
                            ((StringBuffer)charSequence2).append(g[11]);
                        }
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw MessageSummaryAuditFactory.a(illegalArgumentException);
                    }
                    ((StringBuffer)charSequence2).append(string10);
                    string10 = authenticationResult.getUser().getId();
                    try {
                        try {
                            try {
                                if (string10 == null || string10.length() <= 0) continue;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw MessageSummaryAuditFactory.a(illegalArgumentException);
                            }
                            if (((StringBuffer)object3).length() <= 0) break block28;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw MessageSummaryAuditFactory.a(illegalArgumentException);
                        }
                        ((StringBuffer)object3).append(g[14]);
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw MessageSummaryAuditFactory.a(illegalArgumentException);
                    }
                }
                ((StringBuffer)object3).append(string10);
            }
            if (((StringBuffer)charSequence2).length() > 0) {
                string6 = ((StringBuffer)charSequence2).toString();
            }
            if (((StringBuffer)object3).length() > 0) {
                string9 = ((StringBuffer)object3).toString();
            }
            securityTokenType = this.a(policyEnforcementContext);
            user = authenticationContext.getLastAuthenticatedUser();
        } else {
            user = null;
        }
        object3 = policyEnforcementContext.getRequest();
        charSequence2 = policyEnforcementContext.getRequestId().toString();
        if (policyEnforcementContext.isAuditSaveRequest()) {
            object2 = new int[]{-1};
            string4 = this.a((Message)object3, (int[])object2, true);
            object4 = object2[0];
        }
        if ((object2 = (TcpKnob)object3.getKnob(TcpKnob.class)) != null) {
            string7 = object2.getRemoteAddress();
        }
        object2 = policyEnforcementContext.getResponse();
        if (policyEnforcementContext.isAuditSaveResponse()) {
            object = new int[]{object5};
            string5 = this.a((Message)object2, (int[])object, false);
            object5 = object[0];
        }
        int n2 = -1;
        object = (HttpResponseKnob)object2.getKnob(HttpResponseKnob.class);
        if (object != null) {
            n2 = object.getStatus();
        }
        if ((l3 = policyEnforcementContext.getRoutingStartTime()) <= 0L) {
            l3 = System.currentTimeMillis();
        }
        if ((l2 = policyEnforcementContext.getRoutingEndTime()) <= 0L) {
            l2 = l3;
        }
        int n3 = (int)(l2 - l3);
        al al2 = new al(this, policyEnforcementContext);
        try {
            am2 = !this.e ? null : new am(this, al2, user, policyEnforcementContext);
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw MessageSummaryAuditFactory.a(illegalArgumentException);
        }
        am am3 = am2;
        try {
            MessageSummaryAuditRecord messageSummaryAuditRecord3;
            messageSummaryAuditRecord2 = messageSummaryAuditRecord3;
            messageSummaryAuditRecord = messageSummaryAuditRecord3;
            level = policyEnforcementContext.getAuditLevel();
            string3 = this.a;
            charSequence = charSequence2;
            assertionStatus2 = assertionStatus;
            string2 = string7;
            string = policyEnforcementContext.isAuditSaveRequest() ? string4 : null;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw MessageSummaryAuditFactory.a(illegalArgumentException);
        }
        messageSummaryAuditRecord2(level, string3, (String)charSequence, assertionStatus2, string2, string, object4, policyEnforcementContext.isAuditSaveResponse() ? string5 : null, object5, n2, n3, goid2, string8, (Object)al2, bl2, securityTokenType, goid, string6, string9, (Functions.Nullary)am3);
        MessageSummaryAuditRecord messageSummaryAuditRecord4 = messageSummaryAuditRecord;
        messageSummaryAuditRecord4.originalPolicyEnforcementContext((Object)policyEnforcementContext);
        return messageSummaryAuditRecord4;
    }

    public void setMessageContextMappingManager(MessageContextMappingManager messageContextMappingManager) {
        this.d = messageContextMappingManager;
    }

    public void setIdentityProviderFactory(IdentityProviderFactory identityProviderFactory) {
        this.f = identityProviderFactory;
    }

    @Override
    public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
        block4: {
            block5: {
                try {
                    try {
                        if (!g[1].equals(propertyChangeEvent.getPropertyName())) break block4;
                        if (!Boolean.valueOf((String)propertyChangeEvent.getNewValue()).booleanValue()) break block5;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw MessageSummaryAuditFactory.a(illegalArgumentException);
                    }
                    this.e = true;
                    break block4;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw MessageSummaryAuditFactory.a(illegalArgumentException);
                }
            }
            this.e = false;
            b.info(g[2]);
        }
    }

    /*
     * Loose catch block
     */
    private Goid a(Object object, User user, List<MessageContextMapping> list) {
        MessageContextMappingValues messageContextMappingValues;
        MessageContextMappingKeys messageContextMappingKeys;
        block11: {
            try {
                if (this.d == null) {
                    return null;
                }
            }
            catch (Exception exception) {
                throw MessageSummaryAuditFactory.a(exception);
            }
            messageContextMappingKeys = new MessageContextMappingKeys();
            messageContextMappingValues = new MessageContextMappingValues();
            messageContextMappingKeys.setCreateTime(System.currentTimeMillis());
            messageContextMappingValues.setCreateTime(System.currentTimeMillis());
            messageContextMappingValues.setServiceOperation(object.toString());
            if (list == null) break block11;
            int n2 = 0;
            for (MessageContextMapping messageContextMapping : list) {
                block10: {
                    if (messageContextMapping.getMappingType() != MessageContextMapping.MappingType.AUTH_USER) break block10;
                    try {
                        block12: {
                            if (user == null) continue;
                            break block12;
                            catch (Exception exception) {
                                throw MessageSummaryAuditFactory.a(exception);
                            }
                        }
                        messageContextMappingValues.setAuthUserId(this.a(user.getProviderId(), user.getId()));
                        messageContextMappingValues.setAuthUserUniqueId(user.getId());
                        messageContextMappingValues.setAuthUserProviderId(user.getProviderId());
                        continue;
                    }
                    catch (Exception exception) {
                        throw MessageSummaryAuditFactory.a(exception);
                    }
                }
                messageContextMappingKeys.setTypeAndKey(n2, messageContextMapping.getMappingType(), messageContextMapping.getKey());
                messageContextMappingValues.setValue(n2, messageContextMapping.getValue());
                ++n2;
            }
        }
        try {
            Goid goid = this.d.saveMessageContextMappingKeys(messageContextMappingKeys);
            messageContextMappingValues.setMappingKeysGoid(goid);
            return this.d.saveMessageContextMappingValues(messageContextMappingValues);
        }
        catch (Exception exception) {
            b.warning(g[10]);
            return null;
        }
    }

    private String a(Message message, int[] nArray, boolean bl2) {
        String[] stringArray;
        String string;
        block12: {
            block11: {
                try {
                    if (!bl2) break block11;
                    string = g[4];
                    break block12;
                }
                catch (Exception exception) {
                    throw MessageSummaryAuditFactory.a(exception);
                }
            }
            stringArray = g;
            string = stringArray[12];
        }
        String string2 = string;
        try {
            Charset charset;
            byte[] byArray;
            block15: {
                String string3;
                Object[] objectArray;
                String string4;
                Level level;
                Logger logger;
                ContentTypeHeader contentTypeHeader;
                block14: {
                    MimeKnob mimeKnob;
                    block13: {
                        mimeKnob = (MimeKnob)message.getKnob(MimeKnob.class);
                        try {
                            if (mimeKnob != null && message.isInitialized()) break block13;
                        }
                        catch (Exception exception) {
                            throw MessageSummaryAuditFactory.a(exception);
                        }
                        stringArray = g;
                        b.fine(MessageFormat.format(stringArray[7], string2));
                        nArray[0] = 0;
                        return null;
                    }
                    PartInfo partInfo = mimeKnob.getFirstPart();
                    byArray = IOUtils.slurpStream((InputStream)partInfo.getInputStream(false));
                    nArray[0] = byArray.length;
                    contentTypeHeader = partInfo.getContentType();
                    charset = null;
                    try {
                        if (contentTypeHeader == null || !contentTypeHeader.isTextualContentType()) break block14;
                    }
                    catch (Exception exception) {
                        throw MessageSummaryAuditFactory.a(exception);
                    }
                    charset = contentTypeHeader.getEncoding();
                    break block15;
                }
                try {
                    logger = b;
                    level = Level.INFO;
                    string4 = g[5];
                    Object[] objectArray2 = new Object[3];
                    objectArray2[0] = string2;
                    Object[] objectArray3 = objectArray2;
                    objectArray = objectArray2;
                    int n2 = 1;
                    string3 = contentTypeHeader == null ? g[8] : contentTypeHeader.getFullValue();
                }
                catch (Exception exception) {
                    throw MessageSummaryAuditFactory.a(exception);
                }
                objectArray3[n2] = string3;
                objectArray[2] = c;
                logger.log(level, MessageFormat.format(string4, objectArray));
            }
            if (charset == null) {
                charset = c;
            }
            return new String(byArray, charset);
        }
        catch (Exception exception) {
            String string5 = MessageFormat.format(g[6], string2, exception.getMessage());
            b.log(Level.WARNING, string5);
            return string5;
        }
    }

    public AuditDetail makeEvent(PolicyEnforcementContext policyEnforcementContext, String string) {
        MessageSummaryAuditDetail messageSummaryAuditDetail = null;
        if (policyEnforcementContext.isAuditSaveResponse()) {
            messageSummaryAuditDetail = new MessageSummaryAuditDetail(string);
        }
        return messageSummaryAuditDetail;
    }

    private SecurityTokenType a(PolicyEnforcementContext policyEnforcementContext) {
        SecurityTokenType securityTokenType = null;
        LoginCredentials loginCredentials = policyEnforcementContext.getDefaultAuthenticationContext().getLastCredentials();
        if (loginCredentials != null) {
            securityTokenType = loginCredentials.getType();
        }
        return securityTokenType;
    }

    private String b(PolicyEnforcementContext policyEnforcementContext) {
        String string = null;
        try {
            Pair<Binding, Operation> pair = policyEnforcementContext.getBindingAndOperation();
            if (pair != null) {
                string = ((Operation)pair.right).getName();
            }
        }
        catch (Exception exception) {
            b.log(Level.INFO, g[9] + exception.toString());
        }
        return string;
    }

    private String a(Goid goid, String string) {
        String string2 = null;
        try {
            IdentityProvider identityProvider = this.f.getProvider(goid);
            if (identityProvider != null) {
                String string3;
                User user = identityProvider.getUserManager().findByPrimaryKey(string);
                try {
                    string3 = user == null ? string : this.a(user);
                }
                catch (Exception exception) {
                    throw MessageSummaryAuditFactory.a(exception);
                }
                String[] stringArray = g;
                string2 = string3 + stringArray[0] + identityProvider.getConfig().getName() + "]";
            }
        }
        catch (Exception exception) {
            String[] stringArray = g;
            b.log(Level.WARNING, stringArray[15], exception);
        }
        if (string2 == null) {
            string2 = string + g[16] + String.valueOf(goid) + "]";
        }
        return string2;
    }

    private String a(User user) {
        String string;
        block5: {
            block4: {
                string = user.getLogin();
                try {
                    if (string != null && !"".equals(string)) break block4;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw MessageSummaryAuditFactory.a(illegalArgumentException);
                }
                string = user.getName();
            }
            try {
                if (string != null && !"".equals(string)) break block5;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw MessageSummaryAuditFactory.a(illegalArgumentException);
            }
            string = user.getId();
        }
        return string;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[17];
                var3_1 = 0;
                var2_2 = "bq'!_;[\rK\u000f0g)_\u0012O\u0004%\u0004)K\u0006r\u0005\u0005K<J\u0015G\u0013\u0003_,F\u0016c\u001c'D<\\N\u0003N,F\fAJ/O;\\\u0003A\u000fbI'A\u0016C\u00126\n%N\u0012V\u0003,M;\u000f\u0016IJ\u0005K<J\u0015G\u0013bk=K\u000bRJ\u0007\\-A\u0016UJ+YhL\u0017T\u0018'D<C\u001b\u0006\u000e+Y)M\u000eC\u000el'!_;[\rK\u000f0g)_\u0012O\u0004%\u0004)K\u0006r\u0005\u0005K<J\u0015G\u0013\u0003_,F\u0016c\u001c'D<\\\u00070O9Z\u0007U\u001eN\u0001E&[\u0007H\u001eo~1_\u0007\u0006\u0005$\n3\u001f\u001f\u0006B`QyR@\u000fJ+YhZ\fM\u0004-]&\u000f\rTJ,E<\u000f\u0016C\u00126\u0011hZ\u0011O\u0004%\n3\u001d\u001f\u0006\u001e-\n;N\u0014CJ9\u001a5\u000f\u0016C\u00126\u001a\u0017D)M\u000eCJ6EhH\u0007RJ9\u001a5\u000f:k&x\n3\u001e\u001f>9\u001a5\u000f\nG\u0019bD'[BD\u000f'DhF\fO\u001e+K$F\u0018C\u000ey\n&@\u0016\u0006\u000b6^-B\u0012R\u0003,Mh[\r\u0006\u0019#\\-\u000f\u0000I\u000e;\n<J\u001aR\u0004,_$C#\u0001E=C\u0006HM6\n,J\u0016C\u0018/C&JBI\u001a'X)[\u000bI\u0004bD)B\u0007\u001cJA\u0004K!C\u0007BJ6Eh\\\u0003P\u000fb^ JBM\u000f;Yh@\u0010\u0006\u001c#F=J\u0011\u0006\u0005$\n<G\u0007\u0006\u0007'Y;N\u0005CJ!E&[\u0007^\u001ebG)_\u0012O\u0004%\u0004\u0002n\n\b0O;_\rH\u0019'\u001b\u0001F=\\\u0016C\u0018bd'K\u0007\u0006#\u0006\n!\\BT\u000f3_!]\u0007B\u0002n\n";
                var4_3 = "bq'!_;[\rK\u000f0g)_\u0012O\u0004%\u0004)K\u0006r\u0005\u0005K<J\u0015G\u0013\u0003_,F\u0016c\u001c'D<\\N\u0003N,F\fAJ/O;\\\u0003A\u000fbI'A\u0016C\u00126\n%N\u0012V\u0003,M;\u000f\u0016IJ\u0005K<J\u0015G\u0013bk=K\u000bRJ\u0007\\-A\u0016UJ+YhL\u0017T\u0018'D<C\u001b\u0006\u000e+Y)M\u000eC\u000el'!_;[\rK\u000f0g)_\u0012O\u0004%\u0004)K\u0006r\u0005\u0005K<J\u0015G\u0013\u0003_,F\u0016c\u001c'D<\\\u00070O9Z\u0007U\u001eN\u0001E&[\u0007H\u001eo~1_\u0007\u0006\u0005$\n3\u001f\u001f\u0006B`QyR@\u000fJ+YhZ\fM\u0004-]&\u000f\rTJ,E<\u000f\u0016C\u00126\u0011hZ\u0011O\u0004%\n3\u001d\u001f\u0006\u001e-\n;N\u0014CJ9\u001a5\u000f\u0016C\u00126\u001a\u0017D)M\u000eCJ6EhH\u0007RJ9\u001a5\u000f:k&x\n3\u001e\u001f>9\u001a5\u000f\nG\u0019bD'[BD\u000f'DhF\fO\u001e+K$F\u0018C\u000ey\n&@\u0016\u0006\u000b6^-B\u0012R\u0003,Mh[\r\u0006\u0019#\\-\u000f\u0000I\u000e;\n<J\u001aR\u0004,_$C#\u0001E=C\u0006HM6\n,J\u0016C\u0018/C&JBI\u001a'X)[\u000bI\u0004bD)B\u0007\u001cJA\u0004K!C\u0007BJ6Eh\\\u0003P\u000fb^ JBM\u000f;Yh@\u0010\u0006\u001c#F=J\u0011\u0006\u0005$\n<G\u0007\u0006\u0007'Y;N\u0005CJ!E&[\u0007^\u001ebG)_\u0012O\u0004%\u0004\u0002n\n\b0O;_\rH\u0019'\u001b\u0001F=\\\u0016C\u0018bd'K\u0007\u0006#\u0006\n!\\BT\u000f3_!]\u0007B\u0002n\n".length();
                var1_4 = 2;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = MessageSummaryAuditFactory.a(v0, MessageSummaryAuditFactory.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u000eQ3I\u0019\u000f\u0002(@$U\u0018F\r,\u00034U\u000e]C/F5G\u0002C\u0010e\u0003kxb";
                    var4_3 = "\u000eQ3I\u0019\u000f\u0002(@$U\u0018F\r,\u00034U\u000e]C/F5G\u0002C\u0010e\u0003kxb".length();
                    var1_4 = 29;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 55;
                        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++] = MessageSummaryAuditFactory.a(v0, MessageSummaryAuditFactory.a(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;
            }
        }
        MessageSummaryAuditFactory.g = var5;
        MessageSummaryAuditFactory.b = Logger.getLogger(MessageSummaryAuditFactory.class.getName());
        MessageSummaryAuditFactory.c = Charsets.ISO8859;
    }

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

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(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 -> 124;
                    case 1 -> 20;
                    case 2 -> 118;
                    case 3 -> 17;
                    case 4 -> 92;
                    case 5 -> 24;
                    default -> 84;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

