crossminer / scava

https://eclipse.org/scava/
Eclipse Public License 2.0
18 stars 13 forks source link

Help to achieve my scenario #386

Closed phkrief closed 4 years ago

phkrief commented 4 years ago

Dear All, Here is the scenario I would like to achieve with the help of the Scava plugin. In my understanding, it should comply with our initial requirements.

So, please tell me how we could fix that to be able to run this scenario:

Professor request

Extract the current weather for a given city from the OpenWeather (https://openweathermap.org) open data site. The data provided are in a JSON format. For example, for "Paris, FR" http://api.openweathermap.org/data/2.5/weather?q=Paris&appid=abbcea2020f75409af198b98de40e3a6

Look for a JSON library

Look for JSON recommendation

Here is how the code looks like after this first scenario:

==============================

Migrate from a GNU license to license accepted by the EPL license, e.g. Apache

Understand the new APIs

Here is how the code looks like after this second scenario:

AppWithApache.java.txt AppWithGNU.java.txt

creat89 commented 4 years ago

Hello @phkrief,

For the API recommendation and maybe the understanding of a new API, I should say that apart from the recommenders created by UDA, there is one created by EHU that it's called CROSSIndex. This one should have an interface through the Knowledge Base too. CROSSIndex, rather than be connected to the Knowledge base, it is connected to the ElasticSearch Indexes. If you selected, during the analysis of projects in Scava, the indexing of data, CROSSIndex should be capable of providing you recommendations. These will depend on the data analyzed, but it can be data from documentation, BTS issues, mailing lists, forums. StackOverflow is possible, but for the moment, we would need to provide you the index according to your needs (But in the future, this might be visible from the UI). We've been chatting with Thomas and Kostantinos for indexing code and configuration files, too.

CROSSIndex can support Java, C, PHP and Javascript.

phkrief commented 4 years ago

Dear @creat89, Sorry but I don't understand your reply. The described scenario is using the Scva Plugin IDE. So, I have no access to any API but the user interface provided by the plugin. Do I miss something? Thx

creat89 commented 4 years ago

I thought that as any other recommender located in the Knowledge base, would be accessible through the Scava plug-in too.

davidediruscio commented 4 years ago

Hi Adrian,

Have you never interacted with FrontEndArt to make your indexes accessible from the IDE?

I remember that to make things simpler, being your indexes saved on the same ElasticSearch instance used by the web based dashboards, we opted for enabling the specification of query strings to search for NLP-based data directly from the web-based client. Isn’t?

Davide

creat89 commented 4 years ago

The indexes are available through Kibiter. But I'm talking about the recommender created on the indexed data.

davidediruscio commented 4 years ago

@creat89 yes thanks, I remember the branch you developed end of July about that and subsequently merged by @md2manoppello

The recommendations we are able to provide are those described in D6.5.

@phkrief maybe I'm missing something, what do you mean with "....how we could fix that..." at the beginning of this issue description? What are the things that need to be fixed?

phkrief commented 4 years ago

@davidediruscio by "fixing" in mean: what should I/we do t make this reasonable scenario doable. I don't know how we could "influence" the KB to obtain "useful" recommendations. Actually, for example, I installed one of the repo listed by the plugin (json-simple). This repo provides a Json parser with some APIs. I could not find the way to setup my code to get a useful recommendation. Does it make sense ? Davide, who should be my contact to interact with and try to solve my issue? Juri? Adrian?

geryxyz commented 4 years ago

Hi all, @phkrief I checked your scenario. In short:

creat89 commented 4 years ago

As far as I understand, the problem that Philippe is facing, is that the KB does not contain any information regarding the Json parser indicated at the beginning of the thread, as he has indicated in issue #384. This makes impossible to retrieve recommendations useful for solving one of his user cases. In other words, the recommendations retrieved are not related to the library Philippe is using. Ideally, as he has pointed in issue #382, the recommender from the KB should use the data that has been processed by Scava. Due to this point, I had recommended to use CROSSIndex, because it provides recommendations from the data indexed and processed by Scava. However, it seems to be missing in the Eclipse plugin.

In all the cases, Philippe is looking for a way to solve these issues and being able to fulfill his user case.

Am I correct Philippe?

phkrief commented 4 years ago

Hi @creat89 , Your are partially right. I do agree with you that one of the 2 parsers in not included in the KB but the second is included (json-simple). So I would not mind demonstrating the recommendation on the second one only but, unfortunately I get nothing for now. So I was wondering if I was selecting the wrong text to get some useful help form the KB. I will be happy to go with you through the scenario and see how we can solve that. Thanks

phkrief commented 4 years ago

@md2manoppello , @creat89, Would it be difficult to add the license information in the KB? IMHO, this is an important information and, for now, if I want to check this information, I will have to switch to github, browse the license file and comeback to the search dialog in Eclipse. Now, if you cannot make it, I will just mention the workaround and ask for an enhancement in our deliverable. Thanks

creat89 commented 4 years ago

In EHU case, CROSSIndex only retrieves posts from the indexes that contain information that might help you to develop the code that you're writting. It doesn't provide projects similar to those that you're using. Those recommenders are created by UDA.

geryxyz commented 4 years ago

@creat89 what do you meant by missing on the plug-in site? Does CROSSindex use a different API method? If so which one? If it use the same API as any previous request and only add more result entries to the result then it will working as the previous ones.

creat89 commented 4 years ago

@geryxyz I have replied to you in issue #387

phkrief commented 4 years ago

I try to understand how the KB is created. Based on my understanding none of the projects listed in the dashboard are listed in the KB and vise versa. Is it expected ? Personally, I was expecting to have the same projects on both UI. Like that I could either have a short description in the Eclipse IDE or make a deep dive in metrics with the dashboard. Did I miss understand something in the architecture ?

FYI @borisbaldassari

phkrief commented 4 years ago

Thanks a lot for your help @md2manoppello