US8656362B2

System, method and program product for correcting semantic errors in code using peer submitted code snippets

Summary by NHIP

Code Semantic Error Correction System

The system corrects semantic errors in code within an integrated development environment by identifying problematic nodes in a syntax tree. It displays executable snippets from collaboration records and configures them via active fields for input, output, and return values before automatic execution.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

A method, system and/or program product corrects semantic errors in code in an integrated development environment. The method includes inputting, using a code editor, code being developed in an integrated development environment. One or more nodes, in a syntax tree constructed for inputting the code, are identified as containing semantic errors pertaining to use of a third-party library. A primary executable code snippet and a secondary code snippet for correcting the semantic errors are displayed. If execution of the primary code snippet does not correct the semantic errors, then the secondary code snippet is automatically executed.

US8656362B2, drawing sheet 1
Sheet 1 of 8

Term

Projected expiry 20 August 2028.

  1. Priority
  2. Filed
  3. Granted
  4. Today
  5. Projected expiry

17 claims: 3 independent, 14 dependent

  1. 1
    Broadest claimClaim Score 18, narrow(NHIP)A method for correcting semantic errors in code in an integrated development environment, said method comprising the steps of:inputting, using a code editor, code being developed in an integrated development environment;identifying, in a syntax tree constructed for said code inputted, one or more nodes containing semantic errors pertaining to use of a third-party library;displaying one or more suggestions for correcting said semantic errors identified for a node in said syntax tree containing said semantic errors, wherein said one or more suggestions include one or more executable code snippets associated with one or more collaboration records located for a chosen node from the syntax tree;displaying an executable code snippet configuration interface for configuring said one or more executable code snippets, wherein the executable code snippet configuration interface comprises: an input parameter active field for identifying input parameters that are required, by said chosen node, to be used with said one or more executable code snippets;an output parameter active field for identifying output parameters that are required, by said chosen node, to be used with said one or more executable code snippets;an input/output parameter active field for identifying input/output parameters that are required, by said chosen node, to be used with said one or more executable code snippets;and a return value active field for identifying a return value that is required, by said chosen node, to be returned by said one or more executable code snippets;selecting at least one executable code snippet from said one or more executable code snippets displayed for correcting said semantic errors identified for said chosen node, wherein said at least one executable code snippet comprises a primary executable code snippet and a secondary executable code snippet;executing, by a computer, the primary executable code snippet;and in response to the primary executable code snippet failing to correct said semantic errors identified for said chosen node, automatically executing the secondary executable code snippet.
  2. 7
    A computer system for correcting semantic errors in code in an integrated development environment, said computer system comprising:a central processing unit;first program instructions to input, using a code editor, code being developed in an integrated development environment;second program instructions to identify, in a syntax tree constructed for said code inputted, one or more nodes containing semantic errors pertaining to use of a third-party library;third program instructions to display one or more suggestions for correcting said semantic errors identified for a node in said syntax tree containing said semantic errors, wherein said one or more suggestions include one or more executable code snippets associated with one or more collaboration records located for a chosen node from the syntax tree;fourth program instructions to select at least one executable code snippet from said one or more executable code snippets displayed for correcting said semantic errors identified for said chosen node, wherein said at least one executable code snippet comprises a primary executable code snippet and a secondary executable code snippet;fifth program instructions to execute the primary executable code snippet;sixth program instructions to, in response to the primary executable code snippet failing to correct said semantic errors identified for said chosen node, automatically execute the secondary executable code snippet;and seventh program instructions to display a code snippet configuration interface for configuring said one or more code snippets, wherein the code snippet configuration interface comprises: an input parameter active field for identifying input parameters that are required, by said chosen node, to be used with said one or more code snippets;an output parameter active field for identifying output parameters that are required, by said chosen node, to be used with said one or more code snippets;an input/output parameter active field for identifying input/output parameters that are required, by said chosen node, to be used with said one or more code snippets;and a return value active field for identifying a return value that is required, by said chosen node, to be returned by said one or more code snippets;and wherein said first, second, third, fourth, fifth, sixth, and seventh program instructions are stored in said computer system for execution by said central processing unit.
  3. 13
    A computer program product for correcting semantic errors in code in an integrated development environment, said computer program product comprising:a non-transitory computer readable storage medium;first program instructions to input, using a code editor, code being developed in an integrated development environment;second program instructions to identify, in a syntax tree constructed for said code inputted, one or more nodes containing semantic errors pertaining to use of a third-party library;third program instructions to display one or more suggestions for correcting said semantic errors identified for a node in said syntax tree containing said semantic errors, wherein said one or more suggestions include one or more executable code snippets associated with one or more collaboration records located for a chosen node from the syntax tree;fourth program instructions to select at least one executable code snippet from said one or more executable code snippets displayed for correcting said semantic errors identified for said chosen node, wherein said at least one executable code snippet comprises a primary executable code snippet and a secondary executable code snippet;fifth program instructions to execute the primary executable code snippet;sixth program instructions to, in response to the primary executable code snippet failing to correct said semantic errors identified for said chosen node, automatically execute the secondary executable code snippet;and seventh program instructions to display a code snippet configuration interface for configuring said one or more code snippets, wherein the code snippet configuration interface comprises: an input parameter active field for identifying input parameters that are required, by said chosen node, to be used with said one or more code snippets;an output parameter active field for identifying output parameters that are required, by said chosen node, to be used with said one or more code snippets;an input/output parameter active field for identifying input/output parameters that are required, by said chosen node, to be used with said one or more code snippets;and a return value active field for identifying a return value that is required, by said chosen node, to be returned by said one or more code snippets;and wherein said first, second, third, fourth, fifth, sixth, and seventh program instructions are recorded on said non-transitory computer readable storage medium.