taskQuery.taskCandidateGroup("R1") returns running tasks for R1 group is set as candidate group.
If instances of both tasks C and E are returned then both are running tasks in which the candidate group is set to R1. If you want to return only instances of task C then you can be more specific and query by task definition key taskQuery.taskDefinitionKey("<C_TASK_DEF_KEY>")