IP Library › Granted Patent US 12,321,423
Granted Patent B2
US 12,321,423 · App. 17/937,438 · Granted Jun 3, 2025

Software license-based code suggestions

Inventors: Pramod Chandra Samudrala (Mercer Island, WA); Sri Ranga Akhilesh Bontala (Bothell, WA); Matthew Lee (Elmhurst, NY); Yanitsa Donchev (Kirkland, WA); Zijian Wang (San Jose, CA); Yuchen Tian (Santa Clara, CA); Himani Amrish Shah (Seattle, WA); Rama Krishna Sandeep Pokkunuri (Redmond, WA)
Assignee: Amazon Technologies, Inc.
G06F21/1075G06F8/36
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 12,321,423
App. No.
17/937,438
Granted
Jun 3, 2025
Kind
B2
Abstract

A system for providing code suggestions according to licensing criteria is described. The system comprises computing devices that implement a code suggestion service. The code suggestion service receives a request that specifies licensing criteria via an interface of the code suggestion service. The code suggestion service determines respective licenses for respective source code files according to a source code attribution database from parsing the plurality of source code files that are applicable to the plurality of source code files. The code suggestion service generates a set of candidate code suggestions based, at least in part, on the plurality of source code files. The code suggestion service determines code suggestions from the set of candidate code suggestions that satisfy the licensing criteria based on the respective licenses. The code suggestion service provides the code suggestions determined from the set of candidate source code files that satisfy the licensing criteria.

Claims (75)

1. A system, comprising:

one or more computing devices that implement a code suggestion service configured to:

receive a request that specifies one or more licensing criteria via an interface of the code suggestion service;

determine respective licenses for respective ones of a plurality of source code files according to a source code attribution database that comprises indications of the respective licenses identified from parsing the plurality of source code files that are applicable to the plurality of source code files;

generate a set of candidate code suggestions for received code input based, at least in part, on the plurality of source code files;

determine one or more code suggestions from the set of candidate code suggestions that satisfy the one or more licensing criteria based, at least in part, on the respective licenses for respective ones of the plurality of source code files; and

provide the one or more code suggestions determined from the set of candidate source code files that satisfy the one or more licensing criteria.

2. The system of claim 1 , further comprising one or more additional computing devices that implement a license attribution service configured to:

identify the plurality of source code files for license attribution;

parse the plurality of source code files to extract one or more text blocks;

compare the one or more text blocks to a plurality of licenses to determine similarity scores between respective ones of the one or more text blocks and the plurality of licenses;

based on the similarity scores, identify one or more of the plurality of licenses that are applicable to individual ones of the plurality of source code files; and

store, to the source code attribution database, the indications of the respective licenses applicable to the respective ones of the plurality of source code files.

3. The system of claim 2 , wherein the license attribution service is further configured to:

retrieve the plurality of licenses from a license repository; and

store the plurality of licenses to a data store.

4. The system of claim 2 , wherein to compare the one or more text blocks to the plurality of licenses to determine the similarity scores between the respective ones of the one or more text blocks and the plurality of licenses, the license attribution service is configured to:

identify strings of the one or more text blocks that match with strings of the plurality of licenses; and

determine the similarity scores based on a number of the identified of the one or more text blocks that match with strings of the plurality of licenses.

5. The system of claim 1 , further comprising one or more computing devices configured to implement a database builder service configured to:

obtain license format data from a license data repository;

determine respective text types of respective portions of the license format data;

annotate the respective portions with the determined respective text types; and

generate at least a portion of the source code attribution database according to the annotated license format data.

6. A method, comprising:

performing, by one or more computing devices that implement a code suggestion service:

determining respective licenses for respective ones of a plurality of source code files according to a source code attribution database that comprises indications of the respective licenses for the respective source code files;

generating a set of candidate code suggestions for received code input based, at least in part, on the plurality of source code files;

determining one or more code suggestions from the set of candidate code suggestions that satisfy one or more licensing criteria; and

providing the one or more code suggestions determined from the set of candidate source code files that satisfy the one or more licensing criteria.

7. The method of claim 6 , further comprising:

identifying the plurality of source code files for license attribution;

parsing the plurality of source code files to extract one or more text blocks;

comparing the one or more text blocks to a plurality of licenses to determine similarity scores between respective ones of the one or more text blocks and the plurality of licenses;

based on the similarity scores, identifying one or more of the plurality of licenses that are applicable to individual ones of the plurality of source code files; and

storing, to the source code attribution database, the indications of the respective licenses applicable to the respective ones of the plurality of source code files.

8. The method of claim 7 , wherein the one or more text blocks comprise code comments included as part of the one or more source code files.

9. The method of claim 7 , further comprising:

retrieving the plurality of licenses from a license repository; and

storing the plurality of licenses to a data store.

10. The method of claim 7 , wherein comparing the one or more text blocks to the plurality of licenses to determine the similarity scores between the respective ones of the one or more text blocks and the plurality of licenses comprises:

identifying strings of the one or more text blocks that match with strings of the plurality of licenses; and

determining the similarity scores based on a number of the identified of the one or more text blocks that match with strings of the plurality of licenses.

11. The method of claim 6 , further comprising:

obtaining license format data from a license data repository;

determining respective text types of respective portions of the license format data;

annotating the respective portions with the determined respective text types; and

generating at least a portion of the source code attribution database according to the annotated license format data.

12. The method of claim 6 , wherein determining the one or more code suggestions comprises:

filtering the set of candidate code suggestions to exclude code suggestions that do not satisfy the one or more licensing criteria.

13. The method of claim 6 , wherein the licensing criteria comprises one or more of intellectual property limitations, open source requirements, monetization limitations, reproduction limitations.

14. One or more computer-readable storage media storing instructions that, when executed on or across one or more processors, cause the one or more processors to:

determine respective licenses for respective ones of a plurality of source code files according to a source code attribution database that comprises indications of the respective licenses for the respective source code files;

generate a set of candidate code suggestions for received code input based, at least in part, on the plurality of source code files;

determine one or more code suggestions from the set of candidate code suggestions that satisfy one or more licensing criteria; and

provide the one or more code suggestions determined from the set of candidate source code files that satisfy the one or more licensing criteria.

15. The one or more computer-readable storage media of claim 14 , further comprising instructions that, when executed on or across the one or more processors, cause the one or more processors to:

identify the plurality of source code files for license attribution;

parse the plurality of source code files to extract one or more text blocks;

compare the one or more text blocks to a plurality of licenses to determine similarity scores between respective ones of the one or more text blocks and the plurality of licenses;

based on the similarity scores, identify one or more of the plurality of licenses that are applicable to individual ones of the plurality of source code files; and

store, to the source code attribution database, the indications of the respective licenses applicable to the respective ones of the plurality of source code files.

16. The one or more computer-readable storage media of claim 15 , wherein the one or more text blocks comprise code comments included as part of the one or more source code files.

17. The one or more computer-readable storage media of claim 14 , further comprising instructions that, when executed on or across the one or more processors, cause the one or more processors to:

retrieve the plurality of licenses from a license repository; and

store the plurality of licenses to a data store.

18. The one or more computer-readable storage media of claim 15 , wherein to compare the one or more text blocks to the plurality of licenses to determine the similarity scores between the respective ones of the one or more text blocks and the plurality of licenses comprises, the one or more computer-readable storage media further comprise instructions that, when executed on or across the one or more processors, cause the one or more processors to:

identify strings of the one or more text blocks that match with strings of the plurality of licenses; and determine the similarity scores based on a number of the identified of the one or more text blocks that match with strings of the plurality of licenses.

19. The one or more computer-readable storage media of claim 14 , further comprising instructions that, when executed on or across the one or more processors, cause the one or more processors to:

obtain license format data from a license data repository;

determine respective text types of respective portions of the license format data;

annotate the respective portions with the determined respective text types; and

generate at least a portion of the source code attribution database according to the annotated license format data.

20. The one or more computer-readable storage media of claim 14 , further comprising instructions that, when executed on or across the one or more processors, cause the one or more processors to:

filtering the set of candidate code suggestions to exclude code suggestions that do not satisfy the one or more licensing criteria.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2022
From: SAMUDRALA, PRAMOD CHANDRA; BONTALA, SRI RANGA AKHILESH; LEE, MATTHEW; DONCHEV, YANITSA; WANG, ZIJIAN; TIAN, YUCHEN; SHAH, HIMANI AMRISH; POKKUNURI, RAMA KRISHNA SANDEEP
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 062085/0146 →
Continuity (1)
Related Publication 20240111843A1 · Apr 4, 2024
References Cited (34)
US 7552429B2 · Dettinger et al. · 2009 [cited by applicant]
US 7853556B2 · Swaminathan et al. · 2010 [cited by applicant]
US 8359655B1 · Pham · 2013 [cited by examiner]
US 8972372B2 · Elbaum et al. · 2015 [cited by applicant]
US 9672545B2 · Maclellan et al. · 2017 [cited by applicant]
US 9977672B2 · Leupold · 2018 [cited by applicant]
US 10248545B2 · Dominguez et al. · 2019 [cited by applicant]
US 10423594B2 · Olivier et al. · 2019 [cited by applicant]
US 11327722B1 · Bahrami · 2022 [cited by examiner]
US 11704099B1 · Morse · 2023 [cited by examiner]
US 20030023963A1 · Birkholz · 2003 [cited by examiner]
US 20060116966A1 · Pedersen · 2006 [cited by examiner]
US 20090064091A1 · Tonkin et al. · 2009 [cited by applicant]
US 20100106705A1 · Rush · 2010 [cited by examiner]
US 20100115620A1 · Alme · 2010 [cited by applicant]
US 20110010304A1 · Chan Wong · 2011 [cited by examiner]
US 20120089964A1 · Sawano · 2012 [cited by applicant]
US 20120143877A1 · Kumar et al. · 2012 [cited by applicant]
US 20130007700A1 · Villar et al. · 2013 [cited by applicant]
US 20140173563A1 · Dias et al. · 2014 [cited by applicant]
US 20150106111A1 · Gray et al. · 2015 [cited by applicant]
US 20160292580A1 · Sullivan et al. · 2016 [cited by applicant]
US 20180262864A1 · Reynolds et al. · 2018 [cited by applicant]
US 20190005206A1 · Sahoo et al. · 2019 [cited by applicant]
US 20190079752A1 · Makkar · 2019 [cited by applicant]
US 20190318366A1 · Carranza · 2019 [cited by examiner]
US 20190324744A1 · Alam · 2019 [cited by examiner]
US 20210064723A1 · Drake · 2021 [cited by examiner]
US 20220236964A1 · Bahrami · 2022 [cited by examiner]
US 20230418565A1 · Arumugam Selvaraj · 2023 [cited by examiner]
US 20230418566A1 · Athiwaratkun · 2023 [cited by examiner]
U.S. Appl. No. 18/329,504, filed Jun. 5, 2023, Trevor Andrew Morse, et al. [cited by applicant]
U.S. Appl. No. 18/470,335, filed Sep. 19, 2023 Jiangtao Zhang, et al. [cited by applicant]
International Search Report and Written Opinion mailed Nov. 27, 2023 in PCT/US2023/074568, Amazon Technologies, Inc., pp. 1-11. [cited by applicant]