Basis path testing is a method used to identify code defects. The determination of independent paths on basis path testing can be generated by using Genetic Algorithm. However, this method has a weakness. In example, the number of iterations can affect the emersion of basis path. When the iteration is low, it results in the incomplete path occurences. Conversely, if iteration is plentiful resulting to path occurences, after a certain iteration, unfortunately, the result does not change. This study aims to perform the optimization of Genetic Algorithm performance for independent path determination by determining how many iteration levels match the characteristics of the code. The characteristics of the code used include Node, Edge, VG, NBD, and LOC. Moreover, Naïve Bayes is a method used to predict the exact number of iterations based on 17 selected code data into training data, and 16 data into test data. The result of system accuracy test is able to predict the exact iteration of 93.75% from 16 test data. Time-test results show that the new system was able to complete an independent search path being faster 15% than the old system.