Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] Contribute our parameter recommendation engine to Eclipse Code Recommenders Incubator

Hi,

My name is Cheng Zhang, a PhD student from Shanghai Jiao Tong University, China.

Since April, 2011, my fellow students and I have been working on a recommendation
engine, named Precise, for the actual parameters (i.e. arguments) of APIs. Our work 
is largely motivated by Marcel's FSE '09 paper and the main idea is:
1. Use simple program analysis to extract parameter usage patterns from a large code base.
    A usage pattern consists of two parts of information, namely the usage context and the parameter.
2. Build a model based on the extracted usage patterns.
3. On a request for parameter recommendation, we analyze the context of the request, feed the
    context information as input to the model, and use the model output to determine what kinds 
    of parameters are most likely to be used in similar contexts.

As the problem of parameter recommendation is difficult (at least for us) to solve in general, 
Precise focuses on a handful of types of _expression_ that are frequently used as API parameters. 
Those _expression_ types include method invocation, field access, qualified name, array access, 
type cast, and literals (String, number, etc.). For more details, please refer to our paper:
http://stap.sjtu.edu.cn/~chengzhang/papers/precise-camera-ready.pdf

We finished our first prototype implementation in September, 2011. At that time, we used k-NN 
search to do the step 3. In that implementation we modified the code of JDT, so the prototype 
could not be installed as an Eclipse plug-in. You may have noticed that I sent emails to this 
mailing list to ask for advice ;)

With the generous help from Marcel and others, we have improved the Precise prototype a lot.
Currently Precise uses the Bayesian network in Jayes as its model and can be installed as a
normal Eclipse plug-in. Here is a test version available for Eclipse Juno:
http://stap.sjtu.edu.cn/~chengzhang/precise/update/

Note that it only recommends parameters for APIs from SWT framework for the moment.

Our vision for Precise is making it a real tool/function used by a large number of users.
Therefore, we would like to contribute Precise to Eclipse Code Recommenders Incubator.

Any questions, comments, or suggestions will be really appreciated.

Best,
Cheng

Back to the top