looks to see if a load and store operation are working on the same type of array

@param load
the load instruction on an array
@param store
the store instruction on an array
@return whether the type of the load and store are the same
554794
private static boolean similarArrayInstructions(int load, int store) {
        return ((load == Const.AALOAD) && (store == Const.AASTORE)) || ((load == Const.IALOAD) && (store == Const.IASTORE))
                || ((load == Const.DALOAD) && (store == Const.DASTORE)) || ((load == Const.LALOAD) && (store == Const.LASTORE))
                || ((load == Const.FALOAD) && (store == Const.FASTORE)) || ((load == Const.BALOAD) && (store == Const.BASTORE))
                || ((load == Const.CALOAD) && (store == Const.CASTORE)) || ((load == Const.SALOAD) && (store == Const.SASTORE));
    }
61047
@Override
    public void insert(Session session, PersistentStore store, Row row) {

        NodeAVL n;
        NodeAVL x;
        boolean isleft  = true;
        int     compare = -1;

        writeLock.lock();

        try {
            n = getAccessor(store);
            x = n;

            if (n == null) {
                store.setAccessor(this, ((RowAVL) row).getNode(position));

                return;
            }

            while (true) {
                Row currentRow = n.getRow(store);

                compare = compareRowForInsertOrDelete(session, row,
                                                      currentRow);

                if (compare == 0) {
                    throw Error.error(ErrorCode.X_23505);
                }

                isleft = compare < 0;
                x      = n;
                n      = child(store, x, isleft);

                if (n == null) {
                    break;
                }
            }

            x = set(store, x, isleft, ((RowAVL) row).getNode(position));

            balance(store, x, isleft);
        } finally {
            writeLock.unlock();
        }
    }
773334
@SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
    public Object readArray(Type target) {
        int count = readInteger();
        log.debug("Count: {} and {} ref {}", new Object[] { count, (count & 1), (count >> 1) });
        if ((count & 1) == 0) {
            //Reference
            Object ref = getReference(count >> 1);
            if (ref != null) {
                return ref;
            }
        }
        count = (count >> 1);
        String key = readString();
        amf3_mode += 1;
        Object result;
        if (key.equals("")) {
            Class<?> nested = Object.class;
            Class<?> collection = Collection.class;
            Collection resultCollection;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 1) {
                    nested = (Class<?>) actualTypeArguments[0];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (collection.isArray()) {
                nested = ArrayUtils.getGenericType(collection.getComponentType());
                result = Array.newInstance(nested, count);
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    Array.set(result, i, value);
                }
            } else {
                if (SortedSet.class.isAssignableFrom(collection)) {
                    resultCollection = new TreeSet();
                } else if (Set.class.isAssignableFrom(collection)) {
                    resultCollection = new HashSet(count);
                } else {
                    resultCollection = new ArrayList(count);
                }
                result = resultCollection;
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    resultCollection.add(value);
                }
            }
        } else {
            Class<?> v = Object.class;
            Class<?> collection = Collection.class;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 2) {
                    //k = (Class<?>) actualTypeArguments[0];
                    v = (Class<?>) actualTypeArguments[1];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (SortedMap.class.isAssignableFrom(collection)) {
                collection = TreeMap.class;
            } else {
                collection = HashMap.class;
            }
            Map resultMap;
            try {
                resultMap = (Map) collection.newInstance();
            } catch (Exception e) {
                resultMap = new HashMap(count);
            }
            // associative array
            storeReference(resultMap);
            while (!key.equals("")) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(key, value);
                key = readString();
            }
            for (int i = 0; i < count; i++) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(i, value);
            }
            result = resultMap;
        }
        amf3_mode -= 1;
        return result;
    }
598345
function Provider(storage) {
  Object.defineProperties(this, {

    /**
     * The provider storage.
     *
     * @property storage
     * @type Storage
     * @final
     */
    storage: {value: storage}

  });

  if (!(this.storage instanceof Storage))
    throw new TypeError('storage must be of type Storage');
}
112519
public boolean checkInstanceOf(Context context, CharSequence targetClassName,
            CharSequence loaderPackage, Class<?> referenceClass) {
        if ((targetClassName == null) || (referenceClass == null)) {
            return false;
        }

        final Class<?> targetClass = loadOrGetCachedClass(context, targetClassName, loaderPackage);
        if (targetClass == null) {
            return false;
        }

        return referenceClass.isAssignableFrom(targetClass);
    }
295513
@Override
    public RowIterator findFirstRow(Session session, PersistentStore store,
                                    Object value, int compare) {

        readLock.lock();

        try {
            if (compare == OpTypes.SMALLER
                    || compare == OpTypes.SMALLER_EQUAL) {
                return findFirstRowNotNull(session, store);
            }

            boolean isEqual = compare == OpTypes.EQUAL
                              || compare == OpTypes.IS_NULL;
            NodeAVL x     = getAccessor(store);
            int     iTest = 1;

            if (compare == OpTypes.GREATER) {
                iTest = 0;
            }

            if (value == null && !isEqual) {
                return emptyIterator;
            }

            // this method returns the correct node only with the following conditions
            boolean check = compare == OpTypes.GREATER
                            || compare == OpTypes.EQUAL
                            || compare == OpTypes.GREATER_EQUAL;

            if (!check) {
                Error.runtimeError(ErrorCode.U_S0500, "Index.findFirst");
            }

            while (x != null) {
                boolean t = colTypes[0].compare(
                    value, x.getRow(store).getData()[colIndex[0]]) >= iTest;

                if (t) {
                    NodeAVL r = x.getRight(store);

                    if (r == null) {
                        break;
                    }

                    x = r;
                } else {
                    NodeAVL l = x.getLeft(store);

                    if (l == null) {
                        break;
                    }

                    x = l;
                }
            }

/*
        while (x != null
                && Column.compare(value, x.getData()[colIndex_0], colType_0)
                   >= iTest) {
            x = next(x);
        }
*/
            while (x != null) {
                Object colvalue = x.getRow(store).getData()[colIndex[0]];
                int    result   = colTypes[0].compare(value, colvalue);

                if (result >= iTest) {
                    x = next(store, x);
                } else {
                    if (isEqual) {
                        if (result != 0) {
                            x = null;
                        }
                    } else if (colvalue == null) {
                        x = next(store, x);

                        continue;
                    }

                    break;
                }
            }

// MVCC
            if (session == null || x == null) {
                return getIterator(session, store, x);
            }

            while (x != null) {
                Row row = x.getRow(store);

                if (compare == OpTypes.EQUAL
                        && colTypes[0].compare(
                            value, row.getData()[colIndex[0]]) != 0) {
                    x = null;

                    break;
                }

                if (session.database.txManager.canRead(session, row)) {
                    break;
                }

                x = next(store, x);
            }

            return getIterator(session, store, x);
        } finally {
            readLock.unlock();
        }
    }
825738
private boolean spaceExists(final StorageProvider store,
                                final String spaceId)
        throws TaskExecutionFailedException {
        try {
            return new Retrier().execute(new Retriable() {
                @Override
                public Boolean retry() throws Exception {
                    // The actual method being executed
                    store.getSpaceProperties(spaceId);
                    return true;
                }
            });
        } catch (NotFoundException nfe) {
            return false;
        } catch (Exception e) {
            String msg = "Error attempting to check if space exists: " +
                         e.getMessage();
            throw new DuplicationTaskExecutionFailedException(
                buildFailureMessage(msg), e);
        }
    }
53810
public boolean contains(final AbstractDynamoDbStore store, final StaticBuffer key, final StaticBuffer column) {
        return expectedValues.containsKey(store)
            && expectedValues.get(store).containsKey(key)
            && expectedValues.get(store).get(key).containsKey(column);
    }
839272
public Store getStore(StoreConfiguration storeConfiguration, List<Class<?>> types) {
        StoreKey key = StoreKey.builder().uri(storeConfiguration.getUri().normalize()).username(storeConfiguration.getUsername()).build();
        Store store = storesByKey.get(key);
        if (store == null) {
            store = StoreFactory.getStore(storeConfiguration);
            store.start(types);
            storesByKey.put(key, store);
            keysByStore.put(store, key);
        }
        return store;
    }
651422
def CompareStores(self):
    
    storage_reader = storage_factory.StorageFactory.CreateStorageReaderForFile(
        self._storage_file_path)
    if not storage_reader:
      logger.error(
          'Format of storage file: {0:s} not supported'.format(
              self._storage_file_path))
      return False

    compare_storage_reader = (
        storage_factory.StorageFactory.CreateStorageReaderForFile(
            self._compare_storage_file_path))
    if not compare_storage_reader:
      logger.error(
          'Format of storage file: {0:s} not supported'.format(
              self._compare_storage_file_path))
      return False

    try:
      result = self._CompareStores(storage_reader, compare_storage_reader)

    finally:
      compare_storage_reader.Close()
      storage_reader.Close()

    if result:
      self._output_writer.Write('Storage files are identical.\n')
    else:
      self._output_writer.Write('Storage files are different.\n')

    return result
1291080
private static boolean areDuplicateMethodDescriptors(
      FactoryMethodDescriptor factory,
      ImplementationMethodDescriptor implementation) {

    if (!factory.name().equals(implementation.name())) {
      return false;
    }

    // Descriptors are identical if they have the same passed types in the same order.
    return MoreTypes.equivalence().pairwise().equivalent(
        Iterables.transform(factory.passedParameters(), Parameter.TYPE),
        Iterables.transform(implementation.passedParameters(), Parameter.TYPE));
  }
1337244
private static boolean isLoadable(Class<?> clazz, ClassLoader classLoader) {
        try {
            return (clazz == classLoader.loadClass(clazz.getName()));
            // Else: different class with same name found
        } catch (ClassNotFoundException ex) {
            // No corresponding class found at all
            return false;
        }
    }
101536
private void ensureSize(int minsize) {
    if(minsize <= store.length) {
      return;
    }
    int asize = store.length;
    while(asize < minsize) {
      asize = (asize >>> 1) + asize;
    }
    final int[] prev = store;
    store = new int[asize];
    System.arraycopy(prev, 0, store, 0, size);
  }
584159
protected boolean isStoreValid() {
        boolean result = false;
        String requestURI = this.request.getUri();
        this.storeName = parseStoreName(requestURI);
        if(storeName != null) {
            result = true;
        } else {
            logger.error("Error when validating request. Missing store name.");
            RestErrorHandler.writeErrorResponse(this.messageEvent,
                                                HttpResponseStatus.BAD_REQUEST,
                                                "Missing store name. Critical error.");
        }
        return result;
    }
1268441
public void setTablesToReload(java.util.Collection<TableToReload> tablesToReload) {
        if (tablesToReload == null) {
            this.tablesToReload = null;
            return;
        }

        this.tablesToReload = new java.util.ArrayList<TableToReload>(tablesToReload);
    }
503838
public boolean isArray() {
		if (type == null) {
			return false;
		}
		return type.isArray() || List.class.isAssignableFrom(type) || Set.class.isAssignableFrom(type);
	}
203601
protected boolean isSlopDead(Cluster cluster, Set<String> storeNames, Slop slop) {
        // destination node , no longer exists
        if(!cluster.getNodeIds().contains(slop.getNodeId())) {
            return true;
        }

        // destination store, no longer exists
        if(!storeNames.contains(slop.getStoreName())) {
            return true;
        }

        // else. slop is alive
        return false;
    }