/** * Called by instrumented code each time a field method call is passed * * Since it was not clear whether the field method call constitutes a * definition or a use when the instrumentation was initially added this * method will redirect the call accordingly * * @param caller * @param defuseId */ public static void passedFieldMethodCall(Object callee, Object caller, int defuseId) { ExecutionTracer tracer = getExecutionTracer(); if (tracer.disabled) return; if (isThreadNeqCurrentThread()) return; if (DefUsePool.isKnownAsDefinition(defuseId)) { Definition passedDef = DefUsePool.getDefinitionByDefUseId(defuseId); passedDefinition(callee, caller, passedDef.getDefId()); } else if (DefUsePool.isKnownAsUse(defuseId)) { Use passedUse = DefUsePool.getUseByDefUseId(defuseId); passedUse(callee, caller, passedUse.getUseId()); } else throw new EvosuiteError( "instrumentation called passedFieldMethodCall with invalid defuseId: " + defuseId + ", known IDs: " + DefUsePool.getDefUseCounter()); }