Automatic repairs of scripts
AssigneeInternational Business Machines Corporation
InventorsXue F. Gao, Chengen Guan, Xiao D. Zhang, Hai B. Zou
Life of this patent
Estimating the term…
Abstract
A method and associated system for repairing a script. A missed object is detected among one or more objects of the running script, the missed object being unrecognized from an original object of a previous running of the script. A change type of the detected missed object is determined. The script is repaired based on the change type.
Claims17
A method for repairing a script, comprising:
- running a script, said running the script performed by a processor of a computer system;
- said processor detecting a missed object among one or more objects of the running script, said missed object being unrecognized from an original object of a previous running of the script;
- said processor determining a change type of the detected missed object;
- and
- said processor repairing the script based on the change type,
- wherein said determining the change type of the missed object comprises:
- determining whether a height of a new hierarchical structure including the missed object has changed as compared with a height of an original hierarchical structure including the original object, said original hierarchical structure and the new hierarchical structure being hierarchical structures formed by the one or more objects of the running script together with the missed object before and after said detecting respectively;
- if it is determined that the height of the new hierarchical structure has changed then marking the change type of the missed object as a hierarchy change;
- if it is determined that the height of the new hierarchical structure has not changed then determining whether a value of an object at a lowest hierarchy in the new hierarchical structure has changed;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has changed, then determining whether a class of the object at the lowest hierarchy in the new hierarchical structure has changed and if so then marking the change type of the missed object as a class change and if not then marking the change type of the missed object as a recognition property change;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has not changed, then determining whether at least one object upwards along the new hierarchical structure starting from a parent object at the lowest hierarchy has changed and if so then marking the change type of the missed object as said hierarchy change and if not then marking the change type of the missed object as no change.
A computer program product, comprising a computer readable hardware storage device having computer readable program code stored therein, said hardware storage device being entirely hardware, said program code containing instructions which, upon being executed by a processor of a computer system, implement a method for repairing a script, said method comprising:
- said processor running a script;
- said processor detecting a missed object among one or more objects of the running script, said missed object being unrecognized from an original object of a previous running of the script;
- said processor determining a change type of the detected missed object;
- and
- said processor repairing the script based on the change type,
- wherein said determining the change type of the missed object comprises:
- determining whether a height of a new hierarchical structure including the missed object has changed as compared with a height of an original hierarchical structure including the original object, said original hierarchical structure and the new hierarchical structure being hierarchical structures formed by the one or more objects of the running script together with the missed object before and after said detecting respectively;
- if it is determined that the height of the new hierarchical structure has changed then marking the change type of the missed object as a hierarchy change;
- if it is determined that the height of the new hierarchical structure has not changed then determining whether a value of an object at a lowest hierarchy in the new hierarchical structure has changed;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has changed, then determining whether a class of the object at the lowest hierarchy in the new hierarchical structure has changed and if so then marking the change type of the missed object as a class change and if not then marking the change type of the missed object as a recognition property change;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has not changed, then determining whether at least one object upwards along the new hierarchical structure starting from a parent object at the lowest hierarchy has changed and if so then marking the change type of the missed object as said hierarchy change and if not then marking the change type of the missed object as no change.
A computer system comprising a processor, a memory coupled to the processor, and a computer readable hardware storage device coupled to the processor, said storage device containing program code which, upon being executed by the processor via the memory, implements a method for repairing a script, said method comprising:
- said processor running a script;
- said processor detecting a missed object among one or more objects of the running script, said missed object being unrecognized from an original object of a previous running of the script;
- said processor determining a change type of the detected missed object;
- and
- said processor repairing the script based on the change type,
- wherein said determining the change type of the missed object comprises:
- determining whether a height of a new hierarchical structure including the missed object has changed as compared with a height of an original hierarchical structure including the original object, said original hierarchical structure and the new hierarchical structure being hierarchical structures formed by the one or more objects of the running script together with the missed object before and after said detecting respectively;
- if it is determined that the height of the new hierarchical structure has changed then marking the change type of the missed object as a hierarchy change;
- if it is determined that the height of the new hierarchical structure has not changed then determining whether a value of an object at a lowest hierarchy in the new hierarchical structure has changed;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has changed, then determining whether a class of the object at the lowest hierarchy in the new hierarchical structure has changed and if so then marking the change type of the missed object as a class change and if not then marking the change type of the missed object as a recognition property change;
- if it is determined that the height of the new hierarchical structure has not changed and that the value of the object at the lowest hierarchy in the new hierarchical structure has not changed, then determining whether at least one object upwards along the new hierarchical structure starting from a parent object at the lowest hierarchy has changed and if so then marking the change type of the missed object as said hierarchy change and if not then marking the change type of the missed object as no change.
Dependencies are inferred from the claim text.