Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any suggestions about using this on javascript or python? #36

Open
fengh16 opened this issue Jul 24, 2019 · 3 comments
Open

Any suggestions about using this on javascript or python? #36

fengh16 opened this issue Jul 24, 2019 · 3 comments

Comments

@fengh16
Copy link

fengh16 commented Jul 24, 2019

We're trying to apply this model to JavaScript and Python dataset, but we don't know how to get the class or type of a variable using static code analysis. So we just use function name instead of <class name>.<function name> or <variable name>.<function name>.

Now the result seems not good, do you think the class name of a function very important in this model?

Do you have any suggestions about using this model with JavaScript or Python data? Thank you!

@guxd
Copy link
Owner

guxd commented Jul 24, 2019

First, this model needs further fine-tuning. You should modify the default hyperparameter setting to adapt to other languages.
Second, simply using function name could result in ambiguity since a function name could refer to multiple APIs including self-defined ones. We suggest applying code analysis tools to extract class names.
According to feedback from users, API sequences are the most important in representing code semantics. You can try using other sequences which captures the code logics (i.e., step by step procedure to implement a certain functionality).

@fengh16
Copy link
Author

fengh16 commented Jul 25, 2019

Thanks for your reply! But I haven't found the proper way to extract the class name of an instance just using code analysis tools, because JavaScript and Python don't have type signature. Only some code inferring methods using GNN seems good, but it can only tell user the variable is an object, rather than directly give the class name.

Do you know some tools to extract class name in JavaScript or Python? And do you know someone who applied Deep CS to JavaScript or Python? Thanks very much!

@wusuhuang
Copy link

wusuhuang commented Jun 23, 2022

Thanks for your reply! But I haven't found the proper way to extract the class name of an instance just using code analysis tools, because JavaScript and Python don't have type signature. Only some code inferring methods using GNN seems good, but it can only tell user the variable is an object, rather than directly give the class name.

Do you know some tools to extract class name in JavaScript or Python? And do you know someone who applied Deep CS to JavaScript or Python? Thanks very much!

Have you already solved this problem? I also use Python language in the dataset which is CosQA dataset. I also want to use deepcs baseline. If you have sovled this problem, please tell me, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants