laurawartschinski / vulnerabilitydetection Goto Github PK
View Code? Open in Web Editor NEWvulnerability detection in python source code with LSTM networks
vulnerability detection in python source code with LSTM networks
Hello, thank you for your work.
I tried to implent your work;but there were something wrong with my work.
Firstly, I want to use your w2v model: word2vec_withString10-100-200 ;but need .npy file; like other issue mentioned.So I have to make this model by myself.
When I try model.wv.most_similar("if") this command,the out put is a little different from yours.like
Then I try to implent an example,like your work.But the output is really different from your work like this.
I really don't know why...Could you please help me..I would really appreciate it
Hey, it is mentioned in your master paper that "A small focus window traverses through the whole source code in steps of length n" at part "5.2 Processing the data". I wonder what 'steps of length n' means. Does n and m refer to the number of tokens, or the number of lines of code, or other indicators?
Hi,
As you provided in the paper, for each vulnerable token you make some samples (perhaps 200) with a moving window. My question is do you prevent the samples from one token to be common in training and test sets? Because there is many common tokens between them, results in optimistic performance.
请问data文件夹下的漏洞数据集是在哪里下载的,我需要这些数据集
I hasn't find the env to run the example.So maybe you can share the requirements.txt?
I get this error on this line: yhat_classes = model.predict_classes(X_finaltest, verbose=0)
.
.
.
inferred_from[input_arg.type_attr]))
TypeError: Input 'b' of 'MatMul' Op has type float32 that does not match type int32 of argument 'a'.
I encounter the same error while trying to demo the examples as well. Would you be able to tell me you tensorflow, keras and numpy versions please?
Hello, thank you for your work.
I tried to implent your work;but there were something wrong with my work.
Firstly, I want to use your w2v model: word2vec_withString10-100-200 ;but need .npy file; like other issue mentioned.So I have to make this model by myself.
When I try model.wv.most_similar("if") this command,the out put is a little different from yours.like
Then I try to implent an example,like your work.But the output is really different from your work like this.
I really don't know why...Could you please help me..I would really appreciate it
Please help, When I load the Word2Vec model, I have a problem that I cannot solve.
The code to run is as follows:
from gensim.models import Word2Vec
w2v_model = Word2Vec.load('E:/projectlzy/data/word2vec_withString10-100-200.model')
FileNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 2>()
1 from gensim.models import Word2Vec
----> 2 w2v_model = Word2Vec.load('E:/projectlzy/data/word2vec_withString10-100-200.model')
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\models\word2vec.py:1141, in Word2Vec.load(cls, *args, **kwargs)
1122 """Load a previously saved :class:~gensim.models.word2vec.Word2Vec
model.
1123
1124 See Also
(...)
1138
1139 """
1140 try:
-> 1141 model = super(Word2Vec, cls).load(*args, **kwargs)
1143 # for backward compatibility for max_final_vocab
feature
1144 if not hasattr(model, 'max_final_vocab'):
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\models\base_any2vec.py:1230, in BaseWordEmbeddingsModel.load(cls, *args, **kwargs)
1199 @classmethod
1200 def load(cls, *args, **kwargs):
1201 """Load a previously saved object (using :meth:~gensim.models.base_any2vec.BaseWordEmbeddingsModel.save
) from file.
1202
1203 Also initializes extra instance attributes in case the loaded model does not include them.
(...)
1228
1229 """
-> 1230 model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
1231 if not hasattr(model, 'ns_exponent'):
1232 model.ns_exponent = 0.75
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\models\base_any2vec.py:602, in BaseAny2VecModel.load(cls, fname_or_handle, **kwargs)
575 @classmethod
576 def load(cls, fname_or_handle, **kwargs):
577 """Load a previously saved object (using :meth:gensim.models.base_any2vec.BaseAny2VecModel.save
) from a file.
578
579 Parameters
(...)
600
601 """
--> 602 return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\utils.py:436, in SaveLoad.load(cls, fname, mmap)
433 compress, subname = SaveLoad._adapt_by_suffix(fname)
435 obj = unpickle(fname)
--> 436 obj._load_specials(fname, mmap, compress, subname)
437 logger.info("loaded %s", fname)
438 return obj
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\utils.py:467, in SaveLoad._load_specials(self, fname, mmap, compress, subname)
465 logger.info("loading %s recursively from %s.* with mmap=%s", attrib, cfname, mmap)
466 with ignore_deprecation_warning():
--> 467 getattr(self, attrib)._load_specials(cfname, mmap, compress, subname)
469 for attrib in getattr(self, '__numpys', []):
470 logger.info("loading %s from %s with mmap=%s", attrib, subname(fname, attrib), mmap)
File D:\Anaconda\envs\mykeras\lib\site-packages\gensim\utils.py:478, in SaveLoad._load_specials(self, fname, mmap, compress, subname)
476 val = np.load(subname(fname, attrib))['val']
477 else:
--> 478 val = np.load(subname(fname, attrib), mmap_mode=mmap)
480 with ignore_deprecation_warning():
481 setattr(self, attrib, val)
File D:\Anaconda\envs\mykeras\lib\site-packages\numpy\lib\npyio.py:390, in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
388 own_fid = False
389 else:
--> 390 fid = stack.enter_context(open(os_fspath(file), "rb"))
391 own_fid = True
393 # Code to distinguish from NumPy binary files and pickles.
FileNotFoundError: [Errno 2] No such file or directory: 'E:/projectlzy/data/word2vec_withString10-100-200.model.wv.vectors.npy'
Hello, I'm very interested in your project, but I'm a new hand . when I run w2v_pythoncorpus.py,The data on the "https://github.com/numpy/numpy" is not available.For a new hand like me, I don't know how to run this project completely.It would be great if you could come up with a video tutorial。thank you very much.
Hello, when I run w2v_pythoncorpus.py, it shows that my pydriller version is inappropriate. What is your pydriller version? Thank you very much.
The implementation of highlighting defective code snippets is really so great!! But I don't fully understand its implementation principle. Could you please share with me the implementation ideas?
Thank you very much! :)
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.