rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
raise RuntimeError, "Padding must be a 4-element sequence type or an int. Instead, got" + str(val)
raise RuntimeError("Padding must be a 4-element sequence " "type or an int. Instead, got" + str(val))
def _set_padding(self, val): old_padding = self.padding
a54068d9db0136c569fd2709dfb0e8e6e1cadfd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/a54068d9db0136c569fd2709dfb0e8e6e1cadfd0/component.py
width="100%%" height="100%%"
width="%(width)f" height="%(height)f"
def default_filter(kw1): kw = {} for (k,v) in kw1.items(): if type(v) == type(()): if v[0] != v[1]: kw[k] = v[0] else: kw[k] = v return kw
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
def __init__(self, size): basecore2d.GraphicsContextBase.__init__(self) self.size = size self._height = size[1] self.contents = cStringIO.StringIO() self._clipmap = {} self.clip_id = None
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
def clear(self, size):
def clear(self):
def clear(self, size): # TODO: clear the contents pass
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
height, width = self.size
width, height = self.size
def save(self, filename): f = open(filename, 'w') ext = os.path.splitext(filename)[1] if ext == '.svg': template = xmltemplate height, width = self.size contents = self.contents.getvalue().replace("<svg:", "<").replace("</svg:", "</") elif ext == '.html': height, width = self.size[0]*3, self.size[1]*3 contents = self.c...
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
height, width = self.size[0]*3, self.size[1]*3
width, height = self.size[0]*3, self.size[1]*3
def save(self, filename): f = open(filename, 'w') ext = os.path.splitext(filename)[1] if ext == '.svg': template = xmltemplate height, width = self.size contents = self.contents.getvalue().replace("<svg:", "<").replace("</svg:", "</") elif ext == '.html': height, width = self.size[0]*3, self.size[1]*3 contents = self.c...
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
def set_font(self, font): if font.face_name == '': font.face_name = 'Arial' self.face_name = font_face_map.get(font.face_name, font.face_name) self.font = pdfmetrics.Font(self.face_name, self.face_name, pdfmetrics.defaultEncoding) self.font_size = font.size
8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8d8e1e1dd657d3c1aeefb61f13be2bfdb11a7911/backend_svg.py
gc.rect(int(self.x+border_width/2.0), int(self.y+border_width/2.0), int(self.width-2*border_width+1), int(self.height-2*border_width+1))
gc.rect(self.x+border_width/2.0-0.5, self.y+border_width/2.0-0.5, self.width-border_width/2.0, self.height-border_width/2.0)
def _draw_inset_border(self, gc, view_bounds=None, mode="default"): """ Draws the border of a component. Unlike the default Enable border, this one is drawn on the inside of the plot instead of around it. """ if not self.border_visible: return border_width = self.border_width gc.save_state() gc.set_line_width(border_...
7bae5369aa009293616143d42984f95d983bd5e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/7bae5369aa009293616143d42984f95d983bd5e6/component.py
width+2*padding, height+2*padding)
width+2*padding + border_width, height+2*padding + border_width)
def _draw_mainlayer(self, gc, view_bounds=None, mode="default"): text_color = self.text_color_ highlight_color = self.highlight_color_ highlight_bgcolor = self.highlight_bgcolor_ padding = self.cell_padding
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
x,y = self._cached_cell_coords[i,j+1] + self._text_offset + padding
x,y = self._cached_cell_coords[i,j+1] + self._text_offset + \ padding + border_width/2.0
def _draw_mainlayer(self, gc, view_bounds=None, mode="default"): text_color = self.text_color_ highlight_color = self.highlight_color_ highlight_bgcolor = self.highlight_bgcolor_ padding = self.cell_padding
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
x_points = self._cached_cell_coords[:,0,0] y_points = self._cached_cell_coords[0,:,1]
x_points = self._cached_cell_coords[:,0,0] y_points = self._cached_cell_coords[0,:,1]
def _draw_grid_lines(self, gc): gc.set_stroke_color(self.cell_border_color_) gc.set_line_dash(self.cell_border_style_) gc.set_line_width(self.cell_border_width)
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
gc.move_to(x, self.y-self.cell_border_width/2.0) gc.line_to(x, self.y+self.height+self.cell_border_width/2.0)
gc.move_to(x, self.y) gc.line_to(x, self.y+self.height)
def _draw_grid_lines(self, gc): gc.set_stroke_color(self.cell_border_color_) gc.set_line_dash(self.cell_border_style_) gc.set_line_width(self.cell_border_width)
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
gc.move_to(self.x-self.cell_border_width/2.0, y) gc.line_to(self.x+self.width+self.cell_border_width/2.0, y)
gc.move_to(self.x, y) gc.line_to(self.x+self.width, y)
def _draw_grid_lines(self, gc): gc.set_stroke_color(self.cell_border_color_) gc.set_line_dash(self.cell_border_style_) gc.set_line_width(self.cell_border_width)
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
x_points = arange(numcols+1) * cell_width + self.x y_points = arange(numrows+1) * cell_height + self.y
x_points = arange(numcols+1) * cell_width + self.cell_border_width/2.0 + self.x y_points = arange(numrows+1) * cell_height + self.cell_border_width/2.0 + self.y
def _compute_positions(self):
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
self.bounds = [ cols * (width + margin), rows * (height + margin)]
self.bounds = [ cols * (width + margin) + self.cell_border_width, rows * (height + margin) + self.cell_border_width ]
def _update_bounds(self): if self.string_array is not None and len(self.string_array.shape) == 2: rows, cols = self.string_array.shape margin = 2*self.cell_padding + self.cell_border_width width, height = self._get_actual_cell_size() self.bounds = [ cols * (width + margin),# - self.cell_border_width, rows * (height + m...
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
if self.control == self.control.GetCapture(): self.control.SetFocus()
self.control.SetFocus()
def _set_focus ( self ): "Sets the keyboard focus to this window" if self.control == self.control.GetCapture(): self.control.SetFocus() return
097ef1685b66a48a730de6b5893f0ad6e65c8484 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/097ef1685b66a48a730de6b5893f0ad6e65c8484/window.py
def __init__(self, *args, **kwds): super(SuperTuple, self).__init__(*args, **kwds) for i, attr in enumerate(self.__class__.__names__):
def __new__(cls, *args, **kwds): self = tuple.__new__(cls, *args, **kwds) for i, attr in enumerate(cls.__names__):
def __init__(self, *args, **kwds): super(SuperTuple, self).__init__(*args, **kwds) for i, attr in enumerate(self.__class__.__names__): setattr(self, attr, self[i])
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
file_inspector = Instance(FileInspector, args=())
filename = Str() line = Int(1) code = Str()
def getstats(cls, obj=None): self = cls(obj) return pstats.Stats(self)
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
tui.Item('main_results', show_label=False),
tui.UItem('main_results'),
def getstats(cls, obj=None): self = cls(obj) return pstats.Stats(self)
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
tui.Item('callee_results', show_label=False),
tui.UItem('callee_results'),
def getstats(cls, obj=None): self = cls(obj) return pstats.Stats(self)
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
tui.Item('caller_results', show_label=False), tui.Item('file_inspector', show_label=False),
tui.UItem('caller_results'), tui.UItem('filename', style='readonly'), tui.UItem('code', editor=tui.CodeEditor(line='line')),
def getstats(cls, obj=None): self = cls(obj) return pstats.Stats(self)
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
self.file_inspector.file_name = filename self.file_inspector.line = line else: self.file_inspector.file_name = '' self.file_inspector.line = 0 self.file_inspector.text = ''
with open(filename, 'ru') as f: code = f.read() self.code = code self.filename = filename self.line = line else: self.trait_set( code = '', filename = '', line = 1, )
def update_sub_results(self, new): if new is None: return self.caller_results.total_time = new.cum_time self.caller_results.records = new.callers self.callee_results._resort() self.caller_results.selected_record = self.caller_results.activated_record = None
1abb1fd080526092ab77808de73a8c00f92915ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/1abb1fd080526092ab77808de73a8c00f92915ef/sike.py
""" Returns the width and height of the rendered text
""" Returns the bounding rect of the rendered text
def get_text_extent(self, text): """ Returns the width and height of the rendered text """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height()
08ff1c69e2ca9e72fb4097983cfc8501407d0ec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/08ff1c69e2ca9e72fb4097983cfc8501407d0ec8/backend_qpainter.py
return rect.width(), rect.height()
return rect.left(), -fm.descent(), rect.right(), fm.height()
def get_text_extent(self, text): """ Returns the width and height of the rendered text """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height()
08ff1c69e2ca9e72fb4097983cfc8501407d0ec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/08ff1c69e2ca9e72fb4097983cfc8501407d0ec8/backend_qpainter.py
""" Returns the width, height, descent and leading of the rendered text. """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height(), -fm.descent(), fm.leading()
""" Backwards compatibility API over .get_text_extent() for Enable """ x1, y1, x2, y2 = self.get_text_extent(text) return x2, y2, y1, x1
def get_full_text_extent(self, text): """ Returns the width, height, descent and leading of the rendered text. """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height(), -fm.descent(), fm.leading()
08ff1c69e2ca9e72fb4097983cfc8501407d0ec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/08ff1c69e2ca9e72fb4097983cfc8501407d0ec8/backend_qpainter.py
""" PDF currently ignores the alpha value
"""
def set_fill_color(self,color): """ PDF currently ignores the alpha value """ r,g,b = color[:3] try: a = color[3] except IndexError: a = 1.0 self.gc.setFillColorRGB(r, g, b)
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
self.gc.setFillColorRGB(r, g, b)
self.gc.setFillColorRGB(r, g, b, a)
def set_fill_color(self,color): """ PDF currently ignores the alpha value """ r,g,b = color[:3] try: a = color[3] except IndexError: a = 1.0 self.gc.setFillColorRGB(r, g, b)
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
""" PDF currently ignores the alpha value
"""
def set_stroke_color(self,color): """ PDF currently ignores the alpha value """ r,g,b = color[:3] try: a = color[3] except IndexError: a = 1.0 self.gc.setStrokeColorRGB(r, g, b)
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
self.gc.setStrokeColorRGB(r, g, b)
self.gc.setStrokeColorRGB(r, g, b, a)
def set_stroke_color(self,color): """ PDF currently ignores the alpha value """ r,g,b = color[:3] try: a = color[3] except IndexError: a = 1.0 self.gc.setStrokeColorRGB(r, g, b)
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
""" """ msg = "set_alpha not implemented on PDF yet." raise NotImplementedError, msg
""" Sets alpha globally. Note that this will not affect draw_image because reportlab does not currently support drawing images with alpha. """ self.gc.setFillAlpha(alpha) self.gc.setStrokeAlpha(alpha) super(GraphicsContext, self).set_alpha(alpha)
def set_alpha(self, alpha): """ """ msg = "set_alpha not implemented on PDF yet." raise NotImplementedError, msg
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
import Image as PilImage
from reportlab.lib.utils import ImageReader from PIL import Image as PilImage
def draw_image(self, img, rect=None): """ draw_image(img_gc, rect=(x,y,w,h)) Draws another gc into this one. If 'rect' is not provided, then the image gc is drawn into this one, rooted at (0,0) and at full pixel size. If 'rect' is provided, then the image is resized into the (w,h) given and drawn into this GC at poi...
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
pil_img = PilImage.new(format, (converted_img.width(), converted_img.height()))
pil_img = PilImage.fromstring(format, (converted_img.width(), converted_img.height()), converted_img.bmp_array.tostring())
def draw_image(self, img, rect=None): """ draw_image(img_gc, rect=(x,y,w,h)) Draws another gc into this one. If 'rect' is not provided, then the image gc is drawn into this one, rooted at (0,0) and at full pixel size. If 'rect' is provided, then the image is resized into the (w,h) given and drawn into this GC at poi...
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
self.gc.drawImage(pil_img, rect[0], rect[1], rect[2], rect[3])
self.gc.drawImage(ImageReader(pil_img), rect[0], rect[1], rect[2], rect[3])
def draw_image(self, img, rect=None): """ draw_image(img_gc, rect=(x,y,w,h)) Draws another gc into this one. If 'rect' is not provided, then the image gc is drawn into this one, rooted at (0,0) and at full pixel size. If 'rect' is provided, then the image is resized into the (w,h) given and drawn into this GC at poi...
ae8ee20a7b746c1eb3b17895bc052f8585d5cdce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ae8ee20a7b746c1eb3b17895bc052f8585d5cdce/backend_pdf.py
print "boo"
def save_state(self): """ Save the current graphic's context state. This should always be paired with a restore_state """ self.gc.CGContextSaveGState() print "boo"
28b1d11f37a91b55f0ffaa6329a0314b18587c44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/28b1d11f37a91b55f0ffaa6329a0314b18587c44/backend_mac.py
def __init__(self, context, expose_schema=True): """ @param expose_schema: Map AT schema accessors directly to template variables for engines which cannot traverse Zope content (Cheetah). """ security=getSecurityManager() #portal_state = getMultiAdapter((context, context.REQUEST), name=u'plone_portal_state') try: p...
379fac3f1303aa0006320e21e8326e30adfde243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9221/379fac3f1303aa0006320e21e8326e30adfde243/plone.py
portal_url = getattr(site, "portal_url", None)
portal_url = getattr(site, "portal_url", None) request = getattr(site, "REQUEST", None)
def __init__(self, context, expose_schema=True): """ @param expose_schema: Map AT schema accessors directly to template variables for engines which cannot traverse Zope content (Cheetah). """ security=getSecurityManager() #portal_state = getMultiAdapter((context, context.REQUEST), name=u'plone_portal_state') try: p...
379fac3f1303aa0006320e21e8326e30adfde243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9221/379fac3f1303aa0006320e21e8326e30adfde243/plone.py
"request" : context.REQUEST,
"request" : request,
def __init__(self, context, expose_schema=True): """ @param expose_schema: Map AT schema accessors directly to template variables for engines which cannot traverse Zope content (Cheetah). """ security=getSecurityManager() #portal_state = getMultiAdapter((context, context.REQUEST), name=u'plone_portal_state') try: p...
379fac3f1303aa0006320e21e8326e30adfde243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9221/379fac3f1303aa0006320e21e8326e30adfde243/plone.py
DeckPercentageTrump({"test": ">=", "value": 33.33, "ratio": 0.8}),
DeckPercentageTrump({"test": ">=", "value": 100/3, "ratio": 0.8}),
def __init__(self): self.objects = [ DeckPercentageTrump({"test": ">=", "value": 33.33, "ratio": 0.8}), # le test ne fonctionne pas comme souhaiter
6a44382df024f7664c66fc05b0fbceab94a81852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5117/6a44382df024f7664c66fc05b0fbceab94a81852/test.py
print "6]", deck6, proba.ratio(deck6)
print "6]", deck6, proba.ratio(deck6)
def ratio(self,deck): ratio = 1 for ratio_object in self.objects:
6a44382df024f7664c66fc05b0fbceab94a81852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5117/6a44382df024f7664c66fc05b0fbceab94a81852/test.py
progress = 0.0
def parse(self, line, timestamp=None): self.lineNumber += 1 tokens = line.split() iso = 0 try: # Do a small stupid sanity check if this is a correct usbmon log line try: if len(tokens) < 4: return if not(int(tokens[0],16) and int(tokens[1]) and (tokens[2] in ('S', 'C', 'E'))): return except: print "Error on line %d:" %...
961a15b7ae0ce85126517568f085266de11d94b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/961a15b7ae0ce85126517568f085266de11d94b3/Log.py
self.progress = progress
def setProgress(self, progress): self.progress = progress if self.progressQueue: self.progressQueue.put(("Loading %s" % os.path.basename(self.filename), self.progress))
961a15b7ae0ce85126517568f085266de11d94b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/961a15b7ae0ce85126517568f085266de11d94b3/Log.py
self.progress))
progress))
def setProgress(self, progress): self.progress = progress if self.progressQueue: self.progressQueue.put(("Loading %s" % os.path.basename(self.filename), self.progress))
961a15b7ae0ce85126517568f085266de11d94b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/961a15b7ae0ce85126517568f085266de11d94b3/Log.py
self.endpointDecoders = {0: self.controlDecoder}
self.endpointDecoders = {}
def __init__(self, decoderFactory): self.decoderFactory = decoderFactory self.currentConfig = 1
2bc4524148854abaff75df56a89f14b2a61a4e08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/2bc4524148854abaff75df56a89f14b2a61a4e08/Decode.py
ep.bmAttributes & 0x03,
(ep.bmAttributes or 0) & 0x03,
def detector(context): # this is required for all 'Decoder' modules dev = context.device ep = context.endpoint ifc = context.interface devi = context.devInstance
5e20ff22a64e69f7f29bd3fa3e70727c7070fc4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/5e20ff22a64e69f7f29bd3fa3e70727c7070fc4f/WirelessUsb.py
self.progressCallbacks = []
def __init__(self, filename, parser, progressQueue=None, tailMode=False): self.filename = filename self.parser = parser self.progressQueue = progressQueue
88fff7863b16bebc019697ed901f48ef0c2091bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/88fff7863b16bebc019697ed901f48ef0c2091bb/Log.py
data = ''.join(tokens[5:10])
data = ''.join(tokens[5:7]) data = ''.join((data, tokens[7][2:4], tokens[7][0:2])) data = ''.join((data, tokens[8][2:4], tokens[8][0:2])) data = ''.join((data, tokens[9][2:4], tokens[9][0:2]))
def parse(self, line, timestamp=None): self.lineNumber += 1 tokens = line.split() try: # Do a small stupid sanity check if this is a correct usbmon log line try: if len(tokens) < 4: return if not(int(tokens[0],16) and int(tokens[1]) and (tokens[2] in ('S', 'C', 'E'))): return except: print "Error on line %d:" % self.li...
84aaa76843b97da05123be12f9da3c5b56bcc61e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/84aaa76843b97da05123be12f9da3c5b56bcc61e/Log.py
"""Return a unix-style timestamp for the given line. XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """
"""Return a unix-style timestamp for the given line.""" if line[10] != "T": """XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """ timefmt = "%b %d %H:%M:%S" stamp = line[:15] usec = line[16:19] else: timefmt = "%Y-%m-%dT%H:%M:%S" stamp = line[:19] usec = l...
def parseTime(self, line): """Return a unix-style timestamp for the given line. XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """ # Cache the results of strptime. It only changes every # second, and this was taking more than 50% of our parsing time! stamp...
ef8acc3fbb5b481df843acffbf5094b2368310de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/ef8acc3fbb5b481df843acffbf5094b2368310de/Log.py
stamp = line[:15]
def parseTime(self, line): """Return a unix-style timestamp for the given line. XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """ # Cache the results of strptime. It only changes every # second, and this was taking more than 50% of our parsing time! stamp...
ef8acc3fbb5b481df843acffbf5094b2368310de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/ef8acc3fbb5b481df843acffbf5094b2368310de/Log.py
parsed = time.strptime(stamp, "%b %d %H:%M:%S")
parsed = time.strptime(stamp, timefmt)
def parseTime(self, line): """Return a unix-style timestamp for the given line. XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """ # Cache the results of strptime. It only changes every # second, and this was taking more than 50% of our parsing time! stamp...
ef8acc3fbb5b481df843acffbf5094b2368310de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/ef8acc3fbb5b481df843acffbf5094b2368310de/Log.py
usec = int(line[16:19])
usec = int(usec)
def parseTime(self, line): """Return a unix-style timestamp for the given line. XXX: This assumes the current year, so logs that straddle years will have a giant discontinuity in timestamps. """ # Cache the results of strptime. It only changes every # second, and this was taking more than 50% of our parsing time! stamp...
ef8acc3fbb5b481df843acffbf5094b2368310de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/ef8acc3fbb5b481df843acffbf5094b2368310de/Log.py
self.trans.frame = 0
def __init__(self, completed): self.epoch = None self.trans = Types.Transaction() self.trans.frame = 0 self.setupData = None self.completed = completed
79ec211d7f6b2774ecd7f8d4dd5d492a2b86d93a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/79ec211d7f6b2774ecd7f8d4dd5d492a2b86d93a/Log.py
def parse(self, line, timestamp=None, frame=None):
def parse(self, line, timestamp=None):
def parse(self, line, timestamp=None, frame=None): self.lineNumber += 1 tokens = line.split() try: # Do a small stupid sanity check if this is a correct usbmon log line try: if len(tokens) < 4: return if not(int(tokens[0],16) and int(tokens[1]) and (tokens[2] in ('S', 'C', 'E'))): return except: print "Error on line %d...
79ec211d7f6b2774ecd7f8d4dd5d492a2b86d93a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/79ec211d7f6b2774ecd7f8d4dd5d492a2b86d93a/Log.py
elif len(tokens) >= 2 and len(tokens[0]) == 4 and len(tokens[1]) == 2:
elif (len(tokens) >= 2 and len(tokens[0]) >= 4 and tokens[0][-1] == ':' and len(tokens[1]) == 2):
def parse(self, line, timestamp=None, frame=None, lineNumber=None): tokens = line.split() finished = None
e97ff14f56a2f95f19f257a517c4e19240b2782c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/e97ff14f56a2f95f19f257a517c4e19240b2782c/Log.py
self.endpointDecoders = {0: self.controlDecoder}
def _cacheEndpointDecoders(self): """Update the endpointDecoders dictionary using the current configuration and interface settings. """ self.endpointDecoders = {0: self.controlDecoder}
055e08f15c3517244fa0387f190fa0e1fa1c455e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/055e08f15c3517244fa0387f190fa0e1fa1c455e/Decode.py
if decoder:
if decoder and address not in self.endpointDecoders:
def _cacheEndpointDecoders(self): """Update the endpointDecoders dictionary using the current configuration and interface settings. """ self.endpointDecoders = {0: self.controlDecoder}
055e08f15c3517244fa0387f190fa0e1fa1c455e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11735/055e08f15c3517244fa0387f190fa0e1fa1c455e/Decode.py
self.is_workable(task)
self.is_workable(task) and\ self.no_disabled_tag(task)
def workview(self,task,parameters=None): wv = self.active(task) and\ self.is_started(task) and\ self.is_workable(task) return wv
e89a0121bccdbe909de82f83e41104afbdc70c10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/e89a0121bccdbe909de82f83e41104afbdc70c10/treefactory.py
print "receiving add_task %s to state %s (current:%s)" %(tid,state_id,self.state_id) if TM_IDLE_ADD: gobject.idle_add(self.__update_task,None,tid,path,state_id,'add',priority=gobject.PRIORITY_HIGH) else: self.__update_task(None,tid,path,state_id,'add') def __add_task(self,sender,tid,path): self.__update_task(sender,t...
print "receiving add_task %s to state %s (current:%s)" \ %(tid,state_id,self.state_id) gobject.idle_add(self.__update_task,None,tid,path,state_id,'add',\ priority=gobject.PRIORITY_HIGH)
def add_task(self,tid,path,state_id): if DEBUG_MODEL: print "receiving add_task %s to state %s (current:%s)" %(tid,state_id,self.state_id) if TM_IDLE_ADD: gobject.idle_add(self.__update_task,None,tid,path,state_id,'add',priority=gobject.PRIORITY_HIGH) else: self.__update_task(None,tid,path,state_id,'add')
72c55162f776ac5dbf9b6b3a5f520629ea96542f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/72c55162f776ac5dbf9b6b3a5f520629ea96542f/treemodel.py
if TM_IDLE_ADD: gobject.idle_add(self.__update_task,None,tid,path,state_id,data,priority=gobject.PRIORITY_HIGH) else: self.__update_task(None,tid,path,state_id,data)
gobject.idle_add(self.__update_task,None,tid,path,state_id,\ data,priority=gobject.PRIORITY_HIGH)
def update_task(self, tid,path,state_id,data=None): if TM_IDLE_ADD: gobject.idle_add(self.__update_task,None,tid,path,state_id,data,priority=gobject.PRIORITY_HIGH) else: self.__update_task(None,tid,path,state_id,data)
72c55162f776ac5dbf9b6b3a5f520629ea96542f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/72c55162f776ac5dbf9b6b3a5f520629ea96542f/treemodel.py
if TM_IDLE_ADD: gobject.idle_add(self.__remove_task,None,tid,path,state_id,priority=gobject.PRIORITY_HIGH) else: self.__remove_task(None,tid,path,state_id)
gobject.idle_add(self.__remove_task,None,tid,path,state_id,\ priority=gobject.PRIORITY_HIGH)
def remove_task(self,tid,path,state_id): if TM_IDLE_ADD: gobject.idle_add(self.__remove_task,None,tid,path,state_id,priority=gobject.PRIORITY_HIGH) else: self.__remove_task(None,tid,path,state_id)
72c55162f776ac5dbf9b6b3a5f520629ea96542f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/72c55162f776ac5dbf9b6b3a5f520629ea96542f/treemodel.py
if state_id > self.state_id: self.state_id = state_id if TM_IDLE_ADD: gobject.idle_add(self.__reorder,None,nid,path,neworder,state_id) else: self.__reorder(None,nid,path,neworder,state_id)
gobject.idle_add(self.__reorder,None,nid,path,neworder,state_id,\ priority=gobject.PRIORITY_HIGH)
def reorder(self,nid,path,neworder,state_id): if state_id > self.state_id: self.state_id = state_id if TM_IDLE_ADD: gobject.idle_add(self.__reorder,None,nid,path,neworder,state_id) else: self.__reorder(None,nid,path,neworder,state_id)
72c55162f776ac5dbf9b6b3a5f520629ea96542f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/72c55162f776ac5dbf9b6b3a5f520629ea96542f/treemodel.py
self.state_id = state_id
def __reorder(self, sender, nid,path,neworder,state_id): actual_nid = self.tree.get_node_for_path(path,state_id=state_id) if nid == actual_nid: if path: rowref = self.get_iter(path) else: rowref = None self.state_id = state_id self.rows_reordered(path,rowref,neworder) else: raise Exception('path/node mismatch in reorde...
72c55162f776ac5dbf9b6b3a5f520629ea96542f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/72c55162f776ac5dbf9b6b3a5f520629ea96542f/treemodel.py
import sys if options.no_crash_handler == False: pass
def main(options=None, args=None): ''' Calling this starts the full GTG experience ( :-D ) ''' config, ds, req = core_main_init(options, args) # Launch task browser manager = Manager(req, config) #main loop #To be more user friendly and get the logs of crashes, we show an apport # hooked window upon crashes #with sign...
11d749f6321acc5c1d28ed76c5cef727091e3d59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/11d749f6321acc5c1d28ed76c5cef727091e3d59/gtg.py
return [self.get_task(id) for id in self.get_task_ids()]
return [self.get_task(id) for id in self.get_task_ids(u"Active")]
def get_tasks(self): # Retrieve a list of task data dicts return [self.get_task(id) for id in self.get_task_ids()]
d40a460589b48179c7ccff060be491a6e891c8c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d40a460589b48179c7ccff060be491a6e891c8c5/dbuswrapper.py
nt = self.req.new_task(tags=tags)
tags_objects = [] for t in tags: tag_object = self.req.get_tag(t) if tag_object == None: tag_object = self.req.new_tag(t) tags_objects.append(tag_object) nt = self.req.new_task(tags=tags_objects)
def new_task(self, status, title, duedate, startdate, donedate, tags, text, subtasks): # Generate a new task object and return the task data as a dict nt = self.req.new_task(tags=tags) for sub in subtasks: nt.add_subtask(sub) nt.set_status(status, donedate=dates.strtodate(donedate)) nt.set_title(title) nt.set_due_date(...
d40a460589b48179c7ccff060be491a6e891c8c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d40a460589b48179c7ccff060be491a6e891c8c5/dbuswrapper.py
task.set_due_date(task_data["duedate"]) task.set_start_date(task_data["startdate"])
task.set_due_date(dates.strtodate(task_data["duedate"])) task.set_start_date(dates.strtodate(task_data["startdate"]))
def modify_task(self, tid, task_data): # Apply supplied task data to the task object with the specified ID task = self.req.get_task(tid) task.set_status(task_data["status"], donedate=task_data["donedate"]) task.set_title(task_data["title"]) task.set_due_date(task_data["duedate"]) task.set_start_date(task_data["startdat...
d40a460589b48179c7ccff060be491a6e891c8c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d40a460589b48179c7ccff060be491a6e891c8c5/dbuswrapper.py
text = self.quickadd_entry.get_text()
text = unicode(self.quickadd_entry.get_text())
def on_quickadd_activate(self, widget): text = self.quickadd_entry.get_text() due_date = no_date defer_date = no_date if text: tags, notagonly = self.get_selected_tags() # Get tags in the title #NOTE: the ?: tells regexp that the first one is # a non-capturing group, so it must not be returned # to findall. http://www....
7578a4dd37d6d757bec52c087c62eea4655c4008 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/7578a4dd37d6d757bec52c087c62eea4655c4008/browser.py
for match in re.findall(r'(?:^|[\s])(@\w+)', text):
for match in re.findall(r'(?:^|[\s])(@\w+)', text, re.UNICODE):
def on_quickadd_activate(self, widget): text = self.quickadd_entry.get_text() due_date = no_date defer_date = no_date if text: tags, notagonly = self.get_selected_tags() # Get tags in the title #NOTE: the ?: tells regexp that the first one is # a non-capturing group, so it must not be returned # to findall. http://www....
7578a4dd37d6d757bec52c087c62eea4655c4008 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/7578a4dd37d6d757bec52c087c62eea4655c4008/browser.py
tb_Taskbutton = gtk.ToolButton(gtk.STOCK_EXECUTE)
tb_Taskicon = gtk.Image() tb_Taskicon.set_from_icon_name('mail-send', 32) tb_Taskicon.show() tb_Taskbutton = gtk.ToolButton(tb_Taskicon)
def onTaskOpened(self, plugin_api): # add a item (button) to the ToolBar tb_Taskbutton = gtk.ToolButton(gtk.STOCK_EXECUTE) tb_Taskbutton.set_label("Send via email") tb_Taskbutton.connect('clicked', self.onTbTaskButton, plugin_api) self.task_separator = plugin_api.add_task_toolbar_item(gtk.SeparatorToolItem()) self.tb_T...
10880092effe662cd9ec7552c1f7d35141521c21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/10880092effe662cd9ec7552c1f7d35141521c21/sendEmail.py
tree.print_tree()
def test_parent(self): tree = self._build_tree(4,flat=False) tree.print_tree() mynode = tree.get_node('3@3') self.assertEqual(True,mynode.has_parent()) p = mynode.get_parents()[0] par = tree.get_node(p) self.assertEqual('2@2',par.get_id())
46428ecc75bca5e0f53672fa8f1261323f89f347 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/46428ecc75bca5e0f53672fa8f1261323f89f347/test_tree.py
self.add_tag(t.get_name())
self.add_tag(t)
def set_complex_title(self,text,tags=[]): due_date = no_date defer_date = no_date if text: # Get tags in the title #NOTE: the ?: tells regexp that the first one is # a non-capturing group, so it must not be returned # to findall. http://www.amk.ca/python/howto/regex/regex.html # ~~~~Invernizzi for match in re.findall(...
09d830b50836b48f740f8ab3d73cd549594ad99e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/09d830b50836b48f740f8ab3d73cd549594ad99e/task.py
self.trace = '\nDEBUG TRACE for ViewTree %s\n----------------\n\n'%self
if DEBUG: self.trace = '\nDEBUG TRACE for ViewTree %s\n-------------\n\n'%self
def __init__(self,tree,filtersbank,refresh=True): """ Construct a FilteredTree object on top of an existing task tree. @param req: The requestor object @param tree: The tree to filter from @param maintree: Whether this tree is the main tree. The requester must be used to change filters against the main tree. """ self....
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " - - External update of %s\n" %tid
if DEBUG: self.trace += " - - External update of %s\n" %tid
def __execution_loop(self): while len(self.__updating_queue) > 0: tid,action = self.__updating_queue.pop(0)
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " - - External delete of %s\n" %tid
if DEBUG: self.trace += " - - External delete of %s\n" %tid
def __execution_loop(self): while len(self.__updating_queue) > 0: tid,action = self.__updating_queue.pop(0)
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " - - External add of %s\n" %tid
if DEBUG: self.trace += " - - External add of %s\n" %tid
def __execution_loop(self): while len(self.__updating_queue) > 0: tid,action = self.__updating_queue.pop(0)
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += '\n\nDEBUG TRACE\n\n%s' %self.trace
if DEBUG: error += '\n\nDEBUG TRACE\n\n%s' %self.trace
def print_from_node(self, nid, level=0,string=None): prefix = "->"*level paths = self.get_paths_for_node(nid) toprint = "%s%s (%s) " %(prefix,nid,\ str(paths)) if not string: print toprint level += 1 is_good = False for p in paths: if len(p) == level: is_good = True if not is_good: error = 'theres no path of level %...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
return self.node_nth_child(basenode_id,path[0])
toreturn = self.node_nth_child(basenode_id,path[0])
def __node_for_path(self,basenode_id,path): if len(path) == 0: return basenode_id elif path[0] < self.node_n_children(basenode_id): if len(path) == 1: return self.node_nth_child(basenode_id,path[0]) else: node_id = self.node_nth_child(basenode_id,path[0]) path = path[1:] return self.__node_for_path(node_id, path) else:...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
return self.__node_for_path(node_id, path) else: return None
toreturn = self.__node_for_path(node_id, path) else: toreturn = None return toreturn
def __node_for_path(self,basenode_id,path): if len(path) == 0: return basenode_id elif path[0] < self.node_n_children(basenode_id): if len(path) == 1: return self.node_nth_child(basenode_id,path[0]) else: node_id = self.node_nth_child(basenode_id,path[0]) path = path[1:] return self.__node_for_path(node_id, path) else:...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += self.trace
if DEBUG: error += self.trace
def __next_nodes(self,nid,path): '''given a node and a path, return all the next nodes of that node for that path. The list is returned in reverse order (last next_node first) ''' error = "nextnodes %s %s\n" %(nid,str(path)) if len(path) >= 2: index = path[-1] parpath = path[:-1] par = self.get_node_for_path(parpath) p...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " remove %s from path %s\n" %(nid,str(paths))
if DEBUG: self.trace += " remove %s from path %s\n" %(nid,str(paths))
def __delete_node(self,nid,paths=None): '''Delete occurence of node nid for given paths. if paths is None, then the node is removed for every paths it belongs to. Deleting a node means : 1. Deleting all the next_nodes 2. Deleting all the children. 3. Deleting the node itself. 4. Re-adding all the next_nodes ''' error =...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += self.trace
if DEBUG: error += self.trace
def __delete_node(self,nid,paths=None): '''Delete occurence of node nid for given paths. if paths is None, then the node is removed for every paths it belongs to. Deleting a node means : 1. Deleting all the next_nodes 2. Deleting all the children. 3. Deleting the node itself. 4. Re-adding all the next_nodes ''' error =...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += self.trace
if DEBUG: error += self.trace
def __delete_node(self,nid,paths=None): '''Delete occurence of node nid for given paths. if paths is None, then the node is removed for every paths it belongs to. Deleting a node means : 1. Deleting all the next_nodes 2. Deleting all the children. 3. Deleting the node itself. 4. Re-adding all the next_nodes ''' error =...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += "****** We delete %s from path %s\n" %(nid,str(p))
if DEBUG: self.trace += "****** We delete %s from path %s\n" %(nid,str(p))
def __delete_node(self,nid,paths=None): '''Delete occurence of node nid for given paths. if paths is None, then the node is removed for every paths it belongs to. Deleting a node means : 1. Deleting all the next_nodes 2. Deleting all the children. 3. Deleting the node itself. 4. Re-adding all the next_nodes ''' error =...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " "+error
if DEBUG: self.trace += " "+error
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " we wont add path %s for %s\n" %(str(pp),nid)
if DEBUG: self.trace += " we wont add path %s for %s\n" %(str(pp),nid)
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " adding %s to path %s but occupied by %s\n"\
error += " adding %s to path %s but occupied by %s\n"\
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.__delete_node(t[0],[t[1]])
ret = self.__delete_node(t[0]) error += "%s was deleted : %s\n" %(t[0],ret) if self.cache_nodes.has_key(t[0]): error += "%s cached : %s\n" %(t[0],self.cache_nodes[t[0]]) raise Exception(error) par = self.get_node_for_path(t[1][:-1]) if t[0] in self.cache_nodes[par]['children']: error += "%s is still in %s childrens" %(...
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += 'cached VR = %s\n' %self.cache_vr
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += self.trace
if DEBUG: error += self.trace
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " +++++ %s added to %s\n" %(nid,str(p))
if DEBUG: self.trace += " +++++ %s added to %s\n" %(nid,str(p))
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
self.trace += " ______ %s modified in %s\n" %(nid,str(p))
if DEBUG: self.trace += " ______ %s modified in %s\n" %(nid,str(p))
def __update_node(self,nid): '''to update a node, we: 1. take old and new paths 2. we remove all occurence that are in oldpaths and not in newpaths 3. we refresh newpaths to reflect the deletions. 4. We add the occurence in newpaths and not in oldpaths 5. we update nodes that are in both paths ''' error = " Updating no...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
error += self.trace
if DEBUG: error += self.trace
def __update_node(self,nid): '''to update a node, we: 1. take old and new paths 2. we remove all occurence that are in oldpaths and not in newpaths 3. we refresh newpaths to reflect the deletions. 4. We add the occurence in newpaths and not in oldpaths 5. we update nodes that are in both paths ''' error = " Updating no...
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
desktop_file_directories = ["../..", \ "../../../applications"]
desktop_file_directories = ["../..", "../../../applications", "../../../../../share/applications"]
def on_autostart_toggled(self, widget): """Toggle GTG autostarting with the GNOME desktop""" autostart_path = os.path.join(self.__AUTOSTART_DIRECTORY, \ self.__AUTOSTART_FILE) if widget.get_active() == False: #Disable autostart, removing the file in autostart_path if os.path.isfile(autostart_path): os.remove(autostart_...
ef70270506326ff5ba5a55796a8fa355ba16eccd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ef70270506326ff5ba5a55796a8fa355ba16eccd/preferences.py
def on_autostart_toggled(self, widget): """Toggle GTG autostarting with the GNOME desktop""" autostart_path = os.path.join(self.__AUTOSTART_DIRECTORY, \ self.__AUTOSTART_FILE) if widget.get_active() == False: #Disable autostart, removing the file in autostart_path if os.path.isfile(autostart_path): os.remove(autostart_...
ef70270506326ff5ba5a55796a8fa355ba16eccd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ef70270506326ff5ba5a55796a8fa355ba16eccd/preferences.py
task_tags = set([t.get_name() for t in task.get_tags()])
task_tags = set(task.get_tags_name())
def backend_filter(self, task, tags_to_match_set): ''' Filter that checks if two tags sets intersect. It is used to check if a task should be stored inside a backend @param task: a task object @oaram tags_to_match_set: a *set* of tag names ''' all_tasks_tag = self.req.get_alltag_tag().get_name() if all_tasks_tag in tag...
ff5c8249063bd1a867596481f7253da349e3aab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ff5c8249063bd1a867596481f7253da349e3aab9/filters_bank.py
print "ghost position for %s" %tid print "VR : %s " %self.virtual_root
Log.debug("ghost position for %s" %tid) Log.debug("VR : %s " %self.virtual_root)
def get_paths_for_node(self, node): """ Return a list of paths for a given node Return an empty list if no path for that Node. """ toreturn = [] if node: tid = node.get_id() pars = self.node_parents(node) #For that node, we should convert the base_path to path if not node or not self.is_displayed(node.get_id()): return...
ce111ccc05a12b873d87b398f35a308dba4d71c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ce111ccc05a12b873d87b398f35a308dba4d71c6/filteredtree.py
date = "%i-%i-%i" % (t.year, t.month, t.day)
date = t.isoformat()
def get_canonical_date(self, arg): """ Transform "arg" in a valid yyyy-mm-dd date or return None. "arg" can be a yyyy-mm-dd, yyyymmdd, mmdd, today, next week, next month, next year, or a weekday name. """ day_names_en = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] day_names = [_("monda...
21386f519458bd40a8acbcc922fbfc77d264ee07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/21386f519458bd40a8acbcc922fbfc77d264ee07/browser.py
date = "%i-%i-%i" % (t.year, t.month, t.day)
date = t.isoformat()
def get_canonical_date(self, arg): """ Transform "arg" in a valid yyyy-mm-dd date or return None. "arg" can be a yyyy-mm-dd, yyyymmdd, mmdd, today, next week, next month, next year, or a weekday name. """ day_names_en = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] day_names = [_("monda...
21386f519458bd40a8acbcc922fbfc77d264ee07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/21386f519458bd40a8acbcc922fbfc77d264ee07/browser.py
date = "%i-%i-%i" % (t.year, t.month, t.day)
date = t.isoformat()
def get_canonical_date(self, arg): """ Transform "arg" in a valid yyyy-mm-dd date or return None. "arg" can be a yyyy-mm-dd, yyyymmdd, mmdd, today, next week, next month, next year, or a weekday name. """ day_names_en = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] day_names = [_("monda...
21386f519458bd40a8acbcc922fbfc77d264ee07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/21386f519458bd40a8acbcc922fbfc77d264ee07/browser.py
date = "%i-%i-%i" % (t.year, t.month, t.day)
date = t.isoformat()
def get_canonical_date(self, arg): """ Transform "arg" in a valid yyyy-mm-dd date or return None. "arg" can be a yyyy-mm-dd, yyyymmdd, mmdd, today, next week, next month, next year, or a weekday name. """ day_names_en = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] day_names = [_("monda...
21386f519458bd40a8acbcc922fbfc77d264ee07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/21386f519458bd40a8acbcc922fbfc77d264ee07/browser.py