Expansion and reduction of source code for code refactoring

US9182980B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9182980-B2
Application numberUS-201213710612-A
CountryUS
Kind codeB2
Filing dateDec 11, 2012
Priority dateDec 11, 2012
Publication dateNov 10, 2015
Grant dateNov 10, 2015

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

An automated programming tool can receive program source code and can expand portions of the program source code to make to make identifiers explicit, insert sets of parenthesis and so on. Expansions can be kept track of so that reductions after refactoring can be confined to altered portions of the program source code.

First claim

Opening claim text (preview).

What is claimed: 1. A system comprising: at least one processor: a memory connected to the at least one processor: and a module that when loaded into the at least one processor causes the at least one processor to: receive at least one refactoring operation to be applied to program source code; expand at least one section of the program source code affected by the at least one refactoring operation to create expanded program source code; keep track of expansions made to the program source code to create the expanded program source code; and apply the at least one refactoring operation to the expanded program source code to create refactored expanded program source code. 2. The system of claim 1 , further comprising: a module that when loaded into the at least one processor causes the at least one processor to: expand the at least one section of the program source code affected by the at least one refactoring operation to create expanded program source code by inserting typecasts into the program source code to create the expanded program source code, by replacing identifiers in the program source code with fully-qualified names to create the expanded program source code, or by inserting sets of parentheses into the program source code to create the expanded program source code. 3. The system of claim 1 , wherein expand at least one section of the program source code affected by the at least one refactoring operation to create expanded program source code is applied manually. 4. The system of claim 1 , further comprising: a module that when loaded into the at least one processor causes the at least one processor to: receive refactored expanded program source code; reduce expansions made to the program source code to create the expanded source code; and create reduced refactored expanded program source code by removing unnecessary program source code that was inserted as part of expanding the program source code. 5. The system of claim 1 , further comprising: a module that when loaded into the at least one processor causes the at least one processor to: create reduced refactored program source code by removing program source code that was inserted as part of expanding the program source code. 6. The system of claim 3 , further comprising: a module that when loaded into the at least one processor causes the at least one processor to: remove inserted typecasts, name qualifications, or sets of parentheses, inserted by an automated expansion programming tool while leaving program source code unaffected by the one or more refactoring operations unchanged. 7. The system of claim 1 , further comprising: a module that when loaded into the at least one processor causes the at least one processor to: keep track of expansions made to program source code by annotating a node in a parse tree representing the program source code. 8. A method implemented on a computing device having at least one processor, the method comprising: receiving refactored expanded program source code by the processor, the refactored expanded program source code comprising source code to which at least one refactoring operation has been applied, wherein the source code was expanded prior to refactoring, wherein the expansion performed at least one of: qualifying at least one identifier, inserting at least one typecast, or inserting at least one set of parentheses; and reducing the received refactored expanded program source code by removing at least one of: at least one unnecessary typecast, at least one unnecessary identifier qualification or at least one unnecessary set of parentheses around an expression. 9. The method of claim 8 , further comprising: expanding at least one section of program source code affected by at least one refactoring operation to create expanded program source code by inserting at least one typecast into the program source code to create the expanded program source code, or by replacing at least one identifier in the program source code with a fully-qualified name to create the expanded program source code, or by inserting at least one set of parentheses into the program source code to create the expanded program source code. 10. The method of claim 9 , further comprising: keep tracking of expansions made to the program source code to create the expanded program source code. 11. The method of claim 9 , further comprising: automatically programmatically refactoring the expanded program source code. 12. The method of claim 9 , further comprising: keeping track of expansions made to the program source code by annotating nodes of a parse tree representing the expanded source code. 13. The method of claim 8 , further comprising; sending reduced refactored program source code to an editor. 14. A computer-readable storage medium, not including a signal per se, comprising computer-readable instructions which when executed cause at least one processor of a computing device to: receive by an automated expansion module at least one refactoring operation to be applied to program source code; expand at least one section of the program source code affected by the at least one refactoring operation to create expanded program source code prior to performing the at least one refactoring operation; and keep track of expansions made to the program source code to create the expanded program source code; and reduce the expanded program source code by removing at least one expansion of the expansions made to the expanded source code after the at least one refactoring operation has been applied to the expanded source code. 15. The computer-readable storage medium of claim 14 , comprising further computer-readable instructions that when execute cause the at least one processor to: expand the at least one section of the program source code affected by the at least one refactoring operation to create expanded program source code by inserting at least one typecast into the program source code to create the expanded program source code, by replacing at least one identifier in the program source code with a fully-qualified name to create the expanded program source code, or by inserting at least one set of parentheses into the program source code to create the expanded program source code. 16. The computer-readable storage medium of claim 14 , comprising further computer-readable instructions which when executed cause the at least one processor to: receive the expanded program source code by an automated refactoring module; and refactor the expanded program source code to create refactored expanded program source code. 17. The computer-readable storage medium of claim 14 , comprising further computer-readable instructions which when executed cause the at least one processor to: receive by an automated reduction module refactored expanded program source code; reduce expansions made to the program source code to create the expanded source code; and create reduced refactored expanded program source code by removing unnecessary program source code that was inserted as part expanding the program source code. 18. The computer-readable storage medium of claim 14 , comprising further computer-readable instructions which when executed cause the at least one processor to: remove inserted typecasts, name qualifications, or sets of parentheses, inserted by the automated expansion programming tool while leaving program source code unaffected by the one or more refactoring operations unchanged. 19. The computer-readable storage mediu

Assignees

Inventors

Classifications

  • G06F8/72Primary

    Code refactoring · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9182980B2 cover?
An automated programming tool can receive program source code and can expand portions of the program source code to make to make identifiers explicit, insert sets of parenthesis and so on. Expansions can be kept track of so that reductions after refactoring can be confined to altered portions of the program source code.
Who is the assignee on this patent?
Microsoft Corp, Microsoft Technology Licensing Llc
What technology area does this patent fall under?
Primary CPC classification G06F8/72. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 10 2015 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).