News Column

Patent Issued for Ranking Peer Submitted Code Snippets Using Execution Feedback

July 3, 2014



By a News Reporter-Staff News Editor at Computer Weekly News -- According to news reporting originating from Alexandria, Virginia, by VerticalNews journalists, a patent by the inventor Balasubramanian, Swaminathan (Sterling Heights, MI), filed on August 20, 2008, was published online on June 17, 2014.

The assignee for this patent, patent number 8756576, is International Business Machines Corporation (Armonk, NY).

Reporters obtained the following quote from the background information supplied by the inventors: "Most application development activities are managed within an Integrated Development Environment (IDE). Besides relating to syntax, errors can also be related to code semantics. Typically, an IDE provides an editor that is configured to validate code syntax, highlight syntactic errors in a particular language and is configured to offer appropriate corrections for any syntax errors. Often, an IDE provides a rules engine used to highlight language semantic errors, which can be difficult to identify and to correct. As such, there is a need for an application developer to find ways to effectively monitor and correct such semantic errors during development of software."

In addition to obtaining background information on this patent, VerticalNews editors also obtained the inventor's summary information for this patent: "In a first aspect, the invention provides a method for providing execution feedback of peer submitted code snippets executed for correction of semantic errors in code. The method includes identifying, in a syntax tree constructed for code inputted by a first developer into a first instance of a code editor in an integrated development environment, a node containing at least one semantic error pertaining to use of a third-party library, selecting, based on previous execution feedback provided by peer developers, a code snippet of one or more code snippets displayed for correcting the at least one semantic error for the node identified in the code to be executed, where the one or more code snippets displayed are associated with one or more collaboration records located for the node identified and where the one or more code snippets displayed are ranked based on execution feedback provided by peer developers for correcting the at least one semantic error, executing, using a code executor, the code inputted in the integrated development environment, determining whether or not the code snippet selected corrected the at least one semantic error for the node identified and, if the code snippet selected is determined not to have corrected the at least one semantic error, transmitting a new execution feedback conveying failure of the code snippet selected to correct the at least one semantic error. The method further includes receiving additional feedback from the peer developers for correcting the at least one semantic error when the code snippet does not correct the at least one semantic error identified and ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the additional feedback received from the peer developers. In an embodiment, the identifying step further includes inputting the code in the first instance of the code editor by the first developer in the integrated development environment and constructing, using a code parser of the integrated development environment, a syntax tree representation of the code inputted by the first developer. In an embodiment, the identifying step further includes providing a collaboration datastore for storing one or more collaboration records containing respective invocations for identifying the node, where a collaboration record includes one or more properties and where a respective invocation of the respective invocations includes a type of invocation and one or more parameters and creating a respective semantic error marker within the first instance of the code editor for the at least one semantic error identified using one or more collaboration records located for the node. In an embodiment, the selecting step further includes providing a code snippet processor for ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the any execution feedback received from a respective developer for the one or more code snippets executed for the one or more collaboration records located for the node identified, where a respective code snippet that has a higher successful usage is ranked higher than another respective code snippet with a lower successful usage, where a respective code snippet that has a successful usage is ranked higher than another respective code snippet that has some error occurrences within the code snippet and where a respective code snippet that has some error occurrences within the code snippet is ranked higher than another respective code snippet that has failed to correct a semantic error. In an embodiment, the determining step further includes determining whether or not the code snippet selected contains an error and, if the code snippet selected is determined to contain the error, transmitting error details to the collaboration datastore. In an embodiment, the method further includes executing additional code inputted into a second instance of the code editor by a second developer in the integrated development environment and identifying any nodes in the additional code to be executed that contains a semantic error pertaining to use of the third party library.

"In another aspect the invention provides a computer system for providing execution feedback of peer submitted code snippets executed for correction of semantic errors in code. The computer system includes a central processing unit, first program instructions to identify, in a syntax tree constructed for code inputted by a first developer into a first instance of a code editor in an integrated development environment, a node containing at least one semantic error pertaining to use of a third-party library, second program instructions to select, based on previous execution feedback provided by peer developers, a code snippet of one or more code snippets displayed for correcting the at least one semantic error for the node identified in the code to be executed, where the one or more code snippets displayed are associated with one or more collaboration records located for the node identified and where the one or more code snippets displayed are ranked based on execution feedback provided by peer developers for correcting the at least one semantic error and third program instructions to execute, using a code executor, the code inputted in the integrated development environment, the third program instructions includes instructions to determine whether or not the code snippet selected corrected the at least one semantic error for the node identified and, if the code snippet selected is determined not to have corrected the at least one semantic error, the third program instructions includes instructions to transmit a new execution feedback conveying failure of the code snippet selected to correct the at least one semantic error and where the first, second and third program instructions are stored in the computer system for execution by the central processing unit. In an embodiment, the computer system further includes fourth program instructions to receive additional feedback from the peer developers for correcting the at least one semantic error when the code snippet does not correct the at least one semantic error identified, the fourth program instructions includes instructions to rank the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the additional feedback received from the peer developers. In an embodiment, the second program instructions include instructions to provide a collaboration datastore for storing one or more collaboration records containing respective invocations for identifying the node, where a collaboration record includes one or more properties and where a respective invocation of the respective invocations includes a type of invocation and one or more parameters, the second program instructions includes instructions to create a respective semantic error marker within the first instance of the code editor for the at least one semantic error identified using one or more collaboration records located for the node. In an embodiment, the second program instructions include instructions to provide a code snippet processor for ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the any execution feedback received from a respective developer for the one or more code snippets executed for the one or more collaboration records located for the node identified, where a respective code snippet that has a higher successful usage is ranked higher than another respective code snippet with a lower successful usage, where a respective code snippet that has a successful usage is ranked higher than another respective code snippet that has some error occurrences within the code snippet and where a respective code snippet that has some error occurrences within the code snippet is ranked higher than another respective code snippet that has failed to correct a semantic error. In an embodiment, the third program instructions include instructions to determine whether or not the code snippet selected contains an error and, if the code snippet selected is determined to contain the error, the third program instructions includes instructions to transmit error details to the collaboration datastore. In an embodiment, the fourth program instructions include instructions to execute additional code inputted into a second instance of the code editor by a second developer in the integrated development environment and to identify any nodes in the additional code to be executed that contains a semantic error pertaining to use of the third party library. In an embodiment, each of the first, second, third and fourth program instructions are stored in the computer system for execution by the central processing unit.

"In yet another aspect, the invention provides a computer program product for correcting semantic errors in code in an integrated development environment. The computer program product includes a computer readable medium, first program instructions to identify, in a syntax tree constructed for code inputted by a first developer into a first instance of a code editor in an integrated development environment, a node containing at least one semantic error pertaining to use of a third-party library and second program instructions to select, based on previous execution feedback provided by peer developers, a code snippet of one or more code snippets displayed for correcting the at least one semantic error for the node identified in the code to be executed, where the one or more code snippets displayed are associated with one or more collaboration records located for the node identified and where the one or more code snippets displayed are ranked based on execution feedback provided by peer developers for correcting the at least one semantic error and third program instructions to execute, using a code executor, the code inputted in the integrated development environment, the third program instructions includes instructions to determine whether or not the code snippet selected corrected the at least one semantic error for the node identified and, if the code snippet selected is determined not to have corrected the at least one semantic error, the third program instructions includes instructions to transmit a new execution feedback conveying failure of the code snippet selected to correct the at least one semantic error. In an embodiment, the computer program product further includes fourth program instructions to receive additional feedback from the peer developers for correcting the at least one semantic error when the code snippet does not correct the at least one semantic error identified, the fourth program instructions includes instructions to rank the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the additional feedback received from the peer developers. In an embodiment, the second program instructions include instructions to provide a collaboration datastore for storing one or more collaboration records containing respective invocations for identifying the node, where a collaboration record includes one or more properties and where a respective invocation of the respective invocations includes a type of invocation and one or more parameters, the second program instructions includes instructions to create a respective semantic error marker within the first instance of the code editor for the at least one semantic error identified using one or more collaboration records located for the node. In an embodiment, the second program instructions include instructions to provide a code snippet processor for ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the any execution feedback received from a respective developer for the one or more code snippets executed for the one or more collaboration records located for the node identified, where a respective code snippet that has a higher successful usage is ranked higher than another respective code snippet with a lower successful usage, where a respective code snippet that has a successful usage is ranked higher than another respective code snippet that has some error occurrences within the code snippet and where a respective code snippet that has some error occurrences within the code snippet is ranked higher than another respective code snippet that has failed to correct a semantic error. In an embodiment, the third program instructions include instructions to determine whether or not the code snippet selected contains an error and, if the code snippet selected is determined to contain the error, the third program instructions includes instructions to transmit error details to the collaboration datastore. In an embodiment, the fourth program instructions include instructions to execute additional code inputted into a second instance of the code editor by a second developer in the integrated development environment and to identify any nodes in the additional code to be executed that contains a semantic error pertaining to use of the third party library. In an embodiment, each of the first, second, third and fourth program instructions are recorded on the computer readable medium.

"Further, in yet another aspect, the invention provides a process for deploying computing infrastructure including integrating computer-readable code into a computing system, where the code in combination with the computing system is capable of performing a process of providing execution feedback of peer submitted code snippets executed for correction of semantic errors in code inputted in an integrated development environment. The process includes identifying, in a syntax tree constructed for code inputted by a first developer into a first instance of a code editor in an integrated development environment, a node containing at least one semantic error pertaining to use of a third-party library, selecting, based on previous execution feedback provided by peer developers, a code snippet of one or more code snippets displayed for correcting the at least one semantic error for the node identified in the code to be executed, where the one or more code snippets displayed are associated with one or more collaboration records located for the node identified and where the one or more code snippets displayed are ranked based on execution feedback provided by peer developers for correcting the at least one semantic error, executing, using a code executor, the code inputted in the integrated development environment, determining whether or not the code snippet selected corrected the at least one semantic error for the node identified, if the code snippet selected is determined not to have corrected the at least one semantic error, transmitting a new execution feedback conveying failure of the code snippet selected to correct the at least one semantic error, receiving additional feedback from the peer developers for correcting the at least one semantic error when the code snippet does not correct the at least one semantic error identified and ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the additional feedback received from the peer developers. In an embodiment, the identifying step further includes inputting the code in the first instance of the code editor by the first developer in the integrated development environment and constructing, using a code parser of the integrated development environment, a syntax tree representation of the code inputted by the first developer. In an embodiment, the identifying step further includes providing a collaboration datastore for storing one or more collaboration records containing respective invocations for identifying the node, where a collaboration record includes one or more properties and where a respective invocation of the respective invocations includes a type of invocation and one or more parameters and creating a respective semantic error marker within the first instance of the code editor for the at least one semantic error identified using one or more collaboration records located for the node. In an embodiment, the determining step further includes determining whether or not the code snippet selected contains an error and, if the code snippet selected is determined to contain the error, transmitting error details to the collaboration datastore. In an embodiment, the selecting step further includes providing a code snippet processor for ranking the one or more code snippets displayed for correcting the at least one semantic error for the node identified using the any execution feedback received from a respective developer for the one or more code snippets executed for the one or more collaboration records located for the node identified, where a respective code snippet that has a higher successful usage is ranked higher than another respective code snippet with a lower successful usage, where a respective code snippet that has a successful usage is ranked higher than another respective code snippet that has some error occurrences within the code snippet and where a respective code snippet that has some error occurrences within the code snippet is ranked higher than another respective code snippet that has failed to correct a semantic error. In an embodiment, the process further includes executing additional code inputted into a second instance of the code editor by a second developer in the integrated development environment and identifying any nodes in the additional code to be executed that contains a semantic error pertaining to use of the third party library."

For more information, see this patent: Balasubramanian, Swaminathan. Ranking Peer Submitted Code Snippets Using Execution Feedback. U.S. Patent Number 8756576, filed August 20, 2008, and published online on June 17, 2014. Patent URL: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&r=1&f=G&l=50&s1=8756576.PN.&OS=PN/8756576RS=PN/8756576

Keywords for this news article include: International Business Machines Corporation.

Our reports deliver fact-based news of research and discoveries from around the world. Copyright 2014, NewsRx LLC


For more stories covering the world of technology, please see HispanicBusiness' Tech Channel



Source: Computer Weekly News


Story Tools






HispanicBusiness.com Facebook Linkedin Twitter RSS Feed Email Alerts & Newsletters