rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
class TestSimpleArguments(unittest.TestCase): | class PyOCTestSimpleArguments(unittest.TestCase): | def testStruct2(self): obj = OC_TestClass1.new() | def93b98370bd91eae6e886165b0b22301601773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/def93b98370bd91eae6e886165b0b22301601773/test_methods.py |
class TestByReferenceArguments(unittest.TestCase): | class PyOCTestByReferenceArguments(unittest.TestCase): | def testStruct2(self): self.assertEquals(self.obj.dummy2Arg_(((1,2,3,4),)), ((8,6,4,2),)) | def93b98370bd91eae6e886165b0b22301601773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/def93b98370bd91eae6e886165b0b22301601773/test_methods.py |
class TestDecimalNumber (unittest.TestCase): | if isinstance(NSDecimalNumber.decimalNumberWithString_(u'1.00'), NSDecimalNumber): class TestDecimalNumber (unittest.TestCase): | def testPropertyList2(self): d = NSMutableDictionary.dictionary() | 7aa9a57443b831e66a432d2c94c08fa35f0dad97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7aa9a57443b831e66a432d2c94c08fa35f0dad97/test_nsnumber.py |
def testPropertyList2(self): d = NSMutableDictionary.dictionary() | 7aa9a57443b831e66a432d2c94c08fa35f0dad97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7aa9a57443b831e66a432d2c94c08fa35f0dad97/test_nsnumber.py | ||
def testProxy (self): o = NSDecimalNumber.decimalNumberWithString_(u"1.00") | def testProxy (self): o = NSDecimalNumber.decimalNumberWithString_(u"1.00") self.assert_(isinstance(o, NSDecimalNumber)) | def testProxy (self): o = NSDecimalNumber.decimalNumberWithString_(u"1.00") | 7aa9a57443b831e66a432d2c94c08fa35f0dad97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7aa9a57443b831e66a432d2c94c08fa35f0dad97/test_nsnumber.py |
self.assert_(isinstance(o, NSDecimalNumber)) | else: class TestDecimalNumber (unittest.TestCase): def testProxy (self): o = NSDecimalNumber.decimalNumberWithString_(u"1.00") self.assert_(isinstance(o, NSDecimal)) | def testProxy (self): o = NSDecimalNumber.decimalNumberWithString_(u"1.00") | 7aa9a57443b831e66a432d2c94c08fa35f0dad97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7aa9a57443b831e66a432d2c94c08fa35f0dad97/test_nsnumber.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
'%(varname)s', | '&%(varname)s', | def is_id(typestr): # Remove protocol 'declarations' (id <NSObject, NSString>) typestr = PROT_MATCHER.sub('', typestr).strip() if typestr == 'id': return 1 elif typestr[-1] != '*': return 0 try: objc.lookup_class(typestr[:-1]) return 1 except: return 0 | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
fp.write('\t{ "%(funcname)s", (PyCFunction)objc_%(funcname)s, METH_VARARGS, "%(funcproto)s" }, \\\n'%{'funcname':f[0], 'funcproto':f[1]}) | fp.write('\t{ "%(funcname)s", (PyCFunction)objc_%(funcname)s, METH_VARARGS|METH_KEYWORDS, "%(funcproto)s" }, \\\n'%{'funcname':f[0], 'funcproto':f[1]}) | def process_list(fp, lst): ok_count = 0 total_count = 0 funcs=[] fp.write(HDR) for l in lst: l = l.strip() if not l: continue if l[0] == '#': continue total_count += 1 try: sys.stderr.write("Converting '%s' ..."%l.strip()) sys.stderr.flush() funcs.append((process_function(fp, l), l)) sys.stderr.write("done\n") sys.s... | b2c37de87bd0f66cb5d8dfba455a70e2b771594a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2c37de87bd0f66cb5d8dfba455a70e2b771594a/func_builder.py |
executable=${execdir}/%(executable)s | executable="${execdir}/%(executable)s" | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | 0b5ef2f26e09de401d744501c30edbc3f1ffd0d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/0b5ef2f26e09de401d744501c30edbc3f1ffd0d8/bundlebuilder.py |
main=${resdir}/%(mainprogram)s PYTHONPATH=$resdir | main="${resdir}/%(mainprogram)s" PYTHONPATH="$resdir" | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | 0b5ef2f26e09de401d744501c30edbc3f1ffd0d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/0b5ef2f26e09de401d744501c30edbc3f1ffd0d8/bundlebuilder.py |
) CONVENIENCE_METHODS['removeObject:'] = ( ('remove', lambda self, elem: self.removeObject_(container_wrap(elem))), | def popitem_setObject_forKey_(self): try: k = self[iter(self).next()] except StopIteration: raise KeyError, "popitem on an empty %s" % (type(self).__name__,) else: return (k, self[k]) | 4d2a2dbf96704151bd5145bda00bc640894e5a62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/4d2a2dbf96704151bd5145bda00bc640894e5a62/_convenience.py | |
module = __import__(modName) | try: module = __import__(modName) except ImportError, msg: print "SKIP %s: %s"%(modName, msg) continue | def importExternalTestCases(pathPattern="test_*.py", root=".", package=None): """ Import all unittests in the PyObjC tree starting at 'root' """ testFiles = recursiveGlob(root, pathPattern) testModules = map(lambda x:x[len(root)+1:-3].replace('/', '.'), testFiles) if package is not None: testModules = [(package + '.' ... | c7a3ef46174a0d7c40995ec52d364bb4d93cd945 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7a3ef46174a0d7c40995ec52d364bb4d93cd945/di_test.py |
if not os.path.isdir(self.build_dir): self.warn("'%s' does not exist -- cannot test" % self.build_dir) return | def test (self): if not os.path.isdir(self.build_dir): self.warn("'%s' does not exist -- cannot test" % self.build_dir) return | c7a3ef46174a0d7c40995ec52d364bb4d93cd945 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7a3ef46174a0d7c40995ec52d364bb4d93cd945/di_test.py | |
print 'checking', theURL, cachePolicy, timeoutInterval | def initWithURL_cachePolicy_timeoutInterval_(self, theURL, cachePolicy, timeoutInterval): print 'checking', theURL, cachePolicy, timeoutInterval try: theURL = idnSnitch.checkURL_(theURL) except Exception, e: import traceback traceback.print_exc() NSLog(u"%s: %s" % (e.__class__.__name__, e)) print 'checked' self.retain(... | d9e130d721326e358687bd829eb90677cce4d37a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d9e130d721326e358687bd829eb90677cce4d37a/IDNSnitchPlugin.py | |
print 'checked' | def initWithURL_cachePolicy_timeoutInterval_(self, theURL, cachePolicy, timeoutInterval): print 'checking', theURL, cachePolicy, timeoutInterval try: theURL = idnSnitch.checkURL_(theURL) except Exception, e: import traceback traceback.print_exc() NSLog(u"%s: %s" % (e.__class__.__name__, e)) print 'checked' self.retain(... | d9e130d721326e358687bd829eb90677cce4d37a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d9e130d721326e358687bd829eb90677cce4d37a/IDNSnitchPlugin.py | |
print 'got res' | def initWithURL_cachePolicy_timeoutInterval_(self, theURL, cachePolicy, timeoutInterval): print 'checking', theURL, cachePolicy, timeoutInterval try: theURL = idnSnitch.checkURL_(theURL) except Exception, e: import traceback traceback.print_exc() NSLog(u"%s: %s" % (e.__class__.__name__, e)) print 'checked' self.retain(... | d9e130d721326e358687bd829eb90677cce4d37a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d9e130d721326e358687bd829eb90677cce4d37a/IDNSnitchPlugin.py | |
print 'checkURL', self, anURL | def checkURL_(self, anURL): print 'checkURL', self, anURL if anURL is None: return anURL host = anURL.host() if host is None: return anURL if encodings.idna.uace_prefix in host: uni = u'.'.join([encodings.idna.ToUnicode(part) for part in host.split(u'.')]) shouldDeny = self.HOSTS.get(uni) if shouldDeny is None: res = [... | d9e130d721326e358687bd829eb90677cce4d37a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d9e130d721326e358687bd829eb90677cce4d37a/IDNSnitchPlugin.py | |
print "*** Restored handlers and resignaling." % signum | print "*** Restored handlers and resignaling." | def dumpHandler(signum, frame): resetFatalSignals() print "*** Handling fatal signal '%d'." % signum traceback.print_stack(frame) print "*** Restored handlers and resignaling." % signum os.kill(os.getpid(), signum) | b49548bfd577c10bca020f803e64624ee48b2ad1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b49548bfd577c10bca020f803e64624ee48b2ad1/Signals.py |
self.assertEquals("'rtfx'", Foundation.NSFileTypeForHFSTypeCode(fourchar)) | if sys.byteorder == 'little': self.assertEquals("'xftr'", Foundation.NSFileTypeForHFSTypeCode(fourchar)) else: self.assertEquals("'rtfx'", Foundation.NSFileTypeForHFSTypeCode(fourchar)) | def testNSFileTypeForHFSTypeCode(self): self.assertEquals("'rtfx'", Foundation.NSFileTypeForHFSTypeCode('rtfx')) | 19e09053c1c5fdb236d13f953bd9ba8d647f5935 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/19e09053c1c5fdb236d13f953bd9ba8d647f5935/test_globals.py |
- Attribute or accessor 'key' | - Accessor or attribute 'key' - Accessor or attribute 'isKey' | def getKey(obj, key): """ Get the attribute referenced by 'key'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accesors at tried (in this order): - Accessor 'getKey' - Accesoor 'get_key' - Attribute or accessor 'key' - Attribute '_key' If none of these e... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
m = getattr(obj, "get" + key.capitalize()) | m = getattr(obj, "get" + keyCaps(key)) | def getKey(obj, key): """ Get the attribute referenced by 'key'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accesors at tried (in this order): - Accessor 'getKey' - Accesoor 'get_key' - Attribute or accessor 'key' - Attribute '_key' If none of these e... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
try: m = getattr(obj, key) if isinstance(m, types.MethodType): if m.im_self is obj: return m() else: return m | for keyName in (key, "is" + keyCaps(key)): try: m = getattr(obj, keyName) except AttributeError: continue if isinstance(m, types.MethodType) and m.im_self is obj: return m() | def getKey(obj, key): """ Get the attribute referenced by 'key'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accesors at tried (in this order): - Accessor 'getKey' - Accesoor 'get_key' - Attribute or accessor 'key' - Attribute '_key' If none of these e... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
elif isinstance(m, objc.selector): if m.self is obj: return m() else: return m | elif isinstance(m, objc.selector) and m.self is obj: return m() | def getKey(obj, key): """ Get the attribute referenced by 'key'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accesors at tried (in this order): - Accessor 'getKey' - Accesoor 'get_key' - Attribute or accessor 'key' - Attribute '_key' If none of these e... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
except AttributeError: pass try: m = getattr(obj, "_" + key) if isinstance(m, types.MethodType): return m() else: return m except AttributeError: pass raise KeyError, "Key %s does not exist"%(key,) | try: return getattr(obj, "_" + key) except AttributeError: raise KeyError, "Key %s does not exist" % (key,) | def getKey(obj, key): """ Get the attribute referenced by 'key'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accesors at tried (in this order): - Accessor 'getKey' - Accesoor 'get_key' - Attribute or accessor 'key' - Attribute '_key' If none of these e... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
return getattr(obj, SETVALUEFORKEY)(value, key) | getattr(obj, SETVALUEFORKEY)(value, key) return | def setKey(obj, key, value): """ Set the attribute referenced by 'key' to 'value'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accessors are tried (in this order): - Accessor 'setKey' - Accessor 'set_key' - Attribute '_key' - Attribute 'key' Raises Key... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
try: m = getattr(obj, 'set' + key.capitalize()) except AttributeError: pass else: m(value) return try: m = getattr(obj, 'set_' + key) except AttributeError: pass else: m(value) return | aBase = 'set' + keyCaps(key) for accessor in (aBase + '_', aBase, 'set_' + key): m = getattr(obj, accessor, None) if m is None: continue try: m(value) return except TypeError: pass | def setKey(obj, key, value): """ Set the attribute referenced by 'key' to 'value'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accessors are tried (in this order): - Accessor 'setKey' - Accessor 'set_key' - Attribute '_key' - Attribute 'key' Raises Key... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
raise KeyError, "Key %s does not exist"%(key,) | raise KeyError, "Key %s does not exist" % (key,) | def setKey(obj, key, value): """ Set the attribute referenced by 'key' to 'value'. The key is used to build the name of an attribute, or attribute accessor method. The following attributes and accessors are tried (in this order): - Accessor 'setKey' - Accessor 'set_key' - Attribute '_key' - Attribute 'key' Raises Key... | e808afc7ac40d95aaff525d3e72de4a88db1e9a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e808afc7ac40d95aaff525d3e72de4a88db1e9a4/KeyValueCoding.py |
return nil | return None | def dataRepresentationOfType_(self, aType): # return an NSData containing the document's data represented as # the type identified by aType. return nil | a8b9fca7c1319753dc78d8b4e4c4da056e6b9031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a8b9fca7c1319753dc78d8b4e4c4da056e6b9031/MyDocument.py |
import traceback | def unexpectedErrorAlert(): import traceback exceptionInfo = traceback.format_exception_only( *sys.exc_info()[:2])[0].strip() return NSRunAlertPanel("An unexpected error has occurred", "(%s)" % exceptionInfo, "Continue", "Quit", None) | 7cd2adf8848c8e880f391db3d9556643c3a107ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7cd2adf8848c8e880f391db3d9556643c3a107ae/AppHelper.py | |
tag = 0 | self._tag = 0 | def init(self): self = super(ProgressCell, self).init() if self is None: return None | 82ef1db3d518545b9f8de5df8d0363118ecc5ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/82ef1db3d518545b9f8de5df8d0363118ecc5ae0/ProgressCell.py |
cellFrame, controlView) | cellFrame, view) | def drawInteriorWithFrame_inView_(self, cellFrame, view): super(ProgressCell, self).drawInteriorWithFrame_inView_( cellFrame, controlView) self.setControlView_(view) NSColor.controlColor().set() NSRectFill(cellFrame) | 82ef1db3d518545b9f8de5df8d0363118ecc5ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/82ef1db3d518545b9f8de5df8d0363118ecc5ae0/ProgressCell.py |
"-DPYOBJC_NEW_INITIALIZER_PATTERN", | def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path.... | 345c879878d178467d4339e137e614cd4e070ab4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/345c879878d178467d4339e137e614cd4e070ab4/setup.py | |
'-framework', 'Foundation', | '-framework', 'Foundation', | def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path.... | 345c879878d178467d4339e137e614cd4e070ab4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/345c879878d178467d4339e137e614cd4e070ab4/setup.py |
def testObserving(self): observer = PyObjCTestObserver.alloc().init() | 91e800c4e7dc7ef4677862ed4bf0aee206483750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/91e800c4e7dc7ef4677862ed4bf0aee206483750/test_keyvalue.py | ||
runtasks("Generating wrappers & stubs", [sys.executable, "Scripts/CodeGenerators/cocoa_generator.py"]) | def run(self): # Save self.compiler, we need to reset it when we have to rebuild # the extensions. compiler_saved = self.compiler | 324dfa4d312ecf60c58c3e9f6284ca9109151dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/324dfa4d312ecf60c58c3e9f6284ca9109151dab/di_build_ext.py | |
execdir=$(dirname ${0}) | execdir=$(dirname "${0}") | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d/bundlebuilder.py |
resdir=$(dirname ${execdir})/Resources | resdir=$(dirname "${execdir}")/Resources | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d/bundlebuilder.py |
exec ${executable} ${main} ${1} | exec "${executable}" "${main}" "${1}" | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d/bundlebuilder.py |
--iconfile=FILE filename of the icon (an .icns file) to be used | --iconfile=FILE filename of the icon (an .icns file) to be used | def pathjoin(*args): """Safe wrapper for os.path.join: asserts that all but the first argument are relative paths.""" for seg in args[1:]: assert seg[0] != "/" return os.path.join(*args) | a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a7da9cfb2ab27e6377c657ebdfc60516d6c1dd7d/bundlebuilder.py |
os.environ['DYLD_BIND_AT_LAUNCH'] = '1' | def runTestCase(self): os.environ['DYLD_BIND_AT_LAUNCH'] = '1' fp = os.popen('/tmp/test.bin', 'r') del os.environ['DYLD_BIND_AT_LAUNCH'] data = fp.read() xit = fp.close() if xit != None: self.fail("Running failed[%s]"%(xit,)) return data | 4a12c9814f2002d2d55207d66cb9c82e2048b8a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/4a12c9814f2002d2d55207d66cb9c82e2048b8a0/dejagnu.py | |
del os.environ['DYLD_BIND_AT_LAUNCH'] | def runTestCase(self): os.environ['DYLD_BIND_AT_LAUNCH'] = '1' fp = os.popen('/tmp/test.bin', 'r') del os.environ['DYLD_BIND_AT_LAUNCH'] data = fp.read() xit = fp.close() if xit != None: self.fail("Running failed[%s]"%(xit,)) return data | 4a12c9814f2002d2d55207d66cb9c82e2048b8a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/4a12c9814f2002d2d55207d66cb9c82e2048b8a0/dejagnu.py | |
if convertedValue: | if convertedValue is not None: | def propertyListFromPythonCollection(aPyCollection, conversionHelper=None): """Convert a Python collection (dictionary, array, tuple, string) into an Objective-C collection. If conversionHelper is defined, it must be a callable. It will be called for any object encountered for which propertyListFromPythonCollection()... | 0292776592617d8ffea5a2b4dccff0d4e6fe0519 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/0292776592617d8ffea5a2b4dccff0d4e6fe0519/Conversion.py |
if convertedValue: | if convertedValue is not None: | def propertyListFromPythonCollection(aPyCollection, conversionHelper=None): """Convert a Python collection (dictionary, array, tuple, string) into an Objective-C collection. If conversionHelper is defined, it must be a callable. It will be called for any object encountered for which propertyListFromPythonCollection()... | 0292776592617d8ffea5a2b4dccff0d4e6fe0519 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/0292776592617d8ffea5a2b4dccff0d4e6fe0519/Conversion.py |
os.unlink(os.path.join(self.build_lib, '_AppKit.so')) | os.unlink(os.path.join(self.build_lib, 'AppKit', '_AppKit.so')) | def run(self): task_build_libffi() | 710471d490bd4ab7027fbdcd727351f5e3a3dd03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/710471d490bd4ab7027fbdcd727351f5e3a3dd03/setup.py |
os.unlink(os.path.join(self.build_lib, '_Foundation.so')) | os.unlink(os.path.join(self.build_lib, 'Foundation', '_Foundation.so')) | def run(self): task_build_libffi() | 710471d490bd4ab7027fbdcd727351f5e3a3dd03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/710471d490bd4ab7027fbdcd727351f5e3a3dd03/setup.py |
if HAS_KVO and '__useKVO__' not in type_dict: if not ( 'willChangeValueForKey_' in type_dict or 'didChangeValueForKey_' in type_dict): useKVO = issubclass(super_class, NSObject) type_dict['__useKVO__'] = useKVO if useKVO and HAS_PANTHER_KVO: type_dict['__pyobjc_kvo_stack__'] = ivar('__pyobjc_kvo_stack__') | if (HAS_KVO and '__useKVO__' not in type_dict and isNative(type_dict.get('willChangeValueForKey_')) and isNative(type_dict.get('didChangeValueForKey_'))): useKVO = issubclass(super_class, NSObject) type_dict['__useKVO__'] = useKVO | def bundleForClass(cls): return cb | 66be55a6c453a9aaced217f79f9ceeb46884fd44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/66be55a6c453a9aaced217f79f9ceeb46884fd44/_convenience.py |
def init(self): self = super(PyObjCDebuggingDelegate, self).init() self.setVerbosity_(DEFAULTVERBOSITY) return self | verbosity = objc.ivar('verbosity', 'i') | def init(self): self = super(PyObjCDebuggingDelegate, self).init() self.setVerbosity_(DEFAULTVERBOSITY) return self | 3dbe5364d1bb1b6f13a97c06192827e669a7ff2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3dbe5364d1bb1b6f13a97c06192827e669a7ff2f/Debugging.py |
self.setVerbosity_(verbosity) | self.verbosity = verbosity | def initWithVerbosity_(self, verbosity): self = self.init() self.setVerbosity_(verbosity) return self | 3dbe5364d1bb1b6f13a97c06192827e669a7ff2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3dbe5364d1bb1b6f13a97c06192827e669a7ff2f/Debugging.py |
def setVerbosity_(self, verbosity): self._verbosity = verbosity def verbosity(self): return self._verbosity | def initWithVerbosity_(self, verbosity): self = self.init() self.setVerbosity_(verbosity) return self | 3dbe5364d1bb1b6f13a97c06192827e669a7ff2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3dbe5364d1bb1b6f13a97c06192827e669a7ff2f/Debugging.py | |
if self.verbosity() & LOGSTACKTRACE: | if self.verbosity & LOGSTACKTRACE: | def exceptionHandler_shouldLogException_mask_(self, sender, exception, aMask): try: if isPythonException(exception): if self.verbosity() & LOGSTACKTRACE: nsLogObjCException(exception) return nsLogPythonException(exception) elif self.verbosity() & LOGSTACKTRACE: return nsLogObjCException(exception) else: return False ex... | 3dbe5364d1bb1b6f13a97c06192827e669a7ff2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3dbe5364d1bb1b6f13a97c06192827e669a7ff2f/Debugging.py |
elif self.verbosity() & LOGSTACKTRACE: | elif self.verbosity & LOGSTACKTRACE: | def exceptionHandler_shouldLogException_mask_(self, sender, exception, aMask): try: if isPythonException(exception): if self.verbosity() & LOGSTACKTRACE: nsLogObjCException(exception) return nsLogPythonException(exception) elif self.verbosity() & LOGSTACKTRACE: return nsLogObjCException(exception) else: return False ex... | 3dbe5364d1bb1b6f13a97c06192827e669a7ff2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3dbe5364d1bb1b6f13a97c06192827e669a7ff2f/Debugging.py |
for key in graphic.class__.keysForNonBoundsProperties(): | for key in graphic.class__().keysForNonBoundsProperties(): | def stopObservingGraphics_(self, graphics): if graphics is None: return for graphic in graphics: for key in graphic.class__.keysForNonBoundsProperties(): graphic.removeObserver_forKeyPath_(self, key) graphic.removeObserver_forKeyPath_(self, u"drawingBounds") | a90b35f6b1b7192946c90328f04a5718afe647b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a90b35f6b1b7192946c90328f04a5718afe647b3/GraphicsView.py |
for obj in [ ['a',], 'hello', 2, ]: self.assertEquals(repr(obj), PyObjC_TestClass4.fetchObjectDescription_(obj)) | TESTS = ['a'], 'hello', 2 EXPECTS = u'(a)', u'hello', u'2' for obj,expect in zip(TESTS, EXPECTS): self.assertEquals(expect, PyObjC_TestClass4.fetchObjectDescription_(obj)) | def testSimple(self): for obj in [ ['a',], 'hello', 2, ]: self.assertEquals(repr(obj), PyObjC_TestClass4.fetchObjectDescription_(obj)) | 2639bdc8668c390e11a27518df975537da051579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/2639bdc8668c390e11a27518df975537da051579/test_objc.py |
if minArgs == maxArgs: | if selArgs == 3 and (minArgs <= 2 <= maxArgs) and funcName.startswith('validate') and funcName.endswith('_error_'): return selector(func, signature='c@:N^@o^@') elif minArgs == maxArgs: | def accessor(func, typeSignature='@'): """ Return an Objective-C method object that is conformant with key-value coding and key-value observing. """ from inspect import getargspec args, varargs, varkw, defaults = getargspec(func) funcName = func.__name__ maxArgs = len(args) minArgs = maxArgs - len(defaults or ()) # im... | dd018e0251de8859ec3bd93814376d2f3ef1bd4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/dd018e0251de8859ec3bd93814376d2f3ef1bd4c/_descriptors.py |
elif funcName.startswith('validate') and funcName.endswith('_error_'): return selector(func, signature='c@:N^@o^@') | def accessor(func, typeSignature='@'): """ Return an Objective-C method object that is conformant with key-value coding and key-value observing. """ from inspect import getargspec args, varargs, varkw, defaults = getargspec(func) funcName = func.__name__ maxArgs = len(args) minArgs = maxArgs - len(defaults or ()) # im... | dd018e0251de8859ec3bd93814376d2f3ef1bd4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/dd018e0251de8859ec3bd93814376d2f3ef1bd4c/_descriptors.py | |
if k in ('__doc__', '__slots__', '__bases__', '__module__'): continue | def add_convenience_methods(super_class, name, type_dict): """ Add additional methods to the type-dict of subclass 'name' of 'super_class'. CONVENIENCE_METHODS is a global variable containing a mapping from an Objective-C selector to a Python method name and implementation. CLASS_METHODS is a global variable containi... | b2f67c4a18703b5ad9d4f48b022462e0cff995c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b2f67c4a18703b5ad9d4f48b022462e0cff995c1/_convenience.py | |
makeDir(basedir, 'Library', 'Developer', 'ProjectBuilder Extras', 'Project Templates', 'Application') templateDestination = os.path.join(basedir, 'Library', 'Developer', 'ProjectBuilder Extras', | makeDir(basedir, 'Developer', 'ProjectBuilder Extras', 'Project Templates', 'Application') templateDestination = os.path.join(basedir, 'Developer', 'ProjectBuilder Extras', | def killNasties(irrelevant, dirName, names): for aName in names: if aName in nastyFiles: os.remove( os.path.join(dirName, aName) ) if dirName.find(".pbproj") > 0: for aName in names: if aName.find(".pbxuser") > 0: os.remove( os.path.join(dirName, aName) ) if dirName[-3:] == 'CVS': while len(names): del names[0] shutil.... | 9061b5face51e675298118e6ab98e199b99ee1f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9061b5face51e675298118e6ab98e199b99ee1f3/make_distrib.py |
makeDir(basedir, 'Library', 'Developer', 'ProjectBuilder Extras') pbxSpecificationsDestination = os.path.join(basedir, 'Library', 'Developer', 'ProjectBuilder Extras', 'Specifications') | makeDir(basedir, 'Developer', 'ProjectBuilder Extras') pbxSpecificationsDestination = os.path.join(basedir, 'Developer', 'ProjectBuilder Extras', 'Specifications') | def killNasties(irrelevant, dirName, names): for aName in names: if aName in nastyFiles: os.remove( os.path.join(dirName, aName) ) if dirName.find(".pbproj") > 0: for aName in names: if aName.find(".pbxuser") > 0: os.remove( os.path.join(dirName, aName) ) if dirName[-3:] == 'CVS': while len(names): del names[0] shutil.... | 9061b5face51e675298118e6ab98e199b99ee1f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9061b5face51e675298118e6ab98e199b99ee1f3/make_distrib.py |
base, ext = os.path.splitext(fn) | ext = os.path.splitext(fn)[1] | def _xcodeFiles(base): for fn in os.listdir(base): base, ext = os.path.splitext(fn) if ext == '.xcode': yield XCODE_20, os.path.join(base, fn, 'project.pbxproj') elif ext == '.xcodeproj': yield XCODE_21, os.path.join(base, fn, 'project.pbxproj') | 70229f6e2050aab7e19460648ab83d8b08e3b9d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/70229f6e2050aab7e19460648ab83d8b08e3b9d5/ArchiveGraph.py |
('__setattr__', lambda self, name, value: self.setValue_forKey_(name, value)), | ('__setattr__', lambda self, name, value: self.setValue_forKey_(value, name)), | def NSMutableData__setitem__(self, item, value): self.mutableBytes()[item] = value | e64f3ad5a7d6d992702cb434d81f790acc8cc9fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e64f3ad5a7d6d992702cb434d81f790acc8cc9fb/_convenience.py |
%(EOL)s | typedef baz wibble fun* SomethingGreat; | 18971f01826df49c4480694e4ac55453ed4ecf8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/18971f01826df49c4480694e4ac55453ed4ecf8d/tokenize_header.py | |
ignore_files=[]) | ignore_files=[], emit_imports=0, emit_footer=0) enum_generator.generate( DISCRECORDING2_HDRS, 'build/codegen/_DiscRecording2_Enum.inc', ignore_files=[], emit_imports=0, emit_footer=0, emit_header=0) enum_generator.generate( DISCRECORDING3_HDRS, 'build/codegen/_DiscRecording3_Enum.inc', ignore_files=[], emit_imports=0, ... | fd.write('typedef void* PYOBJC_VOIDPTR;\n') | cf6bd0822a967ae34ef4c558ae6f07f121d98747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cf6bd0822a967ae34ef4c558ae6f07f121d98747/cocoa_generator.py |
ignore=()) | ignore=(), emit_footer=0) strconst_generator.generate(DISCRECORDING2_HDRS, 'build/codegen/_DiscRecording2_Str.inc', ignore=(), emit_footer=0, emit_header=0) strconst_generator.generate(DISCRECORDING3_HDRS, 'build/codegen/_DiscRecording3_Str.inc', ignore=(), emit_header=0) | fd.write('typedef void* PYOBJC_VOIDPTR;\n') | cf6bd0822a967ae34ef4c558ae6f07f121d98747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cf6bd0822a967ae34ef4c558ae6f07f121d98747/cocoa_generator.py |
url = NSURL.fileURLWithPath_(__file__) | filePath = __file__ if filePath[-1] == 'c': filePath = filePath[:-1] url = NSURL.fileURLWithPath_(filePath) | def testInitWithURL(self): url = NSURL.fileURLWithPath_(__file__) | 873d3791f60f205e9baa50d4c898050fd5f1dc16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/873d3791f60f205e9baa50d4c898050fd5f1dc16/test_nsattributedstring.py |
self.assertEquals(strval.string(), open(__file__, 'rb').read()) | self.assertEquals(strval.string(), open(filePath, 'rb').read()) | def testInitWithURL(self): url = NSURL.fileURLWithPath_(__file__) | 873d3791f60f205e9baa50d4c898050fd5f1dc16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/873d3791f60f205e9baa50d4c898050fd5f1dc16/test_nsattributedstring.py |
while (nextObject is not None): | while nextObject is not None: | def enumeratorGenerator(anEnumerator): nextObject = anEnumerator.nextObject() while (nextObject is not None): yield nextObject nextObject = anEnumerator.nextObject() | 7f298e9a1551402e57d386536db06979a50cf10f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7f298e9a1551402e57d386536db06979a50cf10f/_convenience.py |
if self.nibname is None: raise bundlebuilder.BundleBuilderError, ("must specify 'nibname'" " when building a plugin bundle") | def setup(self): | cc0c2c27f3f6f2c57e7d1b53d20b45049281099b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cc0c2c27f3f6f2c57e7d1b53d20b45049281099b/pluginbuilder.py | |
if self.nibname: | if self.nibname is not None: | def setup(self): | cc0c2c27f3f6f2c57e7d1b53d20b45049281099b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cc0c2c27f3f6f2c57e7d1b53d20b45049281099b/pluginbuilder.py |
if not hasattr(self.plist, "NSPrincipalClass"): if self.principalClass is None: raise bundlebuilder.BundleBuilderError, ( "must specify 'principalClass' when building a " "plugin bundle") self.plist.NSPrincipalClass = self.principalClass | if not hasattr(self.plist, "NSPrincipalClass"): if self.principalClass is None: raise bundlebuilder.BundleBuilderError, ( "must specify 'principalClass' when building a " "plugin bundle") self.plist.NSPrincipalClass = self.principalClass | def setup(self): | cc0c2c27f3f6f2c57e7d1b53d20b45049281099b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cc0c2c27f3f6f2c57e7d1b53d20b45049281099b/pluginbuilder.py |
e.nodes = [e.nodes[x] for x in swapcorners[refinenode]] e.nodcoord = [e.nodcoord[x] for x in swapcorners[refinenode]] | elem.nodes = [elem.nodes[x] for x in swapcorners[refinenode]] elem.nodcoord = [elem.nodcoord[x] for x in swapcorners[refinenode]] | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setCoordinate(elem.name+'_71', coord) | model.setCoordinate(elename+'_71', coord) | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setCoordinate(elem.name+'_72', coord) | model.setCoordinate(elename+'_72', coord) | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setCoordinate(elem.name+'_73', coord) | model.setCoordinate(elename+'_73', coord) | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setCoordinate(elem.name+'_74', coord) | model.setCoordinate(elename+'_74', coord) | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setCoordinate(elem.name+'_%d' % n, coord) nodenames = [elem.name+'_%d' % n for n in corners] | model.setCoordinate(elename+'_%d' % n, coord) nodenames = [elename+'_%d' % n for n in corners] | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
for n, nn in zip(elem.nodes, [elem.name+'_%d' % n for n in cornerlist]): | for n, nn in zip(elem.nodes, [elename+'_%d' % n for n in cornerlist]): | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
m.setElement(elem.name + '_%s' % i, 'Hex8', nodenames) m.removeElement(e.name) | model.setElement(elename + '_%s' % i, 'Hex8', nodenames) model.removeElement(elem.name) | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0... | d6cbb200bc2feb66f41c852f029ab19903401544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7248/d6cbb200bc2feb66f41c852f029ab19903401544/Adaptive.py |
os.remove(os.path.join(root, name)) | def removeDir(topDir) | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py | |
os.rmdir(os.path.join(root, name)) | def removeDir(topDir) | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py | |
def __init__(self, project, workDir = null, startRevision = null, endRevision = null): | def __init__(self, project, workDir = None, startRevision = None, endRevision = None): | def __init__(self, project, workDir = null, startRevision = null, endRevision = null): self.project = project if workDir == null: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
if workDir == null: | if workDir == None: | def __init__(self, project, workDir = null, startRevision = null, endRevision = null): self.project = project if workDir == null: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
if startRevision == null: | if startRevision == None: | def __init__(self, project, workDir = null, startRevision = null, endRevision = null): self.project = project if workDir == null: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
if endRevision == null: | if endRevision == None: | def __init__(self, project, workDir = null, startRevision = null, endRevision = null): self.project = project if workDir == null: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
def extract_revision_data(self, revision) | def extract_revision_data(self, revision): | def extract_revision_data(self, revision) destDir = os.path.join(self.workDir, revision) project.repository.export(destDir, revision) filename = os.path.join(self.workDir, "stats.%s" % revision) sys.execlp("sloccount --duplicates --autogen --addlangall %s > %s" % (destDir, filename)) removeDir(destDir) | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
def collectMetrics(self) | def collectMetrics(self): | def collectMetrics(self) metrics = MetricsCollector(self) metrics.run() print "\n\nData is available at %" % (metrics.workDir) | f10783af8aa7a0a8252d6801a0dabc95e74ae3ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/f10783af8aa7a0a8252d6801a0dabc95e74ae3ae/sloccompare.py |
def build_re_list(self, expressions_list): | def build_re_list(expressions_list): | def build_re_list(self, expressions_list): re_list = [] for expression in expressions_list: re_list.append(re.compile(expression)) return re_list | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
def string_matches_re_list(self, string, re_list): | def string_matches_re_list(string, re_list): | def string_matches_re_list(self, string, re_list): for expression in re_list: if expression.match(string): return True return False | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
assert(core.SVN_VER_MAJOR, core.SVN_VER_MINOR) >= (1, 3), "Subversion 1.3 or later required" | assert(svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR) >= (1, 3), "Subversion 1.3 or later required" | def __init__(self, url): assert(core.SVN_VER_MAJOR, core.SVN_VER_MINOR) >= (1, 3), "Subversion 1.3 or later required" self.url = url | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
startRevision = convertRevisionStringToInt(startRevision) | startRevision = self.convertRevisionStringToInt(startRevision) | def getRevisionRange(self, startRevision, endRevision): if type(startRevision) == str: startRevision = convertRevisionStringToInt(startRevision) if type(endRevision) == str: endRevision = convertRevisionStringToInt(endRevision) return range(startRevision, endRevision) | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
endRevision = convertRevisionStringToInt(endRevision) | endRevision = self.convertRevisionStringToInt(endRevision) | def getRevisionRange(self, startRevision, endRevision): if type(startRevision) == str: startRevision = convertRevisionStringToInt(startRevision) if type(endRevision) == str: endRevision = convertRevisionStringToInt(endRevision) return range(startRevision, endRevision) | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
self.workDir = tempfile.mkstemp() | self.workDir = tempfile.mkdtemp() | def __init__(self, project, workDir = None, startRevision = None, endRevision = None): self.project = project if workDir == None: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
self.ignoreDirs = build_re_list(project.tagXfiles["VendorCode"]) | self.ignoreDirs = build_re_list(project.getFilesTaggedAs("VendorCode")) | def __init__(self, project, workDir = None, startRevision = None, endRevision = None): self.project = project if workDir == None: self.workDir = tempfile.mkstemp() else: self.workDir = workDir | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
for revision in project.repository.getRevisionRange(self.startRevision, self.endRevision): | for revision in self.project.repository.getRevisionRange(self.startRevision, self.endRevision): | def collectData(self): locHistory = {} | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
for i in self.project.tagXfile["VendorCode"]: | for i in self.project.getFilesTaggedAs("VendorCode"): | def run(self): print "Compiling data for project %s, from version %s to %s" % (self.project.name, self.startRevision, self.endRevision) print "Directories to be ignored: ", for i in self.project.tagXfile["VendorCode"]: print i, print "" | 712021c6e5e001b1a637ac5d8f566b3f45b629d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1870/712021c6e5e001b1a637ac5d8f566b3f45b629d4/sloccompare.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.