nerzid / autocomment Goto Github PK
View Code? Open in Web Editor NEWGenerating automated comments using AST and Callgraphs
License: Apache License 2.0
Generating automated comments using AST and Callgraphs
License: Apache License 2.0
Simplify the data data_type
in db and new data must be stored in a new simplified way.
java.nio.charset.Charset
Charset
java.io.File[]
Array of File
or Collection of File
java.util.SortedMap<java.lang.String, java.nio.charset.Charset>
Collection of Charset
java.util.Set<java.util.Map.Entry<java.lang.String, java.lang.Object>>
?
It may return null or empty string which we don't want to store in db.
They shouldn't be on remote repo.
Current call graph extractor doesn't have a db connection, all info stored locally. But the same info is already stored in db.
So make use of existing db to find the invoked methods.
getListOfInvokedMethods ( classOfCallerMethod, callerMethodSignature)
list of (classOfCalleeMethod, calleeMethodSignature)
Core NLP Stanford Toolkit recognize those verbs as NP which is incorrect. Im going to hardcode some of the identifiers. Below is the current list that we'll be converted to VB .
e.g. equals()
, run()
, toString()
, init()
...
They don't need templates to be explained. All developers know their meanings already.
Collection of Listboolean
Where it should be like following:
Collection of List< boolean >
Problem comes from
com.nerzid.autocomment.nlp.Tokenizer.simplifyDataType(String data_type)
This is the continuation of this work #15 . This issue will stay open until the autocomment can handle almost every postag sentence .
getInt32()
becomes get, int, 32
after splitting operation. It must be get, int32.
We want to ignore ordinary get/set methods (see #3 ). For logs after training process, we may want to see how many get/set methods we ignored.
Those methods are already doing excellent job to check if get/set methods are ordinary or not #3 . We can use that to implement a brand new convention checker tool for JAVA.
Get and Set methods (Accessors and Mutators) must be exluded from train proces. Their comment template are already easy to do. Therefore they'r not needed in database.
This kind of get() method must be excluded
public int getCount(){
return count;
}
but following one has some operations in it, therefore it shouldn't be excluded
public int getAverageGradeOfStudents(){
double sum = 0;
for(Student s: student_list){
sum += s.getGrade();
}
return (sum / student_list.size());
}
The following template can be used to synthesize descriptive comments based on method signature:
VP -->V + NP + [PP]
PP -->Prep + NP
NP --> Noun | Pronoun
VP: Verb phrase
PP: Prepositional Phrase
NP: Noun phrase
For example a class named as
SoftwareEngineering
should be splitted as
Software
and Engineering
.
The results should be stored into another table called UserDefinedType
.
It may be easier to use GUI instead of running files one by one.
identifier -> testReadSwapped()
splitted_identifier -> test read swapped
postag -> NN VBD VBD
I think test methods are not needed since their identifiers explain the situtation mostly and it would be better if the developer itself writes its javadoc.
Expectation
int a = 5;
to int
Current result
int a = 5;
to 0D Collection of int
This bug is easy to solve but im writing here to remember it.
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.