Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and tool for automatically filling code sample by using JavaFX

An automatic filling and sample technology, applied in the field of code, can solve the problems of huge amount of data, low code quality, and much invalid information.

Active Publication Date: 2020-10-23
NANJING UNIV
View PDF9 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, most of the methods for automatic filling of API document code samples currently proposed have the following deficiencies: obtaining original data through search engines, the amount of data is too large, too much invalid information, and the code quality is low, or downloading the Data Dump File from the technical forum And process it, it is difficult for ordinary users to obtain Data Dump File by themselves, so it is impossible to customize the API documentation of a specific technology; most API documents are organized in the form of HTML documents, which can only be accessed through browsers, and the content Complicated, not conducive to user inspection

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and tool for automatically filling code sample by using JavaFX
  • Method and tool for automatically filling code sample by using JavaFX
  • Method and tool for automatically filling code sample by using JavaFX

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0117] figure 1 It is a flow chart of the method for automatically filling code samples with JavaFX in Embodiment 1, wherein the data collection module includes an API extractor and a question information extractor, and the data processing module includes a question-answer pair preprocessor and a question-answer pair extractor, and the document Generate modules include documentation generators, figure 2 A flowchart for the various components working together. This solution takes JavaFX documents as an example, and is applied to scenarios where native API documents are used and code samples are relatively scarce, which affects the learning and development efficiency of developers. The specific steps are as follows:

[0118] Step 110, using crawler technology to access different URLs, and locating elements in the HTML document, and then crawling the text content in the located elements to obtain problem information and API information.

[0119] Before accessing the page and o...

Embodiment 2

[0144] Figure 8 It is a flow chart of processing fault recovery type question-answer pairs in Embodiment 2 of the present invention. This embodiment adds a step of processing fault recovery type question-answer pairs on the basis of the foregoing embodiments. Combine below Figure 5 The second embodiment of the present invention provides a method for automatically filling in code samples with JavaFX and a special process for handling fault repair type question-answer pairs, including the following steps:

[0145] Step 210, accessing different Uniform Resource Identifiers, and locating elements in the HTML document, and then crawling the text content located in the elements to obtain problem information and API information.

[0146] Step 220, accessing the question detailed information page through the crawler, and identifying whether the question title contains a special field, thereby judging whether the question-answer pair is a fault-recovery question-answer pair or a com...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the technical field of codes and a method and tool for automatically filling code samples by using JavaFX. The method comprises the following steps of: accessing different uniform resource identifiers, positioning elements in an HTML document, crawling text contents positioned in the elements, and obtaining problem information and application program interface information;accessing a problem detailed information page through a crawler, extracting a use scene, establishing mapping of an application program interface type, a use scene and a code sample, and processing original data into data meeting document requirements; and operating a document object by using a program, predefining a combination form of document templates and data through code logic, and finallytaking out the stored data, embedding the data into the document, and storing and generating a final application program interface document.

Description

technical field [0001] The invention belongs to the technical field of codes, and in particular relates to a method and a tool for automatically filling code samples with JavaFX. Background technique [0002] Reading API documentation has always been one of the important ways for developers to learn API. Through API documentation, we can most intuitively understand the most standard and intuitive functions, classes, return types, parameters and corresponding functions of an API. However, many API documents only have the definition of the API itself. According to research, only 11% and 6% of the API types in Java SE and Android API documents have code samples to supplement the description, but only vague usage scenarios. A large number of APIs lack corresponding code samples and usage scenarios, which leads to situations where developers will not be able to use them after reading them, and it is difficult to effectively help developers learn. From the perspective of the ope...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/72G06F16/93G06F16/951G06F16/955G06F40/194
CPCG06F8/72G06F16/951G06F16/9566G06F16/93G06F40/194Y02D10/00
Inventor 周鑫张贺刘名锴荣国平邵栋
Owner NANJING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products