CN105205000B - The method and system of the impacted scope of code in positioning software exploitation - Google Patents

The method and system of the impacted scope of code in positioning software exploitation Download PDF

Info

Publication number
CN105205000B
CN105205000B CN201510673640.3A CN201510673640A CN105205000B CN 105205000 B CN105205000 B CN 105205000B CN 201510673640 A CN201510673640 A CN 201510673640A CN 105205000 B CN105205000 B CN 105205000B
Authority
CN
China
Prior art keywords
code
class
entry
software
function keyword
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510673640.3A
Other languages
Chinese (zh)
Other versions
CN105205000A (en
Inventor
王海文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201510673640.3A priority Critical patent/CN105205000B/en
Publication of CN105205000A publication Critical patent/CN105205000A/en
Application granted granted Critical
Publication of CN105205000B publication Critical patent/CN105205000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The system of the impacted scope of code during the method for the impacted scope of code and a kind of positioning software are developed in being developed the invention provides a kind of positioning software, wherein, the method for the impacted scope of code includes in the positioning software exploitation:Receive the function keyword of input;Entry code class is determined according to the function keyword, and establishes the mapping entity of the function keyword and the entry code class;The calling link of the entry code class is extracted in software systems code set according to the entry code class, with according to the mapping entity and the impacted scope of code for calling link positioning and the function keyword match.By technical scheme, when change occurs for demand or software test goes wrong, all impacted code ranges can be quickly and accurately positioned independent of software development document, so as to improve software development efficiency.

Description

The method and system of the impacted scope of code in positioning software exploitation
Technical field
The present invention relates to field of computer technology, the impacted model of code in being developed in particular to a kind of positioning software The system of the impacted scope of code in the method enclosed and a kind of exploitation of positioning software.
Background technology
At present, in software development process, development teams are all by the composition of personnel of various different positions, by different role Development task is completed in cooperation.In general, there are demand, design, exploitation and test, wherein, demand and designer need to formulate Requirement documents and design documentation, developer write code and realize demand, and tester carries out functional test, is finally completed one The development task of system.When demand occurs change or gone wrong in testing, developer is required to quickly The change of positioning this demand or the code range that is influenceed of problem, or be accurately positioned the code bit for causing problem to occur Put.
And the existing scheme to solve the above problems is established between incidence relation and document and code between document to be logical Incidence relation, to be positioned.But the text simply by the keyword and code file analyzed in document of whole realization Part name is matched, and incidence relation is established if consistent, and the filename that program presence is highly dependent on code file is The defects of no specification, i.e.,:The division of code file whether very fine granularity, once the filename for code file occur it is lack of standardization or It situations such as code is reconstructed, then will be unable to find incidence relation, and then impacted code range can not be found.If The comparison of code file division is thick, for example is simply divided by functional node, then is only able to find corresponding node, and can not be more accurate Navigate to button actions;Further, the filename of general code file only meaningful word either word abbreviation, not It can accomplish to match completely with keyword completely.To sum up, the program can only navigate to straight corresponding to demand or test problem keyword Code file is connect, the correlative code of all indirect associations can not be found.
In view of this, the present invention finds all call relations between code by code analysis content.Then according to demand Or the function keyword of problem description, corresponding entry code is found, then by the calling topological relation between code, is found All coverages.The principle that function keyword finds corresponding entry code is, either functional node or function button, all It is that title can be set in code, or title and code opening relationships by way of registration, so by interface The function keyword shown, it is possible to corresponding entry code is found, so than looking for code literary from the keyword in document Part name is more accurate.
Based on above scene, one can be quick, is accurately positioned code model corresponding to factors influencing demand scope or problem The instrument enclosed, it will greatly improve development efficiency, improve speed measuring with software.
Therefore, how when change occurs for demand or software test goes wrong, independent of software development document All impacted code ranges are quickly and accurately positioned, are asked so as to improve software development efficiency as technology urgently to be resolved hurrily Topic.
The content of the invention
The present invention is based on above-mentioned technical problem, when change occurs for demand or software test goes wrong, independent of All impacted code ranges can be quickly and accurately positioned in software development document, so as to improve software development efficiency.
In view of this, first aspect of the present invention it is proposed in a kind of exploitation of positioning software code impacted scope side Method, including:Receive the function keyword of input;Entry code class is determined according to the function keyword, and establishes the function Keyword and the mapping entity of the entry code class;Described in being extracted according to the entry code class in software systems code set The calling link of entry code class, with according to the mapping entity and the calling link positioning and the function keyword match The impacted scope of code.
In the technical scheme, inputted when receiving user (such as software developer) in software systems display interface Function keyword when, the entry code class for the impacted scope of location code can be determined according to the function keyword, and The mapping entity of the entry code class and the function keyword is established, then according to entry code class in software systems code set The complete calling link of the entry code class is extracted, and then according to above-mentioned mapping entity with calling link to determine to close with the function All impacted code ranges of key word matching, in this way, by function keyword without relying on any software development text Shelves find corresponding entry code class and then by code analysis contents, find all call relations between code, you can quick All impacted code ranges are positioned exactly, so as to improve software development efficiency, are simultaneously effective avoided because software is opened Dispatch shelves are asynchronous with final code and the problem of cause code impacted scope position inaccurate.
In the above-mentioned technical solutions, it is preferable that described to be extracted according to the entry code class in software systems code set The calling link of the entry code class, with according to the mapping entity and the calling link positioning and the function keyword The impacted scope of code of matching specifically includes:Analysis is scanned in the software systems code set by ASM frameworks, with Obtain the call relation between all code words in the software systems code set;According in the software systems code set The code that call relation between all code words establishes the software systems code set quotes topological relation resources bank;Root According to the entry code class calling link is extracted in the code quotes topological relation resources bank.
In the technical scheme, pass through a kind of ASM frameworks (Java (cross-platform software that can write first Object oriented program language) bytecode control frame) to software systems code set carry out code content scanning analysis, Which other code word refer to the code word analyzed in software systems code set, call in which method with And other code words have invoked which code word (which code word have invoked indirectly) again, and then obtain software systems generation The call relation between all code words in code collection, with formed code quote topological relation resources bank, then can according to by The entry code class that function keyword determines extracts it in the code of formation quotes topological relation resources bank and calls link, with most All impacted code ranges with function keyword match are determined eventually, i.e., comprehensively and accurately to affected code Positioned, avoid omitting and influenceing the quality of software product.
In any of the above-described technical scheme, it is preferable that described to quote topology in the code according to the entry code class The calling link is extracted in relationship resource storehouse to specifically include:Topological relation is quoted in the code according to the entry code class The direct reference code word for obtaining the entry code class is searched in resources bank;Travel through the code and quote topological relation resource Storehouse, according to all indirect referencing code words of entry code class described in the directly reference code word recursive lookup, to extract State calling link.
In the technical scheme, topology is quoted according to code of the entry code class in the software systems code set of foundation first It is found out in relationship resource storehouse and directly quotes code word, the code is further traveled through and quotes topological relation resource block, with basis The direct all indirect referencing code words quoted code word recursive lookup and go out the entry code class, are extracted with effectively ensuring that Entry code class calling link comprehensive integrality.
In any of the above-described technical scheme, it is preferable that it is described that entry code class is determined according to the function keyword, to build Found the function keyword and the mapping entity of the entry code class specifically includes:Scanning is passed through according to the function keyword The mode of code configuration file, searching data storehouse registration table and/or analyzing software system source code determines the entry code class; The mapping established between key word type, the function keyword and the entry code class of the function keyword is real Body.
In the technical scheme, entry code class is determined by the function keyword inputted in software systems display interface Mode comprises at least one below or its combination:Pass through scan code configuration file, searching data storehouse registration table and analysis software The mode of system source code, the principle of institute's foundation are:Functional node and/or function button (i.e. interface element) all can be corresponding Entered in code content by configuration file or database registration, or directly in code content set functional node and/or Function button, that is, establish function and the mapping relations of code;Then basis can establish function keyword and its keyword class The mapping entity of type and entry code class, further to extract the calling link completion pair of entry code class and function keyword All impacted code ranges to match are soft to be lifted so that software developer improves software systems according to the positioning Part development efficiency.
In any of the above-described technical scheme, it is preferable that the key word type of the function keyword includes:Functional node And/or function button;And the function keyword includes:Software requirement change and/or software test problem describe described The title of the title of functional node and/or the function button.
In the technical scheme, the key word type of function keyword includes but is not limited to:Functional node and function button Or its combination, event can also be included certainly, and function keyword then should at least include:The function of software requirement description of change The title and/or function of the title of node and/or the functional node of the title of function button, and/or software test problem description The title of button, naturally it is also possible to including the function keyword that other can be used in navigating to entry code class, to ensure scheme The feasibility of implementation.
According to the second aspect of the invention, it is proposed that the system of the impacted scope of code, bag in a kind of positioning software exploitation Include:Receiving module, for receiving the function keyword of input;Processing module, for determining entrance according to the function keyword Code word, and establish the mapping entity of the function keyword and the entry code class;Locating module, for entering according to Mouth code word extracts the calling link of the entry code class in software systems code set, with according to the mapping entity and institute State and call link positioning and the impacted scope of code of the function keyword match.
In the technical scheme, inputted when receiving user (such as software developer) in software systems display interface Function keyword when, the entry code class for the impacted scope of location code can be determined according to the function keyword, and The mapping entity of the entry code class and the function keyword is established, then according to entry code class in software systems code set The complete calling link of the entry code class is extracted, and then according to above-mentioned mapping entity with calling link to determine to close with the function All impacted code ranges of key word matching, in this way, by function keyword without relying on any software development text Shelves find corresponding entry code class and then by code analysis contents, find all call relations between code, you can quick All impacted code ranges are positioned exactly, so as to improve software development efficiency, are simultaneously effective avoided because software is opened Dispatch shelves are asynchronous with final code and the problem of cause code impacted scope position inaccurate.
In the above-mentioned technical solutions, it is preferable that the locating module specifically includes:Analysis module, for passing through ASM frameworks Analysis is scanned in the software systems code set, to obtain between all code words in the software systems code set Call relation;Creation module, closed for the calling between all code words in the software systems code set The code that system establishes the software systems code set quotes topological relation resources bank;Abstraction module, for according to the entrance generation Code class extracts the calling link in the code quotes topological relation resources bank.
In the technical scheme, pass through a kind of ASM frameworks (Java (cross-platform software that can write first Object oriented program language) bytecode control frame) to software systems code set carry out code content scanning analysis, Which other code word refer to the code word analyzed in software systems code set, call in which method with And other code words have invoked which code word (which code word have invoked indirectly) again, and then obtain software systems generation The call relation between all code words in code collection, with formed code quote topological relation resources bank, then can according to by The entry code class that function keyword determines extracts it in the code of formation quotes topological relation resources bank and calls link, with most All impacted code ranges with function keyword match are determined eventually, i.e., comprehensively and accurately to affected code Positioned, avoid omitting and influenceing the quality of software product.
In any of the above-described technical scheme, it is preferable that the abstraction module specifically includes:Searching modul, for according to institute State entry code class and the direct reference generation for obtaining the entry code class is searched in the code quotes topological relation resources bank Code class;Spider module, topological relation resources bank is quoted for traveling through the code, looked into according to the code word recurrence of directly quoting All indirect referencing code words of the entry code class are looked for, to extract the calling link.
In the technical scheme, topology is quoted according to code of the entry code class in the software systems code set of foundation first It is found out in relationship resource storehouse and directly quotes code word, the code is further traveled through and quotes topological relation resource block, with basis The direct all indirect referencing code words quoted code word recursive lookup and go out the entry code class, are extracted with effectively ensuring that Entry code class calling link comprehensive integrality.
In any of the above-described technical scheme, it is preferable that the processing module specifically includes:Determining module, for according to institute State side of the function keyword by scan code configuration file, searching data storehouse registration table and/or analyzing software system source code Formula determines the entry code class;Mapping block, key word type, the function for establishing the function keyword are crucial The mapping entity between word and the entry code class.
In the technical scheme, entry code class is determined by the function keyword inputted in software systems display interface Mode comprises at least one below or its combination:Pass through scan code configuration file, searching data storehouse registration table and analysis software The mode of system source code, the principle of institute's foundation are:Functional node and/or function button (i.e. interface element) all can be corresponding Entered in code content by configuration file or database registration, or directly in code content set functional node and/or Function button, that is, establish function and the mapping relations of code;Then basis can establish function keyword and its keyword class The mapping entity of type and entry code class, further to extract the calling link completion pair of entry code class and function keyword All impacted code ranges to match are soft to be lifted so that software developer improves software systems according to the positioning Part development efficiency.
In any of the above-described technical scheme, it is preferable that the key word type of the function keyword includes:Functional node And/or function button;And the function keyword includes:Software requirement change and/or software test problem describe described The title of the title of functional node and/or the function button.
In the technical scheme, the key word type of function keyword includes but is not limited to:Functional node and function button Or its combination, event can also be included certainly, and function keyword then should at least include:The function of software requirement description of change The title and/or function of the title of node and/or the functional node of the title of function button, and/or software test problem description The title of button, naturally it is also possible to including the function keyword that other can be used in navigating to entry code class, to ensure scheme The feasibility of implementation.
By above technical scheme, when change occurs for demand or software test goes wrong, independent of software development Document can be quickly and accurately positioned all impacted code ranges, so as to improve software development efficiency.
Brief description of the drawings
Fig. 1 shows the method for the impacted scope of code in positioning software exploitation according to an embodiment of the invention Schematic flow sheet;
Fig. 2 shows the system of the impacted scope of code in positioning software exploitation according to an embodiment of the invention Block diagram;
Fig. 3 shows that the principle according to an embodiment of the invention that entry code class is searched according to function keyword is shown It is intended to;
Fig. 4 shows establishment interface element according to an embodiment of the invention and point of entry code class mapping relations Analyse process schematic;
Fig. 5 shows that the crawl code according to an embodiment of the invention in code quotes topological relation resources bank is adjusted With the analysis process schematic of link;
Fig. 6 shows that establishment code according to an embodiment of the invention quotes the process signal of topological relation resources bank Figure.
Embodiment
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above objects, features and advantages of the present invention Mode is applied the present invention is further described in detail.It should be noted that in the case where not conflicting, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also To be different from other modes described here using other to implement, therefore, protection scope of the present invention is not by described below Specific embodiment limitation.
Fig. 1 shows the method for the impacted scope of code in positioning software exploitation according to an embodiment of the invention Schematic flow sheet.
As shown in figure 1, in positioning software according to an embodiment of the invention exploitation the impacted scope of code method, Including:Step 102, the function keyword of input is received;Step 104, entry code class is determined according to the function keyword, and Establish the mapping entity of the function keyword and the entry code class;Step 106, according to the entry code class in software System code concentrates the calling link for extracting the entry code class, with according to the mapping entity and the calling link positioning With the impacted scope of code of the function keyword match.
In the technical scheme, inputted when receiving user (such as software developer) in software systems display interface Function keyword when, the entry code class for the impacted scope of location code can be determined according to the function keyword, and The mapping entity of the entry code class and the function keyword is established, then according to entry code class in software systems code set The complete calling link of the entry code class is extracted, and then according to above-mentioned mapping entity with calling link to determine to close with the function All impacted code ranges of key word matching, in this way, by function keyword without relying on any software development text Shelves find corresponding entry code class and then by code analysis contents, find all call relations between code, you can quick All impacted code ranges are positioned exactly, so as to improve software development efficiency, are simultaneously effective avoided because software is opened Dispatch shelves are asynchronous with final code and the problem of cause code impacted scope position inaccurate.
In the above-mentioned technical solutions, it is preferable that the step 106 specifically includes:By ASM frameworks in the software systems Analysis is scanned in code set, to obtain the call relation between all code words in the software systems code set;Root The software systems code set is established according to the call relation between all code words in the software systems code set Code quotes topological relation resources bank;Institute is extracted in the code quotes topological relation resources bank according to the entry code class State calling link.
In the technical scheme, pass through a kind of ASM frameworks (Java (cross-platform software that can write first Object oriented program language) bytecode control frame) to software systems code set carry out code content scanning analysis, Which other code word refer to the code word analyzed in software systems code set, call in which method with And other code words have invoked which code word (which code word have invoked indirectly) again, and then obtain software systems generation The call relation between all code words in code collection, with formed code quote topological relation resources bank, then can according to by The entry code class that function keyword determines extracts it in the code of formation quotes topological relation resources bank and calls link, with most All impacted code ranges with function keyword match are determined eventually, i.e., comprehensively and accurately to affected code Positioned, avoid omitting and influenceing the quality of software product.
In any of the above-described technical scheme, it is preferable that described to quote topology in the code according to the entry code class The calling link is extracted in relationship resource storehouse to specifically include:Topological relation is quoted in the code according to the entry code class The direct reference code word for obtaining the entry code class is searched in resources bank;Travel through the code and quote topological relation resource Storehouse, according to all indirect referencing code words of entry code class described in the directly reference code word recursive lookup, to extract State calling link.
In the technical scheme, topology is quoted according to code of the entry code class in the software systems code set of foundation first It is found out in relationship resource storehouse and directly quotes code word, the code is further traveled through and quotes topological relation resource block, with basis The direct all indirect referencing code words quoted code word recursive lookup and go out the entry code class, are extracted with effectively ensuring that Entry code class calling link comprehensive integrality.
In any of the above-described technical scheme, it is preferable that the step 104 specifically includes:Led to according to the function keyword The mode of overscanning code configuration file, searching data storehouse registration table and/or analyzing software system source code determines the entrance Code word;The institute established between key word type, the function keyword and the entry code class of the function keyword State mapping entity.
In the technical scheme, entry code class is determined by the function keyword inputted in software systems display interface Mode comprises at least one below or its combination:Pass through scan code configuration file, searching data storehouse registration table and analysis software The mode of system source code, the principle of institute's foundation are:Functional node and/or function button (i.e. interface element) all can be corresponding Entered in code content by configuration file or database registration, or directly in code content set functional node and/or Function button, that is, establish function and the mapping relations of code;Then basis can establish function keyword and its keyword class The mapping entity of type and entry code class, further to extract the calling link completion pair of entry code class and function keyword All impacted code ranges to match are soft to be lifted so that software developer improves software systems according to the positioning Part development efficiency.
In any of the above-described technical scheme, it is preferable that the key word type of the function keyword includes:Functional node And/or function button;And the function keyword includes:Software requirement change and/or software test problem describe described The title of the title of functional node and/or the function button.
In the technical scheme, the key word type of function keyword includes but is not limited to:Functional node and function button Or its combination, event can also be included certainly, and function keyword then should at least include:The function of software requirement description of change The title and/or function of the title of node and/or the functional node of the title of function button, and/or software test problem description The title of button, naturally it is also possible to including the function keyword that other can be used in navigating to entry code class, to ensure scheme The feasibility of implementation.
Fig. 2 shows the system of the impacted scope of code in positioning software exploitation according to an embodiment of the invention Block diagram.
As shown in Fig. 2 in positioning software according to an embodiment of the invention exploitation the impacted scope of code system 200, including:Receiving module 202, processing module 204 and locating module 206.
Wherein, receiving module 202, for receiving the function keyword of input;Processing module 204, for according to the work( Energy keyword determines entry code class, and establishes the mapping entity of the function keyword and the entry code class;Positioning mould Block 206, for the calling link of the entry code class to be extracted in software systems code set according to the entry code class, with According to the mapping entity and the impacted scope of code for calling link positioning and the function keyword match.
In the technical scheme, inputted when receiving user (such as software developer) in software systems display interface Function keyword when, the entry code class for the impacted scope of location code can be determined according to the function keyword, and The mapping entity of the entry code class and the function keyword is established, then according to entry code class in software systems code set The complete calling link of the entry code class is extracted, and then according to above-mentioned mapping entity with calling link to determine to close with the function All impacted code ranges of key word matching, in this way, by function keyword without relying on any software development text Shelves find corresponding entry code class and then by code analysis contents, find all call relations between code, you can quick All impacted code ranges are positioned exactly, so as to improve software development efficiency, are simultaneously effective avoided because software is opened Dispatch shelves are asynchronous with final code and the problem of cause code impacted scope position inaccurate.
In the above-mentioned technical solutions, it is preferable that the locating module 206 specifically includes:Analysis module 2062, creation module 2064 and abstraction module 2066.
Wherein, analysis module 2062, for being scanned analysis in the software systems code set by ASM frameworks, To obtain the call relation between all code words in the software systems code set;Creation module 2064, for according to institute State the code that the call relation between all code words in software systems code set establishes the software systems code set Quote topological relation resources bank;Abstraction module 2066, for quoting topological relation in the code according to the entry code class The calling link is extracted in resources bank.
In the technical scheme, pass through a kind of ASM frameworks (Java (cross-platform software that can write first Object oriented program language) bytecode control frame) to software systems code set carry out code content scanning analysis, Which other code word refer to the code word analyzed in software systems code set, call in which method with And other code words have invoked which code word (which code word have invoked indirectly) again, and then obtain software systems generation The call relation between all code words in code collection, with formed code quote topological relation resources bank, then can according to by The entry code class that function keyword determines extracts it in the code of formation quotes topological relation resources bank and calls link, with most All impacted code ranges with function keyword match are determined eventually, i.e., comprehensively and accurately to affected code Positioned, avoid omitting and influenceing the quality of software product.
In any of the above-described technical scheme, it is preferable that the abstraction module 2066 specifically includes:The He of searching modul 20662 Spider module 20664.
Wherein, searching modul 20662, for quoting topological relation resources bank in the code according to the entry code class It is middle to search the direct reference code word for obtaining the entry code class;Spider module 20664, opened up for traveling through the code reference Relationship resource storehouse is flutterred, according to all indirect referencing codes of entry code class described in the directly reference code word recursive lookup Class, to extract the calling link.
In the technical scheme, topology is quoted according to code of the entry code class in the software systems code set of foundation first It is found out in relationship resource storehouse and directly quotes code word, the code is further traveled through and quotes topological relation resource block, with basis The direct all indirect referencing code words quoted code word recursive lookup and go out the entry code class, are extracted with effectively ensuring that Entry code class calling link comprehensive integrality.
In any of the above-described technical scheme, it is preferable that the processing mould 204 specifically includes:Determining module 2042 and mapping Module 2044.
Wherein it is determined that module 2042, for passing through scan code configuration file, searching data according to the function keyword The mode of storehouse registration table and/or analyzing software system source code determines the entry code class;Mapping block 2044, for establishing The mapping entity between the key word type of the function keyword, the function keyword and the entry code class.
In the technical scheme, entry code class is determined by the function keyword inputted in software systems display interface Mode comprises at least one below or its combination:Pass through scan code configuration file, searching data storehouse registration table and analysis software The mode of system source code, the principle of institute's foundation are:Functional node and/or function button (i.e. interface element) all can be corresponding Entered in code content by configuration file or database registration, or directly in code content set functional node and/or Function button, that is, establish function and the mapping relations of code;Then basis can establish function keyword and its keyword class The mapping entity of type and entry code class, further to extract the calling link completion pair of entry code class and function keyword All impacted code ranges to match are soft to be lifted so that software developer improves software systems according to the positioning Part development efficiency.
In any of the above-described technical scheme, it is preferable that the key word type of the function keyword includes:Functional node And/or function button;And the function keyword includes:Software requirement change and/or software test problem describe described The title of the title of functional node and/or the function button.
In the technical scheme, the key word type of function keyword includes but is not limited to:Functional node and function button Or its combination, event can also be included certainly, and function keyword then should at least include:The function of software requirement description of change The title and/or function of the title of node and/or the functional node of the title of function button, and/or software test problem description The title of button, naturally it is also possible to including the function keyword that other can be used in navigating to entry code class, to ensure scheme The feasibility of implementation.
Technical scheme is described in detail with reference to Fig. 3 to Fig. 6.
Fig. 3 shows that the principle according to an embodiment of the invention that entry code class is searched according to function keyword is shown It is intended to.
Fig. 4 shows establishment interface element according to an embodiment of the invention and point of entry code class mapping relations Analyse process schematic.
Fig. 5 shows that the crawl code according to an embodiment of the invention in code quotes topological relation resources bank is adjusted With the analysis process schematic of link.
Fig. 6 shows that establishment code according to an embodiment of the invention quotes the process signal of topological relation resources bank Figure.
As shown in figure 3, the principle according to an embodiment of the invention that entry code class is searched according to function keyword: Either functional node or function button, title can be all set in code content, or name by way of registration Claim and code opening relationships, so the function keyword by being shown on interface, it is possible to corresponding entry code is found, So than looking for code file name more accurate from the keyword in document.Specifically, Input Software system interface first is related Function keyword, such as name of the title of functional node, function button etc..By the relation of assay surface element and code, Find the function keyword of interface display and the mapping relations (establishing mapping entity) of entry code class, interface element and entrance The entity of the mapping relations of code word is as shown in table 1 below, can specifically find the mapping relations in the following manner:If any it is soft Part system is entered code corresponding to interface element by configuration file or database registration, as corresponding to function button Processor code, then mapping relations can be found by analysis configuration file or database information, or the software systems having It is setting interface (display) element directly in code, such as traditional GUI (use by Graphical User Interface, figure Family interface) system, the name of function button is set in code, then can find function keyword correspondingly by analyzing source code Entry code class;Then according to entry code class, by analyzing whole software assembly (software systems code) and generation The code of all codes is quoted in topological relation resources bank, captures the whole code call link of entry code class, and then obtain To all related code ranges (i.e. with the impacted scope of code of function keyword match), idiographic flow is shown in Fig. 4.
The interface element of table 1 and the entity of the mapping relations of entry code class
Key word type Keyword Class name
And the analysis process of code call link is captured in code quotes topological relation resources bank, as shown in figure 5, but It is that should create code first to quote topological relation resources bank, idiographic flow is as shown in fig. 6, i.e. by ASM frameworks to code set (software systems code set) enters line code (content) scanning analysis, wherein, ASM frameworks are a Java bytecode manipulation frameworks, After ASM frameworks read in information from (code) class file, all elements in class can be parsed:Class name, (calling) method, category Property and Java bytecode (instruction) etc., in this way, class reference which other class can be gone out by ASM frame analysis (directly Quote code word), called in which method and which class (indirect referencing code word) for have invoked other side, to extract The relation of class and referenced classes, its class reference relationship entity is as shown in table 2 below, is finally created according to the relation of the class of extraction and referenced classes Build code and quote topological relation resources bank.
The class reference relationship entity of table 2
Class Referenced classes Class method Referenced classes method
Further, the calling chain of class (entry code class) is built, that is, passes through the whole class reference relation of recursive lookup Topological structure (code quotes topological relation resources bank), the class of its reference, and then the class for passing through reference are searched by entry code class Referenced classes set (topological structure for traveling through whole adduction relationship) is traveled through, the referenced classes of recursive lookup referenced classes are ultimately constructed Go out all related code influences scopes.
As it was previously stated, by the analysis to all code contents, all complicated call relations between code are found, Then the function keyword that change or test problem describe according to demand, finds corresponding entry code, then passes through code Between calling topological relation, find all coverages.So it is achieved that from function keyword to the essence for influenceing code range Certainly position, and not dependent on software document, efficiently avoid because software document and final code realize it is asynchronous lead Cause positioning result inaccuracy unreliable, and only by the code that really runs, could more accurately analyze demand change or The code influences scope of test problem, so as to improve software development efficiency.
Technical scheme is described in detail above in association with accompanying drawing, change occurs in demand or software test is asked During topic, all impacted code ranges can be quickly and accurately positioned independent of software development document, so as to improve software Development efficiency.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (6)

1. a kind of method of the impacted scope of code in positioning software exploitation, it is characterised in that including:
Receive the function keyword of input;
Entry code class is determined according to the function keyword, and establishes reflecting for the function keyword and the entry code class Penetrate entity;
The calling link of the entry code class is extracted in software systems code set according to the entry code class, with according to institute State mapping entity and the impacted scope of code for calling link positioning and the function keyword match;
The calling link for extracting the entry code class in software systems code set according to the entry code class, with root Specifically included according to the mapping entity and the impacted scope of code of the calling link positioning and the function keyword match:
Analysis is scanned in the software systems code set by ASM frameworks, to obtain in the software systems code set All code words between call relation;
The call relation between all code words in the software systems code set establishes the software systems generation The code of code collection quotes topological relation resources bank;
The calling link is extracted in the code quotes topological relation resources bank according to the entry code class;
It is described according to the entry code class the code quote topological relation resources bank in extract it is described calling link it is specific Including:
Searched according to the entry code class in the code quotes topological relation resources bank and obtain the entry code class Directly quote code word;
Travel through the code and quote topological relation resources bank, according to entry code described in the directly reference code word recursive lookup All indirect referencing code words of class, to extract the calling link.
2. the method for the impacted scope of code in positioning software exploitation according to claim 1, it is characterised in that described Entry code class is determined according to the function keyword, to establish the mapping entity of the function keyword and the entry code class Specifically include:
Scan code configuration file, searching data storehouse registration table and/or analyzing software system are passed through according to the function keyword The mode of source code determines the entry code class;
That establishes between key word type, the function keyword and the entry code class of the function keyword described reflects Penetrate entity.
3. the method for the impacted scope of code in positioning software exploitation according to claim 2, it is characterised in that
The key word type of the function keyword includes:Functional node and/or function button;And
The function keyword includes:Software requirement changes and/or the title of the functional node of software test problem description And/or the title of the function button.
A kind of 4. system of the impacted scope of code in positioning software exploitation, it is characterised in that including:
Receiving module, for receiving the function keyword of input;
Processing module, for determining entry code class according to the function keyword, and establish the function keyword with it is described The mapping entity of entry code class;
Locating module, for extracting the calling of the entry code class in software systems code set according to the entry code class Link, with according to the mapping entity and the impacted model of code for calling link positioning and the function keyword match Enclose;
The locating module specifically includes:
Analysis module, for being scanned analysis in the software systems code set by ASM frameworks, to obtain the software Call relation between all code words that system code is concentrated;
Creation module, institute is established for the call relation between all code words in the software systems code set The code for stating software systems code set quotes topological relation resources bank;
Abstraction module, for extracting the calling in the code quotes topological relation resources bank according to the entry code class Link;
The abstraction module specifically includes:
Searching modul, described in searching acquisition in the code quotes topological relation resources bank according to the entry code class The direct reference code word of entry code class;
Spider module, topological relation resources bank is quoted for traveling through the code, looked into according to the code word recurrence of directly quoting All indirect referencing code words of the entry code class are looked for, to extract the calling link.
5. the system of the impacted scope of code in positioning software exploitation according to claim 4, it is characterised in that the place Reason module specifically includes:
Determining module, for according to the function keyword by scan code configuration file, searching data storehouse registration table and/or The mode of analyzing software system source code determines the entry code class;
Mapping block, for establishing key word type, the function keyword and the entry code of the function keyword The mapping entity between class.
6. the system of the impacted scope of code in positioning software exploitation according to claim 5, it is characterised in that
The key word type of the function keyword includes:Functional node and/or function button;And
The function keyword includes:Software requirement changes and/or the title of the functional node of software test problem description And/or the title of the function button.
CN201510673640.3A 2015-10-12 2015-10-16 The method and system of the impacted scope of code in positioning software exploitation Active CN105205000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510673640.3A CN105205000B (en) 2015-10-12 2015-10-16 The method and system of the impacted scope of code in positioning software exploitation

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201510657420 2015-10-12
CN2015106574201 2015-10-12
CN201510673640.3A CN105205000B (en) 2015-10-12 2015-10-16 The method and system of the impacted scope of code in positioning software exploitation

Publications (2)

Publication Number Publication Date
CN105205000A CN105205000A (en) 2015-12-30
CN105205000B true CN105205000B (en) 2018-01-23

Family

ID=54952694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510673640.3A Active CN105205000B (en) 2015-10-12 2015-10-16 The method and system of the impacted scope of code in positioning software exploitation

Country Status (1)

Country Link
CN (1) CN105205000B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229487B (en) * 2016-03-25 2020-09-29 阿里巴巴集团控股有限公司 Code processing method and device
CN107368407B (en) * 2016-05-11 2021-05-25 北京京东尚科信息技术有限公司 Information processing method and device
CN107483221B (en) * 2016-06-08 2021-04-27 阿里巴巴集团控股有限公司 Cross-application problem troubleshooting method, device and system
JP6738703B2 (en) * 2016-09-20 2020-08-12 株式会社日立製作所 Impact influence analysis method and apparatus
CN107451050B (en) * 2017-06-20 2020-07-03 阿里巴巴集团控股有限公司 Function acquisition method and device and server
CN108829575B (en) * 2018-04-17 2021-08-24 平安科技(深圳)有限公司 Test case recommendation method, electronic device and readable storage medium
CN110728584B (en) * 2019-10-23 2023-03-21 泰康保险集团股份有限公司 Information processing method and device, readable storage medium and electronic equipment
CN112486563A (en) * 2020-12-02 2021-03-12 车智互联(北京)科技有限公司 Code management method, system, computing device and readable storage medium
CN114398102B (en) * 2022-01-18 2023-08-08 杭州米络星科技(集团)有限公司 Application package generation method and device, compiling server and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461572A (en) * 2014-12-29 2015-03-25 常熟理工学院 Analysis method for spreading effect of requirement change

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750493A (en) * 2015-04-01 2015-07-01 贵州电网公司信息通信分公司 Development method based on mixed mode cross-platform application

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461572A (en) * 2014-12-29 2015-03-25 常熟理工学院 Analysis method for spreading effect of requirement change

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种面向对象软件变更影响分析模型的研究与设计;刘志宏;《中国优秀硕士论文全文数据库》;20070915;第14页第3.1节-第62页第6.5节 *

Also Published As

Publication number Publication date
CN105205000A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN105205000B (en) The method and system of the impacted scope of code in positioning software exploitation
Lingad et al. Location extraction from disaster-related microblogs
CN107341220B (en) Multi-source data fusion method and device
CN107832229A (en) A kind of system testing case automatic generating method based on NLP
CN103092761B (en) Method and device of recognizing and checking modifying code blocks based on difference information file
CN107193739A (en) A kind of black box regression testing method
CN103279631B (en) The Java code review method of Design Mode guidance
CN107608732A (en) A kind of bug search localization methods based on bug knowledge mappings
CN103678287B (en) A kind of method that keyword is unified
CN105912645A (en) Intelligent question and answer method and apparatus
CN111859969B (en) Data analysis method and device, electronic equipment and storage medium
US20020178134A1 (en) Text and imagery spatial correlator
CN107679051A (en) Transaction system error-detecting method and device
CN110442730A (en) A kind of knowledge mapping construction method based on deepdive
CN102541282B (en) Utilize icon moving to the method, the Apparatus and system that complete vocabulary and edit again
CN111143508B (en) Event detection and tracking method and system based on communication type short text
Wang et al. Smart contract vulnerability detection using code representation fusion
Du et al. The Logic of NEAR and FAR
Hong et al. Rule-enhanced noisy knowledge graph embedding via low-quality error detection
CN105138520B (en) A kind of event trigger word recognition methods and device
Islam et al. What network simulator questions do users ask? a large-scale study of stack overflow posts
CN105279249A (en) Method and device for determining confidence of point of interest data in website
CN113807077A (en) Natural language test script parsing processing method and device and electronic equipment
Asano et al. Detecting bad smells of refinement in goal-oriented requirements analysis
Parveen et al. Clause Boundary Identification using Classifier and Clause Markers in Urdu Language

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant