httl.properties: import.getters=forbid.methods=add,put,save,insert,modify,update,delete,remove,clear
554839
public void setForbidMethods(String[] forbidMethods) {
        for (String method : forbidMethods) {
            if (method.startsWith("*")) {
                if (forbidEndsMethods == null) {
                    forbidEndsMethods = new ArrayList<String>();
                }
                forbidEndsMethods.add(method.substring(1));
            } else if (method.endsWith("*")) {
                if (forbidStartsMethods == null) {
                    forbidStartsMethods = new ArrayList<String>();
                }
                forbidStartsMethods.add(method.substring(0, method.length() - 1));
            } else {
                if (forbidEqualsMethods == null) {
                    forbidEqualsMethods = new ArrayList<String>();
                }
                forbidEqualsMethods.add(method);
            }
        }
    }
12039
private static ImmutableList<ImportTree> getWildcardImports(List<? extends ImportTree> imports) {
    ImmutableList.Builder<ImportTree> result = ImmutableList.builder();
    for (ImportTree tree : imports) {
      // javac represents on-demand imports as a member select where the selected name is '*'.
      Tree ident = tree.getQualifiedIdentifier();
      if (!(ident instanceof MemberSelectTree)) {
        continue;
      }
      MemberSelectTree select = (MemberSelectTree) ident;
      if (select.getIdentifier().contentEquals("*")) {
        result.add(tree);
      }
    }
    return result.build();
  }
592774
public void setImports(String[] imports) {
        module.bind(CodegenModule.IMPORTS, new HashSet<String>(Arrays.asList(imports)));
    }
356352
function (scope, key, getter) {
      var value = null, args = Array.prototype.slice.call(arguments);
      var params = (args.length > 3) ? args.slice(3) : [];

      Object.defineProperty(scope, key, {
        get: function () {
          if (value === null) value = getter.apply(scope, params);
          return value;
        }
      });
    }
189629
private void overrideAbstractMethods() throws IOException
    {
        for (final ExecutableElement method : El.getEffectiveMethods(superClass))
        {
            if (method.getModifiers().contains(Modifier.ABSTRACT))
            {
                if (
                        method.getAnnotation(Terminal.class) != null || 
                        method.getAnnotation(Rule.class) != null || 
                        method.getAnnotation(Rules.class) != null )
                {
                    implementedAbstractMethods.add(method);
                    MethodCompiler mc = new MethodCompiler()
                    {
                        @Override
                        protected void implement() throws IOException
                        {
                            TypeMirror returnType = method.getReturnType();
                            List<? extends VariableElement> params = method.getParameters();
                            if (returnType.getKind() != TypeKind.VOID && params.size() == 1)
                            {
                                nameArgument(ARG, 1);
                                try
                                {
                                    convert(ARG, returnType);
                                }
                                catch (IllegalConversionException ex)
                                {
                                    throw new IOException("bad conversion with "+method, ex);
                                }
                                treturn();
                            }
                            else
                            {
                                if (returnType.getKind() == TypeKind.VOID && params.size() == 0)
                                {
                                    treturn();
                                }
                                else
                                {
                                    throw new IllegalArgumentException("cannot implement abstract method "+method);
                                }
                            }
                        }
                    };
                    subClass.overrideMethod(mc, method, Modifier.PROTECTED);
                }
            }
        }
    }
330799
public static void convertBaseClasses (ImportSet imports)
    {
        // replace primitive types with OOO types (required for unboxing)
        imports.replace("byte", "com.threerings.util.Byte");
        imports.replace("boolean", "com.threerings.util.langBoolean");
        imports.replace("[B", "flash.utils.ByteArray");
        imports.replace("float", "com.threerings.util.Float");
        imports.replace("long", "com.threerings.util.Long");

        if (imports.removeAll("[*") > 0) {
            imports.add("com.threerings.io.TypedArray");
        }

        // convert java primitive boxes to their ooo counterparts
        imports.replace(Integer.class, "com.threerings.util.Integer");

        // convert some java.util types to their ooo counterparts
        imports.replace(Map.class, "com.threerings.util.Map");

        // get rid of java.lang stuff and any remaining primitives
        imports.removeGlobals();

        // get rid of remaining arrays
        imports.removeArrays();
    }
1303807
boolean handlePropertyHits(BackedSession d2, Thread t, int len) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[HANDLE_PROPERTY_HITS]);
        }

        Enumeration vEnum = null;
        boolean doWrite = false;

        Connection conn = null;
        String id = d2.getId();
        String propid = null;
        PreparedStatement batchUpdatePS = null;
        PreparedStatement batchInsertPS = null;
        PreparedStatement batchDeletePS = null;
        LinkedList<DatabaseMRHelper> insertBatch = new LinkedList<DatabaseMRHelper>();

        boolean updateClose = false;
        boolean insertClose = false;
        boolean delClose = false;

        conn = getConnection(false);
        if (conn == null) {
            return true;
        }
        if (!multirowInitialized) {
            try {
                initMultirowDBTypes(conn);
            } catch (SQLException e) {
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "problem getting types", e); //PM99783
                }
                if (conn != null)
                    closeConnection(conn);
                return false;
            }
        }

        try {
            // we are not synchronized here - were not in old code either
            Hashtable sht = null;
            if (_smc.writeAllProperties()) {
                Hashtable ht = (Hashtable) d2.getSwappableData();
                vEnum = ht.keys();
                doWrite = true;
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "doing app changes for ALL mSwappable Data " + ht.toString());
                }
            } else {
                if (d2.appDataChanges != null) {
                    if (appDataTablesPerThread) {
                        if ((sht = (Hashtable) d2.appDataChanges.get(t)) != null) {
                            doWrite = true;
                            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "doing app changes for " + id + " on thread "
                                                                                                                                    + t);
                            }
                            if (sht != null) {
                                vEnum = sht.keys();
                            } else {
                                vEnum = (new Hashtable()).keys();
                            }
                        }
                    } else { // appDataTablesPerSession
                        doWrite = true;
                        vEnum = d2.appDataChanges.keys();
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "doing app changes for TimeBasedWrite");
                        }
                    }
                }

            }

            if (doWrite) {
                int enumCount = 0;
                batchUpdatePS = conn.prepareStatement(upAnyProp);
                while (vEnum.hasMoreElements()) {
                    enumCount++;
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "enumCount is now " + enumCount);
                    }
                    long startTime = System.currentTimeMillis();
                    //*start *dbc2.2

                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "about to do vEnum.nextElement");
                    }

                    propid = (String) vEnum.nextElement();
                    if (id.equals(propid)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.WARNING, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "DatabaseHashMapMR.AttributeEqualsSessionIdWarning",
                                                            propid);
                        continue;
                    } else {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "it worked and the propid is: " + propid);
                        }
                    }

                    ByteArrayOutputStream baos = new ByteArrayOutputStream();

                    ObjectOutputStream oos = createObjectOutputStream(baos);
                    oos.writeObject(d2.getSwappableData().get(propid));
                    oos.flush();

                    int size = baos.size();
                    byte[] objbuf = baos.toByteArray();
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "size for " + propid + " is " + size);
                    }

                    oos.close();
                    baos.close();

                    int rowsRet = 0;

                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "before update " + propid + " for session " + id);
                    }

                    // based on the amount of data, we choose whether to go to the
                    // small, medium, or large columns (nulling out whatever is
                    // in the other columns).  We first attempt an update.  If a
                    // row count > 0 is returned, we are done.  Otherwise, the
                    // row does not yet exist so we insert.

                    if (size <= smallColSize) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "storing in small which can handle up to "
                                                                                                                                + smallColSize + " bytes");
                        }

                        if (!usingInformix) {
                            batchUpdatePS.setBytes(1, objbuf);
                            batchUpdatePS.setNull(2, mediumPropType);
                            batchUpdatePS.setNull(3, largePropType);
                        } else {
                            ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                            batchUpdatePS.setBinaryStream(1, bis, objbuf.length);
                            batchUpdatePS.setNull(2, mediumPropType);
                            batchUpdatePS.setNull(3, largePropType);
                        }
                        batchUpdatePS.setString(4, id);
                        batchUpdatePS.setString(5, propid);
                        batchUpdatePS.setString(6, getAppName());
                        batchUpdatePS.addBatch();
                        //in case we need to do an insert on this afterwards
                        //<string, string, byte[]>
                        DatabaseMRHelper helper = new DatabaseMRHelper();
                        helper.setId(id);
                        helper.setPropId(propid);
                        helper.setObject(objbuf);
                        if (usingInformix) {
                            helper.setUseStream(true);
                        }
                        helper.setAppName(getAppName());
                        helper.setSize(DatabaseMRHelper.SMALL);
                        insertBatch.add(helper);

                        // note, the old value in the medium column is left alone
                        // since further access when look at the small column first
                    } else if (size <= mediumColSize) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "storing in medium which can handle up to "
                                                                                                                                + mediumColSize + " bytes");
                        }

                        if ((!usingInformix) && (!_smc.isUseOracleBlob())) {
                            batchUpdatePS.setNull(1, smallPropType);
                            batchUpdatePS.setBytes(2, objbuf);
                            batchUpdatePS.setNull(3, largePropType);
                        } else {
                            ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                            batchUpdatePS.setNull(1, smallPropType);
                            batchUpdatePS.setBinaryStream(2, bis, objbuf.length);
                            batchUpdatePS.setNull(3, largePropType);
                        }
                        batchUpdatePS.setString(4, id);
                        batchUpdatePS.setString(5, propid);
                        batchUpdatePS.setString(6, getAppName());

                        batchUpdatePS.addBatch();
                        DatabaseMRHelper helper = new DatabaseMRHelper();
                        helper.setId(id);
                        helper.setPropId(propid);
                        helper.setObject(objbuf);
                        if (usingInformix || _smc.isUseOracleBlob()) {
                            helper.setUseStream(true);
                        }
                        helper.setAppName(getAppName());
                        helper.setSize(DatabaseMRHelper.MEDIUM);
                        insertBatch.add(helper);
                    } else if (size <= largeColSize) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "storing in large which can handle up to "
                                                                                                                                + largeColSize + " bytes");
                        }
                        // note, the old value in the largecolumn is left alone
                        // since further access will look at the small column and then the
                        // medium column prior to the large column

                        if (!usingInformix) {
                            batchUpdatePS.setNull(1, smallPropType);
                            batchUpdatePS.setNull(2, mediumPropType);
                            batchUpdatePS.setBytes(3, objbuf);
                        } else {
                            ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                            batchUpdatePS.setNull(1, smallPropType);
                            batchUpdatePS.setNull(2, mediumPropType);
                            batchUpdatePS.setBinaryStream(3, bis, objbuf.length);
                        }
                        batchUpdatePS.setString(4, id);
                        batchUpdatePS.setString(5, propid);
                        batchUpdatePS.setString(6, getAppName());

                        batchUpdatePS.addBatch();

                        DatabaseMRHelper helper = new DatabaseMRHelper();
                        helper.setId(id);
                        helper.setPropId(propid);
                        helper.setObject(objbuf);
                        if (usingInformix) {
                            //ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                            //inssps.setBinaryStream(3, bis, objbuf.length);
                            helper.setUseStream(true);
                        }
                        helper.setAppName(getAppName());
                        helper.setSize(DatabaseMRHelper.LARGE);
                        insertBatch.add(helper);
                    } else { // too big 325643
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "DatabaseHashMapMR.db2LongVarCharErr");
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "DatabaseHashMapMR.propertyTooBig", propid);
                    }

                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "after commit " + propid + " for session " + id);
                    }
                    SessionStatistics pmiStats = _iStore.getSessionStatistics();
                    if (pmiStats != null) {
                        pmiStats.writeTimes(objbuf.length, System.currentTimeMillis() - startTime);
                    }

                }
                int updateCount = 0; //PM99783
                int[] results = null;
                if (enumCount>0) {
                    results = batchUpdatePS.executeBatch();
                    if (usingOracle) { //PM99783 when on Oracle DB, executeBatch() returns -2 (SUCCESS_NO_INFO), might be related to BatchPerformanceWorkaround Oracle property, hence we getUpdateCount instead
                        updateCount = batchUpdatePS.getUpdateCount();
                    }
                } else {
                    results = new int[0]; //skip trying to insert
                }
                batchUpdatePS.close();
                updateClose=true;
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "after " + results.length + " batch update(s), total update count : " + updateCount);
                }
                boolean needToInsert = false;
                int batchInsertPSCount = results.length;
                // PI53220 Oracle 11 returns -2 (SUCCESS_NO_INFO); PI57327 Oracle 12 returns successful results.
                if (results[0] == java.sql.Statement.SUCCESS_NO_INFO && updateCount > 0 && (_smc.writeAllProperties() || batchInsertPSCount == updateCount))
                {
                    batchInsertPSCount = batchInsertPSCount - updateCount; // Oracle only : when Write All option or no insert cases
                }
                for (int i=0;i<batchInsertPSCount;i++) {
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "For batch # " + (i+1) + ", update result : " + results[i]);
                    }
                    if (results[i]<=0) { //no rows updated (PM99783)
                        if (!needToInsert) {
                            needToInsert = true;
                            batchInsertPS = conn.prepareStatement(insAnyProp);
                        }
                        DatabaseMRHelper updateRow = insertBatch.get(i);
                        batchInsertPS.setString(1, updateRow.getId());
                        batchInsertPS.setString(2, updateRow.getPropId());
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "Insert attribute " + updateRow.getPropId());
                        }
                        switch (updateRow.getSize()) {
                        case DatabaseMRHelper.SMALL:
                            if (!updateRow.isUseStream()) {
                                batchInsertPS.setBytes(3, updateRow.getObject());
                                batchInsertPS.setNull(4, mediumPropType);
                                batchInsertPS.setNull(5, largePropType);
                            } else {
                                byte[] objbuf = updateRow.getObject();
                                ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                                batchInsertPS.setBinaryStream(3, bis, objbuf.length);
                                batchInsertPS.setNull(4, mediumPropType);
                                batchInsertPS.setNull(5, largePropType);
                            }
                            break;
                        case DatabaseMRHelper.MEDIUM:
                            if (!updateRow.isUseStream()) {
                                batchInsertPS.setNull(3, smallPropType);
                                batchInsertPS.setBytes(4, updateRow.getObject());
                                batchInsertPS.setNull(5, largePropType);
                            } else {
                                byte[] objbuf = updateRow.getObject();
                                ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                                batchInsertPS.setNull(3, smallPropType);
                                batchInsertPS.setBinaryStream(4, bis, objbuf.length);
                                batchInsertPS.setNull(5, largePropType);
                            }
                            break;
                        case DatabaseMRHelper.LARGE:
                            if (!updateRow.isUseStream()) {
                                batchInsertPS.setNull(3, smallPropType);
                                batchInsertPS.setNull(4, mediumPropType);
                                batchInsertPS.setBytes(5, updateRow.getObject());
                            } else {
                                byte[] objbuf = updateRow.getObject();
                                ByteArrayInputStream bis = new ByteArrayInputStream(objbuf);
                                batchInsertPS.setNull(3, smallPropType);
                                batchInsertPS.setNull(4, mediumPropType);
                                batchInsertPS.setBinaryStream(5, bis, objbuf.length);
                            }
                            break;
                        default:
                            break;
                        }

                        batchInsertPS.setString(6, updateRow.getAppName());
                        batchInsertPS.addBatch();
                    }
                }
                //try inserts
                results = new int[0];
                if (needToInsert) {
                    try {
                        results = batchInsertPS.executeBatch();
                    } catch (java.sql.BatchUpdateException e) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "Continue insert due to BatchPerformanceWorkaround enabled");
                        }
                    }
                    batchInsertPS.close();
                    insertClose=true;
                }
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    int problemCntr = 0;
                    for (int i:results) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "Insert result : " + i);
                        }
                        if (usingOracle && i == java.sql.Statement.SUCCESS_NO_INFO) { //PM99783
                            //Oracle executeBatch() returns -2 (SUCCESS_NO_INFO)
                        }
                        else if (i < 0) {
                            problemCntr++;
                        }
                    }
                    if (problemCntr>0) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "Problem updating/creating "+ problemCntr + " attributes");
                    }
                }
                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "Exitting Loop ... all properties writes are done");
                }
                if (appDataTablesPerThread) {
                    if (d2.appDataChanges != null)
                        d2.appDataChanges.remove(t);
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "remove thread from appDataChanges for thread: " + t);
                    }
                } else { //appDataTablesPerSession
                    if (d2.appDataChanges != null)
                        d2.appDataChanges.clear();
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "clearing appDataChanges");
                    }
                }
            }

            // see if any properties were REMOVED.
            // if so, process them

            Enumeration vEnum2 = null;

            if (d2.appDataRemovals != null) {
                if (!appDataTablesPerThread) { // appDataTablesPerSession
                    vEnum2 = d2.appDataRemovals.keys();
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "doing app removals for " + id + " on ALL threads");
                    }
                } else { //appDataTablesPerThread
                    if ((sht = (Hashtable) d2.appDataRemovals.get(t)) != null) {
                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "doing app removals for " + id + " on thread " + t);
                        }
                        if (sht != null) {
                            vEnum2 = sht.keys();
                        } else {
                            vEnum2 = (new Hashtable()).keys();
                        }
                    }
                }

                if (vEnum2 != null && vEnum2.hasMoreElements()) {
                    batchDeletePS = conn.prepareStatement(delProp);
                    while (vEnum2.hasMoreElements()) {
                        propid = (String) vEnum2.nextElement();
                        if (id.equals(propid)) {
                            //since the attribute was never stored on the database, this will do nothing.
                            //We don't even need a warning because they're removing it.
                            continue;
                        } else {
                            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "deleting prop " + propid + " for session "
                                                                                                                                    + id);
                            }
                        }
                        batchDeletePS.setString(1, id);
                        batchDeletePS.setString(2, propid);
                        batchDeletePS.setString(3, getAppName()); //*dbc2.2
                        batchDeletePS.addBatch();

                        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "after remove, before commit " + propid
                                                                                                                                + " for session " + id);
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "after commit " + propid + " for session " + id);
                        }
                    }
                    int results[] = batchDeletePS.executeBatch();
                    batchDeletePS.close();
                    delClose = true;
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        int problemCntr = 0;
                        for (int i:results) {
                            if (i<=0) {
                                problemCntr++;
                            }
                        }
                        if (problemCntr>0) {
                            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "There was a problem deleting " + problemCntr + " rows");
                        }
                    }
                }

                if (!appDataTablesPerThread) { // appDataTablesPerSession
                    if (d2.appDataRemovals != null)
                        d2.appDataRemovals.clear();
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "clearing appDataRemovals");
                    }
                } else { //appDataTablesPerThread
                    if (d2.appDataRemovals != null)
                        d2.appDataRemovals.remove(t);
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "remove thread from appDataRemovals: " + t);
                    }
                }
            }
        } catch (SQLException se) {
            //            if (isStaleConnectionException(se)) {
            //                com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMapMR.handlePropertyHits", "422", d2);
            //                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "StaleConnectionException");
            //            } else {
            com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMapMR.handlePropertyHits", "428", d2);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "DatabaseHashMapMR.propHitErr");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "CommonMessage.exception", se);
            //            }
        } catch (Exception ee) {
            com.ibm.ws.ffdc.FFDCFilter.processException(ee, "com.ibm.ws.session.store.db.DatabaseHashMapMR.handlePropertyHits", "444", d2);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "DatabaseHashMapMR.propHitErr");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[HANDLE_PROPERTY_HITS], "CommonMessage.exception", ee);
        } finally {
            if (!updateClose && batchUpdatePS!=null) {
                closeStatement(batchUpdatePS);
            }
            if (!insertClose && batchInsertPS!=null) {
                closeStatement(batchInsertPS);
            }
            if (!delClose && batchDeletePS != null) {
                closeStatement(batchDeletePS);
            }
            if (conn != null) {
                closeConnection(conn);
            }
        }
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[HANDLE_PROPERTY_HITS], Boolean.valueOf(true));
        }
        return true; // 325643
    }
838594
public void addErrorsProperties(Map<String,Object> properties, Object errorsType)
    {
        try {
            Method method = errorsType.getClass().getMethod("getErrors", EMPTY_PARAMS);
            if (method != null)
            {
                Object value = method.invoke(errorsType, EMPTY_DATA);
                if (value instanceof List<?>)
                {
                    for (Object errorType : (List<?>)value)
                    {
                        method = errorType.getClass().getMethod("getShortText", EMPTY_PARAMS);
                        if (method != null)
                        {
                            value = method.invoke(errorType, EMPTY_DATA);
                            if (value instanceof String)
                                properties.put("Error", value);
                        }
                    }                
                }
            }
        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
853396
@Override
   public void writeImport(Definition def, Writer out) throws IOException
   {
      out.write("package " + def.getRaPackage() + ".inflow;\n\n");
      importLogging(def, out);

      if (def.isUseAnnotation())
      {
         out.write("import javax.resource.spi.Activation;");
         writeEol(out);
      }
      out.write("import javax.resource.spi.ActivationSpec;\n");
      if (def.isUseAnnotation())
      {
         importConfigProperty(def, out);
      }
      out.write("import javax.resource.spi.InvalidPropertyException;\n");
      out.write("import javax.resource.spi.ResourceAdapter;\n");

      if (def.isUseAnnotation())
      {
         for (int i = 0; i < getConfigProps(def).size(); i++)
         {
            if (getConfigProps(def).get(i).isRequired())
            {
               out.write("import javax.validation.constraints.NotNull;\n");
               break;
            }
         }
      }
   }
147658
def allowed_methods(self):
        
        return [
            method
            for method, allowed in (
                ('GET', hasattr(self, 'on_get')),
                ('POST', hasattr(self, 'on_post')),
                ('PUT', hasattr(self, 'on_put')),
                ('PATCH', hasattr(self, 'on_patch')),
                ('DELETE', hasattr(self, 'on_delete')),
                ('HEAD', hasattr(self, 'on_head')),
                ('OPTIONS', hasattr(self, 'on_options')),
            ) if allowed
        ]
669266
def _remove_non_methods():
  """"""
  cur_module = sys.modules[__name__]
  my_globals = dict(globals())
  # Import here so that it doesn't get added to the global namespace or deleted.
  # pylint: disable=g-import-not-at-top
  from prettytensor.pretty_tensor_class import PrettyTensor
  for name, _ in six.iteritems(my_globals):
    if not hasattr(PrettyTensor, name):
      delattr(cur_module, name)
  # Remove a couple of special ones....
  if hasattr(cur_module, 'bookkeeper'):
    delattr(cur_module, 'bookkeeper')
530776
def method_missing(method, *args, &block)
      if method[-1] == '='
        # setter
        key = method.slice(0...-1).to_sym

        unless has_key?(key)
          super
        end
        self[key] = args[0]
      else
        unless has_key?(method)
          super
        end

        prop = self[method]
        if prop.is_a? JSFunction
          prop.call_with_instance(self, *args, &block)
        else
          prop
        end
      end
    end
1120341
public void unregisterCallback(String importer) {
        if (   importer == null
            || !m_callbacks.getReference().containsKey(importer)
            || m_unregistered.getReference().contains(importer))
        {
            return;
        }
        if (m_done.get()) return;

        int [] rstamp = new int[]{0};
        NavigableMap<String,ChannelChangeCallback> rprev = null;
        NavigableMap<String,ChannelChangeCallback> rnext = null;

        int [] ustamp = new int[]{0};
        NavigableSet<String> uprev = null;
        NavigableSet<String> unext = null;

        synchronized(m_undispatched) {
            do {
                rprev = m_callbacks.get(rstamp);
                rnext = ImmutableSortedMap.<String,ChannelChangeCallback>naturalOrder()
                        .putAll(Maps.filterKeys(rprev, not(equalTo(importer))))
                        .build();
            } while (rprev.containsKey(importer) && !m_callbacks.compareAndSet(rprev, rnext, rstamp[0], rstamp[0]+1));

            do {
                uprev = m_unregistered.get(ustamp);
                unext = ImmutableSortedSet.<String>naturalOrder()
                        .addAll(Sets.filter(uprev, not(equalTo(importer))))
                        .add(importer)
                        .build();
            } while (!uprev.contains(importer) && m_unregistered.compareAndSet(uprev, unext, ustamp[0], ustamp[0]+1));

            Iterator<ImporterChannelAssignment> itr = m_undispatched.iterator();
            while (itr.hasNext()) {
                final ImporterChannelAssignment assignment = itr.next();
                if (unext.contains(assignment.getImporter())) {
                    itr.remove();
                }
            }
        }
    }
79245
def _add_list_getter(self):
        
        prop_name = '%s_lst' % self._prop_name
        property_ = property(self._list_getter, None, None)
        setattr(self._element_cls, prop_name, property_)
718813
function convertSteal(context, pkg, steal, root, ignoreWaiting, resavePackageInfo) {
	if(!steal) {
		return steal;
	}
	var copy = utils.extend({}, steal, true);
	var waiting = utils.isArray(ignoreWaiting) ? ignoreWaiting : [];
	if(steal.meta) {
		steal.meta = convertPropertyNames(context, pkg, steal.meta, root,
										  waiting);
	}
	if(steal.map) {
		steal.map = convertPropertyNamesAndValues(context, pkg, steal.map,
												  root, waiting);
	}
	if(steal.paths) {
		steal.paths = convertPropertyNames(context, pkg, steal.paths, root,
										   waiting);
	}
	// needed for builds
	if(steal.buildConfig) {
		steal.buildConfig = convertSteal(context, pkg, steal.buildConfig,
										  root, waiting);
	}

	// Push the waiting conversions down.
	if(ignoreWaiting !== true && waiting.length) {
		convertLater(context, waiting, function(){
			var context = this;
			var local = utils.extend({}, copy, true);
			var config = convertSteal(context, pkg, local, root, true);

			// If we are building we need to resave the package's system
			// configuration so that it will be written out into the build.
			if(context.resavePackageInfo && resavePackageInfo !== false) {
				var info = utils.pkg.findPackageInfo(context, pkg);
				info.steal = info.system = config;
			}

			// Temporarily remove steal.main so that it doesn't set System.main
			var stealMain = config.main;
			delete config.main;
			delete config.transpiler;
			context.loader.config(config);
			config.main = stealMain;
		});
	}

	return steal;
}
679993
private boolean deleteSettersGetters(JDefinedClass clazz, String fieldPublicName) {
		boolean result = false;

		for (Iterator<JMethod> iter = clazz.methods().iterator(); iter.hasNext();) {
			JMethod m = iter.next();

			if (m.name().equals("set" + fieldPublicName) || m.name().equals("get" + fieldPublicName)) {
				iter.remove();
				result = true;
			}
		}

		return result;
	}
1371229
static ImmutableSet<ExecutableElement> propertyMethodsIn(Set<ExecutableElement> abstractMethods) {
    ImmutableSet.Builder<ExecutableElement> properties = ImmutableSet.builder();
    for (ExecutableElement method : abstractMethods) {
      if (method.getParameters().isEmpty()
          && method.getReturnType().getKind() != TypeKind.VOID
          && objectMethodToOverride(method) == ObjectMethod.NONE) {
        properties.add(method);
      }
    }
    return properties.build();
  }