While this works, it is misleading... (we are setting isTakeName to false, but the current iteration IS part of the task name....
I would set up the loop as a for loop like so:
for (int i = 0;
      i < taskParts.length &&
                !taskParts[i].contains("/") &&
                !taskParts[i].contains(":");
      i++)

The condition to check in the for loop is a bit long this way, but you would remove the need for the isTaskName boolean as well as the need for the 3 internal if statements. This would significantly simplify this part of the code.