private VariableReference createOrReuseObjectVariable(TestCase test,int position,int recursionDepth,VariableReference exclude,boolean allowNull,boolean canUseMocks) throws ConstructionFailedException {
  double reuse=Randomness.nextDouble();
  if (reuse <= Properties.PRIMITIVE_REUSE_PROBABILITY) {
    List<VariableReference> candidates=getCandidatesForReuse(test,Object.class,position,exclude,allowNull,canUseMocks);
    filterVariablesByCastClasses(candidates);
    logger.debug("Choosing object from: {}",candidates);
    if (!candidates.isEmpty())     return Randomness.choice(candidates);
  }
  logger.debug("Attempting object generation");
  return attemptObjectGeneration(test,position,recursionDepth,true);
}

private VariableReference createOrReuseObjectVariable ( TestCase test , int position , int recursionDepth , VariableReference exclude , boolean allowNull , boolean canUseMocks ) throws ConstructionFailedException { double reuse = Randomness . nextDouble ( ) ; if ( reuse <= Properties . PRIMITIVE_REUSE_PROBABILITY ) { List < VariableReference > candidates = getCandidatesForReuse ( test , Object . class , position , exclude , allowNull , canUseMocks ) ; filterVariablesByCastClasses ( candidates ) ; logger . debug ( "Choosing object from: {}" , candidates ) ; if ( ! candidates . isEmpty ( ) ) return Randomness . choice ( candidates ) ; } logger . debug ( "Attempting object generation" ) ; return attemptObjectGeneration ( test , position , recursionDepth , true ) ; }
create or reuse a variable that can be assigned to object . class
