protected DynamicThread makeThread(long threadIndex) {
   boolean onErrorStopTest = owner.getOnErrorStopTest();
   boolean onErrorStopTestNow = owner.getOnErrorStopTestNow();
   boolean onErrorStopThread = owner.getOnErrorStopThread();
   boolean onErrorStartNextLoop = owner.getOnErrorStartNextLoop();
   final DynamicThread jmeterThread = new DynamicThread(treeClone, this.owner, notifier);
   jmeterThread.setThreadNum((int) threadIndex);
   jmeterThread.setThreadGroup(this.owner);
   jmeterThread.setInitialContext(context);
   final String threadName = owner.getName() + " " + groupIndex + "-" + (threadIndex + 1);
   jmeterThread.setThreadName(threadName);
   jmeterThread.setEngine(engine);
   jmeterThread.setOnErrorStopTest(onErrorStopTest);
   jmeterThread.setOnErrorStopTestNow(onErrorStopTestNow);
   jmeterThread.setOnErrorStopThread(onErrorStopThread);
   jmeterThread.setOnErrorStartNextLoop(onErrorStartNextLoop);
   return jmeterThread;
 }