IP Library Granted Patent US 11,256,502
Granted Patent B2
US 11,256,502 · App. 16/664,277 · Granted Feb 22, 2022

Automatic generation of documentation and aggregation of community content

Inventors: Adam Smith (San Francisco, CA); Tarak Upadhyaya (San Francisco, CA); Juan Lozano (San Francisco, CA); Daniel Hung (San Francisco, CA)
Assignee: Affirm, Inc.
G06F8/73G06F9/54G06N5/04G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,256,502
App. No.
16/664,277
Granted
Feb 22, 2022
Kind
B2
Abstract

A system and method may provide assistance to programmers related to the creation of documentation. In some aspects, the system may automatically generate documentation-related text in source code. In other aspects, the system may automatically detect the need for the programmer to edit long-from documentation when changes are detected in code. Moreover, the system may provide for the aggregation or creation of documentation content based on one or more data sources, such as by embedding links to those data sources into documentation. In some aspects, some components of the system are based on machine learning methods and are trained on collected data.

Claims (15)

1. A computer-implemented method comprising:

retrieving a portion of source code, the portion of source code including a function having one or more parameters and one or more return values, and the portion of source code including one or more tokens;

automatically generating a docstring for the function using a machine learning model based on an input to the machine learning model of at least the one or more tokens to determine a type of the one or more parameters and the one or more return values, wherein the generated docstring includes a determined type for each of the one or more parameters of the function and a type for each of the one or more return values of the function; and

inserting the generated docstring in the source code.

2. The computer-implemented method of claim 1 , further comprising analyzing one or more usages of the function in the source code to infer a return type of the function.

3. The computer-implemented method of claim 1 , wherein the machine learning model is a neural network.

4. The computer-implemented method of claim 1 , further comprising analyzing one or more usages of the function in the source code to infer a type of at least one parameter of the function.

5. The computer-implemented method of claim 1 , further comprising:

detecting entry of a change in the source code to a return value or at least one parameter of the function;

updating the docstring based on the change in the source code to the return value or at least one parameter of the function.

6. The computer-implemented method of claim 1 , further comprising: using documentation or code from referenced entities to generate the docstring.

7. The computer-implemented method of claim 1 , further comprising:

identifying an application programming interface (API) call in the function definition;

detecting a change to a parameter or return value of the API call;

updating the docstring based on the detected change to the parameter or return value of the API call.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 15, 2021
From: MANHATTAN ENGINEERING INCORPORATED
To: AFFIRM, INC.
Reel/Frame 056548/0888 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 25, 2019
From: SMITH, ADAM; UPADHYAYA, TARAK; LOZANO, JUAN; HUNG, DANIEL
To: MANHATTAN ENGINEERING INCORPORATED
Reel/Frame 050834/0328 →
Continuity (2)
Provisional Application 62750265 · Oct 25, 2018
Related Publication 20200133662A1 · Apr 30, 2020