bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def clearPlotarea(self): self.drawBox( PLOTAREA_COLOR, self.thePlotArea[0] + 1, self.thePlotArea[1] + 1, self.thePlotArea[2] - 2, self.thePlotArea[3] -2 )
def clearPlotarea(self): self.drawBox( PLOTAREA_COLOR, self.thePlotArea[0] + 1, self.thePlotArea[1] + 1, self.thePlotArea[2] - 1, self.thePlotArea[3] -1 )
34,700
def removeInstance( self, anInstance ):
def removeInstance( self, anInstance ):
34,701
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
34,702
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
34,703
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
34,704
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
34,705
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) )
34,706
def createInstance( self, classname, data, rootWidget=None, parent=None ): ''' classname --- a class name of PluginWindow (str) data --- a RawFullPN (RawFullPN) rootWidget --- a root widget (str or None) parent --- a parentWindow (Window) # NOT gtk.Window ''' if self.thePluginMap.has_key( classname ): pas...
def createInstance( self, classname, data, rootWidget=None, parent=None ): ''' classname --- a class name of PluginWindow (str) data --- a RawFullPN (RawFullPN) rootWidget --- a root widget (str or None) parent --- a parentWindow (Window) # NOT gtk.Window ''' if self.thePluginMap.has_key( classname ): pas...
34,707
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
34,708
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
34,709
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
34,710
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
def loadModel( self, aFileObject ): anEmlParser = eml.EmlParser( aFileObject ) self.__thePreModel = anEmlParser.parse()
34,711
def __init__(self): '''constructor '''
def __init__(self): '''constructor '''
34,712
def __init__(self): '''constructor '''
def __init__(self): '''constructor '''
34,713
def __init__(self): '''constructor '''
def __init__(self): '''constructor '''
34,714
def retry(self): '''retrys Return None '''
def retry(self): '''retry Return None '''
34,715
def retry(self): '''retrys Return None '''
def retry(self): '''retrys Return None '''
34,716
def run(self): '''runs process Return None '''
def run(self): '''run process Return None '''
34,717
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,718
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,719
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,720
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,721
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,722
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,723
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,724
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,725
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,726
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,727
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,728
def run(self): '''runs process Return None '''
def run(self): '''runs process Return None '''
34,729
def update( self ): '''updates jobs's status Return None '''
def update( self ): '''update jobs's status Return None '''
34,730
def update( self ): '''updates jobs's status Return None '''
def update( self ): '''updates jobs's status Return None '''
34,731
def stop(self): '''stops the job Return None '''
def stop(self): '''stop the job Return None '''
34,732
def stop(self): '''stops the job Return None '''
def stop(self): '''stops the job Return None '''
34,733
def __init__( self, gladefile=None, root=None ):
def __init__( self, gladefile=None, root=None ):
34,734
def __init__( self, aMainWindow ):
def __init__( self, aMainWindow ):
34,735
def updateSystemSelection( self, obj=None ): aSelectedSystemIter = self.theSystemTree.get_selection().get_selected()[1] if aSelectedSystemIter == None: return
def updateSystemSelection( self, obj=None ): aSelectedSystemIter = self.theSystemTree.get_selection().get_selected()[1] if aSelectedSystemIter == None: return
34,736
def interact( self, parameters={} ):
def interact( self, parameters={} ):
34,737
def loadModel( self, aFile ): if type( aFile ) == str: aFileObject = open( aFile ) else: aFileObject = aFile
def loadModel( self, aFile ): if type( aFile ) == str: aFileObject = open( aFile ) else: aFileObject = aFile
34,738
def __loadEntity( self, anEml, aSystemPath='/' ):
def __loadEntity( self, anEml, aSystemPath='/' ):
34,739
def __loadEntity( self, anEml, aSystemPath='/' ):
def __loadEntity( self, anEml, aSystemPath='/' ):
34,740
def __loadEntityList( self, anEml, anEntityTypeString, aSystemPath, anIDList ): for anID in anIDList:
def __loadEntityList( self, anEml, anEntityTypeString, aSystemPath, anIDList ): for anID in anIDList:
34,741
def startSimulation( self, a ) : if self.theLoadModelChecker == 1: self.theRunningFlag = 1 self.theSession.printMessage( "Start\n" ) self.theTimer = gtk.timeout_add(self.theUpdateInterval, self.updateByTimeOut, 0) self.theLoggerWindow.update() self.theSession.run() self.removeTimeOut()
defelse: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) startSimulation(else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) self,else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) aelse: self.theSession.printMessage( 'WARNING:need load mod...
34,742
def stopSimulation( self, a ) : if self.theLoadModelChecker == 1: if self.theRunningFlag: self.theRunningFlag = 0 self.theSession.stop() self.theSession.printMessage( "Stop\n" ) self.removeTimeOut() self.update() self.theLoggerWindow.update()
defelse: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) stopSimulation(else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) self,else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) aelse: self.theSession.printMessage( 'WARNING:need load mode...
34,743
def stepSimulation( self, a ) : if self.theLoadModelChecker == 1: self.theSession.printMessage( "Step\n" ) self['step_combo_entry'].set_text( str( self.theStepSize ) ) self.theTimer = gtk.timeout_add( self.theUpdateInterval, self.updateByTimeOut, 0 ) if self.theStepType == 0: self.theSession.run( self.theStepSize ) els...
defelse: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) stepSimulation(else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) self,else: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) aelse: self.theSession.printMessage( 'WARNING:need load mode...
34,744
def toggleEntryList( self, button_obj ): #fix me: this part is Root System's bug. if self.theStepperChecker == 1 and self.theEntryChecker == 0: self.theEntryListWindow = EntryListWindow.EntryListWindow( self ) self.theEntryListWindowWindow = self.theEntryListWindow[ 'entry_list_window' ] self.theEntryChecker = 1 if se...
defif self.theStepperChecker == 0 and self.theEntryChecker == 0: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) toggleEntryList(if self.theStepperChecker == 0 and self.theEntryChecker == 0: self.theSession.printMessage( 'WARNING:need load model or script!!\n' ) self,if self.theStepperChecker ==...
34,745
def __init__( self, aFileObject=None ): """read EML file and make domtree"""
def __init__( self, aFileObject=None ): """read EML file and make domtree"""
34,746
def __init__( self, aFileObject=None ): """read EML file and make domtree"""
def__init__(self,aFileObject=None):"""readEMLfileandmakedomtree"""
34,747
def __init__( self, aFileObject=None ): """read EML file and make domtree"""
def__init__(self,aFileObject=None):"""readEMLfileandmakedomtree"""
34,748
def loadModel( self, aModel ): # aModel : an EML instance, a file name (string) or a file object # return -> None # This method can thwor exceptions.
def loadModel( self, aModel ): # aModel : an EML instance, a file name (string) or a file object # return -> None # This method can thwor exceptions.
34,749
def loadModel( self, aModel ): # aModel : an EML instance, a file name (string) or a file object # return -> None # This method can thwor exceptions.
def loadModel( self, aModel ): # aModel : an EML instance, a file name (string) or a file object # return -> None # This method can thwor exceptions.
34,750
def __getFullID( self, aClass):
def __getFullID( self, aClass):
34,751
def __getFullID( self, aClass):
def __getFullID( self, aClass):
34,752
def p_propertylist(t): ''' propertylist : propertylist property | property | empty ''' t[0] = createList( 'propertylist', t )
def p_propertylist(t): ''' propertylist : property propertylist | property | empty ''' t[0] = createList( 'propertylist', t )
34,753
def p_valuelist(t): ''' valuelist : valuelist value | value ''' t[0] = createList( 'valuelist', t )
def p_valuelist(t): ''' valuelist : value valuelist | value ''' t[0] = createList( 'valuelist', t )
34,754
def p_matrixlist(t): ''' matrixlist : matrixlist matrix | matrix ''' t[0] = createList( 'matrixlist', t )
def p_matrixlist(t): ''' matrixlist : matrix matrixlist | matrix ''' t[0] = createList( 'matrixlist', t )
34,755
def __loadData( self, *arg ) : """loads model or script file arg[0] --- ok button of FileSelection arg[1] --- 'Model'/'Script' (str) Return None """
defself.theEntityListWindow.setSession( self.theSession ) __loadData(self.theEntityListWindow.setSession( self.theSession ) self,self.theEntityListWindow.setSession( self.theSession ) *argself.theEntityListWindow.setSession( self.theSession ) )self.theEntityListWindow.setSession( self.theSession ) :self.theEntityListWi...
34,756
def animate( self ): if ( self.__running ):
def animate( self ): if ( self.__running ):
34,757
def __deleted( self, *arg ): """When delete_event happens or exit menu is selected, this method is called. """ running_flag = False if self.theSession.theRunningFlag: # stop simulation temporarily self.theSession.stop() running_flag = True
def __deleted( self, *arg ): """When delete_event happens or exit menu is selected, this method is called. """ running_flag = False if self.theSession.theRunningFlag: # stop simulation temporarily self.theSession.stop() running_flag = True
34,758
def close( self ): """ restores message method and closes window """
defclose(self):"""restoresmessagemethodandcloseswindow"""
34,759
def __handleSimulation( self, *arg ) : """handles simulation arg[0] --- simulation button (gtk.Button) Returns None """
def __handleSimulation( self, *arg ) : """handles simulation arg[0] --- simulation button (gtk.Button) Returns None """
34,760
def __handleSimulation( self, *arg ) : """handles simulation arg[0] --- simulation button (gtk.Button) Returns None """
def__handleSimulation(self,*arg):"""handlessimulationarg[0]---simulationbutton(gtk.Button)ReturnsNone"""
34,761
def __saveModel( self, *arg ) :
def __saveModel( self, *arg ) :
34,762
def createEntity( self, aClass, aFullID ):
defcreateEntity(self,aClass,aFullID):
34,763
def createEntity( self, aClass, aFullID ):
defcreateEntity(self,aClass,aFullID):
34,764
def editFile( self, fileName ):
def editFile( self, fileName ):
34,765
def loadStepperProperty( self ): aStepperPropertyList = self.__theEml.getStepperPropertyList() for aStepperProperty in aStepperPropertyList:
def loadStepperProperty( self ): aStepperPropertyList = self.__theEml.getStepperPropertyList() for aStepperProperty in aStepperPropertyList:
34,766
def openWindow( self ):
def openWindow( self ):
34,767
def openWindow( self ):
def self.theEntityListWindow = self.theSession.createEntityListWindow() openWindow( self.theEntityListWindow = self.theSession.createEntityListWindow() self self.theEntityListWindow = self.theSession.createEntityListWindow() ):
34,768
def exit( self, anObject=None ):
def exit( self, anObject=None ):
34,769
def startSimulation( self, obj ) :
defstartSimulation(self,obj):
34,770
def startSimulation( self, obj ) :
def startSimulation( self, obj ) :
34,771
def startSimulation( self, obj ) :
def startSimulation( self, obj ) :
34,772
def stopSimulation( self, obj ) :
def stopSimulation( self, obj ) :
34,773
def stopSimulation( self, obj ) :
def stopSimulation( self, obj ) :
34,774
def stepSimulation( self, obj ) :
defself.theRunningFlag = 1 stepSimulation(self.theRunningFlag = 1 self,self.theRunningFlag = 1 objself.theRunningFlag = 1 )self.theRunningFlag = 1 :
34,775
def stepSimulation( self, obj ) :
def stepSimulation( self, obj ) :
34,776
def stepSimulation( self, obj ) :
def stepSimulation( self, obj ) :
34,777
def openWindow(self):
def openWindow(self):
34,778
def openWindow(self):
def openWindow(self):
34,779
def openWindow(self):
def openWindow(self):
34,780
def openWindow(self):
def openWindow(self):
34,781
def selectStepperID( self, *objects ):
def selectStepperID( self, *objects ):
34,782
def selectStepperID( self, *objects ):
def selectStepperID( self, *objects ):
34,783
def selectStepperID( self, *objects ):
def selectStepperID( self, *objects ):
34,784
def updateProperty( self, *objects ):
def updateProperty( self, *objects ):
34,785
def updateProperty( self, *objects ):
def updateProperty( self, *objects ):
34,786
def shiftplot(self,realshift): #save plotarea self.pm2.draw_drawable(self.pm2.new_gc(),self.pm,self.origo[0]+realshift, self.plotarea[1],0,0,self.plotarea[2]-realshift, self.plotarea[3]) self.clearplotarea() #paste self.pm.draw_drawable(self.pm.new_gc(),self.pm2,0,0,self.origo[0], self.plotarea[1],self.plotarea[2]-real...
def shiftplot(self,realshift): #save plotarea self.pm2.draw_drawable(self.pm2.new_gc(),self.pm,self.origo[0]+realshift, self.plotarea[1],0,0,self.plotarea[2]-realshift, self.plotarea[3]+1) self.clearplotarea() #paste self.pm.draw_drawable(self.pm.new_gc(),self.pm2,0,0,self.origo[0], self.plotarea[1],self.plotarea[2]-re...
34,787
def shiftplot(self,realshift): #save plotarea self.pm2.draw_drawable(self.pm2.new_gc(),self.pm,self.origo[0]+realshift, self.plotarea[1],0,0,self.plotarea[2]-realshift, self.plotarea[3]) self.clearplotarea() #paste self.pm.draw_drawable(self.pm.new_gc(),self.pm2,0,0,self.origo[0], self.plotarea[1],self.plotarea[2]-real...
def shiftplot(self,realshift): #save plotarea self.pm2.draw_drawable(self.pm2.new_gc(),self.pm,self.origo[0]+realshift, self.plotarea[1],0,0,self.plotarea[2]-realshift, self.plotarea[3]+1) self.clearplotarea() #paste self.pm.draw_drawable(self.pm.new_gc(),self.pm2,0,0,self.origo[0], self.plotarea[1],self.plotarea[2]-re...
34,788
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
34,789
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
defreframey(self):#noredraw!#getmaxandminfromdatabuffersifself.zoomlevel==0:self.getminmax()ifself.minmax[0]==self.minmax[1]:ifself.minmax[0]==0:self.minmax[1]=1else:self.minmax[1]=self.minmax[0]+abs(self.minmax[0])#calculateyframemin,maxifself.scale_type=='linear':yrange=(self.minmax[1]-self.minmax[0])/(self.yframemax...
34,790
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
34,791
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]+abs(self.minmax[0]) #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self....
34,792
def withinframes(self,point): return point[0]<self.plotaread[2] and point[0]>self.plotaread[0] and\ point[1]<self.plotaread[3] and point[1]>self.plotaread[1]
def withinframes(self,point): return point[0]<self.plotaread[2] and point[0]>self.plotaread[0] and\ point[1]<=self.plotaread[3] and point[1]>=self.plotaread[1]
34,793
def __init__( self ):
def __init__( self ):
34,794
def __init__( self ):
def __init__( self ):
34,795
def __init__( self ):
def __init__( self ):
34,796
def loadRule( self, button_obj ) : self.theStepperChacker = 1 aFileName = self.theRuleFileSelection.get_filename() self.theRuleFileSelection.hide() self.theSession.printMessage( 'load rule file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.theModelInterpreter.loa...
def loadRule( self, button_obj ) : self.theStepperChecker = 1 aFileName = self.theRuleFileSelection.get_filename() self.theRuleFileSelection.hide() self.theSession.printMessage( 'load rule file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.theModelInterpreter.loa...
34,797
def loadRule( self, button_obj ) : self.theStepperChacker = 1 aFileName = self.theRuleFileSelection.get_filename() self.theRuleFileSelection.hide() self.theSession.printMessage( 'load rule file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.theModelInterpreter.loa...
def loadRule( self, button_obj ) : self.theStepperChacker = 1 aFileName = self.theRuleFileSelection.get_filename() self.theRuleFileSelection.hide() self.theSession.printMessage( 'loading rule file %s\n' % aFileName ) self.theSession.loadModel( aFileName ) self.theSession.theSimulator.initialize()
34,798
def loadScript( self, button_obj ): self.theStepperChacker = 1 aFileName = self.theScriptFileSelection.get_filename() self.theScriptFileSelection.hide() self.theSession.printMessage( 'load script file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.update()
def loadScript( self, button_obj ): self.theStepperChecker = 1 aFileName = self.theScriptFileSelection.get_filename() self.theScriptFileSelection.hide() self.theSession.printMessage( 'load script file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.update()
34,799