CN115757888A - Method, storage medium and device for generating code call relation chain view - Google Patents

Method, storage medium and device for generating code call relation chain view Download PDF

Info

Publication number
CN115757888A
CN115757888A CN202211537478.9A CN202211537478A CN115757888A CN 115757888 A CN115757888 A CN 115757888A CN 202211537478 A CN202211537478 A CN 202211537478A CN 115757888 A CN115757888 A CN 115757888A
Authority
CN
China
Prior art keywords
interface
list
relationship
calling
configuration file
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.)
Pending
Application number
CN202211537478.9A
Other languages
Chinese (zh)
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211537478.9A priority Critical patent/CN115757888A/en
Publication of CN115757888A publication Critical patent/CN115757888A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

Methods of generating a code call chain view are provided. The method for generating the code call chain view comprises the following steps: acquiring application-related project source codes from a project source code management warehouse; generating a program compression package from the acquired project source codes; decompressing the program compression packet to obtain a plurality of configuration files; creating an interface method list according to the dependency relationship between the interfaces and the methods; creating a parent class and method relation list according to the dependency relationship between the class name and the method and the interface method list; creating a method calling relation list according to the method of each configuration file and the calling relation among the configuration files; creating an interface implementation relation list according to the implementation method of the defined interface and the dependency relation between the interfaces; and generating a calling relation graph among the classes, the methods and the interfaces according to the parent class and method relation list, the method calling relation list and the interface realization relation list. In addition, the application also provides a computer readable storage medium and computer equipment.

Description

Method, storage medium and device for generating code call relation chain view
Technical Field
The present application relates to the field of software development technologies, and in particular, to a method, a storage medium, and an apparatus for automatically generating a code invocation relation chain view.
Background
In the software development process, when the code execution flow and vulnerability analysis of the current project code are needed to be analyzed, developers comb out the call chain relation among the methods in the whole project code, and the analysis of the whole project code is better assisted through the method call relation. The combing of call chain relations among methods in a project is usually finished manually, but in the prior art, the manual combing has the execution problem: firstly, the manual review project code needs to spend a great deal of labor cost and time cost, and the problem of missed carding is easy to occur due to the unfamiliarity of the whole project code. Secondly, the method for updating the project simultaneously needs to call the chain relation in the process of updating the project code, so that the maintenance cost is high, and the code amount of the project is huge. In the prior art, the method calling chain relation of the project is difficult to be efficiently and accurately combed.
Disclosure of Invention
The application provides a method, a storage medium and equipment for generating a code calling relation chain view, which can automatically execute and efficiently and accurately comb a code calling relation.
In a first aspect, an embodiment of the present application provides a method for automatically generating a code call chain view. The method for automatically generating the code call chain view comprises the following steps:
acquiring application-related project source codes from a project source code management warehouse;
generating a program compression package from the acquired project source codes;
decompressing the program compression package to obtain a plurality of configuration files, wherein each project source code corresponds to one configuration file, and each configuration file comprises a method, a class name, an interface and a path of the configuration file;
acquiring a dependency relationship between an interface and a method in the configuration file, and creating an interface method list according to the dependency relationship between the interface and the method, wherein the interface method list is used for describing the dependency relationship between the interface and the method;
acquiring a dependency relationship between a class name and a method in the configuration file, and creating a parent class and method relationship list according to the dependency relationship between the class name and the method and the interface method list, wherein the parent class and method relationship list is used for describing the dependency relationship between the class name and the method;
acquiring a calling relationship between a method of each configuration file and each configuration file, and creating a method calling relationship list according to the calling relationship between the method of each configuration file and each configuration file, wherein the method calling relationship list is used for describing the calling relationship between the method and the configuration file;
acquiring a dependency relationship between an implementation method of a definition interface and the interface, and creating an interface implementation relationship list according to the dependency relationship between the implementation method of the definition interface and the interface, wherein the interface implementation relationship list is used for describing the dependency relationship between the implementation method of the definition interface and the interface;
and generating a calling relation graph among the classes, the methods and the interfaces according to the parent class and method relation list, the method calling relation list and the interface realization relation list.
In a second aspect, an embodiment of the present application provides a storage medium, including:
the storage medium is used for storing a program of a method for automatically generating a code call chain view, and the program of the method for automatically generating the code call chain view is executed for realizing the method for automatically generating the code call chain view.
In a third aspect, an embodiment of the present application provides an apparatus for automatically generating a code call chain view, where the apparatus for automatically generating a code call chain view includes:
a memory for storing a program for automatically generating a method of code calling a chain view; and
and the processor is used for executing the program of the method for automatically generating the code call chain view and realizing the method for automatically generating the code call chain view.
The method, the storage medium and the equipment for automatically generating the code calling relation chain view automatically acquire the parent class and method relation list, the method calling relation list and the interface realization relation list and generate the relation graph among the class, the method and the interface according to the data of the three lists. The method saves labor and time cost, ensures the accuracy of analysis data, and can effectively solve the problems of high maintenance cost, huge project code amount, high cost of calling chain relation expense of a carding method, missed carding and the like in the prior art.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a flowchart of a method for automatically generating a code call relation chain view according to an embodiment of the present application.
Fig. 2 is a flowchart of substeps S108 provided in an embodiment of the present application.
Fig. 3 is a flowchart of a substep S202 provided in an embodiment of the present application.
Fig. 4 is a flowchart of substeps S402 provided in an embodiment of the present application.
Fig. 5 is a flowchart of substeps S608 provided in an embodiment of the present application.
Fig. 6 is a flowchart of substeps S114 provided in an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a computer device for applying an automatic code generation method to invoke a relationship chain view according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances, in other words that the embodiments described are to be practiced in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, may also include other things, such as processes, methods, systems, articles, or apparatus that comprise a list of steps or elements is not necessarily limited to only those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such processes, methods, articles, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In addition, technical solutions between the embodiments may be combined with each other, but must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory to each other or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope claimed in the present application.
Please refer to fig. 1, which is a flowchart illustrating a method for automatically generating a code call relationship chain view according to an embodiment of the present application. The method for automatically generating the code call relation chain view specifically comprises the following steps.
And step S102, acquiring the project source code related to the application from the project source code management warehouse. In some possible embodiments, a developer searches a project source code of a project from a project source code management warehouse (open source project for warehouse management system, gitlab) according to the requirement of the project, and obtains the project source code of the project in the gitlab through a gitclone command.
And step S104, generating a program compression package by the acquired project source code. In some possible embodiments, a developer uses a project management integration tool maven based on a Java platform to construct the project source codes into a corresponding program compression package jar package or war package. In other possible embodiments, the developer uses a tool ant for automating the tasks of software compilation testing, deployment, etc. or a project automation building tool gram to build the project source code and obtain the corresponding program compression package.
And S106, decompressing the program compression package to obtain a plurality of configuration files. In some possible embodiments, the program compression package jar package or the program compression package war package is decompressed, and a pom.xml file of Extensible Markup Language (XML) of a Project Object Model (POM) is found in the decompressed folder. Xml file, there is a label in the above-mentioned pom, and the above-mentioned label is used to distinguish whether the item corresponding to the above-mentioned item source code is a single module item or a multi-module interdependent item. In other possible embodiments, if there is no dependency tag in the pom.xml file, where the unique identifier groudId of the item is consistent with the groupId of the POM element parent, the item corresponding to the item source code is a single module item; if the dependency tag with the groudId consistent with the groupId of the POM element parent exists in the pom.xml file, the item corresponding to the item source code is an item with multiple modules interdependent, and the multiple modules of the item need to be decompressed continuously. And traversing each decompressed file through global search depth to obtain a class file list of the whole project. Each class file includes a method, a class name, an interface, and a path of the class file, and each class file serves as a configuration file.
After the configuration files are obtained, the configuration files are loaded in a traversing and circulating mode one by using a ClassReader in a universal Java byte code operation analysis framework (ASM).
And step S108, creating an interface method list according to the dependency relationship between the interfaces and the methods. And after acquiring the dependency relationship between the interfaces and the methods in the configuration file, creating an interface relationship list according to the dependency relationship between the interfaces and the methods. The above list of interface methods is used to describe the dependencies between interfaces and methods.
Step S110, a parent class and method relation list is created according to the dependency relationship between the class name and the method and the interface method list. And acquiring the dependency relationship between the class name in the configuration file and the method, and in some possible embodiments, acquiring the dependency relationship between the class name in the configuration file and the interface method in the interface method list, and creating a parent class and method relationship list in combination with the dependency relationship between the class name and the method. The above-mentioned parent class and method relation list is used to describe the dependency relationship between the class name and the method.
Step S112, a method calling relation list is created according to the method of each configuration file and the calling relation between the configuration files. And after the calling relationship between the method of each configuration file and each configuration file is obtained, creating a method calling relationship list according to the calling relationship between the method of each configuration file and each configuration file. The method call relation list is used for describing call relations between the methods and the configuration files.
And step S114, creating an interface implementation relation list according to the implementation method of the defined interface and the dependency relation between the interfaces. After the realization method of the definition interface and the dependency relationship between the interfaces are obtained, an interface realization relationship list is created according to the realization method of the definition interface and the dependency relationship between the interfaces. The interface implementation relation list is used for describing the implementation method of the defined interface and the dependency relation between the interfaces.
And step S116, generating a calling relation graph among the classes, the methods and the interfaces according to the parent class and method relation list, the method calling relation list and the interface realization relation list. In some possible embodiments, the data recorded in the parent class and method relation list, the method call relation list, and the three lists of the interface and implementation relation list are bound into a phase diagram UI component, so as to implement a visual view of the class, method, and interface call relation.
In some possible embodiments, the dependency relationship between the interfaces and the methods in the configuration file is obtained, and the interface method list is created according to the dependency relationship between the interfaces and the methods. The method for automatically generating the code call relation chain view specifically comprises the following steps.
Please refer to fig. 2, which is a flowchart illustrating the substep of step S108 according to an embodiment of the present application.
Step S202, calling a first method to obtain the interface and the method in each configuration file and the dependency relationship between the interface and the method to obtain a plurality of first dependency relationship groups. In some possible embodiments, the first method is an mterfaceslist () method, which is a method of the methodview class. And calling the first method to obtain the interface and the method in the configuration file, and analyzing the dependency relationship between the interface and the method. Constructing the interface and the method with dependency relationship into a plurality of first dependency relationship groups, wherein each first dependency relationship group comprises a first dependent item and a first depended item. The first dependent item is an interface or a method in the first dependency group, and the first dependent item is another interface or a method in the first dependency group.
Step S204, the first dependent item in each group is placed in one column of the interface method list, and the first depended item in each group is placed in the other column of the interface method list to obtain the interface method list.
In some possible embodiments, the dependency relationship between the class name and the method in the configuration file is obtained, and a parent class and method relationship list is created according to the dependency relationship between the class name and the method and the interface method list. The method for automatically generating the code call relation chain view specifically comprises the following steps.
Please refer to fig. 3, which is a flowchart illustrating the substeps of step S202 according to an embodiment of the present application.
Step S402, calling a second method to obtain the class name and method in each configuration file, and the dependency relationship between the class name and the method, and combining the class name and the dependency relationship between the interface methods in the interface method list to construct a plurality of second dependency relationship groups. In some possible embodiments, the second method is a visitMethodList () method, which is a method of the MethodVisitor class. And calling the second method to obtain the class name and the method in the configuration file, and analyzing the dependency relationship between the class name and the method. And combining the class names and the methods with the dependency relationships and the class names with the dependency relationships with the interface methods in the interface method list to construct a plurality of second dependency relationship groups. Each second dependency group includes a second dependent item and a second depended item. The second dependent item is a class name or method in the second dependency group, and the second dependent item is another class name or method in the second dependency group.
Step S404, placing the second dependent item in each group in one column of the parent and method relationship list, and placing the second dependent item in each group in another column of the parent and method relationship list to obtain the parent and method relationship list.
In some possible embodiments, the method of each configuration file and the call relationship between each configuration file are obtained, and a method call relationship list is created according to the method of each configuration file and the call relationship between each configuration file. The method for automatically generating the code call relation chain view specifically comprises the following steps.
Please refer to fig. 4, which is a flowchart illustrating the substeps of step S402 according to an embodiment of the present application.
Step S602, placing the method in each configuration file in a method list, so that all the methods in all the configuration files are placed in the method list. In some possible embodiments, all methods in the configuration file are placed in a method list, and all methods under the configuration file are acquired. Specifically, each method represents a list length, and if the list length of the obtained method list is less than 2, there is no sub-method under the configuration file. In other possible embodiments, the length of the list of methods is greater than 2, and the second method to the last method of the list of methods are taken as the list of methods of the configuration file.
Step S604, calling a third method to obtain paths of all configuration files. The third method is a visitMethod () method, which is a class of classviistor. In some possible embodiments, each profile path corresponds to a profile.
Step S606, the method of the corresponding configuration file is called one by one according to the path of each configuration file by using the third method to obtain a return value. In some possible embodiments, the method in the corresponding configuration file is called one by one for each configuration file by using the third method. When the developer does not know whether all methods in the method list are called under the configuration file, the third method outputs a return value regardless of whether the calling is successful.
Step S608, determining a calling relationship between the method in the method list and the configuration file according to the return value. In some possible embodiments, the third method is used to call the corresponding method in the configuration file one by one for each configuration file, and the output return value includes two return results: a first returned result indicating success and a second returned result indicating failure. And determining whether a calling relationship exists between the method in the method list and the other configuration files according to the returned result.
Step S610, obtaining a plurality of call relation groups according to the call relation between the method in the method list and the configuration file. In some possible embodiments, the calling relationship existing between the method and other configuration files is confirmed according to the return value. And constructing the method and the configuration file with the calling relationship into a plurality of calling relationship groups. Each calling relationship group comprises a calling item and a called item. The calling item is one method or configuration file in the calling relation group, and the called item is another method or configuration file in the calling relation group.
Step S612, placing the calling items in each group in one column of the method calling relationship list, and placing the called items in each group in another column of the method calling relationship list to obtain the method calling relationship list.
In some possible embodiments, the calling relationship between the method in the method list and the configuration file is determined according to the return value. The method for automatically generating the code call relation chain view specifically comprises the following steps.
Please refer to fig. 5, which is a flowchart illustrating the substep of step S608 according to an embodiment of the present application.
Step S702, when the return value is the first return result, determining that there is a call relationship between the method in the method list and the other configuration files.
Step S704, when the return value is the second return result, determining that there is no call relationship between the method in the method list and the other configuration files.
In some possible embodiments, the dependency relationship between the implementation method of the defined interface and the interface is obtained, and the interface implementation relationship list is created according to the dependency relationship between the implementation method of the defined interface and the interface. The method for automatically generating the code call relation chain view specifically comprises the following steps.
Please refer to fig. 6, which is a flowchart illustrating the sub-step S114 according to an embodiment of the present application.
Step S802, calling a fourth method to search the father interface class of the interface method list. The fourth method is a getSuperClass () method, which is a method of the methodviritor class. In some possible embodiments, the fourth method is invoked to find the dependency relationship between the parent interface class and the method in the interface method list generated by the first method.
Step S804, the fourth method is called to obtain the interface, the implementation method, and the dependency relationship between the interface and the implementation method in each configuration file to obtain a plurality of third dependency relationship groups. And analyzing the dependency relationship between the parent interface and the implementation method in the method. And constructing the parent interface with the dependency relationship and the implementation method into a plurality of third dependency relationship groups. Each third dependency group includes a third dependent item and a third depended item. The third dependent item is an interface or an implementation method in a third dependency group, and the third dependent item is another interface or an implementation method in the third dependency group.
Step S806, placing the third dependent item in each group in one column of the interface implementation relationship list, and placing the third dependent item in each group in another column of the interface implementation relationship list to obtain the interface implementation relationship list.
In the embodiment, after the parent class and method relationship list, the method invocation relationship list and the interface implementation relationship list are obtained, according to the data in the three lists of the parent class and method relationship list, the method invocation relationship list and the interface implementation relationship list, the data is transmitted to a directed graph visual component, a relationship graph among classes, methods and interfaces is generated, and the dependency relationship among the classes, methods and interfaces and the invocation relationship between the methods and the class file are shown.
Please refer to fig. 7, which is a schematic structural diagram of a computer device for automatically generating a code call relationship chain view method by an application according to an embodiment of the present application. The apparatus 100 for automatically generating a code call relationship chain view method includes a memory 101, and a processor 102. The memory 101 is used for storing method program instructions for automatically generating a code calling relation chain view, and the processor 102 is used for executing the method program instructions for automatically generating the code calling relation chain view so as to realize a method for automatically generating the code calling relation chain view.
The processor 102 may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, or other data Processing chip, and is configured to execute the method program instructions stored in the memory 101 for automatically generating the code call relation chain view.
The memory 101 includes at least one type of readable storage medium including flash memory, hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, and the like. The memory 101 may in some embodiments be an internal storage unit of the computer device, such as a hard disk of the computer device. The memory 101 may also be a storage device of an external computer device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. configured in the computer device. Further, the memory 101 may also include both an internal storage unit and an external storage device of the computer device. The memory 101 is not only used for storing application software installed in the computer device and various data, such as code for implementing an auto-generation code calling a relational chain view method, but also used for temporarily storing data that has been output or will be output.
In the above embodiment, the parent class and method relationship list, the method call relationship list, and the interface implementation relationship list are automatically obtained, and a relationship diagram between classes, methods, and interfaces is generated according to the data of the three lists. The method saves labor and time cost, ensures the accuracy of analysis data, and can effectively solve the problems of high maintenance cost, huge project code amount, high cost of calling chain relation expense of a carding method, missed carding and the like in the prior art.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, to the extent that such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, it is intended that the present application also encompass such modifications and variations.
The above-mentioned embodiments are only examples of the present invention, and the scope of the claims of the present invention should not be limited by these examples, so that the claims of the present invention should be construed as equivalent and still fall within the scope of the present invention.

Claims (10)

1. A method for automatically generating a code call chain view, the method for automatically generating the code call chain view comprising:
acquiring application-related project source codes from a project source code management warehouse;
generating a program compression package from the acquired project source codes;
decompressing the program compression package to obtain a plurality of configuration files, wherein each project source code corresponds to one configuration file, and each configuration file comprises a method, a class name, an interface and a path of the configuration file;
acquiring a dependency relationship between an interface and a method in the configuration file, and creating an interface method list according to the dependency relationship between the interface and the method, wherein the interface method list is used for describing the dependency relationship between the interface and the method;
acquiring a dependency relationship between a class name and a method in the configuration file, and creating a parent class and method relationship list according to the dependency relationship between the class name and the method and the interface method list, wherein the parent class and method relationship list is used for describing the dependency relationship between the class name and the method;
acquiring a calling relationship between a method of each configuration file and each configuration file, and creating a method calling relationship list according to the calling relationship between the method of each configuration file and each configuration file, wherein the method calling relationship list is used for describing the calling relationship between the method and the configuration file;
acquiring a dependency relationship between an implementation method of a defined interface and the interface, and creating an interface implementation relationship list according to the implementation method of the defined interface and the dependency relationship between the interfaces, wherein the interface implementation relationship list is used for describing the dependency relationship between the implementation method of the defined interface and the interface; and
and generating a calling relation graph among the classes, the methods and the interfaces according to the parent class and method relation list, the method calling relation list and the interface realization relation list.
2. The method for automatically generating a code call chain view according to claim 1, wherein obtaining a dependency relationship between an interface and a method in the configuration file, and creating an interface method list according to the dependency relationship between the interface and the method specifically comprises:
calling a first method to obtain an interface, a method and a dependency relationship between the interface and the method in each configuration file to obtain a plurality of first dependency relationship groups, wherein each first dependency relationship group comprises a first dependency item and a first depended item, the first dependency item is one interface or method in the first dependency relationship group, and the first depended item is another interface or method in the first dependency relationship group;
and placing the first dependent item in each group in one column of the interface method list, and placing the first depended item in each group in the other column of the interface method list to obtain the interface method list.
3. The method of automatically generating a code call chain view of claim 2, wherein the first method is an InterfacesList () method and the configuration file is a class file.
4. The method for automatically generating a code call chain view according to claim 2, wherein the obtaining of the dependency relationship between the class name and the method in the configuration file, and the creating of the parent class and method relationship list according to the dependency relationship between the class name and the method and the interface method list comprise:
calling a second method to obtain class names, methods and dependency relations between the class names and the methods in each configuration file, and combining the class names and the dependency relations between the interface methods in the interface method list to construct a plurality of second dependency relation groups, wherein each second dependency relation group comprises a second dependency item and a second depended item, the second dependency item is one class name or method in the second dependency relation group, and the second depended item is another class name or method in the second dependency relation group;
and placing the second dependent item in each group in one column of the parent class and method relation list, and placing the second dependent item in each group in the other column of the parent class and method relation list to obtain the parent class and method relation list.
5. The method of automatically generating a code call chain view of claim 4, wherein the second method is a visitMethodList () method.
6. The method for automatically generating a code call chain view according to claim 4, wherein the method for obtaining the call relationship between the method of each configuration file and each configuration file, and creating a method call relationship list according to the call relationship between the method of each configuration file and each configuration file specifically comprises:
placing the methods in each configuration file in a method list, so that the method list places all the methods in all the configuration files;
calling a third method to obtain paths of all configuration files;
calling the corresponding configuration file method one by one according to the path of each configuration file by using a third method to obtain a return value;
determining the calling relationship between the method in the method list and the configuration file according to the return value;
obtaining a plurality of calling relation groups according to calling relations between the methods and the configuration files in the method list, wherein each calling relation group comprises a calling item and a called item, the calling item is one method or configuration file in the calling relation group, and the called item is another method or configuration file in the calling relation group; and
and placing the calling items in each group in one column of the method calling relation list, and placing the called items in each group in the other column of the method calling relation list to obtain the method calling relation list.
7. The method for automatically generating a code call chain view according to claim 6, wherein the third method is a visitMethod () method, the return value includes a first return result indicating success and a second return result indicating failure, and the determining a call relationship between the method in the method list and the configuration file according to the return value specifically includes:
when the return value is a first return result, judging that a calling relation exists between the method in the method list and the other configuration files;
and when the return value is a second return result, judging that no calling relation exists between the method in the method list and the other configuration files.
8. The method for automatically generating a code call chain view according to claim 1, wherein obtaining a dependency relationship between an implementation method for defining an interface and the interface, and creating an interface implementation relationship list according to the dependency relationship between the implementation method for defining the interface and the interface specifically includes:
calling a fourth method to search a parent interface class in the interfaces in the interface method list, wherein the fourth method is a getSuperClass () method;
calling the fourth method to obtain the interface, the implementation method and the dependency relationship between the interface and the implementation method in each configuration file to obtain a plurality of third dependency relationship groups, wherein each third dependency relationship group comprises a third dependency item and a third depended item, the third dependency item is one interface or the implementation method in the third dependency relationship group, and the third depended item is the other interface or the implementation method in the third dependency relationship group; and
and placing the third dependent item in each group in one column of the interface implementation relation list, and placing the third depended item in each group in the other column of the interface implementation relation list to obtain the interface implementation relation list.
9. A computer device, characterized in that the computer device comprises:
a memory for storing a program for automatically generating a method of code calling a chain view; and
a processor for executing a program of the method for automatically generating a code call chain view and implementing a method for automatically generating a code call chain view as claimed in any one of claims 1 to 8.
10. A storage medium for storing a program of a method of automatically generating a code call chain view, the program of the method of automatically generating a code call chain view being executed to implement the method of automatically generating a code call chain view according to any one of claims 1 to 8.
CN202211537478.9A 2022-12-02 2022-12-02 Method, storage medium and device for generating code call relation chain view Pending CN115757888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211537478.9A CN115757888A (en) 2022-12-02 2022-12-02 Method, storage medium and device for generating code call relation chain view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211537478.9A CN115757888A (en) 2022-12-02 2022-12-02 Method, storage medium and device for generating code call relation chain view

Publications (1)

Publication Number Publication Date
CN115757888A true CN115757888A (en) 2023-03-07

Family

ID=85342757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211537478.9A Pending CN115757888A (en) 2022-12-02 2022-12-02 Method, storage medium and device for generating code call relation chain view

Country Status (1)

Country Link
CN (1) CN115757888A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117406929A (en) * 2023-11-09 2024-01-16 北京大学 Lossless call chain compression and restoration method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117406929A (en) * 2023-11-09 2024-01-16 北京大学 Lossless call chain compression and restoration method and system
CN117406929B (en) * 2023-11-09 2024-06-07 北京大学 Lossless call chain compression and restoration method and system

Similar Documents

Publication Publication Date Title
US20240176646A1 (en) Analytic model execution engine with instrumentation for granular performance analysis for metrics and diagnostics for troubleshooting
US7124401B2 (en) Testing versions of applications
US6772083B2 (en) Computer program test configurations with data containers and test scripts
US20040044992A1 (en) Handling parameters in test scripts for computer program applications
CN111144839B (en) Project construction method, continuous integration system and terminal equipment
US20110185339A1 (en) Automating the creation of an application provisioning model
US20140026120A1 (en) Unit testing an enterprise javabeans (ejb) bean class
CN110737437A (en) compiling method and device based on code integration
CN115757888A (en) Method, storage medium and device for generating code call relation chain view
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN112256318A (en) Construction method and equipment for dependent product
CN113495728A (en) Dependency relationship determination method, dependency relationship determination device, electronic equipment and medium
CN115220863A (en) Operation and maintenance method and device for container application, computer equipment and storage medium
CN117370203B (en) Automatic test method, system, electronic equipment and storage medium
CN110309067A (en) Fixed scene method for testing pressure and device based on android system
US20110246967A1 (en) Methods and systems for automation framework extensibility
CN112346981A (en) Joint debugging test coverage rate detection method and system
CN111352631A (en) Interface compatibility detection method and device
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN113656044B (en) Android installation package compression method and device, computer equipment and storage medium
CN110795646A (en) Request processing method and device, electronic equipment and computer-readable storage medium
CN112346952A (en) Method, equipment and electronic equipment for regression testing of test cases
CN116166547A (en) Code change range analysis method, device, equipment and storage medium
CN111367796B (en) Application program debugging method and device
CN113934405A (en) Plug-in processing method, device, equipment, storage medium and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination