cd67dba10273d0d9c3d7ab331fcc3580efdd4d9c,framework/CodeInterfaces/WorkshopExamples/ProjectileInterface.py,Projectile,finalizeCodeOutput,#Projectile#Any#Any#Any#,99
Before Change
// open output file
outfileName = os.path.join(workingDir,output+".txt" )
print(outfileName)
with open(outfileName, "r") as src:
headers = [x.strip() for x in src.readline().split() ]
data = []
line = ""
// starts reading
while not line.strip().startswith("--"):
line = src.readline()
if not line.strip().startswith("--"):
data.append(",".join( line.split())+"\n")
// write the output file
with open(os.path.join(workingDir,output+".csv" ),"w") as outputFile:
outputFile.writelines(",".join( headers ) +"\n")
for i in range(len(data)):
outputFile.writelines(data[i])
After Change
// open output file
outfileName = os.path.join(workingDir,output+".txt" )
headers, data = self._readOutputData(outfileName)
// write the output file
with open(os.path.join(workingDir,output+".csv" ),"w") as outputFile:
outputFile.writelines(",".join( headers ) +"\n")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: idaholab/raven
Commit Name: cd67dba10273d0d9c3d7ab331fcc3580efdd4d9c
Time: 2020-12-08
Author: andrea.alfonsi@inl.gov
File Name: framework/CodeInterfaces/WorkshopExamples/ProjectileInterface.py
Class Name: Projectile
Method Name: finalizeCodeOutput
Project Name: pantsbuild/pants
Commit Name: 2649b5de8d60e813bc842c9bfe8b4e7b222c49ad
Time: 2021-03-12
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/util_rules/pex_test.py
Class Name:
Method Name: create_pex_and_get_all_data
Project Name: stanfordnlp/stanza
Commit Name: ae1a7796a3df1add1ee420467afea82bde8bd44c
Time: 2018-06-07
Author: zyh@stanford.edu
File Name: models/lemma/loader.py
Class Name: DataLoader
Method Name: load_file