rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
gauss.SetInput(imagedata) | gauss.SetInput(clip.GetOutput()) | def BuildEditedImage(imagedata, points): """ Editing the original image in accordance with the edit points in the editor, it is necessary to generate the vtkPolyData via vtkContourFilter """ for point in points: x, y, z = point colour = points[point] imagedata.SetScalarComponentFromDouble(x, y, z, 0, colour) imagedata.Update() gauss = vtk.vtkImageGaussianSmooth() gauss.SetInput(imagedata) gauss.SetRadiusFactor(0.6) gauss.Update() return gauss.GetOutput() #return imagedata | 9e6e2b60849cc23faa6fec135ab36b97af686474 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/9e6e2b60849cc23faa6fec135ab36b97af686474/imagedata_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
4666,
329,
2040,
12,
381,
11349,
396,
16,
3143,
4672,
3536,
15328,
310,
326,
2282,
1316,
316,
1721,
29342,
598,
326,
3874,
3143,
316,
326,
4858,
16,
518,
353,
4573,
358,
2103,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
4666,
329,
2040,
12,
381,
11349,
396,
16,
3143,
4672,
3536,
15328,
310,
326,
2282,
1316,
316,
1721,
29342,
598,
326,
3874,
3143,
316,
326,
4858,
16,
518,
353,
4573,
358,
2103,
326,... |
select min(hrt.id) as id, l.date::date as name, hrt.sheet_id as sheet_id, sum(l.unit_amount) as total_timesheet, 0.0 as total_attendance from hr_analytic_timesheet hrt left join account_analytic_line l on (l.id = hrt.line_id) group by l.date::date, hrt.sheet_id ) union ( select -min(a.id) as id, a.name::date as name, a.sheet_id as sheet_id, 0.0 as total_timesheet, SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance from hr_attendance a group by a.name::date, a.sheet_id )) AS foo GROUP BY name, sheet_id""") | SELECT MAX(id) as id, name, sheet_id, SUM(total_timesheet) as total_timesheet, CASE WHEN SUM(total_attendance) < 0 THEN (SUM(total_attendance) + CASE WHEN current_date <> name THEN 1440 ELSE (EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM current_time) END ) ELSE SUM(total_attendance) END /60 as total_attendance FROM (( select min(hrt.id) as id, l.date::date as name, hrt.sheet_id as sheet_id, sum(l.unit_amount) as total_timesheet, 0.0 as total_attendance from hr_analytic_timesheet hrt left join account_analytic_line l on (l.id = hrt.line_id) group by l.date::date, hrt.sheet_id ) union ( select -min(a.id) as id, a.name::date as name, a.sheet_id as sheet_id, 0.0 as total_timesheet, SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance from hr_attendance a group by a.name::date, a.sheet_id )) AS foo GROUP BY name, sheet_id )) AS bar""") | def init(self, cr): cr.execute("""create or replace view hr_timesheet_sheet_sheet_day as SELECT MAX(id) as id, name, sheet_id, SUM(total_timesheet) as total_timesheet, CASE WHEN SUM(total_attendance) < 0 THEN (SUM(total_attendance) + CASE WHEN current_date <> name THEN 1440 ELSE (EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM current_time) END ) ELSE SUM(total_attendance) END /60 as total_attendance, (SUM(total_attendance) - SUM(total_timesheet)) as total_difference FROM (( select min(hrt.id) as id, l.date::date as name, hrt.sheet_id as sheet_id, sum(l.unit_amount) as total_timesheet, 0.0 as total_attendance from hr_analytic_timesheet hrt left join account_analytic_line l on (l.id = hrt.line_id) group by l.date::date, hrt.sheet_id ) union ( select -min(a.id) as id, a.name::date as name, a.sheet_id as sheet_id, 0.0 as total_timesheet, SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance from hr_attendance a group by a.name::date, a.sheet_id )) AS foo GROUP BY name, sheet_id""") | 89b312484b12c368ce1d36532f97989773d6b2f2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/89b312484b12c368ce1d36532f97989773d6b2f2/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
2640,
578,
1453,
1476,
15407,
67,
8293,
2963,
67,
8118,
67,
8118,
67,
2881,
487,
9111,
4552,
12,
350,
13,
487,
612,
16,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
2640,
578,
1453,
1476,
15407,
67,
8293,
2963,
67,
8118,
67,
8118,
67,
2881,
487,
9111,
4552,
12,
350,
13,
487,
612,
16,
508,... |
def __init__(self): | def __init__(self, url=""): | def __init__(self): cp = config() self.xml_file = getTempFilename() self.xsl_file = os.path.expandvars(cp_get(cp, "gip", "pretty_gip_xsl", "$GIP_LOCATION/templates/pretty_gip_info.xsl")) self.html_file = os.path.expandvars(cp_get(cp, "gip", "pretty_gip_html", "$VDT_LOCATION/apache/htdocs/pretty_gip_info.html")) self.doc = Document() self.entries = None | fb367b6d1622b9e4151697d07ba739634657ef9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12088/fb367b6d1622b9e4151697d07ba739634657ef9d/pretty_gip_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
880,
1546,
6,
4672,
3283,
273,
642,
1435,
365,
18,
2902,
67,
768,
273,
28988,
5359,
1435,
365,
18,
30903,
67,
768,
273,
1140,
18,
803,
18,
12320,
4699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
880,
1546,
6,
4672,
3283,
273,
642,
1435,
365,
18,
2902,
67,
768,
273,
28988,
5359,
1435,
365,
18,
30903,
67,
768,
273,
1140,
18,
803,
18,
12320,
4699,
... |
gLogger.exception(errStr,'',str(x)) | gLogger.exception(errStr) | def pfnunparse(pfnDict): """ This method takes a dictionary containing a the pfn attributes and contructs it """ #gLogger.debug("Pfn.pfnunparse: Attempting to un-parse pfnDict.") try: # All files must have a path and a filename. Or else... # fullPath = '/some/path/to/a/file.file' fullPath = "%s/%s" % (pfnDict['Path'],pfnDict['FileName']) fullPath = os.path.realpath(fullPath) # If they have a port they must also have a host... if pfnDict['Port']: pfnHost ="%s:%s" % (pfnDict['Host'],pfnDict['Port']) # pfnHost = 'host:port' # If there is a port then there may be a web service url if pfnDict['WSUrl']: pfnHost = "%s%s" % (pfnHost,pfnDict['WSUrl']) #pfnHost = 'host:port/wsurl' else: # It is possible that the host is an empty string pfnHost = pfnDict['Host'] #pfnHost = 'host' #pfnHost = '' # But, if the host is not an empty string we must put a protocol infront of it... if pfnHost: pfnHost = "%s://%s" % (pfnDict['Protocol'],pfnHost) #pfnHost = 'protocol://host' #pfnHost = 'protocol://host:port' #pfnHost = 'protocol://host:port/wsurl' else: # If there is no host there may or may not be a protocol if pfnDict['Protocol']: pfnHost = '%s:' % pfnDict['Protocol'] #pfnHost = 'protocol:' else: pfnHost = '' fullPfn = '%s%s' % (pfnHost,fullPath) #fullPfn = 'fullPath' #fullPfn = 'protocol:/fullPath' #fullPfn = 'protocol://host/fullPath' #fullPfn = 'protocol://host:port/fullPath' #fullPfn = 'protocol://host:port/wsurl/fullPath' #gLogger.debug("Pfn.pfnunparse: Successfully un-parsed pfn dictionary.") return S_OK(fullPfn) except Exception,x: errStr = "Pfn.pfnunparse: Exception while un-parsing pfn dictionary." gLogger.exception(errStr,'',str(x)) return S_ERROR(errStr) | fc5f50842408c7266069c82c4694cc5b2493a3ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/fc5f50842408c7266069c82c4694cc5b2493a3ce/Pfn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
4293,
318,
2670,
12,
84,
4293,
5014,
4672,
3536,
1220,
707,
5530,
279,
3880,
4191,
279,
326,
293,
4293,
1677,
471,
356,
8813,
87,
518,
3536,
468,
75,
3328,
18,
4148,
2932,
52,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
4293,
318,
2670,
12,
84,
4293,
5014,
4672,
3536,
1220,
707,
5530,
279,
3880,
4191,
279,
326,
293,
4293,
1677,
471,
356,
8813,
87,
518,
3536,
468,
75,
3328,
18,
4148,
2932,
52,
429... |
if name.endswith('.py') or name.endswith('.h') or name.endswith('.hh') or name.endswith('.c') or name.endswith('.cc') or | if name.endswith('.py') or \ name.endswith('.h') or name.endswith('.hh') or \ name.endswith('.c') or name.endswith('.cc') or \ | def copy_license_to_files(license_content): """Copy license header to every .py, .cc or .h files""" # get the project name if not configurationhandler.project_config: configurationhandler.loadConfig() project_name = configurationhandler.project_config['project'] # open each python file and main bin file for root, dirs, files in os.walk('./'): for name in files: if name.endswith('.py') or name.endswith('.h') or name.endswith('.hh') or name.endswith('.c') or name.endswith('.cc') or name.endswith('.am') or name.endswith('ac'): skip_until_end_found = False try: target_file_name = os.path.join(root, name) ftarget_file_name = file(target_file_name, 'r') ftarget_file_name_out = file(ftarget_file_name.name + '.new', 'w') for line in ftarget_file_name: # seek if we have to add or Replace a License if BEGIN_LICENCE_TAG_PY in line: ftarget_file_name_out.write(line) # write this line, otherwise will be skipped skip_until_end_found = True ftarget_file_name_out.write(prefix_license(license_content, "#")) if BEGIN_LICENCE_TAG_C in line: ftarget_file_name_out.write(line) # write this line, otherwise will be skipped skip_until_end_found = True ftarget_file_name_out.write(prefix_license(license_content, " *")) if END_LICENCE_TAG_C in line or END_LICENCE_TAG_PY in line: skip_until_end_found = False if not skip_until_end_found: ftarget_file_name_out.write(line) ftarget_file_name.close() ftarget_file_name_out.close() if skip_until_end_found: # that means we didn't find the END_LICENCE_TAG, don't copy the file print _("WARNING: %s was not found in the file %s. No licence replacement") % (END_LICENCE_TAG, ftarget_file_name.name) os.remove(ftarget_file_name_out.name) else: templatetools.apply_file_rights(ftarget_file_name.name, ftarget_file_name_out.name) os.rename(ftarget_file_name_out.name, ftarget_file_name.name) except (OSError, IOError), e: msg = _("%s file was not found") % fcopyright_name raise LicenceError(msg) | 72085da42ef6f092ab7ab27495d1d0eb78d662a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/290/72085da42ef6f092ab7ab27495d1d0eb78d662a2/license.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
12687,
67,
869,
67,
2354,
12,
12687,
67,
1745,
4672,
3536,
2951,
8630,
1446,
358,
3614,
263,
2074,
16,
263,
952,
578,
263,
76,
1390,
8395,
225,
468,
336,
326,
1984,
508,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
12687,
67,
869,
67,
2354,
12,
12687,
67,
1745,
4672,
3536,
2951,
8630,
1446,
358,
3614,
263,
2074,
16,
263,
952,
578,
263,
76,
1390,
8395,
225,
468,
336,
326,
1984,
508,
309,... |
'selector': ' }]) | 'selector': ' ]) | def test_replaceFilteredRulesForm(self): view = self.view commands = view.getCommands() res = view.replaceFilteredRulesForm(ruleType='state-enabled') self.assertEquals(res, [ {'selectorType': '', 'params': {'html': u'<![CDATA[\n<form style="display: inline" method="POST" id="rules_table_form" action="http://nohost/plone/Members/test_user_1_/@@rules-controlpanel">\n</form>\n]]>', 'withKssSetup': u'True'}, 'name': 'replaceHTML', 'selector': '#rules_table_form' }]) | 8e10635eb95b61dcecc555114726969d7c40cc1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12184/8e10635eb95b61dcecc555114726969d7c40cc1b/test_kss.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2079,
14478,
4478,
1204,
12,
2890,
4672,
1476,
273,
365,
18,
1945,
4364,
273,
1476,
18,
588,
9127,
1435,
400,
273,
1476,
18,
2079,
14478,
4478,
1204,
12,
5345,
559,
2218,
2019,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2079,
14478,
4478,
1204,
12,
2890,
4672,
1476,
273,
365,
18,
1945,
4364,
273,
1476,
18,
588,
9127,
1435,
400,
273,
1476,
18,
2079,
14478,
4478,
1204,
12,
5345,
559,
2218,
2019,... |
for instr in self.project.instruments: if not instr.isVisible: toolbutt = gtk.ToolButton() imgsize = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)[0] pixbuf = instr.pixbuf.scale_simple(imgsize, imgsize, gtk.gdk.INTERP_BILINEAR) image = gtk.Image() image.set_from_pixbuf(pixbuf) toolbutt.set_label(instr.name) toolbutt.set_icon_widget(image) toolbutt.set_is_important(True) toolbutt.connect("clicked", self.OnMaximiseTrack, instr) self.instrbar.insert(toolbutt, -1) | minimisedInstrs = [x for x in self.project.instruments if not x.isVisible] for instr in minimisedInstrs: toolbutt = gtk.ToolButton() imgsize = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)[0] pixbuf = instr.pixbuf.scale_simple(imgsize, imgsize, gtk.gdk.INTERP_BILINEAR) image = gtk.Image() image.set_from_pixbuf(pixbuf) toolbutt.set_label(instr.name) toolbutt.set_icon_widget(image) toolbutt.set_is_important(True) toolbutt.connect("clicked", self.OnMaximiseTrack, instr) self.instrbar.insert(toolbutt, -1) | def Update(self): """ Updates the mix view when requested by OnStateChanged or __init__ Returns: False -- indicates the GTK signal to: 1) continue propagating the regular signal. 2) stop calling the callback on a timeout_add. """ if self.Updating: return self.Updating = True self.projectview.Update() # remove all the mixer strips and then add the visible ones for strip in self.hbox.get_children(): self.hbox.remove(strip) for instr in self.project.instruments: if instr.isVisible: strip = None for channel in self.channels: if channel.instrument is instr: strip = channel strip.Update() break if not strip: strip = MixerStrip(self.project, instr, self, self.mainview) strip.connect("minimise", self.OnMinimiseTrack, instr) self.channels.append(strip) self.hbox.pack_start(strip, False, False) removeList = [] for strip in self.channels: if not strip.instrument in self.project.instruments: strip.Destroy() removeList.append(strip) for item in removeList: self.channels.remove(item) del removeList #Pack the master vuwidget self.hbox.pack_end(self.mastermixer, False, False) #create the minimise instruments bar if self.instrbar: for i in self.vbox.get_children(): if i == self.instrbar: self.vbox.remove(self.instrbar) self.instrbar = gtk.Toolbar() self.instrbar.set_show_arrow(True) self.instrbar.set_style(gtk.TOOLBAR_BOTH_HORIZ) toollab = gtk.ToolItem() lab = gtk.Label() lab.set_markup(_("<b>Instruments Not Shown:</b>")) toollab.add(lab) toollab.set_is_important(True) self.instrbar.insert(toollab, 0) | 48fa5ad9ed2b02b3f606cc7155b0cd3339a354ee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/48fa5ad9ed2b02b3f606cc7155b0cd3339a354ee/CompactMixView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
12,
2890,
4672,
3536,
15419,
326,
6843,
1476,
1347,
3764,
635,
2755,
1119,
5033,
578,
1001,
2738,
972,
225,
2860,
30,
1083,
1493,
8527,
326,
19688,
47,
4277,
358,
30,
404,
13,
1324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
12,
2890,
4672,
3536,
15419,
326,
6843,
1476,
1347,
3764,
635,
2755,
1119,
5033,
578,
1001,
2738,
972,
225,
2860,
30,
1083,
1493,
8527,
326,
19688,
47,
4277,
358,
30,
404,
13,
1324... |
formatter = logging.Formatter(fmt=FMT, datefmt=DATEFMT) log = logging.getLogger('mailman') handler = logging.StreamHandler() handler.setFormatter(formatter) log.addHandler(handler) log.setLevel(logging.INFO) | logging.basicConfig(format=FMT, datefmt=DATEFMT, level=logging.INFO) cp = ReallySafeConfigParser() if config.LOG_CONFIG_FILE: cp.read(config.LOG_CONFIG_FILE) | def initialize(propagate=False): # XXX Don't call logging.basicConfig() because in Python 2.3, it adds a # handler to the root logger that we don't want. When Python 2.4 is the # minimum requirement, we can use basicConfig() with keyword arguments. # # The current set of Mailman logs are: # # debug - Only used for development # error - All exceptions go to this log # bounce - All bounce processing logs go here # mischief - Various types of hostile activity # post - Information about messages posted to mailing lists # vette - Information related to admindb activity # smtp - Successful SMTP activity # smtp-failure - Unsuccessful SMTP activity # subscribe - Information about leaves/joins # config - Configuration issues # locks - Lock steals # qrunner - qrunner start/stops # fromusenet - Information related to the Usenet to Mailman gateway # # Start by creating a common formatter and the root logger. formatter = logging.Formatter(fmt=FMT, datefmt=DATEFMT) log = logging.getLogger('mailman') handler = logging.StreamHandler() handler.setFormatter(formatter) log.addHandler(handler) log.setLevel(logging.INFO) # Create the subloggers for logger in LOGGERS: log = logging.getLogger('mailman.' + logger) # Propagation to the root logger is how we handle logging to stderr # when the qrunners are not run as a subprocess of mailmanctl. log.propagate = propagate handler = ReopenableFileHandler(os.path.join(config.LOG_DIR, logger)) _handlers.append(handler) handler.setFormatter(formatter) log.addHandler(handler) # It doesn't make much sense for the debug logger to ignore debug # level messages. if logger == 'debug': log.setLevel(logging.DEBUG) | 6362c6e0a021eb5939d14b8ae4a2ed7b80371580 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2120/6362c6e0a021eb5939d14b8ae4a2ed7b80371580/loginit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
5986,
346,
340,
33,
8381,
4672,
468,
11329,
7615,
1404,
745,
2907,
18,
13240,
809,
1435,
2724,
316,
6600,
576,
18,
23,
16,
518,
4831,
279,
468,
1838,
358,
326,
1365,
1194,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
5986,
346,
340,
33,
8381,
4672,
468,
11329,
7615,
1404,
745,
2907,
18,
13240,
809,
1435,
2724,
316,
6600,
576,
18,
23,
16,
518,
4831,
279,
468,
1838,
358,
326,
1365,
1194,
71... |
return self._dict.__contains__(el) | raise NotImplementedError("Please use a subclass that implements the __contains__ method") | def __contains__(self, el): #{{{ | 5692ed97988b844b3fc73c0ff916ecbd137ea54b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2635/5692ed97988b844b3fc73c0ff916ecbd137ea54b/mappingset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
415,
4672,
3735,
12187,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
415,
4672,
3735,
12187,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
'web' | 'browser' | 'device' | 'broker' | 'web' | 'browser' | 'agency' | 'broker' | def isRunning(self, part): """Called to test the web presence or browser is running. | 89c26ae85ea06431a8c3e18f173500e3bf7a509d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12466/89c26ae85ea06431a8c3e18f173500e3bf7a509d/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19858,
12,
2890,
16,
1087,
4672,
3536,
8185,
358,
1842,
326,
3311,
9805,
578,
4748,
353,
3549,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19858,
12,
2890,
16,
1087,
4672,
3536,
8185,
358,
1842,
326,
3311,
9805,
578,
4748,
353,
3549,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
except KeyError: raise KeyError, name + " is not a valid option." | except KeyError: raise AttributeError, name + " is not a valid option." | def __setattr__(self, name, value): try: if _Config.defaults[name] != value or _Config.options.get(name, _Config.invalidValue) != value: if "Dir" in name: _Config.__createDir(value) _Config.options[name] = value except KeyError: raise KeyError, name + " is not a valid option." | dac7e4d0e824051ef6794eb34c3098a347d61893 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10139/dac7e4d0e824051ef6794eb34c3098a347d61893/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
4672,
775,
30,
309,
389,
809,
18,
7606,
63,
529,
65,
480,
460,
578,
389,
809,
18,
2116,
18,
588,
12,
529,
16,
389,
809,
18,
5387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
4672,
775,
30,
309,
389,
809,
18,
7606,
63,
529,
65,
480,
460,
578,
389,
809,
18,
2116,
18,
588,
12,
529,
16,
389,
809,
18,
5387,
... |
'PCBuild')) | 'PC', 'VS7.1')) | def finalize_options (self): from distutils import sysconfig | 3af3ecca92ca7b10b2c53c51166101267975f029 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/3af3ecca92ca7b10b2c53c51166101267975f029/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ | out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?recid=%s">Detailed record</a></span>""" \ | def print_record(recID, format='hb', ot='', decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." out = "" # sanity check: if not record_exists(recID): return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <header>\n" for id in get_fieldvalues(recID,oaiidfield): out += " <identifier>%s</identifier>\n" % id out += " <datestamp>%s</datestamp>\n" % get_modification_date(recID) out += " </header>\n" out += " <metadata>\n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ <record xmlns="http://www.loc.gov/MARC21/slim">\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) elif format.startswith("xm"): out += """ <record>\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) for digit1 in range(0,10): for digit2 in range(0,10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) if dbg: out += "<br>Debug: " + query res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if format.startswith("xm") or format == "marcxml": fieldid = encode_for_xml(field[0:3]) if field_number_old != -999: out += """ </datafield>\n""" out += """ <datafield tag="%s" ind1="%s" ind2="%s">\n""" % (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value if format.startswith("xm") or format == "marcxml": value = encode_for_xml(value) out += """ <subfield code="%s">%s</subfield>\n""" % (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if (format.startswith("xm") or format == "marcxml") and field_number_old != -999: out += """ </datafield>\n""" # we are at the end of printing the record: if format.startswith("xm") or format == "marcxml": out += " </record>\n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ <dc xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://www.openarchives.org/OAI/1.1/dc.xsd">\n""" for f in get_fieldvalues(recID, "041__a"): out += " <language>%s</language>\n" % f for f in get_fieldvalues(recID, "100__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " <title>%s</title>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " <subject>%s</subject>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " <identifier>%s</identifier>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " <description>%s</description>\n" % encode_for_xml(f) out += " <date>%s</date>\n" % get_creation_date(recID) out += " </dc>\n" elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format == "hd": # HTML detailed format # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so either call BibFormat on the fly or use default format # second, see if we are calling BibFormat on the fly: if cfg_call_bibformat: out += call_bibformat(recID) else: # okay, need to construct a simple "Detailed record" format of our own: out += "<p> " # secondly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<p><p><center><big><strong>%s</strong></big></center>" % title # thirdly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += "<p><p><center>" for author in authors: out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(author), author) out += "</center>" # fourthly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += "<p><center><small>%s</small></center>" % date # fifthly, abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Abstract:</strong> %s</small></p>""" % abstract # fifthly bis, keywords: keywords = get_fieldvalues(recID, "6531_a") if len(keywords): out += """<p style="margin-left: 15%; width: 70%"> <small><strong>Keyword(s):</strong></small>""" for keyword in keywords: out += """<small><a href="%s/search.py?p=%s&f=keyword">%s</a> ;</small> """ % (weburl, urllib.quote(keyword), keyword) # fifthly bis bis, published in: prs_p = get_fieldvalues(recID, "909C4p") prs_v = get_fieldvalues(recID, "909C4v") prs_y = get_fieldvalues(recID, "909C4y") prs_n = get_fieldvalues(recID, "909C4n") prs_c = get_fieldvalues(recID, "909C4c") for idx in range(0,len(prs_p)): out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Publ. in:</strong> %s""" % prs_p[idx] if prs_v and prs_v[idx]: out += """<strong>%s</strong>""" % prs_v[idx] if prs_y and prs_y[idx]: out += """(%s)""" % prs_y[idx] if prs_n and prs_n[idx]: out += """, no.%s""" % prs_n[idx] if prs_c and prs_c[idx]: out += """, p.%s""" % prs_c[idx] out += """.</small>""" # sixthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): link_text = "URL" if urls_z[idx]: link_text = urls_z[idx] out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>%s:</strong> <a href="%s">%s</a></small>""" % (link_text, urls_u[idx], urls_u[idx]) # print some white space at the end: out += "<p><p>" elif format == "hb-fly": # HTML brief called on the fly; suitable for testing brief formats out += call_bibformat(recID, "BRIEF_HTML") out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) elif format == "hd-ejournalsite": # HTML brief called on the fly; suitable for testing brief formats out += call_bibformat(recID, "EJOURNALSITE") out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) else: # HTML brief format by default query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' does not exist in format 'format', so print some default format: # firstly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<strong>%s</strong> " % title # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " / " for i in range (0,cfg_author_et_al_threshold): if i < len(authors): out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(authors[i]), authors[i]) if len(authors) > cfg_author_et_al_threshold: out += " <em>et al.</em>" # thirdly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += " %s." % date # thirdly bis, report numbers: rns = get_fieldvalues(recID, "037__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn rns = get_fieldvalues(recID, "088__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn # fourthly, beginning of abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += "<br><small>%s [...]</small>" % abstract[:1+string.find(abstract, '.')] # fifthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): out += """<br><small class="note"><a class="note" href="%s">%s</a></small>""" % (urls_u[idx], urls_u[idx]) # at the end of HTML mode, print the "Detailed record" functionality: if cfg_use_aleph_sysnos: alephsysnos = get_fieldvalues(recID, "970__a") if len(alephsysnos)>0: alephsysno = alephsysnos[0] out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?sysnb=%s">Detailed record</a></span>""" \ % (weburl, alephsysno) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) # ...and the "Mark record" functionality: #out += """<span class="moreinfo"> - <input name="recid" type="checkbox" value="%s"> Mark record</span>""" % recID # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += " </metadata>\n" out += " </record>\n" return out | 535ed6a8d836745c0ddd7f1016fbe145d7c7bebd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/535ed6a8d836745c0ddd7f1016fbe145d7c7bebd/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
3366,
12,
3927,
734,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
16824,
33,
94,
2941,
18,
323,
14706,
4672,
315,
15402,
1409,
296,
3927,
734,
11,
4955,
4078,
4751,
358,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
3366,
12,
3927,
734,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
16824,
33,
94,
2941,
18,
323,
14706,
4672,
315,
15402,
1409,
296,
3927,
734,
11,
4955,
4078,
4751,
358,
2... |
start = page_num * rows - 10 | start = rows * (page_num - 1) | def __init__(self, query): self.query = query.copy() | 7233a25d6e71372cbd851c5184c11474966dfc5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6299/7233a25d6e71372cbd851c5184c11474966dfc5d/index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
843,
4672,
365,
18,
2271,
273,
843,
18,
3530,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
843,
4672,
365,
18,
2271,
273,
843,
18,
3530,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.client.voidresp() | self.assertEqual(self.client.voidresp(), "226 transfer complete") | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.client.voidresp() | 1ad61af58377105e51758ab67f7315199e5d6064 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/1ad61af58377105e51758ab67f7315199e5d6064/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
892,
67,
4071,
12,
2890,
4672,
468,
2424,
977,
7313,
273,
365,
18,
2625,
18,
13866,
4172,
2668,
1098,
6134,
365,
18,
11231,
1248,
2520,
1442,
12,
15031,
16,
5832,
18,
1260,
2... |
if not self._isDeadEnd(attr): | if not self._isDeadEnd(attr, key): | def run(self): taskMgr.doMethodLater(self._nextCheckDelay, self._checkForLeaks, self.getCheckTaskName()) | 88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1562,
9455,
18,
2896,
1305,
20607,
12,
2890,
6315,
4285,
1564,
6763,
16,
365,
6315,
1893,
1290,
1682,
581,
87,
16,
365,
18,
588,
1564,
2174,
461,
10756,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1562,
9455,
18,
2896,
1305,
20607,
12,
2890,
6315,
4285,
1564,
6763,
16,
365,
6315,
1893,
1290,
1682,
581,
87,
16,
365,
18,
588,
1564,
2174,
461,
10756,
2,
-100,
... |
self.fp += 1 | self.fn += 1 | def CalculateStats(self): self.Reset() for msg in msginfoDB.db: self.total += 1 m = self.__empty_msg() m.id = msg msginfoDB._getState(m) if m.c == 's': self.cls_spam += 1 if m.t == 0: self.fn += 1 elif m.c == 'h': self.cls_ham += 1 if m.t == 1: self.fp += 1 elif m.c == 'u': self.cls_unsure += 1 if m.t == 0: self.trn_unsure_ham += 1 elif m.t == 1: self.trn_unsure_spam += 1 if m.t == 1: self.trn_spam += 1 elif m.t == 0: self.trn_ham += 1 | ec75a1d02f7509b75c9d531bbde8028fafb82d32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/ec75a1d02f7509b75c9d531bbde8028fafb82d32/Stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9029,
4195,
12,
2890,
4672,
365,
18,
7013,
1435,
364,
1234,
316,
1234,
1376,
2290,
18,
1966,
30,
365,
18,
4963,
1011,
404,
312,
273,
365,
16186,
5531,
67,
3576,
1435,
312,
18,
350,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9029,
4195,
12,
2890,
4672,
365,
18,
7013,
1435,
364,
1234,
316,
1234,
1376,
2290,
18,
1966,
30,
365,
18,
4963,
1011,
404,
312,
273,
365,
16186,
5531,
67,
3576,
1435,
312,
18,
350,
273... |
def __call__(self, *args): | def __call__(self, *args, **kwds): | def __call__(self, *args): indent = debugindent[self.log] if debugmidline[self.log]: self.log.write("\n") | 6c6061998291b28c44abf45ac6261f9b6292f500 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10452/6c6061998291b28c44abf45ac6261f9b6292f500/x88.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
25577,
4672,
3504,
273,
1198,
9355,
63,
2890,
18,
1330,
65,
309,
1198,
13138,
1369,
63,
2890,
18,
1330,
14542,
365,
18,
1330,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
25577,
4672,
3504,
273,
1198,
9355,
63,
2890,
18,
1330,
65,
309,
1198,
13138,
1369,
63,
2890,
18,
1330,
14542,
365,
18,
1330,
18,
26... |
command = [lambda:app.htmlapp.addAndSelectFeed(url), "Open HTTP URL"] | messages.NewChannel(url).send_to_backend() | def openURL_withReplyEvent_(self, event, replyEvent): keyDirectObject = struct.unpack(">i", "----")[0] url = event.paramDescriptorForKeyword_(keyDirectObject).stringValue().decode('utf8') | 018bbc7d1624aa1bbb3fadb11711c555376ee49b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/018bbc7d1624aa1bbb3fadb11711c555376ee49b/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
1785,
67,
1918,
7817,
1133,
67,
12,
2890,
16,
871,
16,
4332,
1133,
4672,
498,
5368,
921,
273,
1958,
18,
17309,
2932,
34,
77,
3113,
315,
553,
7923,
63,
20,
65,
880,
273,
871,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
1785,
67,
1918,
7817,
1133,
67,
12,
2890,
16,
871,
16,
4332,
1133,
4672,
498,
5368,
921,
273,
1958,
18,
17309,
2932,
34,
77,
3113,
315,
553,
7923,
63,
20,
65,
880,
273,
871,
18... |
TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) | if sys.platform == "win32": TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) else: TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS) | def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h) ConditionalWriteFile("built/tmp/null.cxx","") | 363855b1b43c4ed8ea04da225cb9e53b61c3b55b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/363855b1b43c4ed8ea04da225cb9e53b61c3b55b/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
52,
464,
69,
1444,
2697,
13332,
1177,
21,
33,
474,
12,
5757,
18,
4939,
2932,
1199,
25146,
20,
5717,
1177,
22,
33,
474,
12,
5757,
18,
4939,
2932,
1199,
25146,
21,
5717,
1177,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
52,
464,
69,
1444,
2697,
13332,
1177,
21,
33,
474,
12,
5757,
18,
4939,
2932,
1199,
25146,
20,
5717,
1177,
22,
33,
474,
12,
5757,
18,
4939,
2932,
1199,
25146,
21,
5717,
1177,
23,
... |
(weburl, url_args, results_in_Home._nbhits), "") | (weburl, url_args, results_in_Home._nbhits)) | def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this kind of matching. If it is not set, then a guess is made. - Calls search_in_bibwords() and/or search_in_bibxxx() functions. - If hit_hints is set, than print lots of hints on current search. Useful for debugging and/or when search gives zero hits. - Called by main().""" ## create empty output results set: results_out = {} for coll in colls: results_out[coll] = HitList() results_out[coll]._nbhits = 0 ## if p is not defined, return all hits in given collections: if not p: for coll in colls: results_out[coll]._set = collrecs_cache[coll]._set results_out[coll]._nbhits = collrecs_cache[coll]._nbhits return results_out ## now we are sure to have some p: good. ## create search units: opft_items = create_opft_search_units(req, p, f, m) #req.write("<p>%s" % opft_items) ## search regardless of collection: results_in_any_collection = HitList() results_in_any_collection_empty = 1 # to be able to skip first set operation for opft_item in opft_items: results_for_opft_item = {} oi, pi, fi, ti = opft_item[0], opft_item[1], opft_item[2], opft_item[3] # firstly, launch search for this pattern item: if ti == 'a' or ti == 'r': # we are doing either direct bibxxx search or phrase search or regexp search results_for_opft_item = search_in_bibxxx(req, pi, fi, ti) elif ti == 'w': # we are doing bibwords search results_for_opft_item = search_in_bibwords(req, pi, fi) else: print_warning(req, "Search type '%s' is not defined." % ti, "Error") return None if hit_hints: results_for_opft_item.calculate_nbhits() if results_for_opft_item._nbhits == 0: text = "Search term <em>%s</em>" % pi if fi: text += " inside <em>%s</em> " % fi print_warning(req, "%s did not match any record. Nearest terms in any collection are: %s" % (text, create_nearest_terms_box(req.args, pi, fi)), "") return results_out # empty if dbg: print_warning(req, "Item <strong>%s:%s</strong> gave %d hits." % (fi, pi, results_for_opft_item._nbhits), "") # secondly, apply the set intersect/union/disjunction functions: if dbg: t1 = os.times()[4] if results_in_any_collection_empty: results_in_any_collection = results_for_opft_item results_in_any_collection_empty = 0 else: if oi == '+': results_in_any_collection.intersect(results_for_opft_item) elif oi == '-': results_in_any_collection.difference(results_for_opft_item) elif oi == '|': results_in_any_collection.union(results_for_opft_item) else: print_warning(req, "Invalid set operation %s." % oi, "Error") if dbg: t2 = os.times()[4] print_warning(req, "Set operation '%s' took %.2f seconds." % (oi, (t2 - t1)), "Profile") ## before doing collection intersection, see how many hits we have now: results_in_any_collection.calculate_nbhits() ## return all hits if no collection list specified (useful for WebSearch Admin to determine collection ## recID universe): if colls == []: return results_in_any_collection ## were there no hits at all before doing collection intersection? if results_in_any_collection._nbhits == 0: # pattern not found in any public/private collection: if hit_hints: text = """All search terms matched but boolean query returned no hits. Please combine your search terms differently.""" url_args = req.args text += """<blockquote><table class="nearesttermsbox" cellpadding="0" cellspacing="0" border="0">""" for opft_item in opft_items: oi, pi, fi, ti = opft_item[0], opft_item[1], opft_item[2], opft_item[3] url_args_new = re.sub(r'(^|\&)p=.*?(\&|$)', r'\1p='+urllib.quote(pi)+r'\2', url_args) url_args_new = re.sub(r'(^|\&)f=.*?(\&|$)', r'\1f='+urllib.quote(fi)+r'\2', url_args_new) text += """<tr><td class="nearesttermsboxbody" align="right">%s</td><td class="nearesttermsboxbody" width="15"> </td><td class="nearesttermsboxbody" align="left"><a class="nearestterms" href="%s/search.py?%s">%s</a></td></tr>""" % \ (get_word_nbhits(pi, fi), weburl, url_args_new, pi) text += """</table></blockquote>""" print_warning(req, text, "") return results_out # still empty ## intersect with collection universe: if dbg: t1 = os.times()[4] if colls: for coll in colls: results_out[coll]._set = Numeric.bitwise_and(results_in_any_collection._set, collrecs_cache[coll]._set) if dbg: t2 = os.times()[4] print_warning(req, "Intersecting with collection hitlist universe took %.2f seconds." % ((t2 - t1)), "Profile") ## count number of hits in given collections: results_out_nb_hits_total = 0 for coll in colls: results_out[coll].calculate_nbhits() results_out_nb_hits_total += results_out[coll]._nbhits if results_out_nb_hits_total == 0: # pattern had been found but not in the collections chosen by the user: if hit_hints: # try to search in Home: results_in_Home = HitList() results_in_Home._set = Numeric.bitwise_and(results_in_any_collection._set, collrecs_cache[cdsname]._set) results_in_Home.calculate_nbhits() if results_in_Home._nbhits > 0: # some hits found in Home, so propose this search: url_args = req.args url_args = re.sub(r'(^|\&)cc=.*?(\&|$)', r'\2', url_args) url_args = re.sub(r'(^|\&)c=.*?(\&[^c]+=|$)', r'\2', url_args) url_args = re.sub(r'^\&+', '', url_args) url_args = re.sub(r'\&+$', '', url_args) print_warning(req, """Match found in other public collections: <a class="nearestterms" href="%s/search.py?%s">%d hits</a>.""" % (weburl, url_args, results_in_Home._nbhits), "") else: # no hits found in Home, recommend different search terms: text = """No public collection matched your query. If you were looking for a non-public document, please choose the desired restricted collection first.""" print_warning(req, text, "") return results_out | c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
4951,
12,
3658,
16,
293,
33,
7036,
16,
284,
33,
7036,
16,
645,
3251,
22850,
6487,
312,
33,
7036,
16,
6800,
67,
24598,
33,
20,
4672,
3536,
16294,
364,
1936,
296,
84,
11,
471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
4951,
12,
3658,
16,
293,
33,
7036,
16,
284,
33,
7036,
16,
645,
3251,
22850,
6487,
312,
33,
7036,
16,
6800,
67,
24598,
33,
20,
4672,
3536,
16294,
364,
1936,
296,
84,
11,
471... |
sage: sr = mq.SR(2,1,2,8,gf2=True) | sage: sr = mq.SR(2, 1, 2, 8, gf2=True) | def sub_bytes(self, d): """ Perform the non-linear transform on d. | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
67,
3890,
12,
2890,
16,
302,
4672,
3536,
11217,
326,
1661,
17,
12379,
2510,
603,
302,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
67,
3890,
12,
2890,
16,
302,
4672,
3536,
11217,
326,
1661,
17,
12379,
2510,
603,
302,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
| QtCore.Qt.ItemIsEnabled)) | | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsUserCheckable)) | def __init__(self, bookmark, parent, labelList): """ QBookmarkTreeWidgetItem(bookmark: Bookmark, parent: QTreeWidgetItem labelList: QStringList) -> QBookmarkTreeWidget Create a new tree widget item with a specific parent and labels | 0894a6c25e7078774573a34b285f23a303f54a9a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/0894a6c25e7078774573a34b285f23a303f54a9a/bookmark_panel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13696,
16,
982,
16,
1433,
682,
4672,
3536,
2238,
22966,
2471,
4609,
1180,
12,
3618,
3355,
30,
20258,
3355,
16,
982,
30,
2238,
2471,
4609,
1180,
1433,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13696,
16,
982,
16,
1433,
682,
4672,
3536,
2238,
22966,
2471,
4609,
1180,
12,
3618,
3355,
30,
20258,
3355,
16,
982,
30,
2238,
2471,
4609,
1180,
1433,
682,
... |
array.array.__init__(typecode) | array.array.__init__(self, typecode) | def __init__(self, typecode, newarg=None): array.array.__init__(typecode) | 8fb9c56a93e0cfc376598f7cb8597424279a4c40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/8fb9c56a93e0cfc376598f7cb8597424279a4c40/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
710,
16,
394,
3175,
33,
7036,
4672,
526,
18,
1126,
16186,
2738,
972,
12,
723,
710,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
710,
16,
394,
3175,
33,
7036,
4672,
526,
18,
1126,
16186,
2738,
972,
12,
723,
710,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cmd='"%s" -b "%s" %s -s "%s" "%s"' % (munger,bindir, mungeropts,refBrain,image) | cmd='"%s" -b "%s" %s -s "%s" .' % (munger,bindir, mungeropts,refBrain) | def findExecutable(execname,msg=''): ''' @return full path to a command using the shell's which function ''' execpath=subprocess.Popen(["which", execname], stdout=subprocess.PIPE).communicate()[0].rstrip() if execpath == '' : if msg == '' : msg="Locate the program "+execname newpath = easygui.fileopenbox(msg=msg) return newpath else : return execpath | 4949a6e52733dd60f71681ba83e60f83ba4df96a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14871/4949a6e52733dd60f71681ba83e60f83ba4df96a/callmungereasygui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
17709,
12,
4177,
529,
16,
3576,
2218,
11,
4672,
9163,
632,
2463,
1983,
589,
358,
279,
1296,
1450,
326,
5972,
1807,
1492,
445,
9163,
1196,
803,
33,
1717,
2567,
18,
52,
3190,
3816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
17709,
12,
4177,
529,
16,
3576,
2218,
11,
4672,
9163,
632,
2463,
1983,
589,
358,
279,
1296,
1450,
326,
5972,
1807,
1492,
445,
9163,
1196,
803,
33,
1717,
2567,
18,
52,
3190,
3816,
... |
Instances.flavorId == Flavors.flavorId | Instances.flavorId = Flavors.flavorId | def resolve(self, label, depSetList): """ Determine troves that provide the given dependencies, restricting by label and limiting to latest version for each (name, flavor) pair. """ selectTemplate = """SELECT depNum, Items.item, Versions.version, Nodes.timeStamps, flavor FROM (%s) INNER JOIN Instances ON provInstanceId == Instances.instanceId INNER JOIN Items ON Instances.itemId == Items.itemId INNER JOIN Versions ON Instances.versionId == Versions.versionId INNER JOIN Flavors ON Instances.flavorId == Flavors.flavorId INNER JOIN Nodes ON Instances.itemId == Nodes.itemId AND Instances.versionId == Nodes.versionId ORDER BY Nodes.finalTimestamp DESC """ depList, cu = self._resolve(depSetList, selectTemplate, restrictBy = label.asString(), restrictor = self._restrictResolveByLabel) | c3870e643626054f9dc7fe38751e71be00f92f1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/c3870e643626054f9dc7fe38751e71be00f92f1b/deptable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
12,
2890,
16,
1433,
16,
5993,
694,
682,
4672,
3536,
10229,
23432,
3324,
716,
5615,
326,
864,
5030,
16,
13108,
310,
635,
1433,
471,
1800,
310,
358,
4891,
1177,
364,
1517,
261,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
12,
2890,
16,
1433,
16,
5993,
694,
682,
4672,
3536,
10229,
23432,
3324,
716,
5615,
326,
864,
5030,
16,
13108,
310,
635,
1433,
471,
1800,
310,
358,
4891,
1177,
364,
1517,
261,
529,
... |
autoconnect.connect('toggled', self.prefs_config_widget_active, | autoconnect.connect('toggled', self._config_widget_active, | def mpd_tab(self): """Construct and layout the MPD tab""" mpdlabel = ui.label(markup='<b>' + _('MPD Connection') + '</b>', y=1) mpd_frame = gtk.Frame() mpd_frame.set_label_widget(mpdlabel) mpd_frame.set_shadow_type(gtk.SHADOW_NONE) controlbox = gtk.HBox() profiles = ui.combo() add_profile = ui.button(img=ui.image(stock=gtk.STOCK_ADD)) remove_profile = ui.button(img=ui.image(stock=gtk.STOCK_REMOVE)) self.prefs_populate_profile_combo(profiles, self.config.profile_num, remove_profile) controlbox.pack_start(profiles, False, False, 2) controlbox.pack_start(remove_profile, False, False, 2) controlbox.pack_start(add_profile, False, False, 2) namelabel = ui.label(textmn=_("_Name") + ":") nameentry = ui.entry() namelabel.set_mnemonic_widget(nameentry) hostlabel = ui.label(textmn=_("_Host") + ":") hostentry = ui.entry() hostlabel.set_mnemonic_widget(hostentry) portlabel = ui.label(textmn=_("_Port") + ":") portentry = gtk.SpinButton(gtk.Adjustment(0 ,0 ,65535, 1),1) portentry.set_numeric(True) portlabel.set_mnemonic_widget(portentry) dirlabel = ui.label(textmn=_("_Music dir") + ":") direntry = gtk.FileChooserButton(_('Select a Music Directory')) direntry.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) direntry.connect('selection-changed', self.prefs_direntry_changed, profiles) dirlabel.set_mnemonic_widget(direntry) passwordlabel = ui.label(textmn=_("Pa_ssword") + ":") passwordentry = ui.entry(password=True) passwordlabel.set_mnemonic_widget(passwordentry) passwordentry.set_tooltip_text(_("Leave blank if no password is required.")) autoconnect = gtk.CheckButton(_("_Autoconnect on start")) autoconnect.set_active(self.config.autoconnect) autoconnect.connect('toggled', self.prefs_config_widget_active, 'autoconnect') # Fill in entries with current profile: self.prefs_profile_chosen(profiles, nameentry, hostentry, portentry, passwordentry, direntry) # Update display if $MPD_HOST or $MPD_PORT is set: host, port, password = misc.mpd_env_vars() if host or port: using_mpd_env_vars = True if not host: host = "" if not port: port = 0 if not password: password = "" hostentry.set_text(str(host)) portentry.set_value(port) passwordentry.set_text(str(password)) nameentry.set_text(_("Using MPD_HOST/PORT")) for widget in [hostentry, portentry, passwordentry, nameentry, profiles, add_profile, remove_profile]: widget.set_sensitive(False) else: using_mpd_env_vars = False nameentry.connect('changed', self.prefs_nameentry_changed, profiles, remove_profile) hostentry.connect('changed', self.prefs_hostentry_changed, profiles) portentry.connect('value-changed', self.prefs_portentry_changed, profiles) passwordentry.connect('changed', self.prefs_passwordentry_changed, profiles) profiles.connect('changed', self.prefs_profile_chosen, nameentry, hostentry, portentry, passwordentry, direntry) add_profile.connect('clicked', self.prefs_add_profile, nameentry, profiles, remove_profile) remove_profile.connect('clicked', self.prefs_remove_profile, profiles, remove_profile) | 7d41f2105c0d58643150b6472b6b9676150f38e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/7d41f2105c0d58643150b6472b6b9676150f38e3/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6749,
72,
67,
7032,
12,
2890,
4672,
3536,
7249,
471,
3511,
326,
13480,
40,
3246,
8395,
6749,
72,
1925,
273,
5915,
18,
1925,
12,
15056,
2218,
32,
70,
1870,
397,
389,
2668,
4566,
40,
405... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6749,
72,
67,
7032,
12,
2890,
4672,
3536,
7249,
471,
3511,
326,
13480,
40,
3246,
8395,
6749,
72,
1925,
273,
5915,
18,
1925,
12,
15056,
2218,
32,
70,
1870,
397,
389,
2668,
4566,
40,
405... |
self.assert_(proxy.readlines(4 + len(os.linesep)) == | self.assertEqual(proxy.readlines(4 + len(os.linesep)), | def _test_readlines(self, proxy): # Read multiple lines proxy.seek(0) self.assert_(proxy.readlines() == ['foo' + os.linesep, 'bar' + os.linesep, 'fred' + os.linesep, 'bob']) proxy.seek(0) self.assert_(proxy.readlines(2) == ['foo' + os.linesep]) proxy.seek(3 + len(os.linesep)) self.assert_(proxy.readlines(4 + len(os.linesep)) == ['bar' + os.linesep, 'fred' + os.linesep]) proxy.seek(3) self.assert_(proxy.readlines(1000) == [os.linesep, 'bar' + os.linesep, 'fred' + os.linesep, 'bob']) | 9d1fae6c21b9661e8074aa8a166635ba69122b4b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9d1fae6c21b9661e8074aa8a166635ba69122b4b/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
896,
3548,
12,
2890,
16,
2889,
4672,
468,
2720,
3229,
2362,
2889,
18,
16508,
12,
20,
13,
365,
18,
11231,
67,
12,
5656,
18,
896,
3548,
1435,
422,
10228,
11351,
11,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
896,
3548,
12,
2890,
16,
2889,
4672,
468,
2720,
3229,
2362,
2889,
18,
16508,
12,
20,
13,
365,
18,
11231,
67,
12,
5656,
18,
896,
3548,
1435,
422,
10228,
11351,
11,
397,
... |
parser = _MOFileParser(fpath) | parser = _MOFileParser(fpath, enc) | def mofile(fpath, **kwargs): """ Convenience function that parse the mo file *fpath* and return a MOFile instance. **Keyword arguments**: - *fpath*: string, full or relative path to the mo file to parse - *wrapwidth*: integer, the wrap width, only useful when -w option was passed to xgettext to generate the po file that was used to format the mo file (optional, default to 78) - *autodetect_encoding*: boolean, if set to False the function will not try to detect the po file encoding (optional, default to True) - *encoding*: string, an encoding, only relevant if autodetect_encoding is set to False **Example**: >>> import polib >>> mo = polib.mofile('tests/test_utf8.mo') >>> mo #doctest: +ELLIPSIS <MOFile instance at ...> >>> import os, tempfile >>> for fname in ['test_iso-8859-15.mo', 'test_utf8.mo']: ... orig_mo = polib.mofile('tests/'+fname) ... tmpf = tempfile.NamedTemporaryFile().name ... orig_mo.save(tmpf) ... try: ... new_mo = polib.mofile(tmpf) ... for old, new in zip(orig_mo, new_mo): ... if old.msgid != new.msgid: ... old.msgstr ... new.msgstr ... finally: ... os.unlink(tmpf) """ if _dictget(kwargs, 'autodetect_encoding', True) == True: enc = detect_encoding(fpath) else: enc = _dictget(kwargs, 'encoding', default_encoding) parser = _MOFileParser(fpath) instance = parser.parse() instance.wrapwidth = _dictget(kwargs, 'wrapwidth', 78) instance.encoding = enc return instance | dda4d3f6263a4b81a841864a82766d4573d9eb92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/dda4d3f6263a4b81a841864a82766d4573d9eb92/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7344,
768,
12,
28900,
16,
2826,
4333,
4672,
3536,
735,
9080,
445,
716,
1109,
326,
7344,
585,
380,
28900,
14,
471,
327,
279,
16070,
812,
791,
18,
225,
2826,
8736,
1775,
636,
30,
300,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7344,
768,
12,
28900,
16,
2826,
4333,
4672,
3536,
735,
9080,
445,
716,
1109,
326,
7344,
585,
380,
28900,
14,
471,
327,
279,
16070,
812,
791,
18,
225,
2826,
8736,
1775,
636,
30,
300,
38... |
return importer.import_file(filename, finfo, fqname) | return importFunc(filename, finfo, fqname) | def _import_pathname(self, pathname, fqname): if _os_path_isdir(pathname): result = self._import_pathname(_os_path_join(pathname, '__init__'), fqname) if result: values = result[2] values['__pkgdir__'] = pathname values['__path__'] = [ pathname ] return 1, result[1], values return None | 16abaf4fd2ed34d4b3b71d740cdef6686032295c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/16abaf4fd2ed34d4b3b71d740cdef6686032295c/imputil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5666,
67,
28336,
12,
2890,
16,
9806,
16,
8508,
529,
4672,
309,
389,
538,
67,
803,
67,
291,
1214,
12,
28336,
4672,
563,
273,
365,
6315,
5666,
67,
28336,
24899,
538,
67,
803,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5666,
67,
28336,
12,
2890,
16,
9806,
16,
8508,
529,
4672,
309,
389,
538,
67,
803,
67,
291,
1214,
12,
28336,
4672,
563,
273,
365,
6315,
5666,
67,
28336,
24899,
538,
67,
803,
67,
... |
def response (dialog, response): resfunc(dialog, response) d.hide() d.connect("response", response) | def response (dialog, response, responsecb): responsecb(dialog, response) dialog.hide() d.connect("response", response, responsecb) | def response (dialog, response): resfunc(dialog, response) d.hide() | f9f75be5e90c57a67878c17a201267ee91112ea7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5339/f9f75be5e90c57a67878c17a201267ee91112ea7/Human.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
261,
12730,
16,
766,
4672,
400,
644,
12,
12730,
16,
766,
13,
302,
18,
11248,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
261,
12730,
16,
766,
4672,
400,
644,
12,
12730,
16,
766,
13,
302,
18,
11248,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
atoms = traj[0] r_old = atoms.get_positions() f_old = atoms.get_forces() | r_old = None f_old = None | def replay_trajectory(self, traj): """Initialize hessian from old trajectory.""" if isinstance(traj, str): from ase.io.trajectory import PickleTrajectory traj = PickleTrajectory(traj, 'r') atoms = traj[0] r_old = atoms.get_positions() f_old = atoms.get_forces() for i in range(0, len(traj) - 1): r = traj[i].get_positions() f = traj[i].get_forces() self.update(r, f, r_old, f_old) r_old = r f_old = f self.r_old = traj[-2].get_positions() self.f_old = traj[-2].get_forces() | e4186acc11663a2a2c70c16ef0b0536e66a7b908 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/e4186acc11663a2a2c70c16ef0b0536e66a7b908/lbfgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16033,
67,
2033,
19528,
12,
2890,
16,
1284,
78,
4672,
3536,
7520,
366,
20529,
628,
1592,
27016,
12123,
309,
1549,
12,
30514,
16,
609,
4672,
628,
26561,
18,
1594,
18,
2033,
19528,
1930,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16033,
67,
2033,
19528,
12,
2890,
16,
1284,
78,
4672,
3536,
7520,
366,
20529,
628,
1592,
27016,
12123,
309,
1549,
12,
30514,
16,
609,
4672,
628,
26561,
18,
1594,
18,
2033,
19528,
1930,
2... |
instr.SetLevel(DbToFloat(st["decay"][0])) | instr.SetLevel(DbToFloat(struct["decay"][0])) | def __PipelineBusLevelCb(self, bus, message): """ Handler for GStreamer bus messages about the currently reported level for the project or any of the instruments. """ st = message.structure if st and st.get_name() == "level": if not message.src is self.levelElement: for instr in self.instruments: if message.src is instr.levelElement: instr.SetLevel(DbToFloat(st["decay"][0])) break else: self.SetLevel(DbToFloat(st["decay"][0])) return True | e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8798,
7086,
2355,
15237,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
4663,
364,
611,
1228,
264,
5766,
2743,
2973,
326,
4551,
14010,
1801,
364,
326,
1984,
578,
1281,
434,
326,
29555,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8798,
7086,
2355,
15237,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
4663,
364,
611,
1228,
264,
5766,
2743,
2973,
326,
4551,
14010,
1801,
364,
326,
1984,
578,
1281,
434,
326,
29555,
1... |
def base_test_rects(self,rects): gc = agg.GraphicsContextArray((100,100)) | def base_rects(self,rects): gc = agg.GraphicsContextArray((100, 100)) | def base_test_rects(self,rects): gc = agg.GraphicsContextArray((100,100)) gc.rects(rects) actual = gc._get_path()._vertices() desired = array(((1.0,1.0,agg.path_cmd_move_to, agg.path_flags_none), (1.0,2.0,agg.path_cmd_line_to, agg.path_flags_none), (2.0,2.0,agg.path_cmd_line_to, agg.path_flags_none), (2.0,1.0,agg.path_cmd_line_to, agg.path_flags_none), (0.0,0.0,agg.path_cmd_end_poly, agg.path_flags_close), (2.0,2.0,agg.path_cmd_move_to, agg.path_flags_none), (2.0,3.0,agg.path_cmd_line_to, agg.path_flags_none), (3.0,3.0,agg.path_cmd_line_to, agg.path_flags_none), (3.0,2.0,agg.path_cmd_line_to, agg.path_flags_none), (0.0,0.0,agg.path_cmd_end_poly, agg.path_flags_close), (0.0,0.0,agg.path_cmd_stop, agg.path_flags_none),)) self.assertTrue(allclose(actual,desired)) | e47282ce7056af747cbd7b863b37854c3c1dd9d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/e47282ce7056af747cbd7b863b37854c3c1dd9d6/graphics_context_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1026,
67,
2607,
87,
12,
2890,
16,
2607,
87,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6625,
16,
2130,
3719,
8859,
18,
2607,
87,
12,
2607,
87,
13,
3214,
273,
8859,
6315,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1026,
67,
2607,
87,
12,
2890,
16,
2607,
87,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6625,
16,
2130,
3719,
8859,
18,
2607,
87,
12,
2607,
87,
13,
3214,
273,
8859,
6315,
588... |
startup_pipe.write(struct.pack('@H', listen_port)) | startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json) | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url listen_port = server.server_port server._device_management_handler = None elif options.server_type == SERVER_SYNC: server = SyncHTTPServer(('127.0.0.1', port), SyncPageHandler) print 'Sync HTTP server started on port %d...' % server.server_port listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # Write the listening port as a 2 byte value. This is _not_ using # network byte ordering since the other end of the pipe is on the same # machine. startup_pipe.write(struct.pack('@H', listen_port)) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True | d38dc438a2d6467e58b52213517566bd3f66d280 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d38dc438a2d6467e58b52213517566bd3f66d280/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
2589,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
2589,
1... |
else: db_field = db_values[key] | def import_record(self, cursor, user, model, module, values, fs_id): | d0801dc2816f0701c191a2942109935a99cf02f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/d0801dc2816f0701c191a2942109935a99cf02f6/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
3366,
12,
2890,
16,
3347,
16,
729,
16,
938,
16,
1605,
16,
924,
16,
2662,
67,
350,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
3366,
12,
2890,
16,
3347,
16,
729,
16,
938,
16,
1605,
16,
924,
16,
2662,
67,
350,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
register() | def unregister(): bpy.types.VIEW3D_MT_edit_mesh_faces.remove(menu_func) | 3c99606547c1cbdf8a00d81348e24eebea18f852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/3c99606547c1cbdf8a00d81348e24eebea18f852/mesh_bridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10232,
13332,
324,
2074,
18,
2352,
18,
12145,
23,
40,
67,
6152,
67,
4619,
67,
15557,
67,
4601,
18,
4479,
12,
5414,
67,
644,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10232,
13332,
324,
2074,
18,
2352,
18,
12145,
23,
40,
67,
6152,
67,
4619,
67,
15557,
67,
4601,
18,
4479,
12,
5414,
67,
644,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
gLogger.info("StageRequest__issuePrestageRequests: %.2f GB used at %s (limit %2.f GB)" % ((usedSpace)/(1000*1000*1000.0),storageElement,totalSpace/(1000*1000*1000.0))) | gLogger.info( "StageRequest__issuePrestageRequests: %.2f GB used at %s (limit %2.f GB)" % ( ( usedSpace ) / ( 1000 * 1000 * 1000.0 ), storageElement, totalSpace / ( 1000 * 1000 * 1000.0 ) ) ) | def __issuePrestageRequests(self,storageElement,seReplicaIDs,allReplicaInfo): # First select which files can be eligible for prestaging based on the available space usedSpace = 0 if self.storageElementUsage.has_key(storageElement): usedSpace = self.storageElementUsage[storageElement]['TotalSize'] totalSpace = gConfig.getValue("/Resources/StorageElements/%s/CacheSize" % storageElement,0) if not totalSpace: gLogger.info("StageRequest__issuePrestageRequests: No space restriction at %s" % (storageElement)) selectedReplicaIDs = seReplicaIDs elif (totalSpace > usedSpace): gLogger.info("StageRequest__issuePrestageRequests: %.2f GB available at %s" % ((totalSpace-usedSpace)/(1000*1000*1000.0),storageElement)) selectedReplicaIDs = [] for replicaID in seReplicaIDs: if totalSpace > usedSpace: usedSpace += allReplicaInfo[replicaID]['Size'] selectedReplicaIDs.append(replicaID) else: gLogger.info("StageRequest__issuePrestageRequests: %.2f GB used at %s (limit %2.f GB)" % ((usedSpace)/(1000*1000*1000.0),storageElement,totalSpace/(1000*1000*1000.0))) return gLogger.info("StageRequest__issuePrestageRequests: Selected %s files eligible for staging at %s." % (len(selectedReplicaIDs),storageElement)) | 87d9e4a612b5cfd0ddcec58ce5dded533250cdc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/87d9e4a612b5cfd0ddcec58ce5dded533250cdc2/StageRequestAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
13882,
1386,
12869,
6421,
12,
2890,
16,
5697,
1046,
16,
307,
14222,
5103,
16,
454,
14222,
966,
4672,
468,
5783,
2027,
1492,
1390,
848,
506,
21351,
364,
675,
334,
5755,
2511,
603,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
13882,
1386,
12869,
6421,
12,
2890,
16,
5697,
1046,
16,
307,
14222,
5103,
16,
454,
14222,
966,
4672,
468,
5783,
2027,
1492,
1390,
848,
506,
21351,
364,
675,
334,
5755,
2511,
603,
3... |
def __init__(self, host='', port=None): | def __init__(self, host='', port=None, strict=None): | def __init__(self, host='', port=None): "Provide a default host, since the superclass requires one." | 10fb0cd552742f705321830d292919646e739dd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/10fb0cd552742f705321830d292919646e739dd2/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
7036,
16,
5490,
33,
7036,
4672,
315,
20632,
279,
805,
1479,
16,
3241,
326,
12098,
4991,
1245,
1199,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
7036,
16,
5490,
33,
7036,
4672,
315,
20632,
279,
805,
1479,
16,
3241,
326,
12098,
4991,
1245,
1199,
2,
-100,
-100,
-100,
-100,
... |
if argv == NULL or argc <= 0: | if argv == NULL or argc.value <= 0: | def CommandLineToArgvW(lpCmdLine): if lpCmdLine is None: lpCmdLine = NULL if lpCmdLine != NULL: lpCmdLine = ctypes.byref(lpCmdLine) argc = ctypes.c_int(0) argv = ctypes.windll.shell32.CommandLineToArgvW(lpCmdLine, ctypes.byref(argc)) if argv == NULL or argc <= 0: ctypes.WinError() try: vptr = ctypes.c_void_p(argv) aptr = ctypes.cast(vptr, LPWSTR * argc) argv = [ str( aptr[i].contents ) for i in xrange(0, argc + 1) ] finally: LocalFree(argv) return argv | f8e3dd04a34c34d1ca65f7d41b1dd4657ede074a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/f8e3dd04a34c34d1ca65f7d41b1dd4657ede074a/win32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15893,
774,
4117,
90,
59,
12,
9953,
5931,
1670,
4672,
309,
12423,
5931,
1670,
353,
599,
30,
12423,
5931,
1670,
273,
3206,
309,
12423,
5931,
1670,
480,
3206,
30,
12423,
5931,
1670,
273,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15893,
774,
4117,
90,
59,
12,
9953,
5931,
1670,
4672,
309,
12423,
5931,
1670,
353,
599,
30,
12423,
5931,
1670,
273,
3206,
309,
12423,
5931,
1670,
480,
3206,
30,
12423,
5931,
1670,
273,
6... |
else | else: | def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 160) else quickfix.CharField.__init__(self, 160, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
972,
12,
2890,
16,
25430,
13,
469,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
972,
12,
2890,
16,
25430,
13,
469,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
9... |
line = """ <b id=\"performer87403420\"> mi123sdf ФЫВАв serdce Trofim)<\/b><span><b id=\"performer87403420""" print line print re.findall("<b id=\"performer([0-9]*)\">([А-ЯA-Z0-9 ()]*)<", line, re.IGNORECASE) line = """nbsp;<\/span><span id=\"title76067271\">SHtil& <a href="javascript: showLyrics(87919392,3966457);">Кто ты</a> </span>""" print re.findall(" < span id = \"title([0-9]*)\">([А-ЯA-ZёЁ0-9 \s line = u"sadf asdf asd фыав фыва фыв asdf" result = "" for l in line.split(): result += " " + l.capitalize() print result | def s(self, value): if value: return value else: return "" | 76c1c68376b93417f6050ff4ff45ffdeb906acbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/76c1c68376b93417f6050ff4ff45ffdeb906acbb/vk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
12,
2890,
16,
460,
4672,
309,
460,
30,
327,
460,
469,
30,
327,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
12,
2890,
16,
460,
4672,
309,
460,
30,
327,
460,
469,
30,
327,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
for category, books in collections.items(): | for category, lpaths in collections.items(): books = lpaths.values() | def get_collections(self, collection_attributes): from calibre.devices.usbms.driver import debug_print debug_print('Starting get_collections:', prefs['manage_device_metadata']) debug_print('Renaming rules:', tweaks['sony_collection_renaming_rules']) | bcd1d79352d584b33c4d09cb755712aadd3f1139 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/bcd1d79352d584b33c4d09cb755712aadd3f1139/books.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
19246,
12,
2890,
16,
1849,
67,
4350,
4672,
628,
26139,
266,
18,
12506,
18,
25525,
959,
18,
7407,
1930,
1198,
67,
1188,
1198,
67,
1188,
2668,
11715,
336,
67,
19246,
30,
2187,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
19246,
12,
2890,
16,
1849,
67,
4350,
4672,
628,
26139,
266,
18,
12506,
18,
25525,
959,
18,
7407,
1930,
1198,
67,
1188,
1198,
67,
1188,
2668,
11715,
336,
67,
19246,
30,
2187,
1... |
def export(ctxt, url, path=None, revision=None): | def export(ctxt, url, path=None, revision=None, dir_='.'): | def export(ctxt, url, path=None, revision=None): """Perform an export from a Subversion repository. :param ctxt: the build context :type ctxt: `Context` :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out """ args = ['export', '--force'] if revision: args += ['-r', revision] if path: url = posixpath.join(url, path) args += [url, '.'] from bitten.build import shtools returncode = shtools.execute(ctxt, file_='svn', args=args) if returncode != 0: ctxt.error('svn export failed (%s)' % returncode) | 2a5426b22bc673bd28d3b309ee85369a57b71992 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4547/2a5426b22bc673bd28d3b309ee85369a57b71992/svntools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
12,
20364,
16,
880,
16,
589,
33,
7036,
16,
6350,
33,
7036,
16,
1577,
67,
2218,
1093,
4672,
3536,
4990,
392,
3359,
628,
279,
2592,
1589,
3352,
18,
225,
294,
891,
14286,
30,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
12,
20364,
16,
880,
16,
589,
33,
7036,
16,
6350,
33,
7036,
16,
1577,
67,
2218,
1093,
4672,
3536,
4990,
392,
3359,
628,
279,
2592,
1589,
3352,
18,
225,
294,
891,
14286,
30,
326,
... |
print "X", csum, self.repomd[dbtype]["checksum"] | def getDbFile(self, dbtype): cachebase = os.path.join(self.config.cachedir, self.reponame) cachepath = os.path.join(self.config.cachedir, self.reponame, "sqlite") | c8d839853a18f3e88789cf6df994a51661f98ef1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/c8d839853a18f3e88789cf6df994a51661f98ef1/sqlitedb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11188,
812,
12,
2890,
16,
1319,
723,
4672,
1247,
1969,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1425,
18,
7097,
481,
16,
365,
18,
266,
500,
339,
13,
1247,
803,
273,
1140,
18,
803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11188,
812,
12,
2890,
16,
1319,
723,
4672,
1247,
1969,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1425,
18,
7097,
481,
16,
365,
18,
266,
500,
339,
13,
1247,
803,
273,
1140,
18,
803,... | |
raise ValueError, "Baudrate must be a integer number" | raise ValueError, "Baudrate must be a integer number, not %r" % a | def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -e, --echo: enable local echo (default off) -c, --cr: disable CR -> CR+LF translation """ % sys.argv[0] | b786cd543c0d1d1d0891ed88728d89d9950c58cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/b786cd543c0d1d1d0891ed88728d89d9950c58cb/miniterm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
1671,
9499,
18,
11241,
16,
3536,
29550,
30,
738,
87,
306,
2116,
65,
4477,
18778,
13586,
81,
364,
326,
2734,
1756,
18,
225,
702,
30,
300,
84,
16,
1493,
655,
33,
6354,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
1671,
9499,
18,
11241,
16,
3536,
29550,
30,
738,
87,
306,
2116,
65,
4477,
18778,
13586,
81,
364,
326,
2734,
1756,
18,
225,
702,
30,
300,
84,
16,
1493,
655,
33,
6354,... |
('debug', '', '$(MAKE) CFLAGS="-g -DRPY_ASSERT" $(TARGET)'), ('debug_exc', '', '$(MAKE) CFLAGS="-g -DRPY_ASSERT -DDO_LOG_EXC" $(TARGET)'), ('debug_mem', '', '$(MAKE) CFLAGS="-g -DRPY_ASSERT -DTRIVIAL_MALLOC_DEBUG" $(TARGET)'), ('no_obmalloc', '', '$(MAKE) CFLAGS="-g -DRPY_ASSERT -DNO_OBMALLOC" $(TARGET)'), ('linuxmemchk', '', '$(MAKE) CFLAGS="-g -DRPY_ASSERT -DLINUXMEMCHK" $(TARGET)'), | ('debug', '', '$(MAKE) CFLAGS="-g -O1 -DRPY_ASSERT" $(TARGET)'), ('debug_exc', '', '$(MAKE) CFLAGS="-g -O1 -DRPY_ASSERT -DDO_LOG_EXC" $(TARGET)'), ('debug_mem', '', '$(MAKE) CFLAGS="-g -O1 -DRPY_ASSERT -DTRIVIAL_MALLOC_DEBUG" $(TARGET)'), ('no_obmalloc', '', '$(MAKE) CFLAGS="-g -O1 -DRPY_ASSERT -DNO_OBMALLOC" $(TARGET)'), ('linuxmemchk', '', '$(MAKE) CFLAGS="-g -O1 -DRPY_ASSERT -DLINUXMEMCHK" $(TARGET)'), | def gen_makefile(self, targetdir): cfiles = [self.c_source_filename] + self.extrafiles mk = self.translator.platform.gen_makefile(cfiles, self.eci, path=targetdir) if self.has_profopt(): profopt = self.config.translation.profopt mk.definition('ABS_TARGET', '$(shell python -c "import sys,os; print os.path.abspath(sys.argv[1])" $(TARGET))') mk.definition('DEFAULT_TARGET', 'profopt') mk.definition('PROFOPT', profopt) | 7ae6d32c762b310bca1b737c842a7b90adceca1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/7ae6d32c762b310bca1b737c842a7b90adceca1e/genc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
6540,
768,
12,
2890,
16,
1018,
1214,
4672,
276,
2354,
273,
306,
2890,
18,
71,
67,
3168,
67,
3459,
65,
397,
365,
18,
14523,
1727,
1449,
5028,
273,
365,
18,
17879,
18,
9898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
6540,
768,
12,
2890,
16,
1018,
1214,
4672,
276,
2354,
273,
306,
2890,
18,
71,
67,
3168,
67,
3459,
65,
397,
365,
18,
14523,
1727,
1449,
5028,
273,
365,
18,
17879,
18,
9898,
... |
- ``pr2`` - the projection of D onto other (giving a | - ``pr2`` - the projection of ``D`` onto ``other`` (giving a | def direct_product(self,other,maps=True): """ Wraps GAP's DirectProduct, Embedding, and Projection. Sage calls GAP's DirectProduct, which chooses an efficient representation for the direct product. The direct product of permutation groups will be a permutation group again. For a direct product D, the GAP operation Embedding(D,i) returns the homomorphism embedding the i-th factor into D. The GAP operation Projection(D,i) gives the projection of D onto the i-th factor. INPUT: - ``self, other`` - permutation groups This method returns a 5-tuple - a permutation groups and 4 morphisms. OUTPUT: - ``D`` - a direct product of the inputs, returned as a permutation group as well - ``iota1`` - an embedding of self into D - ``iota2`` - an embedding of other into D - ``pr1`` - the projection of D onto self (giving a splitting 1 - other - D - self - 1) - ``pr2`` - the projection of D onto other (giving a splitting 1 - self - D - other - 1) EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: D = G.direct_product(G,False) sage: D Permutation Group with generators [(1,2,3,4), (5,6,7,8)] sage: D,iota1,iota2,pr1,pr2 = G.direct_product(G) sage: D; iota1; iota2; pr1; pr2 Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group :: sage: g=D([(1,3),(2,4)]); g (1,3)(2,4) sage: d=D([(1,4,3,2),(5,7),(6,8)]); d (1,4,3,2)(5,7)(6,8) sage: iota1(g); iota2(g); pr1(d); pr2(d) (1,3)(2,4) (5,7)(6,8) (1,4,3,2) (1,3)(2,4) """ from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap G1 = self._gap_init_() G2 = other._gap_init_() cmd1 = "G:=DirectProduct("+G1+","+G2+")" cmd2 = "iota1:=Embedding(G,1)" cmd3 = "iota2:=Embedding(G,2)" cmd4 = "pr1:=Projection(G,1)" cmd5 = "pr2:=Projection(G,2)" if not(maps): return PermutationGroup(gap_group=gap.eval(cmd1)) else: D = PermutationGroup_generic(gap_group=gap.eval(cmd1)) iota1 = PermutationGroupMorphism_from_gap(self,D, cmd2, "iota1") iota2 = PermutationGroupMorphism_from_gap(other,D, cmd3, "iota2") pr1 = PermutationGroupMorphism_from_gap(D,self, cmd4, "pr1") pr2 = PermutationGroupMorphism_from_gap(D,other, cmd5, "pr2") return D,iota1,iota2,pr1,pr2 | f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2657,
67,
5896,
12,
2890,
16,
3011,
16,
10711,
33,
5510,
4672,
3536,
678,
7506,
611,
2203,
1807,
9908,
4133,
16,
14564,
7459,
16,
471,
21288,
18,
225,
348,
410,
4097,
611,
2203,
1807,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2657,
67,
5896,
12,
2890,
16,
3011,
16,
10711,
33,
5510,
4672,
3536,
678,
7506,
611,
2203,
1807,
9908,
4133,
16,
14564,
7459,
16,
471,
21288,
18,
225,
348,
410,
4097,
611,
2203,
1807,
... |
key_left | key_left: | def kbPatch(exe): """Patch the Robot Odyssey engine's keyboard decoder.""" # Robot Odyssey has a bug that makes it rather difficult to play # on an AT keyboard, particularly one without a numeric keypad: # While the AT-style ("gray") arrow keys do work for basic # movement, the game can't detect shift-arrow combinations. So, # you can't take single-pixel steps. This makes Robot Odyssey # totally unplayable on a laptop unless you have some kind of # keyboard remapper running externally. # # To understand the problem, we can take a closer look at the # game's keyboard handler. To poll the keyboard, the basic steps # are: # # 1. The game first uses BIOS interrupt 16h to first check # for a key in the keyboard buffer (AH=1), then to retrieve # a key if one exists (AH=0). It also pokes at the BIOS data # area (segment 40h) directly, in order to turn off numlock, # turn on caps lock, and drain the keyboard buffer. # # 2. This function returns with the value of AX from Int 16h # preserved. This means we have a scan code in AH, and a # character code in AL. Now we're in the game's keyboard # mapping function, which we'll be patching here. # # 3. This function stores a translated key in a global variable. # If there are no keys down, it stores zero. For most keys, # it stores an ASCII value. But there are several special # cases: Arrow keys, Shift-Arrow keys, and Insert/Delete. # # This arrow key remapping is of the form: # # if (input_scancode == LEFT) { # if (al == 0) { # output_scancode = TRANSLATED_SHIFT_LEFT; # } else { # output_scancode = TRANSLATED_LEFT; # } # } else { # ... # } # # So, they're relying on the fact that an un-shifted arrow has # no ASCII equivalent, while a shift-arrow on the numpad turns # into a number key when the BIOS translates it. # # This is a clever hack, but it won't do for gray arrow keys. # Instead, we'd rather look at the actual status of the shift # keys. We can get this from the BIOS data area, but that won't # work in a Windows DOS box. Instead, we call a BIOS interrupt. # # This will increase the code size a bit, but we can make room by # removing support for very old legacy scancodes. # XXX: This patcher works on Robot Odyssey, but it does not # work on Gertrude's Secrets, since that game uses different # internal keycode values. # This is the original keyboard handler snippet that we'll be # replacing, starting right after the BIOS polling function # returns, and ending at a point where the translated key is # expected to be in AL. This section has been carefully chosen # to avoid any non-relative addresses. origMapperLen = 137 origMapperPrefix = unhex(""" 75 03 E9 81 00 80 FC 88 74 34 80 FC 4D 74 2B 80 FC 86 74 3A 80 FC 50 74 31 80 FC 87 74 40 80 FC 4B 74 37 80 FC 85 74 46 80 FC 48 74 3D 80 FC 52 74 48 80 FC 53 74 49 EB 54 90 3C 00 74 06 """) kbMapper = exe.find(origMapperPrefix) if not kbMapper: raise CodeMismatchError() print "Found keyboard mapper. Patching..." patch = asm(""" ; On entry: ; ; AH = BIOS Scancode ; AL = ASCII Key ; Z=0 if a key is waiting, ; Z=1 if there is no key. jz no_key cmp ah, 0x48 jz key_up cmp ah, 0x50 jz key_down cmp ah, 0x4B jz key_left cmp ah, 0x4D jz key_right cmp ah, 0x52 ; NB: I don't think these are used by Robot Odyssey, jz key_insert ; but they're used by the shape editor in cmp ah, 0x53 ; Gertrude's Secrets. jz key_delete ; Other key: Leave it in ASCII. Normally we'd be done now... ; However, while we're here, we'll apply another bug fix. ; The game is expecting all keyboard input to be in uppercase. ; It does this by forcing Caps Lock to be on, using the BIOS ; data area. However, this isn't supported by the Windows XP ; DOS box. We can work around this by doing a toupper() on all ; characters here. cmp al, 'a' jb done cmp al, 'z' ja done xor al, 0x20 jmp done | 759308781d42ac356f2dd3c5f6dc2d3cd3ef278d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/759308781d42ac356f2dd3c5f6dc2d3cd3ef278d/robot_odyssey_patcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... |
[(fn, ft) for fn, ft in self.__config if hasattr(ft, 'store')]) | [(fn, ft) for fn, ft in self._config if hasattr(ft, 'store')]) | def external(self): return FieldDescriptions( [(fn, ft) for fn, ft in self.__config if hasattr(ft, 'store')]) | f56713a386bf1305fbef61fa0979f6dcca2aaf28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/f56713a386bf1305fbef61fa0979f6dcca2aaf28/qFieldTypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3903,
12,
2890,
4672,
327,
2286,
16844,
12,
306,
12,
4293,
16,
11038,
13,
364,
2295,
16,
11038,
316,
365,
16186,
1425,
309,
3859,
12,
1222,
16,
296,
2233,
6134,
5717,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3903,
12,
2890,
4672,
327,
2286,
16844,
12,
306,
12,
4293,
16,
11038,
13,
364,
2295,
16,
11038,
316,
365,
16186,
1425,
309,
3859,
12,
1222,
16,
296,
2233,
6134,
5717,
2,
-100,
-100,
-1... |
color = convertColor(color) | def addCanvasLine(canvas,p1,p2,color=(0,0,0),color2=None,**kwargs): canvas.ctx.set_line_width(kwargs.get('linewidth',1)) if color2 and color2!=color: mp = (p1[0]+p2[0])/2.,(p1[1]+p2[1])/2. color = convertColor(color) canvas.ctx.set_source_rgb(*color) _doLine(canvas,p1,mp,**kwargs) canvas.ctx.stroke() color2 = convertColor(color2) canvas.ctx.set_source_rgb(*color2) _doLine(canvas,mp,p2,**kwargs) canvas.ctx.stroke() else: color = convertColor(color) canvas.ctx.set_source_rgb(*color) _doLine(canvas,p1,p2,**kwargs) canvas.ctx.stroke() | 5ba093eaf3549394b8a19230b1d78201ff272742 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9195/5ba093eaf3549394b8a19230b1d78201ff272742/cairoCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12971,
1670,
12,
15424,
16,
84,
21,
16,
84,
22,
16,
3266,
28657,
20,
16,
20,
16,
20,
3631,
3266,
22,
33,
7036,
16,
636,
4333,
4672,
5953,
18,
5900,
18,
542,
67,
1369,
67,
2819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12971,
1670,
12,
15424,
16,
84,
21,
16,
84,
22,
16,
3266,
28657,
20,
16,
20,
16,
20,
3631,
3266,
22,
33,
7036,
16,
636,
4333,
4672,
5953,
18,
5900,
18,
542,
67,
1369,
67,
2819... | |
global recVal for irec,rec in enumerate(userrec): if (mode == 'e'): timeflag = 1 else: timeflag = (rec[1] == time) if ((rec[0]=='ber') and timeflag and (elem == rec[2])): match=re.search(rec[3]+'\s*(([-]*\d+(\.\d+)?(e[+-]\d+)?)\s*)+', line) if match: recVal[irec]=re.split('\s+',match.group(0))[rec[4]] | global recVal for irec,rec in enumerate(userrec): if (mode == 'e'): timeflag = 1 else: timeflag = (rec[1] == time) if ((rec[0]=='ber') and timeflag and (elem == rec[2])): match=re.search(rec[3]+'\s*(([-]*\d+(\.\d+)?(e[+-]\d+)?)\s*)+', line) if match: recVal[irec]=re.split('\s+',match.group(0))[rec[4]] | def check_beam_rec (time, elem, kwd, value, line): global recVal for irec,rec in enumerate(userrec): if (mode == 'e'): timeflag = 1 else: timeflag = (rec[1] == time) if ((rec[0]=='ber') and timeflag and (elem == rec[2])): | aa37b2bdfae39b7dbc77c6303652ba62381c3298 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1573/aa37b2bdfae39b7dbc77c6303652ba62381c3298/extractor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
27385,
67,
3927,
261,
957,
16,
3659,
16,
417,
3623,
16,
460,
16,
980,
4672,
2552,
1950,
3053,
364,
277,
3927,
16,
3927,
316,
4241,
12,
1355,
3927,
4672,
309,
261,
3188,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
27385,
67,
3927,
261,
957,
16,
3659,
16,
417,
3623,
16,
460,
16,
980,
4672,
2552,
1950,
3053,
364,
277,
3927,
16,
3927,
316,
4241,
12,
1355,
3927,
4672,
309,
261,
3188,
422,
... |
errorpage = 'errors/program/deadline-%s.html' % tl | def _checkDeadline_helper(method, extension, moduleObj, request, tl, *args, **kwargs): errorpage = 'errors/program/deadline-%s.html' % tl from esp.users.models import UserBit from esp.datatree.models import DataTree, GetNode, QTree, get_lowest_parent, StringToPerm, PermToString if tl != 'learn' and tl != 'teach': return True canView = moduleObj.user.updateOnsite(request) if not canView: canView = UserBit.UserHasPerms(moduleObj.user, moduleObj.program.anchor_id, GetNode('V/Deadline/Registration/'+{'learn':'Student', 'teach':'Teacher'}[tl]+extension)) return canView | 3151647c33a72b7e9d269dc739d0262bdddebf66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/3151647c33a72b7e9d269dc739d0262bdddebf66/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
15839,
67,
4759,
12,
2039,
16,
2710,
16,
1605,
2675,
16,
590,
16,
8332,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
5001,
84,
18,
5577,
18,
7665,
1930,
2177,
5775,
628,
5001,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
15839,
67,
4759,
12,
2039,
16,
2710,
16,
1605,
2675,
16,
590,
16,
8332,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
5001,
84,
18,
5577,
18,
7665,
1930,
2177,
5775,
628,
5001,
... | |
"""Register a callback to be called if our broker gets disconnected.""" | """Remove a callback that was registered with notifyOnDisconnect.""" | def dontNotifyOnDisconnect(self, callback): """Register a callback to be called if our broker gets disconnected.""" self.disconnectCallbacks.remove(callback) if not self.disconnectCallbacks: self.broker.dontNotifyOnDisconnect(self._disconnected) | 1a93ab3e183ef6bc5d75ed809d92737628e44232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1a93ab3e183ef6bc5d75ed809d92737628e44232/pb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14046,
9168,
1398,
18895,
12,
2890,
16,
1348,
4672,
3536,
3288,
279,
1348,
716,
1703,
4104,
598,
5066,
1398,
18895,
12123,
365,
18,
20177,
10617,
18,
4479,
12,
3394,
13,
309,
486,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14046,
9168,
1398,
18895,
12,
2890,
16,
1348,
4672,
3536,
3288,
279,
1348,
716,
1703,
4104,
598,
5066,
1398,
18895,
12123,
365,
18,
20177,
10617,
18,
4479,
12,
3394,
13,
309,
486,
365,
1... |
file_bug(package) | try: file_bug(package) except Exception, e: print >>sys.stderr, "W: Unable to file bug: %s" % str(e) | def main(): unstable = get_sources(DEBIAN_MIRROR, "unstable", "main") main = get_sources(UBUNTU_MIRROR, UBUNTU_DIST, "main") universe = get_sources(UBUNTU_MIRROR, UBUNTU_DIST, "universe") jobs = get_joblist() for package, component in jobs: try: print print " * Processing %s" % package (debian_info, debian_ver, ubuntu_info, ubuntu_ver, base_info, base_ver) = find_info(package, component, unstable, main, universe) (debian_dsc, debian_patch, ubuntu_dsc, ubuntu_patch, base_dsc, final_dir) = prepare(package, debian_info, debian_ver, ubuntu_info, ubuntu_ver, base_info, base_ver) (merged_ver, merged_dsc, merged_patch) = merge(package, debian_ver, debian_dsc, debian_patch, ubuntu_ver, ubuntu_dsc, ubuntu_patch, base_ver, base_dsc, final_dir) write_report(package, debian_ver, ubuntu_ver, base_ver, merged_ver, final_dir) file_bug(package) except Excuse, e: print >>sys.stderr, "W:", str(e) continue except Problem, e: print >>sys.stderr, "E:", str(e) continue | 8bed164f055fec6895de44d822e2dedca830e4fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1955/8bed164f055fec6895de44d822e2dedca830e4fe/hi_mom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
640,
15021,
273,
336,
67,
10141,
12,
1639,
38,
21634,
67,
7492,
54,
2784,
16,
315,
318,
15021,
3113,
315,
5254,
7923,
2774,
273,
336,
67,
10141,
12,
57,
3000,
1784,
57,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
640,
15021,
273,
336,
67,
10141,
12,
1639,
38,
21634,
67,
7492,
54,
2784,
16,
315,
318,
15021,
3113,
315,
5254,
7923,
2774,
273,
336,
67,
10141,
12,
57,
3000,
1784,
57,
67... |
replyto = [] | new = [] | def process(mlist, msg, msgdata): # Set the "X-Ack: no" header if noack flag is set. if msgdata.get('noack'): del msg['x-ack'] msg['X-Ack'] = 'no' # Because we're going to modify various important headers in the email # message, we want to save some of the information in the msgdata # dictionary for later. Specifically, the sender header will get waxed, # but we need it for the Acknowledge module later. msgdata['original_sender'] = msg.get_sender() # VirginRunner sets _fasttrack for internally crafted messages. fasttrack = msgdata.get('_fasttrack') if not msgdata.get('isdigest') and not fasttrack: prefix_subject(mlist, msg, msgdata) # Mark message so we know we've been here, but leave any existing # X-BeenThere's intact. msg['X-BeenThere'] = mlist.GetListEmail() # Add Precedence: and other useful headers. None of these are standard # and finding information on some of them are fairly difficult. Some are # just common practice, and we'll add more here as they become necessary. # Good places to look are: # # http://www.dsv.su.se/~jpalme/ietf/jp-ietf-home.html # http://www.faqs.org/rfcs/rfc2076.html # # None of these headers are added if they already exist. BAW: some # consider the advertising of this a security breach. I.e. if there are # known exploits in a particular version of Mailman and we know a site is # using such an old version, they may be vulnerable. It's too easy to # edit the code to add a configuration variable to handle this. if not msg.has_key('x-mailman-version'): msg['X-Mailman-Version'] = mm_cfg.VERSION # We set "Precedence: list" because this is the recommendation from the # sendmail docs, the most authoritative source of this header's semantics. if not msg.has_key('precedence'): msg['Precedence'] = 'list' # Reply-To: munging. Do not do this if the message is "fast tracked", # meaning it is internally crafted and delivered to a specific user. BAW: # Yuck, I really hate this feature but I've caved under the sheer pressure # of the (very vocal) folks want it. OTOH, RFC 2822 allows Reply-To: to # be a list of addresses, so instead of replacing the original, simply # augment it. RFC 2822 allows max one Reply-To: header so collapse them # if we're adding a value, otherwise don't touch it. (Should we collapse # in all cases?) if not fasttrack: replyto = [] d = {} def add((name, addr)): lcaddr = addr.lower() if d.has_key(lcaddr): return d[lcaddr] = (name, addr) replyto.append((name, addr)) # List admin wants an explicit Reply-To: added if mlist.reply_goes_to_list == 2: add(parseaddr(mlist.reply_to_address)) # If we're not first stripping existing Reply-To: then we need to add # the original Reply-To:'s to the list we're building up. In both # cases we'll zap the existing field because RFC 2822 says max one is # allowed. if not mlist.first_strip_reply_to: orig = msg.get_all('reply-to', []) for pair in getaddresses(orig): add(pair) # Set Reply-To: header to point back to this list. Add this last # because some folks think that some MUAs make it easier to delete # addresses from the right than from the left. if mlist.reply_goes_to_list == 1: add((mlist.description, mlist.GetListEmail())) del msg['reply-to'] # Don't put Reply-To: back if there's nothing to add! if replyto: # Preserve order msg['Reply-To'] = COMMASPACE.join( [formataddr(pair) for pair in replyto]) # The To field normally contains the list posting address. However when # messages are personalized, that header will get overwritten with the # address of the recipient. We need to get the posting address in one of # the recipient headers or they won't be able to reply back to the list. # It's possible the posting address was munged into the Reply-To header, # but if not, we'll add it to a Cc header. BAW: should we force it into a # Reply-To header in the above code? if mlist.personalize and mlist.reply_goes_to_list <> 1: msg['Cc'] = formataddr((mlist.description, mlist.GetListEmail())) # Add list-specific headers as defined in RFC 2369 and RFC 2919, but only # if the message is being crafted for a specific list (e.g. not for the # password reminders). # # BAW: Some people really hate the List-* headers. It seems that the free # version of Eudora (possibly on for some platforms) does not hide these # headers by default, pissing off their users. Too bad. Fix the MUAs. if msgdata.get('_nolist') or not mlist.include_rfc2369_headers: return # Pre-calculate listid = '<%s.%s>' % (mlist.internal_name(), mlist.host_name) if mlist.description: listid = mlist.description + ' ' + listid requestaddr = mlist.GetRequestEmail() subfieldfmt = '<%s>, <mailto:%s?subject=%ssubscribe>' listinfo = mlist.GetScriptURL('listinfo', absolute=1) # We always add a List-ID: header. For internally crafted messages, we # also add a (nonstandard), "X-List-Administrivia: yes" header. For all # others (i.e. those coming from list posts), we adda a bunch of other RFC # 2369 headers. headers = { 'List-Id' : listid, } if msgdata.get('reduced_list_headers'): headers['X-List-Administrivia'] = 'yes' else: headers.update({ 'List-Help' : '<mailto:%s?subject=help>' % requestaddr, 'List-Unsubscribe': subfieldfmt % (listinfo, requestaddr, 'un'), 'List-Subscribe' : subfieldfmt % (listinfo, requestaddr, ''), }) # List-Post: is controlled by a separate attribute if mlist.include_list_post_header: headers['List-Post'] = '<mailto:%s>' % mlist.GetListEmail() # Add this header if we're archiving if mlist.archive: archiveurl = mlist.GetBaseArchiveURL() if archiveurl.endswith('/'): archiveurl = archiveurl[:-1] headers['List-Archive'] = '<%s>' % archiveurl # First we delete any pre-existing headers because the RFC permits only # one copy of each, and we want to be sure it's ours. for h, v in headers.items(): del msg[h] # Wrap these lines if they are too long. 78 character width probably # shouldn't be hardcoded, but is at least text-MUA friendly. The # adding of 2 is for the colon-space separator. if len(h) + 2 + len(v) > 78: v = CONTINUATION.join(v.split(', ')) msg[h] = v | 4e77bf18241f861b81a669919aec923f2ee0783c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4e77bf18241f861b81a669919aec923f2ee0783c/CookHeaders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
781,
376,
16,
1234,
16,
1234,
892,
4672,
468,
1000,
326,
315,
60,
17,
11931,
30,
1158,
6,
1446,
309,
1158,
484,
2982,
353,
444,
18,
309,
1234,
892,
18,
588,
2668,
2135,
484... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
781,
376,
16,
1234,
16,
1234,
892,
4672,
468,
1000,
326,
315,
60,
17,
11931,
30,
1158,
6,
1446,
309,
1158,
484,
2982,
353,
444,
18,
309,
1234,
892,
18,
588,
2668,
2135,
484... |
cmd.append('cc_opt_path=%s' % self.scons_compiler_path) | cmd.append('cc_opt_path=%s' % self.scons_compiler_path) | def _call_scons(self, scons_exec, sconscript, pkg_name, bootstrapping): # XXX: when a scons script is missing, scons only prints warnings, and # does not return a failure (status is 0). We have to detect this from # distutils (this cannot work for recursive scons builds...) | 2f6604a638ca0c96f426a2010a0dc8e6e6e2c93f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/2f6604a638ca0c96f426a2010a0dc8e6e6e2c93f/scons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
67,
87,
8559,
12,
2890,
16,
272,
8559,
67,
4177,
16,
272,
591,
4263,
16,
3475,
67,
529,
16,
7065,
1382,
4672,
468,
11329,
30,
1347,
279,
272,
8559,
2728,
353,
3315,
16,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
67,
87,
8559,
12,
2890,
16,
272,
8559,
67,
4177,
16,
272,
591,
4263,
16,
3475,
67,
529,
16,
7065,
1382,
4672,
468,
11329,
30,
1347,
279,
272,
8559,
2728,
353,
3315,
16,
27... |
else | else: | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 412) else quickfix.DoubleField.__init__(self, 412, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
2138,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
2138,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
27... |
pats.append("crmd:.* Performing .* op=%s_start_0" % rsc.id) pats.append("crmd:.* LRM operation %s_start_0.*complete" % rsc.id) | if rsc.unique == "1": pats.append("crmd:.* Performing .* op=%s_start_0" % self.rid) pats.append("crmd:.* LRM operation %s_start_0.*complete" % self.rid) else: pats.append("crmd:.* Performing .* op=.*_start_0") pats.append("crmd:.* LRM operation .*_start_0.*complete") | def __call__(self, node): '''Perform the 'ResourceRecover' test. ''' self.incr("calls") ret = self.startall(None) if not ret: return self.failure("Setup failed") | fea71c03fd94c7f2539f0239b9e93f4c9acf7622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11962/fea71c03fd94c7f2539f0239b9e93f4c9acf7622/CTStests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
9163,
4990,
326,
296,
1420,
27622,
11,
1842,
18,
9163,
365,
18,
267,
3353,
2932,
12550,
7923,
225,
325,
273,
365,
18,
1937,
454,
12,
7036,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
9163,
4990,
326,
296,
1420,
27622,
11,
1842,
18,
9163,
365,
18,
267,
3353,
2932,
12550,
7923,
225,
325,
273,
365,
18,
1937,
454,
12,
7036,
13,... |
return app.TemplateDisplay(templateName, frameHint=frame, | return app.TemplateDisplay(templateName,'default', frameHint=frame, | def _chooseDisplayForCurrentTab(self): tls = self.tabListSelection frame = app.controller.frame | 3d3d914638b70870936979775d185bb3389964d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/3d3d914638b70870936979775d185bb3389964d1/selection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
25777,
4236,
1290,
3935,
5661,
12,
2890,
4672,
6871,
273,
365,
18,
7032,
682,
6233,
2623,
273,
595,
18,
5723,
18,
3789,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
25777,
4236,
1290,
3935,
5661,
12,
2890,
4672,
6871,
273,
365,
18,
7032,
682,
6233,
2623,
273,
595,
18,
5723,
18,
3789,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lis.append( (key, self[key]) ) | result.append((key, self[key])) | def items( self ): lis = [] for key in self.keys(): try: lis.append( (key, self[key]) ) except IndexError: lis.append( (key, self.dict[key]) ) return lis | 06dfcf61676c7c31e2c2232d65d1d5286aee095d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/06dfcf61676c7c31e2c2232d65d1d5286aee095d/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
365,
262,
30,
328,
291,
273,
5378,
364,
498,
316,
365,
18,
2452,
13332,
775,
30,
563,
18,
6923,
12443,
856,
16,
365,
63,
856,
22643,
1335,
10195,
30,
328,
291,
18,
6923,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
365,
262,
30,
328,
291,
273,
5378,
364,
498,
316,
365,
18,
2452,
13332,
775,
30,
563,
18,
6923,
12443,
856,
16,
365,
63,
856,
22643,
1335,
10195,
30,
328,
291,
18,
6923,
12... |
def cmd_ping(self,*befehl): | def cmd_ping(self,befehl): | def cmd_ping(self,*befehl): '''antwortet mit pong''' if befehl['ziel'].startswith('#'): self.msg(befehl['ziel'],'Pong') else: self.notice(befehl['quelle']['nickname'],'Pong') | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1382,
12,
2890,
16,
2196,
3030,
25356,
4672,
9163,
970,
91,
499,
278,
20310,
26856,
26418,
309,
506,
3030,
25356,
3292,
94,
77,
292,
29489,
17514,
1918,
2668,
10038,
4672,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1382,
12,
2890,
16,
2196,
3030,
25356,
4672,
9163,
970,
91,
499,
278,
20310,
26856,
26418,
309,
506,
3030,
25356,
3292,
94,
77,
292,
29489,
17514,
1918,
2668,
10038,
4672,
365,
... |
context.addcomment_form = point_addcomment_form(_("Add comment")) | context.addcomment_form = point_addcomment_form(_("Comment")) | def GET(self, topic_id, point_id): i = web.input(page="1", order="", search="", search_tags="") page = int(i.page) | e7aa1fa24b87fada7d3a35c3629db1cb8648f271 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4231/e7aa1fa24b87fada7d3a35c3629db1cb8648f271/code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
16,
3958,
67,
350,
16,
1634,
67,
350,
4672,
277,
273,
3311,
18,
2630,
12,
2433,
1546,
21,
3113,
1353,
1546,
3113,
1623,
1546,
3113,
1623,
67,
4156,
1546,
7923,
1363,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
16,
3958,
67,
350,
16,
1634,
67,
350,
4672,
277,
273,
3311,
18,
2630,
12,
2433,
1546,
21,
3113,
1353,
1546,
3113,
1623,
1546,
3113,
1623,
67,
4156,
1546,
7923,
1363,
27... |
elts[i].style.display = ((cmd=="hide private")?"none":"block"); | elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block"); | def write_javascript(self, directory): jsfile = open(os.path.join(directory, 'epydoc.js'), 'w') print >> jsfile, self.TOGGLE_PRIVATE_JS print >> jsfile, self.GET_COOKIE_JS print >> jsfile, self.SET_FRAME_JS print >> jsfile, self.HIDE_PRIVATE_JS print >> jsfile, self.TOGGLE_CALLGRAPH_JS print >> jsfile, html_colorize.PYSRC_JAVASCRIPTS print >> jsfile, self.GET_ANCHOR_JS print >> jsfile, self.REDIRECT_URL_JS jsfile.close() | efa53d0cb5b90524e3e4219b8789997f18e8c97c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/efa53d0cb5b90524e3e4219b8789997f18e8c97c/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
11242,
12,
2890,
16,
1867,
4672,
3828,
768,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
296,
881,
93,
2434,
18,
2924,
19899,
296,
91,
6134,
1172,
1671,
3828,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
11242,
12,
2890,
16,
1867,
4672,
3828,
768,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
296,
881,
93,
2434,
18,
2924,
19899,
296,
91,
6134,
1172,
1671,
3828,
768,
... |
def __init__(self, instance, isOpen, wxId, children, isMarked): | def __init__(self, instance, isOpen, children, isMarked): | def __init__(self, instance, isOpen, wxId, children, isMarked): self.instance = instance self.isOpen = isOpen self.wxId = wxId self.children = children self.isMarked = isMarked | 82c260c08c708f9d5a0dc6654ed0e3fb25467109 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/82c260c08c708f9d5a0dc6654ed0e3fb25467109/SideBar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
791,
16,
16633,
16,
2325,
16,
353,
21486,
4672,
365,
18,
1336,
273,
791,
365,
18,
291,
3678,
273,
16633,
365,
18,
91,
24514,
273,
7075,
548,
365,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
791,
16,
16633,
16,
2325,
16,
353,
21486,
4672,
365,
18,
1336,
273,
791,
365,
18,
291,
3678,
273,
16633,
365,
18,
91,
24514,
273,
7075,
548,
365,
18,
5... |
nanny.tattle_quantity('netrecv',0) nanny.tattle_quantity('netsend',0) | if self.on_loopback: nanny.tattle_quantity('looprecv',0) else: nanny.tattle_quantity('netrecv',0) | def getconnection(self): """ <Purpose> Accepts an incoming connection to a listening TCP socket. | cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c/emulcomm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4071,
12,
2890,
4672,
3536,
411,
10262,
4150,
34,
27158,
392,
6935,
1459,
358,
279,
13895,
9911,
2987,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4071,
12,
2890,
4672,
3536,
411,
10262,
4150,
34,
27158,
392,
6935,
1459,
358,
279,
13895,
9911,
2987,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return YES | return self.continueTracking_at_inView_(at, at, view) | def startTrackingAt_inView_(self, at, view): wrappermap.wrapper(view).emit('pressed') return YES | 775d91fa8a6d565abfc39a35c76374ff4ed670e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/775d91fa8a6d565abfc39a35c76374ff4ed670e1/customcontrol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12642,
861,
67,
267,
1767,
67,
12,
2890,
16,
622,
16,
1476,
4672,
4053,
1458,
18,
8376,
12,
1945,
2934,
18356,
2668,
10906,
6134,
327,
1624,
3991,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12642,
861,
67,
267,
1767,
67,
12,
2890,
16,
622,
16,
1476,
4672,
4053,
1458,
18,
8376,
12,
1945,
2934,
18356,
2668,
10906,
6134,
327,
1624,
3991,
2,
-100,
-100,
-100,
-100,
-100,
... |
@classmethod def to_binary_characters(cls, elem): | def binary_characters(self, elem): | def to_annotation(cls, elem): return Tree.Annotation( desc=collapse_wspace(get_child_text(elem, 'desc')), confidence=get_child_as(elem, 'confidence', cls.to_confidence), properties=get_children_as(elem, 'property', cls.to_property), uri=get_child_as(elem, 'uri', cls.to_uri), **elem.attrib) | 5f38465441061de22d67bc9df2281f70d7ac37ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/5f38465441061de22d67bc9df2281f70d7ac37ce/PhyloXMLIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
11495,
12,
6429,
16,
3659,
4672,
327,
4902,
18,
3257,
12,
3044,
33,
21405,
67,
91,
2981,
12,
588,
67,
3624,
67,
955,
12,
10037,
16,
296,
5569,
6134,
3631,
15588,
33,
588,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
11495,
12,
6429,
16,
3659,
4672,
327,
4902,
18,
3257,
12,
3044,
33,
21405,
67,
91,
2981,
12,
588,
67,
3624,
67,
955,
12,
10037,
16,
296,
5569,
6134,
3631,
15588,
33,
588,
67... |
"""Start a new project.""" | """ Starts a new project. Parameters: widget -- reserved for GTK callbacks, don't use it explicitly. """ | def OnNewProject(self, widget): """Start a new project.""" # hide the welcome dislog and call OnNewProject() from JokosherApp self.window.hide() self.mainwindow.OnNewProject(self, self.OnDialogClose) | fdad701ef3921349b1a997410400939cb276664e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/fdad701ef3921349b1a997410400939cb276664e/WelcomeDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1908,
4109,
12,
2890,
16,
3604,
4672,
3536,
1685,
279,
394,
1984,
12123,
225,
468,
6853,
326,
28329,
1015,
1330,
471,
745,
2755,
1908,
4109,
1435,
628,
804,
601,
538,
1614,
3371,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1908,
4109,
12,
2890,
16,
3604,
4672,
3536,
1685,
279,
394,
1984,
12123,
225,
468,
6853,
326,
28329,
1015,
1330,
471,
745,
2755,
1908,
4109,
1435,
628,
804,
601,
538,
1614,
3371,
3... |
if not self.f_strings: for k, v in theme_map.iteritems(): self.f_strings[k] = '\x01%s' % (color_scheme[v],) if k is Parenthesis: self.f_strings[k] += 'I' | self.f_strings = {} for k, v in theme_map.iteritems(): self.f_strings[k] = '\x01%s' % (color_scheme[v],) if k is Parenthesis: self.f_strings[k] += 'I' | def __init__(self, color_scheme, **options): if not self.f_strings: for k, v in theme_map.iteritems(): self.f_strings[k] = '\x01%s' % (color_scheme[v],) if k is Parenthesis: # FIXME: Find a way to make this the inverse of the current # background colour self.f_strings[k] += 'I' Formatter.__init__(self, **options) | a800103ef826f859cbc45f2d13e76a3017da5bce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/a800103ef826f859cbc45f2d13e76a3017da5bce/formatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2036,
67,
9068,
16,
2826,
2116,
4672,
309,
486,
365,
18,
74,
67,
10219,
30,
364,
417,
16,
331,
316,
5006,
67,
1458,
18,
2165,
3319,
13332,
365,
18,
74,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2036,
67,
9068,
16,
2826,
2116,
4672,
309,
486,
365,
18,
74,
67,
10219,
30,
364,
417,
16,
331,
316,
5006,
67,
1458,
18,
2165,
3319,
13332,
365,
18,
74,... |
if line.find("rpm --query --queryformat") != -1 or \ line.find("rpm --eval") != -1: | if (line.find("rpm --query --queryformat") != -1 or line.find("rpm --eval") != -1): | def checkScripts(repo): comment = re.compile("^\s*#") for rpm in repo: for s in ("postin", "postun", "prein", "preun", "verifyscript"): data = rpm[s] if data == None: continue if data.find("RPM") != -1: for line in data.split("\n"): if line.find("RPM") == -1 or comment.match(line): continue # ignore RPM_INSTALL_PREFIX and "rpm --import" if line.find("RPM_INSTALL_PREFIX") != -1 or \ line.find("rpm --import") != -1: continue print rpm.filename, "contains \"RPM\" as string" break if data.find("%") != -1: for line in data.split("\n"): if line.find("%") == -1 or comment.match(line): continue # ignore ${var%extension} constructs if re.compile(".*\${.+%.+}").match(line): continue # ignore "rpm --query --queryformat" and "rpm --eval" if line.find("rpm --query --queryformat") != -1 or \ line.find("rpm --eval") != -1: continue # ignore `date +string` if re.compile(".*date \'?\+").match(line): continue print rpm.filename, "contains \"%\"" break | 427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
15041,
12,
7422,
4672,
2879,
273,
283,
18,
11100,
2932,
17134,
87,
14,
7,
7923,
364,
25228,
316,
3538,
30,
364,
272,
316,
7566,
2767,
267,
3113,
315,
2767,
318,
3113,
315,
1484,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
15041,
12,
7422,
4672,
2879,
273,
283,
18,
11100,
2932,
17134,
87,
14,
7,
7923,
364,
25228,
316,
3538,
30,
364,
272,
316,
7566,
2767,
267,
3113,
315,
2767,
318,
3113,
315,
1484,
2... |
F = derivative(f) J1 = derivative(L) J2 = derivative(F) | F = Derivative(f, w) J1 = Derivative(L, w) J2 = Derivative(F, w) | def test_something(self): element = FiniteElement("CG", "triangle", 1) v = TestFunction(element) u = TrialFunction(element) w = Function(element, "w") f = (f**2/2)*dx L = f*v*dx a = u*v*dx F = derivative(f) J1 = derivative(L) J2 = derivative(F) # TODO: Apply algorithms of various kinds and verify that (a, J1, J2) are equivalent, as well as (L, F). | 5d5fe4ad61ac58457519c7014bcc4f09b9bf3b43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/624/5d5fe4ad61ac58457519c7014bcc4f09b9bf3b43/mass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30289,
12,
2890,
4672,
930,
273,
9458,
1137,
1046,
2932,
20585,
3113,
315,
16857,
4341,
3113,
404,
13,
225,
331,
273,
7766,
2083,
12,
2956,
13,
582,
273,
10000,
287,
2083,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30289,
12,
2890,
4672,
930,
273,
9458,
1137,
1046,
2932,
20585,
3113,
315,
16857,
4341,
3113,
404,
13,
225,
331,
273,
7766,
2083,
12,
2956,
13,
582,
273,
10000,
287,
2083,
12,
... |
def get_wave_function_array(self, n=0, k=0, s=0): | def get_number_of_grid_points(self): return self.get_pseudo_wave_function(0, 0, 0).shape def get_pseudo_wave_function(self, n=0, k=0, s=0): | def get_wave_function_array(self, n=0, k=0, s=0): return npy.array(self.calc.GetWaveFunctionArray(n, k, s)) | 00836fe7ba7dc98ee8997299b7e06ef0e82cd0bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/00836fe7ba7dc98ee8997299b7e06ef0e82cd0bc/old.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2696,
67,
792,
67,
5222,
67,
4139,
12,
2890,
4672,
327,
365,
18,
588,
67,
26023,
67,
17838,
67,
915,
12,
20,
16,
374,
16,
374,
2934,
4867,
225,
1652,
336,
67,
26023,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2696,
67,
792,
67,
5222,
67,
4139,
12,
2890,
4672,
327,
365,
18,
588,
67,
26023,
67,
17838,
67,
915,
12,
20,
16,
374,
16,
374,
2934,
4867,
225,
1652,
336,
67,
26023,
67,
1... |
c.ConnectNode(node) | self._ConnectNode(c, node) | def call_instance_migrate(self, node, instance, target, live): """Migrate an instance. | 253482126e14ec90848550d2d2005740e45f62a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/253482126e14ec90848550d2d2005740e45f62a8/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1336,
67,
22083,
12,
2890,
16,
756,
16,
791,
16,
1018,
16,
8429,
4672,
3536,
19594,
392,
791,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1336,
67,
22083,
12,
2890,
16,
756,
16,
791,
16,
1018,
16,
8429,
4672,
3536,
19594,
392,
791,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
t = type(value) if not isinstance(t, StringType): if not isinstance(t, TupleType): | if not isinstance(value, StringType): if not isinstance(value, TupleType): | def __init__(self, value=0): t = type(value) if not isinstance(t, StringType): if not isinstance(t, TupleType): if value == 0: value = time.time() value = time.localtime(value) value = time.strftime("%Y%m%dT%H:%M:%S", value) self.value = value | 1e52682c3ad78f3d799a9ea36bd493b18b540454 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1e52682c3ad78f3d799a9ea36bd493b18b540454/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
460,
33,
20,
4672,
309,
486,
1549,
12,
1132,
16,
31570,
4672,
309,
486,
1549,
12,
1132,
16,
7257,
559,
4672,
309,
460,
422,
374,
30,
460,
273,
813,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
460,
33,
20,
4672,
309,
486,
1549,
12,
1132,
16,
31570,
4672,
309,
486,
1549,
12,
1132,
16,
7257,
559,
4672,
309,
460,
422,
374,
30,
460,
273,
813,
18,... |
if outfileString: | if outfileString: | def preparejob(self,jobconfig,master_input_sandbox,subjob): """Prepare NG job description file xrsl""" | ad984b56cdc008f13cd574a924fd1ecab2076a7d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/ad984b56cdc008f13cd574a924fd1ecab2076a7d/NG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
4688,
12,
2890,
16,
4688,
1425,
16,
7525,
67,
2630,
67,
27004,
16,
1717,
4688,
4672,
3536,
7543,
423,
43,
1719,
2477,
585,
20912,
2069,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
4688,
12,
2890,
16,
4688,
1425,
16,
7525,
67,
2630,
67,
27004,
16,
1717,
4688,
4672,
3536,
7543,
423,
43,
1719,
2477,
585,
20912,
2069,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.rapi.add_package_to_group(repo["id"], pkggroup["id"], | self.rapi.add_packages_to_group(repo["id"], pkggroup["id"], | def test_repo_package_groups(self): repo = self.rapi.create('some-id','some name', \ 'i386', 'yum:http://example.com') pkggroup = self.rapi.create_packagegroup(repo["id"], 'test-group-id', 'test-group-name', 'test-group-description') package = self.create_package('test_repo_packages') self.rapi.add_package(repo["id"], package["id"]) self.rapi.add_package_to_group(repo["id"], pkggroup["id"], package["name"], gtype="default") # Verify package is present in group found = self.rapi.repository('some-id') self.assertTrue(found['packagegroups'] is not None) self.assertTrue(pkggroup['id'] in found['packagegroups']) self.assertTrue(package["name"] in \ found['packagegroups'][pkggroup['id']]['default_package_names']) # Remove package from package group self.rapi.delete_package_from_group(repo["id"], pkggroup["id"], package["name"], gtype="default") found = self.rapi.repository('some-id') self.assertTrue(found['packagegroups'] is not None) self.assertTrue(pkggroup['id'] in found['packagegroups']) self.assertTrue(package["name"] not in \ found['packagegroups'][pkggroup['id']]['default_package_names']) # Remove packagegroup from repo self.rapi.delete_packagegroup(repo["id"], pkggroup["id"]) found = self.rapi.repository('some-id') self.assertTrue(len(found['packagegroups']) == 0) | e32e8c48a6204869bda9fd0125e2ed702367775f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/e32e8c48a6204869bda9fd0125e2ed702367775f/test_api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7422,
67,
5610,
67,
4650,
12,
2890,
4672,
3538,
273,
365,
18,
1266,
77,
18,
2640,
2668,
19068,
17,
350,
17023,
19068,
508,
2187,
521,
296,
77,
23,
5292,
2187,
296,
93,
379,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7422,
67,
5610,
67,
4650,
12,
2890,
4672,
3538,
273,
365,
18,
1266,
77,
18,
2640,
2668,
19068,
17,
350,
17023,
19068,
508,
2187,
521,
296,
77,
23,
5292,
2187,
296,
93,
379,
... |
[-30*c^4 + 100/7*c^3 - 5/14*c^2 - 5/14*c, -2*b^2 - b*c + 1/2*b, a + 2*b + 2*c - 1, 7/125*b + 42/25*c^3 - 79/125*c^2 + 3/125*c, a^2 - a + 2*b^2 + 2*c^2, -5*b*c + 1/2*b - 6*c^2 + 2*c, 2*a*b + 2*b*c - b] | [-30*c^4 + 100/7*c^3 - 5/14*c^2 - 5/14*c, -2*b^2 - b*c + 1/2*b, -7/125*b - 42/25*c^3 + 79/125*c^2 - 3/125*c, a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, -5*b*c + 1/2*b - 6*c^2 + 2*c, 2*a*b + 2*b*c - b] | def groebner_basis(self, algorithm=None): """ Return a Groebner basis of this ideal. | 8d84fbe9023a763c603bcc7cc5df51fa93bf2688 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8d84fbe9023a763c603bcc7cc5df51fa93bf2688/multi_polynomial_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
303,
24008,
1224,
67,
23774,
12,
2890,
16,
4886,
33,
7036,
4672,
3536,
2000,
279,
611,
303,
24008,
1224,
10853,
434,
333,
23349,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
303,
24008,
1224,
67,
23774,
12,
2890,
16,
4886,
33,
7036,
4672,
3536,
2000,
279,
611,
303,
24008,
1224,
10853,
434,
333,
23349,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
class WebTLSMDDaemon(object): def __init__(self, db_file): | class WebTLSMDDaemon(): def __init__(self): | def Refmac5RefinementPrep(job_id, struct_id, chain_ntls, wilson): """Called with a list of tuples (job_id, struct_id, [chain_id, ntls], wilson). Generates PDB and TLSIN files for refinement with REFMAC5 + PHENIX. Returns a single string if there is an error, otherwise a dictionary of results is returned. """ try: struct_id = mysql.job_get_structure_id(job_id) except: return "Could not find the directory related to job_id: %s" % job_id if mysql.job_get_via_pdb(job_id) == 1: ## If job was submitted via pdb.org, the results are in a different ## directory/path. pdb_id = struct_id job_dir = os.path.join(conf.WEBTLSMDD_PDB_DIR, pdb_id) job_url = os.path.join(conf.TLSMD_PUBLIC_URL, "pdb", pdb_id) analysis_dir = os.path.join(job_dir, "ANALYSIS") analysis_base_url = "%s/ANALYSIS" % (job_url) else: ## User-submitted (non-pdb.org) result directory/path/url job_dir = os.path.join(conf.TLSMD_WORK_DIR, job_id) job_url = os.path.join(conf.TLSMD_PUBLIC_URL, "jobs", job_id) analysis_dir = os.path.join(job_dir, "ANALYSIS") analysis_base_url = "%s/ANALYSIS" % (job_url) if not os.path.isdir(analysis_dir): return "Job analysis directory does not exist" old_dir = os.getcwd() os.chdir(analysis_dir) ## input structure pdbin = "%s.pdb" % (struct_id) if not os.path.isfile(pdbin): pdbin = None for pdbx in glob.glob("*.pdb"): if len(pdbx) == 8: struct_id = pdbx[:4] pdbin = pdbx break if pdbin is None: os.chdir(old_dir) return "Input PDB File %s Not Found" % (pdbin) ## the per-chain TLSOUT files from TLSMD must be merged tlsins = [] for chain_id, ntls in chain_ntls: tlsin = "%s_CHAIN%s_NTLS%d.tlsout" % (struct_id, chain_id, ntls) if not os.path.isfile(tlsin): os.chdir(old_dir) return "Input TLSIN File %s Not Found" % (tlsin) tlsins.append(tlsin) job_num = job_id.split("_")[0] secure_dir = job_id.split("_")[1] if not os.path.exists(secure_dir): os.mkdir(secure_dir) ## form unique pdbout/tlsout filenames from job_id pdbout1 = "%s/%s_TLS+Biso.pdb" % (secure_dir, job_num) pdbout2 = "%s/%s_pureTLS.pdb" % (secure_dir, job_num) ## the tlsout from this program is going to be the tlsin ## for refinement, so it's important for the filename to have ## the tlsin extension so the user is not confused tlsout1 = "%s/%s_TLS+Biso.tlsin" % (secure_dir, job_num) tlsout2 = "%s/%s_pureTLS.tlsin" % (secure_dir, job_num) phenix = "%s/%s.phenix" % (secure_dir, job_num) ## make urls for linking pdbout_url1 = "%s/%s" % (analysis_base_url, pdbout1) pdbout_url2 = "%s/%s" % (analysis_base_url, pdbout2) tlsout_url1 = "%s/%s" % (analysis_base_url, tlsout1) tlsout_url2 = "%s/%s" % (analysis_base_url, tlsout2) phenix_url = "%s/%s" % (analysis_base_url, phenix) ## create the REFMAC/PHENIX files tls_calcs.refmac5_prep(pdbin, tlsins, pdbout1, tlsout1) tls_calcs.refmac_pure_tls_prep(pdbin, tlsins, wilson, pdbout2, tlsout2) tls_calcs.phenix_prep(pdbin, tlsins, phenix) os.chdir(old_dir) return dict(pdbout1 = pdbout1, pdbout_url1 = pdbout_url1, pdbout2 = pdbout2, pdbout_url2 = pdbout_url2, tlsout1 = tlsout1, tlsout_url1 = tlsout_url1, tlsout2 = tlsout2, tlsout_url2 = tlsout_url2, phenix = phenix, phenix_url = phenix_url) | 57a414db198f444674182632ac07084d877a9036 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/57a414db198f444674182632ac07084d877a9036/webtlsmdd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3941,
5821,
25,
426,
926,
820,
15543,
12,
4688,
67,
350,
16,
1958,
67,
350,
16,
2687,
67,
496,
3251,
16,
341,
330,
816,
4672,
3536,
8185,
598,
279,
666,
434,
10384,
261,
4688,
67,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3941,
5821,
25,
426,
926,
820,
15543,
12,
4688,
67,
350,
16,
1958,
67,
350,
16,
2687,
67,
496,
3251,
16,
341,
330,
816,
4672,
3536,
8185,
598,
279,
666,
434,
10384,
261,
4688,
67,
35... |
return 2 | return "OK, python was compiled with GCC" | def check_config_h(): """Checks if the GCC compiler is mentioned in config.h. If it is not, compiling probably doesn't work. """ # return values # 2: OK, python was compiled with GCC # 1: OK, python's config.h mentions __GCC__ # 0: uncertain, because we couldn't check it # -1: probably not OK, because we didn't found it in config.h # You could check check_config_h()>0 => OK from distutils import sysconfig import string,sys # if sys.version contains GCC then python was compiled with # GCC, and the config.h file should be OK if -1 == string.find(sys.version,"GCC"): pass # go to the next test else: return 2 try: # It would probably better to read single lines to search. # But we do this only once, and it is fast enough f=open(sysconfig.get_config_h_filename()) s=f.read() f.close() # is somewhere a #ifdef __GNUC__ or something similar if -1 == string.find(s,"__GNUC__"): return -1 else: return 1 except IOError: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing pass return 0 | 0d0aad695df507bf98088a926c2198f62de27cd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0d0aad695df507bf98088a926c2198f62de27cd2/cygwinccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1425,
67,
76,
13332,
3536,
4081,
309,
326,
611,
6743,
5274,
353,
27635,
316,
642,
18,
76,
18,
225,
971,
518,
353,
486,
16,
1161,
4973,
8656,
3302,
1404,
1440,
18,
3536,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1425,
67,
76,
13332,
3536,
4081,
309,
326,
611,
6743,
5274,
353,
27635,
316,
642,
18,
76,
18,
225,
971,
518,
353,
486,
16,
1161,
4973,
8656,
3302,
1404,
1440,
18,
3536,
468,
... |
def call_bibupload(marcxmlfile, mode = ["-r", "-i"], oai_src_id = -1): | def call_bibupload(marcxmlfile, mode = None, oai_src_id = -1): | def call_bibupload(marcxmlfile, mode = ["-r", "-i"], oai_src_id = -1): """Call bibupload in insert mode on MARCXMLFILE.""" if os.path.exists(marcxmlfile): try: args = mode args.append(marcxmlfile) task_id = task_low_level_submission_tuple("bibupload", "oaiharvest", tuple(args)) create_bibharvest_log(task_id, oai_src_id, marcxmlfile) except Exception, msg: write_message("An exception during submitting bibharvest task occured : %s " % (str(msg))) return 1 return 0 else: write_message("marcxmlfile %s does not exist" % marcxmlfile) return 1 | 50a211189b9fc6758f487b882d8934f5f7a25be9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/50a211189b9fc6758f487b882d8934f5f7a25be9/oaiharvestlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
745,
67,
70,
495,
6327,
12,
3684,
71,
2902,
768,
16,
1965,
273,
599,
16,
225,
320,
10658,
67,
4816,
67,
350,
273,
300,
21,
4672,
3536,
1477,
25581,
6327,
316,
2243,
1965,
603,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
745,
67,
70,
495,
6327,
12,
3684,
71,
2902,
768,
16,
1965,
273,
599,
16,
225,
320,
10658,
67,
4816,
67,
350,
273,
300,
21,
4672,
3536,
1477,
25581,
6327,
316,
2243,
1965,
603,
4... |
return self.get(newsite, type) | return self.get(newsite, type, key = key) | def get(self, site, key, type): # This can probably also provide something for # localised settings, but then it first needs to # check whether the page is sysop only. self.lock.acquire() try: if type not in self.summaries: self.summaries[type] = {} if key in self.summaries[type]: if (time.time() - self.summaries[type][key][1]) < \ self.CommonsDelinker.config['summary_cache']: # Return cached result return self.summaries[type][key][0] output(u'%s Fetching new summary for %s' % (self, site)) if self.CommonsDelinker.config['global']: self.check_user_page(site) page = wikipedia.Page(site, '%s%s' % \ (self.CommonsDelinker.config['local_settings'], type)) try: # Fetch the summary template, follow redirects i18n = page.get(get_redirect = True) self.summaries[type][key] = (i18n, time.time()) return i18n except wikipedia.NoPage: pass finally: self.lock.release() # No i18n available, but it may be available in the wikipedia # of that language. Only do so for wiktionary, wikibooks, # wikiquote, wikisource, wikinews, wikiversity # This will cause the bot to function even on special wikis # like mediawiki.org and meta and species. output(u'%s Using default summary for %s' % (self, site)) if site.family.name != 'wikipedia' and self.CommonsDelinker.config['global']: if site.family.name in ('wiktionary', 'wikibooks', 'wikiquote', 'wikisource', 'wikinews', 'wikiversity'): newsite = self.CommonsDelinker.get_site(site.lang, wikipedia.Family('wikipedia')) return self.get(newsite, type) return self.CommonsDelinker.config['default_settings'].get(type, '') | f813f152a1f3070df23aa21124a6a674f0e823d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/f813f152a1f3070df23aa21124a6a674f0e823d7/delinker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2834,
16,
498,
16,
618,
4672,
468,
1220,
848,
8656,
2546,
5615,
5943,
364,
468,
1191,
5918,
1947,
16,
1496,
1508,
518,
1122,
4260,
358,
468,
866,
2856,
326,
1363,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2834,
16,
498,
16,
618,
4672,
468,
1220,
848,
8656,
2546,
5615,
5943,
364,
468,
1191,
5918,
1947,
16,
1496,
1508,
518,
1122,
4260,
358,
468,
866,
2856,
326,
1363,
35... |
def LOG(severity,*args): zLOG.LOG('ZWiki',severity,' '.join(map(str,args))) | def LOG(severity,*args): zLOG.LOG('ZWiki',severity,' '.join(map(str,*args))) | def LOG(severity,*args): zLOG.LOG('ZWiki',severity,' '.join(map(str,args))) | 0de317591e874983afe8e74608a250564dac7ed6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5225/0de317591e874983afe8e74608a250564dac7ed6/Utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2018,
12,
27341,
16,
14,
1968,
4672,
998,
4842,
18,
4842,
2668,
62,
25438,
2187,
27341,
11189,
2418,
5701,
12,
1458,
12,
701,
16,
1968,
20349,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2018,
12,
27341,
16,
14,
1968,
4672,
998,
4842,
18,
4842,
2668,
62,
25438,
2187,
27341,
11189,
2418,
5701,
12,
1458,
12,
701,
16,
1968,
20349,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if regexp.match(str(song_info[i+1]).lower()): | mpdh.conout(unicode(song_info[i+1]).lower()) if regexp.match(unicode(song_info[i+1]).lower()): | def searchfilter_loop(self): while self.filterbox_visible: # copy the last command or pattern safely self.filterbox_cond.acquire() try: while(self.filterbox_cmd_buf == '$$$DONE###'): self.filterbox_cond.wait() todo = self.filterbox_cmd_buf self.filterbox_cond.release() except: todo = self.filterbox_cmd_buf pass self.current.freeze_child_notify() matches = gtk.ListStore(*([int] + [str] * len(self.columnformat))) matches.clear() filterposition = self.current.get_visible_rect()[1] model, selected = self.current_selection.get_selected_rows() filterselected = [] for path in selected: filterselected.append(path) rownum = 0 # Store previous rownums in temporary list, in case we are # about to populate the songfilter with a subset of the # current filter. This will allow us to preserve the mapping. prev_rownums = [] for song in self.filter_row_mapping: prev_rownums.append(song) self.filter_row_mapping = [] if todo == '$$$QUIT###': gobject.idle_add(self.searchfilter_revert_model) return elif len(todo) == 0: for row in self.currentdata: self.filter_row_mapping.append(rownum) rownum = rownum + 1 song_info = [row[0]] for i in range(len(self.columnformat)): song_info.append(misc.unbold(row[i+1])) matches.append(song_info) else: # this make take some seconds... and we'll escape the search text because # we'll be searching for a match in items that are also escaped. todo = misc.escape_html(todo) todo = re.escape(todo) todo = '.*' + todo.replace(' ', ' .*').lower() regexp = re.compile(todo) rownum = 0 if self.prevtodo in todo and len(self.prevtodo) > 0: # If the user's current filter is a subset of the # previous selection (e.g. "h" -> "ha"), search # for files only in the current model, not the # entire self.currentdata subset = True use_data = self.current.get_model() if len(use_data) != len(prev_rownums): # Not exactly sure why this happens sometimes # so lets just revert to prevent a possible, but # infrequent, crash. The only downside is speed. subset = False use_data = self.currentdata else: subset = False use_data = self.currentdata for row in use_data: song_info = [row[0]] for i in range(len(self.columnformat)): song_info.append(misc.unbold(row[i+1])) # Search for matches in all columns: for i in range(len(self.columnformat)): if regexp.match(str(song_info[i+1]).lower()): matches.append(song_info) if subset: self.filter_row_mapping.append(prev_rownums[rownum]) else: self.filter_row_mapping.append(rownum) break rownum = rownum + 1 if self.prevtodo == todo or self.prevtodo == "RETAIN_POS_AND_SEL": # mpd update, retain view of treeview: retain_position_and_selection = True if self.plpos: filterposition = self.plpos self.plpos = None else: retain_position_and_selection = False self.filterbox_cond.acquire() self.filterbox_cmd_buf='$$$DONE###' try: self.filterbox_cond.release() except: pass gobject.idle_add(self.searchfilter_set_matches, matches, filterposition, filterselected, retain_position_and_selection) self.prevtodo = todo | c855d56ed39764d70d6569e06061a748e58d665a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/c855d56ed39764d70d6569e06061a748e58d665a/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
2188,
67,
6498,
12,
2890,
4672,
1323,
365,
18,
2188,
2147,
67,
8613,
30,
468,
1610,
326,
1142,
1296,
578,
1936,
15303,
365,
18,
2188,
2147,
67,
10013,
18,
1077,
1039,
1435,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
2188,
67,
6498,
12,
2890,
4672,
1323,
365,
18,
2188,
2147,
67,
8613,
30,
468,
1610,
326,
1142,
1296,
578,
1936,
15303,
365,
18,
2188,
2147,
67,
10013,
18,
1077,
1039,
1435,
775,
... |
if isinstance(ret, (int)): | if isinstance(ret, (int, long)): | def get_option(self, section, option, default="__None__"): """ Wrapper around ConfigParser.get. Automatically adds any missing sections, adds the ability to write a default value, and if one is provided prints if the default or a previously saved value is returned. """ if not self.has_section(section): if default != "__None__": self.add_section(section) else: return None if self.has_option(section, option): ret = RawConfigParser.get(self, section, option) if (isinstance(ret, basestring) and ret.startswith(self.mrk_ws) and ret.endswith(self.mrk_ws)): ret = ret[3:-3] if default: if self.debug: print ''.join(['found ', option, ' in configuration ', str(ret)]) else: if default != "__None__": print 'did not find %s in configuration, setting default %s' % (option, str(default)) self.set(section, option, str(default), write=True) ret = default else: ret = None # Try to intelligently handle the type of the return value. try: if not ret.startswith('0') or len(ret) == 1: ret = int(ret) except (ValueError, TypeError, AttributeError): ret = Noneify(ret) # This is a workaround for a python-dbus issue on 64-bit systems. if isinstance(ret, (int)): try: Int32(ret) except OverflowError: ret = long(ret) return to_unicode(ret) | 35ec07e0968ab7f9b9dde542874aa40c65e2543b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/35ec07e0968ab7f9b9dde542874aa40c65e2543b/configmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
16,
805,
1546,
972,
7036,
14437,
4672,
3536,
18735,
6740,
25076,
18,
588,
18,
225,
11809,
20271,
4831,
1281,
3315,
7178,
16,
4831,
326,
7123,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
16,
805,
1546,
972,
7036,
14437,
4672,
3536,
18735,
6740,
25076,
18,
588,
18,
225,
11809,
20271,
4831,
1281,
3315,
7178,
16,
4831,
326,
7123,... |
class VideoSequnce(VideoItem): | class VideoSequence(VideoItem): | def paint(self, painter, option, widget): rect = painter.transform().mapRect(self.boundingRect()) clip_rect = painter.transform().mapRect(option.exposedRect) | 18af821113608605aa54c6fd64266cf8faca44b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10170/18af821113608605aa54c6fd64266cf8faca44b3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
12,
2890,
16,
21295,
16,
1456,
16,
3604,
4672,
4917,
273,
21295,
18,
6547,
7675,
1458,
6120,
12,
2890,
18,
3653,
310,
6120,
10756,
6807,
67,
2607,
273,
21295,
18,
6547,
7675,
1458... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
12,
2890,
16,
21295,
16,
1456,
16,
3604,
4672,
4917,
273,
21295,
18,
6547,
7675,
1458,
6120,
12,
2890,
18,
3653,
310,
6120,
10756,
6807,
67,
2607,
273,
21295,
18,
6547,
7675,
1458... |
'name': line.acc_no.bank and line.acc_no.bank.name+' '+tmp or tmp, | 'name': tmp, | def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_position_template = self.pool.get('account.fiscal.position.template') obj_fiscal_position = self.pool.get('account.fiscal.position') data_pool = self.pool.get('ir.model.data') | 115dac5e71e2ad517251d87ca3ae088e104b5297 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/115dac5e71e2ad517251d87ca3ae088e104b5297/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
7027,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
63,
20,
5717,
1081,
67,
8981,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
7027,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
63,
20,
5717,
1081,
67,
8981,
273,
365,
18,
... |
return ('%s=%s'%(k,smart_str(v)) for k,v in self.items() if v) | return ('%s=%s'%(k,smart_str(v)) for k,v in sorted(self.items()) if v) | def _parts(self): return ('%s=%s'%(k,smart_str(v)) for k,v in self.items() if v) | 7b83f3cd5967aac87ad52fb0237444820ed00ad6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3687/7b83f3cd5967aac87ad52fb0237444820ed00ad6/GChart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6019,
12,
2890,
4672,
327,
7707,
9,
87,
5095,
87,
11,
17105,
79,
16,
26416,
67,
701,
12,
90,
3719,
364,
417,
16,
90,
316,
365,
18,
3319,
1435,
309,
331,
13,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6019,
12,
2890,
4672,
327,
7707,
9,
87,
5095,
87,
11,
17105,
79,
16,
26416,
67,
701,
12,
90,
3719,
364,
417,
16,
90,
316,
365,
18,
3319,
1435,
309,
331,
13,
2,
-100,
-100,
-10... |
associate_partners_list = [] query="SELECT DISTINCT associate_member FROM res_partner" cr.execute(query) for p in cr.fetchall(): if p[0] and p[0] != partner_data.id: associate_partners_list.append(p[0]) if associate_partners_list != []: res_state = self._membership_state(cr, uid, associate_partners_list, name, args, context) | res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context) | def _membership_state(self, cr, uid, ids, name, args, context=None): res = {} for id in ids: res[id] = 'none' today = time.strftime('%Y-%m-%d') for id in ids: partner_data = self.browse(cr,uid,id) if partner_data.membership_cancel and today > partner_data.membership_cancel: res[id] = 'canceled' continue if partner_data.membership_stop and today > partner_data.membership_stop: res[id] = 'old' continue s = 4 if partner_data.member_lines: for mline in partner_data.member_lines: if mline.date_from <= today and mline.date_to >= today: if mline.account_invoice_line and mline.account_invoice_line.invoice_id: mstate = mline.account_invoice_line.invoice_id.state if mstate == 'paid': s = 0 break elif mstate == 'open' and s!=0: s = 1 elif mstate == 'cancel' and s!=0 and s!=1: s = 2 elif (mstate == 'draft' or mstate == 'proforma') and s!=0 and s!=1: s = 3 if s==4: for mline in partner_data.member_lines: if mline.date_from < today and mline.date_to < today and mline.date_from<=mline.date_to and mline.account_invoice_line.invoice_id.state == 'paid': s = 5 else: s = 6 if s==0: res[id] = 'paid' elif s==1: res[id] = 'invoiced' elif s==2: res[id] = 'canceled' elif s==3: res[id] = 'waiting' elif s==5: res[id] = 'old' elif s==6: res[id] = 'none' if partner_data.free_member and s!=0: res[id] = 'free' if partner_data.associate_member: associate_partners_list = [] query="SELECT DISTINCT associate_member FROM res_partner" cr.execute(query) for p in cr.fetchall(): if p[0] and p[0] != partner_data.id: associate_partners_list.append(p[0]) if associate_partners_list != []: res_state = self._membership_state(cr, uid, associate_partners_list, name, args, context) res[id] = res_state[partner_data.associate_member.id] #partner_data.associate_member.membership_state return res | 02614834338c6f545319904a339ed8cab0466c60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/02614834338c6f545319904a339ed8cab0466c60/membership.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
19679,
67,
2019,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
400,
273,
2618,
364,
612,
316,
3258,
30,
400,
63,
350,
65,
273,
296,
6102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
19679,
67,
2019,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
400,
273,
2618,
364,
612,
316,
3258,
30,
400,
63,
350,
65,
273,
296,
6102,
... |
any_ones, = [k for k in cto if k[u'name'] == u'any'] | any_one = starting_query.get_facet_options(u'project', [u''])[0] | def test_contribution_type_options_are_reasonable(self): GET_data = {} starting_query = mysite.search.controllers.Query.create_from_GET_data( GET_data) cto = starting_query.get_facet_options(u'project', [u'thingamajig', u'thingamabob', u'']) jig_ones, = [k for k in cto if k[u'name'] == u'thingamajig'] any_ones, = [k for k in cto if k[u'name'] == u'any'] self.assertEqual(jig_ones[u'count'], 2) self.assertEqual(any_ones[u'count'], 3) | ddec2c8b83da5e6f19b27037a478e02155986ec0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/ddec2c8b83da5e6f19b27037a478e02155986ec0/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
591,
4027,
67,
723,
67,
2116,
67,
834,
67,
10579,
429,
12,
2890,
4672,
4978,
67,
892,
273,
2618,
5023,
67,
2271,
273,
312,
1900,
1137,
18,
3072,
18,
20171,
18,
1138,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
591,
4027,
67,
723,
67,
2116,
67,
834,
67,
10579,
429,
12,
2890,
4672,
4978,
67,
892,
273,
2618,
5023,
67,
2271,
273,
312,
1900,
1137,
18,
3072,
18,
20171,
18,
1138,
18,
26... |
for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: | for menu in ['add', 'replace', 'playafter', 'tag']: | def update_menu_visibility(self, show_songinfo_only=False): if show_songinfo_only or not self.expanded: for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', 'pl', \ 'remove', 'clear', 'update', 'new', 'edit', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() return elif self.current_tab == self.TAB_CURRENT: if len(self.currentdata) > 0: if self.current_selection.count_selected_rows() > 0: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() if not self.filterbox_visible: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['clear', 'pl', 'sort', 'remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', \ 'update', 'new', 'edit']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_LIBRARY: self.UIManager.get_widget('/mainmenu/updatemenu/').show() if len(self.browserdata) > 0: if self.browser_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'rename', 'rm', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_PLAYLISTS: if self.playlists_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() if self.playlists_selection.count_selected_rows() == 1 and self.mpd_major_version() >= 0.13: self.UIManager.get_widget('/mainmenu/renamemenu/').show() else: self.UIManager.get_widget('/mainmenu/renamemenu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm', 'rename']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'update', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_STREAMS: self.UIManager.get_widget('/mainmenu/newmenu/').show() if self.streams_selection.count_selected_rows() > 0: if self.streams_selection.count_selected_rows() == 1: self.UIManager.get_widget('/mainmenu/editmenu/').show() else: self.UIManager.get_widget('/mainmenu/editmenu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['rename', 'remove', 'clear', 'pl', 'update', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() | b33877e05a3757e7c9cef00e0e41779cddbb5424 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/b33877e05a3757e7c9cef00e0e41779cddbb5424/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5414,
67,
14422,
12,
2890,
16,
2405,
67,
816,
75,
1376,
67,
3700,
33,
8381,
4672,
309,
2405,
67,
816,
75,
1376,
67,
3700,
578,
486,
365,
18,
17336,
30,
364,
3824,
316,
1022... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5414,
67,
14422,
12,
2890,
16,
2405,
67,
816,
75,
1376,
67,
3700,
33,
8381,
4672,
309,
2405,
67,
816,
75,
1376,
67,
3700,
578,
486,
365,
18,
17336,
30,
364,
3824,
316,
1022... |
if self.__version == 7: key = (r"%s\7.0\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" % (self.__root,)) | if self.__version >= 7: key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" % (self.__root, self.__version)) | def get_msvc_paths(self, path, platform='x86'): """Get a list of devstudio directories (include, lib or path). | 89ddf73fbbc39e1209c66ea797dbe4e4fb5ee74f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/89ddf73fbbc39e1209c66ea797dbe4e4fb5ee74f/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
12,
2890,
16,
589,
16,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
589,
2934,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
12,
2890,
16,
589,
16,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
589,
2934,
2,
-100,
-1... |
"""Generate one ServerSection for each BotAllocator we have, sorted by hostname""" allocators = self.botNet.servers.values() allocators.sort(lambda a,b: cmp(a.host, b.host)) return [ServerSection(a) for a in allocators] | servers = self.botNet.servers.keys() servers.sort(lambda a,b: cmp(str(a), str(b))) return [ServerSection(self.botNet, s) for s in servers] | def render_mainColumn(self, context): """Generate one ServerSection for each BotAllocator we have, sorted by hostname""" allocators = self.botNet.servers.values() allocators.sort(lambda a,b: cmp(a.host, b.host)) return [ServerSection(a) for a in allocators] | ef55162408018d84e44ed59d4f844d9bca1a2968 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/ef55162408018d84e44ed59d4f844d9bca1a2968/BotStatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
5254,
1494,
12,
2890,
16,
819,
4672,
3536,
4625,
1245,
3224,
5285,
364,
1517,
15039,
21156,
732,
1240,
16,
3115,
635,
5199,
8395,
4767,
3062,
273,
365,
18,
4819,
7308,
18,
1424... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
5254,
1494,
12,
2890,
16,
819,
4672,
3536,
4625,
1245,
3224,
5285,
364,
1517,
15039,
21156,
732,
1240,
16,
3115,
635,
5199,
8395,
4767,
3062,
273,
365,
18,
4819,
7308,
18,
1424... |
dump_re = re.compile(r'^\* Dumped revision (\d+)\.$') | dump_re = re.compile(r'^\* Dumped revision (\d+)\.\r?$') | def copy_repos(src_path, dst_path, head_revision, ignore_uuid = 0): "Copy the repository SRC_PATH, with head revision HEAD_REVISION, to DST_PATH" # A BDB hot-backup procedure would be more efficient, but that would # require access to the BDB tools, and this doesn't. Print a fake # pipe command so that the displayed CMDs can be run by hand create_repos(dst_path) dump_args = ' dump "' + src_path + '"' load_args = ' load "' + dst_path + '"' if ignore_uuid: load_args = load_args + " --ignore-uuid" if verbose_mode: print 'CMD:', os.path.basename(svnadmin_binary) + dump_args, \ '|', os.path.basename(svnadmin_binary) + load_args, start = time.time() dump_in, dump_out, dump_err = os.popen3(svnadmin_binary + dump_args, 'b') load_in, load_out, load_err = os.popen3(svnadmin_binary + load_args, 'b') stop = time.time() if verbose_mode: print '<TIME = %.6f>' % (stop - start) while 1: data = dump_out.read(1024*1024) # Arbitrary buffer size if data == "": break load_in.write(data) load_in.close() # Tell load we are done dump_lines = dump_err.readlines() load_lines = load_out.readlines() dump_in.close() dump_out.close() dump_err.close() load_out.close() load_err.close() dump_re = re.compile(r'^\* Dumped revision (\d+)\.$') expect_revision = 0 for dump_line in dump_lines: match = dump_re.match(dump_line) if not match or match.group(1) != str(expect_revision): print 'ERROR: dump failed:', dump_line, raise SVNRepositoryCopyFailure expect_revision += 1 if expect_revision != head_revision + 1: print 'ERROR: dump failed; did not see revision', head_revision raise SVNRepositoryCopyFailure load_re = re.compile(r'^------- Committed revision (\d+) >>>$') expect_revision = 1 for load_line in load_lines: match = load_re.match(load_line) if match: if match.group(1) != str(expect_revision): print 'ERROR: load failed:', load_line, raise SVNRepositoryCopyFailure expect_revision += 1 if expect_revision != head_revision + 1: print 'ERROR: load failed; did not see revision', head_revision raise SVNRepositoryCopyFailure | 1a34cd94a352df88ae4ca1fd135f94bbd1e49233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1387/1a34cd94a352df88ae4ca1fd135f94bbd1e49233/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
15564,
12,
4816,
67,
803,
16,
3046,
67,
803,
16,
910,
67,
13057,
16,
2305,
67,
7080,
273,
374,
4672,
315,
2951,
326,
3352,
348,
11529,
67,
4211,
16,
598,
910,
6350,
14792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
15564,
12,
4816,
67,
803,
16,
3046,
67,
803,
16,
910,
67,
13057,
16,
2305,
67,
7080,
273,
374,
4672,
315,
2951,
326,
3352,
348,
11529,
67,
4211,
16,
598,
910,
6350,
14792,
... |
print ('Tagged object %s with %s' | print('Tagged object %s with %s' | def execute_tag_command(objs, db, tags, options): tags = form_tag_value_pairs(tags) actions = { 'id': db.tag_object_by_id, 'about': db.tag_object_by_about, } for obj in objs: description = describe_by_mode(obj.specifier, obj.mode) for tag in tags: o = actions[obj.mode](obj.specifier, tag.name, tag.value) if o == 0: if options.verbose: print ('Tagged object %s with %s' % (description, formatted_tag_value (tag.name, tag.value))) else: warning('Failed to tag object %s with %s' % (description, tag.name)) warning('Error code %d' % o) | e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
2692,
67,
3076,
12,
18093,
16,
1319,
16,
2342,
16,
702,
4672,
2342,
273,
646,
67,
2692,
67,
1132,
67,
11545,
12,
4156,
13,
4209,
273,
288,
296,
350,
4278,
1319,
18,
2692,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
2692,
67,
3076,
12,
18093,
16,
1319,
16,
2342,
16,
702,
4672,
2342,
273,
646,
67,
2692,
67,
1132,
67,
11545,
12,
4156,
13,
4209,
273,
288,
296,
350,
4278,
1319,
18,
2692,
6... |
def check_antialias(self): | def test_antialias(self): | def check_antialias(self): gc = agg.GraphicsContextArray((200,50),pix_format = "bgra32") gc.set_antialias(1) f = Font(MODERN) gc.set_font(f) gc.show_text("hello") save(gc,test_name()+'.bmp') | 1d96ab014629902ff0c3275273182d01de39da50 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/1d96ab014629902ff0c3275273182d01de39da50/image_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
970,
649,
1795,
12,
2890,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6976,
16,
3361,
3631,
14861,
67,
2139,
273,
315,
70,
2752,
1578,
7923,
8859,
18,
542,
67,
970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
970,
649,
1795,
12,
2890,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6976,
16,
3361,
3631,
14861,
67,
2139,
273,
315,
70,
2752,
1578,
7923,
8859,
18,
542,
67,
970,
... |
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return;\n") file.Write(" }\n") | def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") | 85c6d6739a81098c35cb35c3430f038ed4f5ddab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85c6d6739a81098c35cb35c3430f038ed4f5ddab/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
4354,
1085,
12,
2890,
16,
585,
4672,
3536,
83,
1107,
2794,
628,
5067,
12123,
585,
18,
3067,
2932,
225,
309,
6142,
87,
411,
374,
13,
18890,
82,
6,
738,
365,
18,
529,
13,
585,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
4354,
1085,
12,
2890,
16,
585,
4672,
3536,
83,
1107,
2794,
628,
5067,
12123,
585,
18,
3067,
2932,
225,
309,
6142,
87,
411,
374,
13,
18890,
82,
6,
738,
365,
18,
529,
13,
585,
18... | |
print "Could not connect to database: %s"%e | print "Database error: %s"%e | def lint_sql(self): if not fuglu.extensions.sql.ENABLED: print "Vacation requires the fuglu sql extension to be enabled" return False try: dbsession=fuglu.extensions.sql.get_session(self.config.get(self.section,'dbconnectstring')) bind=dbsession.get_bind(Vacation) bind.connect() except Exception,e: print "Could not connect to database: %s"%e return False return True | 625be998c0f2f44a38d5c1d262fbfb9ae2f9da91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10919/625be998c0f2f44a38d5c1d262fbfb9ae2f9da91/vacation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19477,
67,
4669,
12,
2890,
4672,
309,
486,
284,
637,
28832,
18,
9489,
18,
4669,
18,
13560,
30,
1172,
315,
58,
1077,
367,
4991,
326,
284,
637,
28832,
1847,
2710,
358,
506,
3696,
6,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19477,
67,
4669,
12,
2890,
4672,
309,
486,
284,
637,
28832,
18,
9489,
18,
4669,
18,
13560,
30,
1172,
315,
58,
1077,
367,
4991,
326,
284,
637,
28832,
1847,
2710,
358,
506,
3696,
6,
327,... |
missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] | if self.maybeMissingModules: maybe = self.maybeMissingModules else: maybe = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] | def reportMissing(self): missing = [name for name in self.missingModules if name not in MAYMISS_MODULES] missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] missing.sort() missingsub.sort() if missing: self.message("Warning: couldn't find the following modules:", 1) self.message(" " + ", ".join(missing)) if missingsub: self.message("Warning: couldn't find the following submodules " "(but it's probably OK since modulefinder can't distinguish " "between from \"module import submodule\" and " "\"from module import name\"):", 1) self.message(" " + ", ".join(missingsub)) | 74bdca8a207af74796b7e4a117886be92818f6cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/74bdca8a207af74796b7e4a117886be92818f6cb/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
4841,
12,
2890,
4672,
3315,
273,
306,
529,
364,
508,
316,
365,
18,
7337,
7782,
309,
508,
486,
316,
490,
5255,
7492,
1260,
67,
12194,
55,
65,
309,
365,
18,
19133,
4841,
7782,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
4841,
12,
2890,
4672,
3315,
273,
306,
529,
364,
508,
316,
365,
18,
7337,
7782,
309,
508,
486,
316,
490,
5255,
7492,
1260,
67,
12194,
55,
65,
309,
365,
18,
19133,
4841,
7782,
30,
... |
job.set_shell_command("examples/%s" % test) | job.set_shell_command(test) | def run_tests(): # # Run waf to make sure that everything is built, configured and ready to go # unless we are explicitly told not to. We want to be careful about causing # our users pain while waiting for extraneous stuff to compile and link, so # we allow users that know what they''re doing to not invoke waf at all. # if not options.nowaf: # # If the user is running the "kinds" or "list" options, there is an # implied dependency on the test-runner since we call that program # if those options are selected. We will exit after processing those # options, so if we see them, we can safely only build the test-runner. # # If the user has constrained us to running only a particular type of # file, we can only ask waf to build what we know will be necessary. # For example, if the user only wants to run BVT tests, we only have # to build the test-runner and can ignore all of the examples. # # If the user only wants to run a single example, then we can just build # that example. # # If there is no constraint, then we have to build everything since the # user wants to run everything. # if options.kinds or options.list or (len(options.constrain) and options.constrain in core_kinds): if sys.platform == "win32": waf_cmd = "waf --target=test-runner" else: waf_cmd = "./waf --target=test-runner" elif len(options.example): if sys.platform == "win32": waf_cmd = "waf --target=%s" % os.path.basename(options.example) else: waf_cmd = "./waf --target=%s" % os.path.basename(options.example) else: if sys.platform == "win32": waf_cmd = "waf" else: waf_cmd = "./waf" if options.verbose: print "Building: %s" % waf_cmd proc = subprocess.Popen(waf_cmd, shell = True) proc.communicate() if proc.returncode: print >> sys.stderr, "Waf died. Not running tests" return proc.returncode # # Pull some interesting configuration information out of waf, primarily # so we can know where executables can be found, but also to tell us what # pieces of the system have been built. This will tell us what examples # are runnable. # read_waf_active_variant() read_waf_config() make_paths() # # If lots of logging is enabled, we can crash Python when it tries to # save all of the text. We just don't allow logging to be turned on when # test.py runs. If you want to see logging output from your tests, you # have to run them using the test-runner directly. # os.environ["NS_LOG"] = "" # # There are a couple of options that imply we can to exit before starting # up a bunch of threads and running tests. Let's detect these cases and # handle them without doing all of the hard work. # if options.kinds: path_cmd = os.path.join("utils", "test-runner --kinds") (rc, standard_out, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) print standard_out if options.list: path_cmd = os.path.join("utils", "test-runner --list") (rc, standard_out, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) print standard_out if options.kinds or options.list: return # # We communicate results in two ways. First, a simple message relating # PASS, FAIL, CRASH or SKIP is always written to the standard output. It # is expected that this will be one of the main use cases. A developer can # just run test.py with no options and see that all of the tests still # pass. # # The second main use case is when detailed status is requested (with the # --text or --html options). Typicall this will be text if a developer # finds a problem, or HTML for nightly builds. In these cases, an # XML file is written containing the status messages from the test suites. # This file is then read and translated into text or HTML. It is expected # that nobody will really be interested in the XML, so we write it somewhere # with a unique name (time) to avoid collisions. In case an error happens, we # provide a runtime option to retain the temporary files. # # When we run examples as smoke tests, they are going to want to create # lots and lots of trace files. We aren't really interested in the contents # of the trace files, so we also just stash them off in the temporary dir. # The retain option also causes these unchecked trace files to be kept. # date_and_time = time.strftime("%Y-%m-%d-%H-%M-%S-CUT", time.gmtime()) if not os.path.exists(TMP_OUTPUT_DIR): os.makedirs(TMP_OUTPUT_DIR) testpy_output_dir = os.path.join(TMP_OUTPUT_DIR, date_and_time); if not os.path.exists(testpy_output_dir): os.makedirs(testpy_output_dir) # # Create the main output file and start filling it with XML. We need to # do this since the tests will just append individual results to this file. # xml_results_file = os.path.join(testpy_output_dir, "results.xml") f = open(xml_results_file, 'w') f.write('<?xml version="1.0"?>\n') f.write('<TestResults>\n') f.close() # # We need to figure out what test suites to execute. We are either given one # suite or example explicitly via the --suite or --example/--pyexample option, # or we need to call into the test runner and ask it to list all of the available # test suites. Further, we need to provide the constraint information if it # has been given to us. # # This translates into allowing the following options with respect to the # suites # # ./test,py: run all of the suites and examples # ./test.py --constrain=core: run all of the suites of all kinds # ./test.py --constrain=unit: run all unit suites # ./test,py --suite=some-test-suite: run a single suite # ./test,py --example=udp/udp-echo: run no test suites # ./test,py --pyexample=wireless/mixed-wireless.py: run no test suites # ./test,py --suite=some-suite --example=some-example: run the single suite # # We can also use the --constrain option to provide an ordering of test # execution quite easily. # if len(options.suite): suites = options.suite + "\n" elif len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain): path_cmd = os.path.join("utils", "test-runner --list --constrain=%s" % options.constrain) (rc, suites, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) else: path_cmd = os.path.join("utils", "test-runner --list") (rc, suites, standard_err, et) = run_job_synchronously(path_cmd, os.getcwd(), False, False) else: suites = "" # # suite_list will either a single test suite name that the user has # indicated she wants to run or a list of test suites provided by # the test-runner possibly according to user provided constraints. # We go through the trouble of setting up the parallel execution # even in the case of a single suite to avoid having two process the # results in two different places. # suite_list = suites.split('\n') # # We now have a possibly large number of test suites to run, so we want to # run them in parallel. We're going to spin up a number of worker threads # that will run our test jobs for us. # input_queue = Queue.Queue(0) output_queue = Queue.Queue(0) jobs = 0 threads=[] # # In Python 2.6 you can just use multiprocessing module, but we don't want # to introduce that dependency yet; so we jump through a few hoops. # processors = 1 if sys.platform != "win32": if 'SC_NPROCESSORS_ONLN'in os.sysconf_names: processors = os.sysconf('SC_NPROCESSORS_ONLN') else: proc = subprocess.Popen("sysctl -n hw.ncpu", shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout_results, stderr_results = proc.communicate() if len(stderr_results) == 0: processors = int(stdout_results) # # Now, spin up one thread per processor which will eventually mean one test # per processor running concurrently. # for i in range(processors): thread = worker_thread(input_queue, output_queue) threads.append(thread) thread.start() # # Keep track of some summary statistics # total_tests = 0 skipped_tests = 0 # # We now have worker threads spun up, and a list of work to do. So, run # through the list of test suites and dispatch a job to run each one. # # Dispatching will run with unlimited speed and the worker threads will # execute as fast as possible from the queue. # # Note that we actually dispatch tests to be skipped, so all of the # PASS, FAIL, CRASH and SKIP processing is done in the same place. # for test in suite_list: test = test.strip() if len(test): job = Job() job.set_is_example(False) job.set_is_pyexample(False) job.set_display_name(test) job.set_tmp_file_name(os.path.join(testpy_output_dir, "%s.xml" % test)) job.set_cwd(os.getcwd()) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) if (options.multiple): multiple = " --multiple" else: multiple = "" path_cmd = os.path.join("utils", "test-runner --suite=%s%s" % (test, multiple)) job.set_shell_command(path_cmd) if options.valgrind and test in core_valgrind_skip_tests: job.set_is_skip(True) # Skip tests that will fail if NSC is missing. if not NSC_ENABLED and test in core_nsc_missing_skip_tests: job.set_is_skip(True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # We've taken care of the discovered or specified test suites. Now we # have to deal with examples run as smoke tests. We have a list of all of # the example programs it makes sense to try and run. Each example will # have a condition associated with it that must evaluate to true for us # to try and execute it. This is used to determine if the example has # a dependency that is not satisfied. For example, if an example depends # on NSC being configured by waf, that example should have a condition # that evaluates to true if NSC is enabled. For example, # # ("tcp-nsc-zoo", "NSC_ENABLED == True"), # # In this case, the example "tcp-nsc-zoo" will only be run if we find the # waf configuration variable "NSC_ENABLED" to be True. # # We don't care at all how the trace files come out, so we just write them # to a single temporary directory. # # XXX As it stands, all of the trace files have unique names, and so file # collisions can only happen if two instances of an example are running in # two versions of the test.py process concurrently. We may want to create # uniquely named temporary traces directories to avoid this problem. # # We need to figure out what examples to execute. We are either given one # suite or example explicitly via the --suite or --example option, or we # need to walk the list of examples looking for available example # conditions. # # This translates into allowing the following options with respect to the # suites # # ./test,py: run all of the examples # ./test.py --constrain=unit run no examples # ./test.py --constrain=example run all of the examples # ./test.py --suite=some-test-suite: run no examples # ./test.py --example=some-example: run the single example # ./test.py --suite=some-suite --example=some-example: run the single example # # XXX could use constrain to separate out examples used for performance # testing # if len(options.suite) == 0 and len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain) == 0 or options.constrain == "example": if ENABLE_EXAMPLES: for test, do_run, do_valgrind_run in example_tests: if eval(do_run): job = Job() job.set_is_example(True) job.set_is_pyexample(False) job.set_display_name(test) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % test) if options.valgrind and not eval(do_valgrind_run): job.set_is_skip (True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 elif len(options.example): # # If you tell me to run an example, I will try and run the example # irrespective of any condition. # job = Job() job.set_is_example(True) job.set_is_pyexample(False) job.set_display_name(options.example) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % options.example) if options.verbose: print "Queue %s" % options.example input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # Run some Python examples as smoke tests. We have a list of all of # the example programs it makes sense to try and run. Each example will # have a condition associated with it that must evaluate to true for us # to try and execute it. This is used to determine if the example has # a dependency that is not satisfied. # # We don't care at all how the trace files come out, so we just write them # to a single temporary directory. # # We need to figure out what python examples to execute. We are either # given one pyexample explicitly via the --pyexample option, or we # need to walk the list of python examples # # This translates into allowing the following options with respect to the # suites # # ./test.py --constrain=pyexample run all of the python examples # ./test.py --pyexample=some-example.py: run the single python example # if len(options.suite) == 0 and len(options.example) == 0 and len(options.pyexample) == 0: if len(options.constrain) == 0 or options.constrain == "pyexample": if ENABLE_EXAMPLES: for test, do_run in python_tests: if eval(do_run): job = Job() job.set_is_example(False) job.set_is_pyexample(True) job.set_display_name(test) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % test) # # Python programs and valgrind do not work and play # well together, so we skip them under valgrind. # We go through the trouble of doing all of this # work to report the skipped tests in a consistent # way throught the output formatter. # if options.valgrind: job.set_is_skip (True) # # The user can disable python bindings, so we need # to pay attention to that and give some feedback # that we're not testing them # if not ENABLE_PYTHON_BINDINGS: job.set_is_skip (True) if options.verbose: print "Queue %s" % test input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 elif len(options.pyexample): # # If you tell me to run a python example, I will try and run the example # irrespective of any condition. # job = Job() job.set_is_pyexample(True) job.set_display_name(options.pyexample) job.set_tmp_file_name("") job.set_cwd(testpy_output_dir) job.set_basedir(os.getcwd()) job.set_tempdir(testpy_output_dir) job.set_shell_command("examples/%s" % options.pyexample) if options.verbose: print "Queue %s" % options.pyexample input_queue.put(job) jobs = jobs + 1 total_tests = total_tests + 1 # # Tell the worker threads to pack up and go home for the day. Each one # will exit when they see their is_break task. # for i in range(processors): job = Job() job.set_is_break(True) input_queue.put(job) # # Now all of the tests have been dispatched, so all we have to do here # in the main thread is to wait for them to complete. Keyboard interrupt # handling is broken as mentioned above. We use a signal handler to catch # sigint and set a global variable. When the worker threads sense this # they stop doing real work and will just start throwing jobs back at us # with is_break set to True. In this case, there are no real results so we # ignore them. If there are real results, we always print PASS or FAIL to # standard out as a quick indication of what happened. # passed_tests = 0 failed_tests = 0 crashed_tests = 0 valgrind_errors = 0 for i in range(jobs): job = output_queue.get() if job.is_break: continue if job.is_example or job.is_pyexample: kind = "Example" else: kind = "TestSuite" if job.is_skip: status = "SKIP" skipped_tests = skipped_tests + 1 else: if job.returncode == 0: status = "PASS" passed_tests = passed_tests + 1 elif job.returncode == 1: failed_tests = failed_tests + 1 status = "FAIL" elif job.returncode == 2: valgrind_errors = valgrind_errors + 1 status = "VALGR" else: crashed_tests = crashed_tests + 1 status = "CRASH" print "%s: %s %s" % (status, kind, job.display_name) if job.is_example or job.is_pyexample: # # Examples are the odd man out here. They are written without any # knowledge that they are going to be run as a test, so we need to # cook up some kind of output for them. We're writing an xml file, # so we do some simple XML that says we ran the example. # # XXX We could add some timing information to the examples, i.e. run # them through time and print the results here. # f = open(xml_results_file, 'a') f.write('<Example>\n') example_name = " <Name>%s</Name>\n" % job.display_name f.write(example_name) if status == "PASS": f.write(' <Result>PASS</Result>\n') elif status == "FAIL": f.write(' <Result>FAIL</Result>\n') elif status == "VALGR": f.write(' <Result>VALGR</Result>\n') elif status == "SKIP": f.write(' <Result>SKIP</Result>\n') else: f.write(' <Result>CRASH</Result>\n') f.write(' <ElapsedTime>%.3f</ElapsedTime>\n' % job.elapsed_time) f.write('</Example>\n') f.close() else: # # If we're not running an example, we're running a test suite. # These puppies are running concurrently and generating output # that was written to a temporary file to avoid collisions. # # Now that we are executing sequentially in the main thread, we can # concatenate the contents of the associated temp file to the main # results file and remove that temp file. # # One thing to consider is that a test suite can crash just as # well as any other program, so we need to deal with that # possibility as well. If it ran correctly it will return 0 # if it passed, or 1 if it failed. In this case, we can count # on the results file it saved being complete. If it crashed, it # will return some other code, and the file should be considered # corrupt and useless. If the suite didn't create any XML, then # we're going to have to do it ourselves. # # Another issue is how to deal with a valgrind error. If we run # a test suite under valgrind and it passes, we will get a return # code of 0 and there will be a valid xml results file since the code # ran to completion. If we get a return code of 1 under valgrind, # the test case failed, but valgrind did not find any problems so the # test case return code was passed through. We will have a valid xml # results file here as well since the test suite ran. If we see a # return code of 2, this means that valgrind found an error (we asked # it to return 2 if it found a problem in run_job_synchronously) but # the suite ran to completion so there is a valid xml results file. # If the suite crashes under valgrind we will see some other error # return code (like 139). If valgrind finds an illegal instruction or # some other strange problem, it will die with its own strange return # code (like 132). However, if the test crashes by itself, not under # valgrind we will also see some other return code. # # If the return code is 0, 1, or 2, we have a valid xml file. If we # get another return code, we have no xml and we can't really say what # happened -- maybe the TestSuite crashed, maybe valgrind crashed due # to an illegal instruction. If we get something beside 0-2, we assume # a crash and fake up an xml entry. After this is all done, we still # need to indicate a valgrind error somehow, so we fake up an xml entry # with a VALGR result. Thus, in the case of a working TestSuite that # fails valgrind, we'll see the PASS entry for the working TestSuite # followed by a VALGR failing test suite of the same name. # if job.is_skip: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>SKIP</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() else: if job.returncode == 0 or job.returncode == 1 or job.returncode == 2: f_to = open(xml_results_file, 'a') f_from = open(job.tmp_file_name) f_to.write(f_from.read()) f_to.close() f_from.close() else: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>CRASH</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() if job.returncode == 2: f = open(xml_results_file, 'a') f.write("<TestSuite>\n") f.write(" <SuiteName>%s</SuiteName>\n" % job.display_name) f.write(' <SuiteResult>VALGR</SuiteResult>\n') f.write(' <SuiteTime>Execution times not available</SuiteTime>\n') f.write("</TestSuite>\n") f.close() # # We have all of the tests run and the results written out. One final # bit of housekeeping is to wait for all of the threads to close down # so we can exit gracefully. # for thread in threads: thread.join() # # Back at the beginning of time, we started the body of an XML document # since the test suites and examples were going to just write their # individual pieces. So, we need to finish off and close out the XML # document # f = open(xml_results_file, 'a') f.write('</TestResults>\n') f.close() # # Print a quick summary of events # print "%d of %d tests passed (%d passed, %d skipped, %d failed, %d crashed, %d valgrind errors)" % (passed_tests, total_tests, passed_tests, skipped_tests, failed_tests, crashed_tests, valgrind_errors) # # The last things to do are to translate the XML results file to "human # readable form" if the user asked for it (or make an XML file somewhere) # if len(options.html): translate_to_html(xml_results_file, options.html) if len(options.text): translate_to_text(xml_results_file, options.text) if len(options.xml): shutil.copyfile(xml_results_file, options.xml) # # If we have been asked to retain all of the little temporary files, we # don't delete tm. If we do delete the temporary files, delete only the # directory we just created. We don't want to happily delete any retained # directories, which will probably surprise the user. # if not options.retain: shutil.rmtree(testpy_output_dir) if passed_tests + skipped_tests == total_tests: return 0 # success else: return 1 # catchall for general errors | c925b2a08945bb817c600805907ee7e110c7a67a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11087/c925b2a08945bb817c600805907ee7e110c7a67a/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
13332,
468,
468,
1939,
24103,
358,
1221,
3071,
716,
7756,
353,
6650,
16,
4351,
471,
5695,
358,
1960,
468,
3308,
732,
854,
8122,
268,
1673,
486,
358,
18,
225,
1660,
2545,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
13332,
468,
468,
1939,
24103,
358,
1221,
3071,
716,
7756,
353,
6650,
16,
4351,
471,
5695,
358,
1960,
468,
3308,
732,
854,
8122,
268,
1673,
486,
358,
18,
225,
1660,
2545,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.