Comments (10)
Table Structures
MethodTable
mid=> int AUTOINCREMENT PRIMARY KEY
signature => varchar(255)
identifier=> varchar(255)
splitted_identifier=> varchar(255)
lemma => varchar(255)
postag => varchar(255)
FK_dtid => dtid FOREIGN KEY(FK_dtid) REFERENCES DataType(dtid)
ParameterTable
pgid => int AUTOINCREMENT PRIMARY KEY
identifier => varchar(255)
splitted_identifier => varchar(255)
lemma => varchar(255)
postag => varchar(255)
FK_dtid => int FOREIGN KEY(FK_dtid) REFERENCES DataType(dtid)
FK_mid => int FOREIGN KEY(FK_mid) REFERENCES Method(mid)
DataTypeTable
dtid => int AUTOINCREMENT PRIMARY KEY
identifier => varchar(255)
simplified_identifier => varchar(255)
lemma => varchar(255)
postag => varchar(255)
There is one problem here, this structure assumes all data_types are user-defined. Any ideas to fix this or is it okay to just store not only user-defined ones but every data_type ? That can solve the problem as well. @emineekin
from autocomment.
Change the table name to "Data types", ignore whether or not it is defined by the user. Simply, for any data type, resolve if necessary and save.
Related to #10
from autocomment.
Okay, Im working on it.
from autocomment.
Is there a way to store the original identifiers as well, so that call graph extractor can query using the identifiers as they appear in source code? @nerzid
from autocomment.
Well, in our db, we have columns; text, lemma, postag, data_type and params .
So a method with identifier such as;
In the text column
insert students into db
Meaning that this is just a lowercased and splitted version. If I want to search this identifier through the source code I can run the following pseudo code.
splittedTextWithoutSpaces = "insertstudentintodb";
if(sourceCode.identifier.toLowerCase().equals(splittedTextWithoutSpaces))
// does something
from autocomment.
I'll reopen this issue because database need some polishing. I'll close this issue once we make sure that there isn't any problems with database.
from autocomment.
Im happy with the database right now. See #17 . One important note, the ID's of the tables are just id not mid or dtid or pid because there is a bug in javalite that it sometimes doesn't see method table's id as mid but it sees it like id. Thats why i've changed all table's id attribute as id .
from autocomment.
One last request:
Can you please just rename the tables? You can change them to Methods, and Parameters and DataTypes for example, or whatever you like.
Because CallGraphExtractor is using Reflection library, which has classes with the same name. And, to be able to query the tables in db using ORM, I must have the same class as the table name, which causes a conflict.
@nerzid
from autocomment.
Sure, Im on it.
from autocomment.
I've added "Table" keyword at the end of each table's name. See 6538faa
Method
turned into MethodTable
and so on ...
from autocomment.
Related Issues (18)
- IdentifierSplitter splits numbers as well
- Simplify the output of 'data_type'
- Ignore get/set methods for training process
- Create Custom Exception for isOrdinaryGet and isOrdinarySet Methods
- isOrdinaryGet/SetMethod can check convention of get/set methods
- Training process ignores punctuations always HOT 1
- Need Custom Exception Class for Tokenizer.simplifyDataType
- Resolve user defined class names HOT 2
- Add .gitignore for spooned files
- Prepare GUI for Autocomment HOT 1
- Method Comment Template - Title HOT 3
- Integrating call graph extractor with main app
- Trainer makes non-collection datatypes 0D collection HOT 1
- Prepare Meaningful Sentence Structure and Grammar Rules for Title
- Should we exclude test methods ? HOT 1
- Exclude common methods from DB HOT 2
- Hardcode some of the known identifiers' postags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autocomment.