示例#1
0
 def __make__while(self, useClasses):
     c1 = JOcHelper.getMethodCondition(self.mMethod)
     c2 = JOcHelper.getMethodCondition(self.mMethod, True)
     s1 = JOcMixBlock(self.mMethod)
     s2 = JOcMixBlock(self.mMethod)
     s1.__push__if(c2, s2)
     s2.__make__statement(useClasses)
     if (random.random() < 0.3):
         s2.makeReturn()
     else:
         s2.__push__statement('break;')
     self.__push__while(c1, s1)
示例#2
0
 def __make__if(self, useClasses):
     c1 = JOcHelper.getMethodCondition(self.mMethod)
     s1 = JOcMixBlock(self.mMethod)
     s1.__make__statement(useClasses)
     if (random.random() < 0.3):
         s1.makeReturn()
     self.__push__if(c1, s1)