shangwenwang / cognac Goto Github PK
View Code? Open in Web Editor NEWThe official webpage of an FSE2021 paper
License: MIT License
The official webpage of an FSE2021 paper
License: MIT License
Hello, thank you very much for sharing your great work !
I am so sorry to disturb you! I'm facing some problems when running the dataset generation.
I hope you can help me to solve it! Thank you in advance :)
If I'm not wrong,
====Step 1====
dataextractor.py
input:
java-small/training
java-small/validation
java-small/test
output:
training.json
validation.json
test.json
====Step 2====
train_fasttext.py
input:
training.json
validation.json
test.json
output:
fasttext_vectors/vocab.pkl
fasttext_vectors/weight.pkl
vocab.pkl is only 58 bytes and weight.pkl is 2206 bytes
I checked inside the code (train_fasttext.py) and figured that the json2corpus method has split(', '). However, I don't have the same expression in the JSON files generated by Step 1 (dataextractor.py).
Could you please kindly advise me on how I can fix this problem?
Hi, I'm having trouble getting the token sequence in the first step. After parsing the code through Javalang,I can't get the token sequence, and the type of each token. There is an error that the parsed AST does not have a token sequence. Can you help me?
method.tokens = AST.tokens
The AST does not have a token attribute.
Hello @ShangwenWang,
Could you let me know about the file named "validation_shuffled.json" ?
This file is only used in cal_sim.py; hence I wonder how I can generate this file.
Thank you for your help!
How do you extract the local and global context from Java code? Do you provide source code to extract context?
Hello,
I'm sorry to bother you, but I'm having some problems.
I used the data sets you provided: Small, Med and Large to conduct experiments on your model, but the final results were quite different from those in your paper.
I am wondering if I have made some mistakes in parameters. Are the parameters listed in your config file consistent with your experiment at that time? Or is there any code that needs to be uncommented?
I hope you can give me some suggestions so that my reproduction can be as consistent as possible with yours.
Thank you very much for your help.
Hello, I'am sorry to disturb you,I met some problems when running your model. I hope you can help me to solve them,Thank you in advance.
1、I have finished Step 1 and Step 2 according to your steps, but the generated VOCAB.PKL is very small, only 1KB. Is this normal?
2、I ran into difficulty on the third step,I don't know what those paths are supposed to be.Can you describe it to me in detail,please?
3、I know you are using Pointer Generator Network,Do I need to use his code to help complete your model or do I just need the code you provide?
train_data_path = os.path.join(root_dir, "path2train")
eval_data_path = os.path.join(root_dir, "path2validation")
decode_data_path = os.path.join(root_dir, "path2test")
vocab_path = os.path.join(root_dir, "path2vocab")
log_root = os.path.join(root_dir, "path2log")
excluded_type = {}
In the file decode.py:
作者你好,我在运行dataextractor.py的时候,第309行 的method.tokens = AST.tokens
一直报错,'MethodDeclaration' object has no attribute 'tokens'
,是我安装的javalang版本问题吗?早期的MethodDeclaration有tokens属性吗
for method in AST.types[0].body:
#TODO: a question is how to add constructor
if not isinstance(method, self.consideredType) or method.name == 'main':
continue
curMethod = curClass + '.' + method.name
method.tokens = AST.tokens
self.methodMapping[curMethod] = method
invocations = self.findInvocation(str(method))
invocations_completed = self.completeInvocation(localImports, invocations, curClass, superclass, curClassMethods)
self.callee[curMethod] = set(invocations_completed)
for x in invocations_completed:
self.caller[x].add(curMethod)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.