161acf130a732150ff6f90c883476fa44d843efb,XORcipher/XOR_cipher.py,XORCipher,encrypt_file,#XORCipher#Any#Any#,156
Before Change
try :
fin = open(file,"r" )
fout = open("encrypt.out" ,"w+" )
for line in fin:
fout.write(self.encrypt_string(line,key))
fin.close()
fout.close()
except:
return False
After Change
try :
with open (file,"r" ) as fin:
with open ("encrypt.out" ,"w+" ) as fout:
for line in fin:
fout.write (self.encrypt_string(line,key) )
except:
return False
return True
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 7
Instances Project Name: geekcomputers/Python
Commit Name: 161acf130a732150ff6f90c883476fa44d843efb
Time: 2017-12-22
Author: christianbender89@web.de
File Name: XORcipher/XOR_cipher.py
Class Name: XORCipher
Method Name: encrypt_file
Project Name: RaRe-Technologies/gensim
Commit Name: ec60b6d78f0fc423a8158d9f42210b878a8bcf0e
Time: 2011-02-16
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/svmlightcorpus.py
Class Name: SvmLightCorpus
Method Name: saveCorpus
Project Name: facebook/FAI-PEP
Commit Name: dd4536dc24af728c326ce6e50854dd43e4a9e034
Time: 2020-04-15
Author: huaminli@fb.com
File Name: benchmarking/download_benchmarks/download_benchmarks.py
Class Name: DownloadBenchmarks
Method Name: downloadFile
Project Name: geekcomputers/Python
Commit Name: 161acf130a732150ff6f90c883476fa44d843efb
Time: 2017-12-22
Author: christianbender89@web.de
File Name: XORcipher/XOR_cipher.py
Class Name: XORCipher
Method Name: decrypt_file
Project Name: RaRe-Technologies/gensim
Commit Name: 1aa7e115fcf87b443373c14b7b2f3dd2e3383584
Time: 2011-02-19
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/lowcorpus.py
Class Name: LowCorpus
Method Name: saveCorpus