Modified setProgrammingMode(), setStartRunningMode() and its test codes