Check if an object is copyable using the {@link #copy(Object)} method.
@param thing: the object that needs to be copied
@return: true if {@link CopyHelper} can copy this thing, false otherwise
497265
public static boolean isCopyable(Object thing) {
    if (
        (thing instanceof Copyable)
            || (thing instanceof byte[])
            || (isImmutableType(thing))
        ) {
      return true;
    }
    return false;
  }
1351175
public boolean copy() {
        boolean result = false;
        WebElement element = getActiveElement();
        if (element != null) {
            if (connectedToMac()) {
                element.sendKeys(Keys.CONTROL, Keys.INSERT);
            } else {
                element.sendKeys(Keys.CONTROL, "c");
            }
            result = true;
        }
        return result;
    }
101991
public static boolean instanceOf(Object a, Object b, Context cx)
    {
        // Check RHS is an object
        if (! (b instanceof Scriptable)) {
            throw typeError0("msg.instanceof.not.object");
        }

        // for primitive values on LHS, return false
        if (! (a instanceof Scriptable))
            return false;

        return ((Scriptable)b).hasInstance((Scriptable)a);
    }
1088941
private boolean isCopyModel(I_CmsDraggable draggable) {

        if (!(draggable instanceof CmsResultListItem)) {
            return false;
        }
        return ((CmsResultListItem)draggable).getResult().isCopyModel();
    }
132834
private boolean isObjectTypeWithNonStringifiableKey(JSType type) {
    if (!type.isTemplatizedType()) {
      return false;
    }
    TemplatizedType templatizedType = type.toMaybeTemplatizedType();
    if (templatizedType.getReferencedType().isNativeObjectType()
        && templatizedType.getTemplateTypes().size() > 1) {
      return !isReasonableObjectPropertyKey(templatizedType.getTemplateTypes().get(0));
    } else {
      return false;
    }
  }
640766
public static boolean isObjectMethod(Method method) {
		if (method == null) {
			return false;
		}
		try {
			Object.class.getDeclaredMethod(method.getName(), method.getParameterTypes());
			return true;
		}
		catch (Exception ex) {
			return false;
		}
	}
1301985
public static void copyStrokableProperties(HasStroke strokableOriginal, HasStroke strokableCopy) {
		strokableCopy.setStrokeOpacity(strokableOriginal.getStrokeOpacity());
		strokableCopy.setStrokeColor(strokableOriginal.getStrokeColor());
		strokableCopy.setStrokeWidth(strokableOriginal.getStrokeWidth());
	}
273685
public boolean isUnifiableWith(SyntacticCategory other) {
    Map<Integer, String> myAssignedVariables = Maps.newHashMap();
    Map<Integer, String> otherAssignedVariables = Maps.newHashMap();
    Map<Integer, Integer> variableRelabeling = Maps.newHashMap();

    // System.err.println("unifying: " + this + " " + other);
    return isUnifiableWith(other, myAssignedVariables, otherAssignedVariables, variableRelabeling); 
  }
683166
def instance=(thing)
      if instance_variable_defined?(:@instance)
        raise(JSI::Bug, "overwriting instance is not supported")
      end
      if thing.is_a?(Base)
        warn "assigning instance to a Base instance is incorrect. received: #{thing.pretty_inspect.chomp}"
        @instance = thing.instance
      elsif thing.is_a?(JSI::JSON::Node)
        @instance = thing
      else
        @instance = JSI::JSON::Node.new_doc(thing)
      end
    end
835480
public static void copyFillableProperties(HasFill fillableOriginal, HasFill fillableCopy) {
		fillableCopy.setFillOpacity(fillableOriginal.getFillOpacity());
		fillableCopy.setFillColor(fillableOriginal.getFillColor());
	}
1183334
@Override
  public T copy(final T obj) {
    try {
      return serializer.read(serializer.serialize(obj));
    } catch (ClassNotFoundException e) {
      throw new SerializerException("Copying failed.", e);
    }
  }
105680
public boolean equalsTo(Object o)
    {
        if(o == null || !(o instanceof Reference))
        {
            return false;
        }
        
        Reference refCompared = (Reference)o;
        if(!StringUtil.isEquals(sections, refCompared.sections)) return false;
        if(systemUnderTest == null || !systemUnderTest.equalsTo(refCompared.systemUnderTest)) return false;
        if(requirement == null || !requirement.equalsTo(refCompared.requirement)) return false;
        if(specification == null || !specification.equalsTo(refCompared.specification)) return false;
        
        return true;
    }
1115626
public static Object copy(Object orig) throws NotSerializableException {
        Object obj = null;
        try {
            // Write the object out to a byte array
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(bos);
            out.writeObject(orig);
            out.flush();
            out.close();

            // Make an input stream from the byte array and read
            // a copy of the object back in.
            ObjectInputStream in = new ObjectInputStream(
                    new ByteArrayInputStream(bos.toByteArray()));
            obj = in.readObject();
        } catch (NotSerializableException e) {
            throw e;
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException cnfe) {
            cnfe.printStackTrace();
        }
        return obj;
    }
285818
public static boolean isObject( Object obj ) {
      return !isNumber( obj ) && !isString( obj ) && !isBoolean( obj ) && !isArray( obj )
            && !isFunction( obj ) || isNull( obj );
   }
1370884
public static <S, T> Copy<S, T> to(Position.Readable<T> targetPosition, Position.Readable<S> sourcePosition) {
        return new Copy<>(sourcePosition, targetPosition);
    }
1199588
@SuppressWarnings("NullAway")
  protected final @NonNull <T> T copyOf(@Nullable T object) {
    if (object == null) {
      return null;
    }
    T copy = copier.copy(object, cacheManager.getClassLoader());
    return requireNonNull(copy);
  }
670564
function isImmutable(object) {
  return !!(object && typeof object.hasOwnProperty === 'function' && (object.hasOwnProperty('__ownerID') || // Immutable.Map
  object._map && object._map.hasOwnProperty('__ownerID'))); // Immutable.Record
}