Replication Package For Paper: Generating Query-specific Class API Summaries


We refactor the code of this project, which could be found on this.

Summary Example:

Here is the summary example in Figure 1 from Paper, which explains how the summary look like: summary_example

Schema Of API-KG

Here is the schema of API KG which is used to support API Summary Generation: kg_schema

RQ1: What is the intrinsic quality of the summaries generated by KG-APISumm ?

In SummaryForRQ1Queries.json, we show the summary generated by our APIKGSumm approach for 12 queries. In RQ1SummaryQuality.csv, we show the data for RQ1, that is the score for each class summary and the agreement.

RQ2: How are the summaries generated by KG-APISumm different than those generated by other approaches?

we compare the APIKGSumm with three different approach:

  1. google
  2. biker
  3. textrank

RQ3: How useful are the summaries generated by KGAPISumm in helping developers during API retrieval?

Here is the query we chosen from Biker data set and their query type:

  1. single_top_1
    • How can I read input from the console using the Scanner class in Java?
    • How to wait for all threads to finish, using ExecutorService?
  2. single_top_3
    • Listing only files in directory
    • Is there a way to instantiate a class by name in Java?
  3. single_top_5

    • How do I properly load a BufferedImage in java?
    • Avoiding PermGen out of memory and GC overhead limit exceeded
  4. single_not_top_10
    • Is there any way to find os name using java?
    • Stable timer independent of system time
  5. single_top_10
    • How do I Click a JButton without the user Clicking it?
    • How to generate a random permutation in Java?
  6. multi_top3
    • Reading a plain text file in Java
    • Load Java Image inside package from a class in a different package
  7. multi_top5
    • Java - Draw a ruler (line with tick marks at 90 degree angle)
    • How to make a symlink in Java when running in Linux?
  8. multi_top10
    • Stop a Runnable submitted to ExecutorService
    • Preferred Java way to ping an HTTP URL for availability
  9. multi_one_top10
    • How to make ImageIO read from InputStream :Java
    • How do I print a double value without scientific notation using Java
  10. multi_all_not_top10
    • Varargs method modifies caller’s array instead of its own copy?
    • How to hide cursor in a Swing application?

RQ4: Is KG-APISumm generating different summaries for different queries, for the same class?

We select seven queries from Biker data set that contain the same class in the ground truth, namely java.nio.file.Files. The class provides methods that operate on files and directories.

Here is seven different class summary for different queries:

1. Query: Elegant way to read file into byte[] array in Java

Summary for java.nio.file.Files

2. Getting A File’s Mime Type In Java

Summary for java.nio.file.Files

3. getting file creator/owner attributes in Java

Summary for java.nio.file.Files

4. How to append text to file in Java 8 using specified Charset

Summary for java.nio.file.Files

5. How can I write to a specific line number in a txt file in Java

Summary for java.nio.file.Files

6. add custom attribute or metadata to file java

Summary for java.nio.file.Files

7. Add all files recursively from root with Java 8 Stream

Summary for java.nio.file.Files