Color-octet fraction in J / ψ production and absorption