Naming conflict identification method, apparatus, device, and readable storage medium
By scanning and comparing the programming entity signatures and operation instructions in the JAR package, naming conflicts in the application software are identified, resolving class loader errors caused by different developer specifications, and improving the stability and reliability of the application software.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU PINWEI SOFTWARE CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-06-23
Smart Images

Figure CN119557226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and more specifically, to a naming conflict identification method, apparatus, device, and readable storage medium. Background Technology
[0002] As application software becomes increasingly complex, software development projects are typically broken down into multiple module development tasks. These modules may be developed by different developers or organizations, each following different naming conventions and design philosophies. This can easily lead to situations where algorithms with the same name have different functions. Because of these identical names but different functions, during application software operation, the class loader may incorrectly load the wrong class, causing the algorithm to fail or malfunction.
[0003] Therefore, in the process of application software development, it is necessary to resolve naming conflicts in a timely manner to improve the stability and reliability of the application software. However, the prerequisite for resolving naming conflicts is the ability to detect them in a timely manner. Thus, how to identify naming conflicts has become a key focus for people in this field. Summary of the Invention
[0004] In view of this, this application provides a naming conflict identification method, apparatus, device, and readable storage medium for identifying naming conflicts.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A naming conflict identification method includes:
[0007] Scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files;
[0008] If not, then it is determined that there is no naming conflict in the application to be identified;
[0009] If they exist, extract the operation instructions corresponding to each programming entity with the same signature, and identify whether the operation instructions corresponding to each programming entity with the same signature are the same.
[0010] If they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature;
[0011] If they are the same, proceed to the step of determining that there is no naming conflict in the application to be identified.
[0012] Optionally, the step of scanning all JAR files in the application to be identified and analyzing whether there are programming entities with the same signature in different JAR files includes:
[0013] Extract all bytecode files from each JAR file;
[0014] The bytecode files of different JAR packages are parsed to analyze whether there are programming entities with the same signature in different JAR packages.
[0015] Optionally, the step of parsing the bytecode files of different JAR packages and analyzing whether there are programming entities with the same signature in the different JAR packages includes:
[0016] Compare the bytecode files of different JAR packages to determine whether there are bytecode files that constitute the same structure in different JAR packages;
[0017] If so, then determine whether there are programming entities with the same signature in the same bytecode file.
[0018] Optionally, comparing the bytecode files of different JAR packages to determine whether there are bytecode files constituting the same structure in different JAR packages includes:
[0019] Determine the definition type and modifiers of the programming entities in each bytecode file;
[0020] Determine whether different JAR files contain bytecode files with identical definition types and modifiers for programming entities.
[0021] Optionally, the extraction of all bytecode files from each JAR file includes:
[0022] Use command-line tools to extract class files from each JAR file.
[0023] Optionally, the step of extracting the operation instructions corresponding to each programming entity with the same signature and identifying whether the operation instructions corresponding to each programming entity with the same signature are the same includes:
[0024] Extract the set of operation instructions for each method corresponding to the same signature, and identify whether the set of operation instructions for each method corresponding to the same signature is the same.
[0025] Optionally, before scanning all JAR files in the application to be identified and analyzing whether there are programming entities with the same signature in different JAR files, the method further includes:
[0026] Log in to the server remotely via SSH and download all JAR files of the application to be identified.
[0027] A naming conflict identification device, comprising:
[0028] The scanning module scans all JAR files of the application to be identified and analyzes whether there are programming entities with the same signature in different JAR files; if not, it calls the determination module; if they exist, it calls the extraction module.
[0029] The determination module is used to determine that there are no naming conflicts in the application to be identified;
[0030] The extraction module is used to extract the operation instructions of each programming entity corresponding to the same signature, and to identify whether the operation instructions of each programming entity corresponding to the same signature are the same; if they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature; if they are the same, the determination module is called.
[0031] A naming conflict identification device includes a memory and a processor;
[0032] The memory is used to store programs;
[0033] The processor is used to execute the program to implement the various steps of the naming conflict identification method described above.
[0034] A readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the various steps of the naming conflict identification method described above.
[0035] As can be seen from the above technical solution, the naming conflict identification method provided in this application considers that programming entities with the same signature in the same JAR package have the same function and will not have naming conflicts. Therefore, this method can first scan all JAR packages of the application to be identified and analyze whether there are programming entities with the same signature in different JAR packages. If not, it is determined that there is no naming conflict in the application to be identified. Based on this, the signature comparison process of the same JAR package is removed, improving the identification efficiency. After determining that there are programming entities with the same signature in different JAR packages, the operation instructions corresponding to each programming entity with the same signature can be extracted, and it can be identified whether the operation instructions corresponding to each programming entity with the same signature are the same. If they are not the same, it is determined that there is a conflict between the programming entities corresponding to the same signature. If they are the same, the step of determining that there is no naming conflict in the application to be identified is performed. Based on this, this application can determine whether programming entities with the same signature in different JAR packages have the same function by identifying the instructions in the programming entity, transforming the function identification process into an instruction extraction process and an instruction comparison process. Instructions are the specific execution steps of the algorithm. Algorithms with the same execution steps have the same function. By comparing instructions, the matching of algorithm functions can be accurately determined. Meanwhile, instruction extraction is relatively simple. Therefore, converting the function identification process into an instruction comparison process can simplify the identification difficulty and improve identification efficiency while ensuring identification accuracy. It is evident that this application can determine whether there are naming conflicts in the application to be identified while ensuring identification efficiency, thereby accelerating the naming conflict resolution process and improving the stability and reliability of the application software. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0037] Figure 1 This is a flowchart of a naming conflict identification method disclosed in an embodiment of this application;
[0038] Figure 2 This is a flowchart illustrating the identification of programming entities with the same signature, as disclosed in an embodiment of this application.
[0039] Figure 3 This is a structural block diagram of a naming conflict identification device disclosed in an embodiment of this application;
[0040] Figure 4 This is a hardware structure block diagram of a naming conflict identification device disclosed in an embodiment of this application. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] This application provides a naming conflict identification method, which can be applied to various testing platforms or algorithm detection systems, as well as to various computer terminals or smart terminals. The executing entity can be the processor or server of the computer terminal or smart terminal. The flowchart of the naming conflict identification method is shown below. Figure 1 As shown, it specifically includes:
[0043] Step S1: Scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files; if not, proceed to step S4; if yes, proceed to step S2.
[0044] Specifically, it can obtain all the JAR files of the application to be identified, and scan each JAR file to identify whether there are programming entities with the same signature in different JAR files.
[0045] If no programming entities with the same signature exist in different JAR files, then step S4 can be executed.
[0046] If different JAR files contain programming entities with the same signature, then step S2 can be executed.
[0047] Each programming entity can be any of the following: a method in a JAR file, or a class in a JAR file.
[0048] Step S2: Extract the operation instructions of each programming entity corresponding to the same signature, and identify whether the operation instructions of each programming entity corresponding to the same signature are the same; if not, proceed to step S3; if yes, proceed to step S4.
[0049] Specifically, when programming entities with the same signature exist in different JAR files, it is necessary to determine whether the functions of the programming entities with the same signature in different JAR files are the same.
[0050] If programming entities with the same signature in different JAR files have different functions, it indicates that the programming entities with the same signature conflict with each other, which may easily lead to the failure of the application to be identified.
[0051] If programming entities with the same signature in different JAR files have the same functionality, then programming entities with the same signature can be considered as unified programming entities, and there is no conflict between them.
[0052] One method is to compare the operation instructions between different programming entities with the same signature to determine whether the functions of programming entities in different JAR packages corresponding to the same signature are the same.
[0053] If the operation instructions for different JAR packages corresponding to the same signature are the same, then step S4 can be executed.
[0054] If the operation instructions for different JAR packages corresponding to the same signature are different, then step S3 can be executed.
[0055] Step S3: Determine if there is a conflict between the programming entities corresponding to the same signature.
[0056] Specifically, when there are differences in the operation instructions of programming entities in different JAR packages corresponding to the same signature, it indicates that there are programming entities with naming conflicts between different JAR packages. At this time, the JAR package identifier and signature corresponding to the target programming entity with naming conflicts can be determined.
[0057] Generate a JAR file containing the identifier and signature of the target programming entity.
[0058] You can also create emails or reminder pop-ups based on the reminder information;
[0059] Determine the technical personnel terminal corresponding to the application to be identified;
[0060] Send emails or alert pop-ups to the technical staff's terminals.
[0061] Step S4: Determine that there are no naming conflicts in the application to be identified.
[0062] Specifically, when there are no programming entities with the same signature in different JAR packages, it can be assumed that there is no naming conflict in the application to be identified. Therefore, a detection result can be generated to characterize that there is no naming conflict in the application to be identified.
[0063] When there are no differences in the operation instructions of programming entities corresponding to the same signature in different JAR packages, it indicates that there are no programming entities with naming conflicts between different JAR packages. At this time, it can be determined that there are no conflicts between the programming entities corresponding to the same signature.
[0064] It can generate feedback information to indicate that there are no naming conflicts with the application being identified.
[0065] As can be seen from the above technical solution, the naming conflict identification method provided in this application considers that programming entities with the same signature in the same JAR package have the same function and will not have naming conflicts. Therefore, this method can first scan all JAR packages of the application to be identified and analyze whether there are programming entities with the same signature in different JAR packages. If not, it is determined that there is no naming conflict in the application to be identified. Based on this, the signature comparison process of the same JAR package is removed, improving the identification efficiency. After determining that there are programming entities with the same signature in different JAR packages, the operation instructions corresponding to each programming entity with the same signature can be extracted, and it can be identified whether the operation instructions corresponding to each programming entity with the same signature are the same. If they are not the same, it is determined that there is a conflict between the programming entities corresponding to the same signature. If they are the same, the step of determining that there is no naming conflict in the application to be identified is performed. Based on this, this application can determine whether programming entities with the same signature in different JAR packages have the same function by identifying the instructions in the programming entity, transforming the function identification process into an instruction extraction process and an instruction comparison process. Instructions are the specific execution steps of the algorithm. Algorithms with the same execution steps have the same function. By comparing instructions, the matching of algorithm functions can be accurately determined. Meanwhile, instruction extraction is relatively simple. Therefore, converting the function identification process into an instruction comparison process can simplify the identification difficulty and improve identification efficiency while ensuring identification accuracy. It is evident that this application can determine whether there are naming conflicts in the application to be identified while ensuring identification efficiency, thereby accelerating the naming conflict resolution process and improving the stability and reliability of the application software.
[0066] In some embodiments of this application, considering that naming conflicts may be due to multiple versions of the application to be identified being deployed on the server, and that any one or more programming entities in the latest version have been modified, resulting in naming conflicts between programming entities with the same signature in different versions, a process of obtaining all JAR files of the application to be identified on the server can be added before step S1, which involves scanning all JAR files of the application to be identified and analyzing whether there are programming entities with the same signature in different JAR files, in order to identify naming conflicts in the application to be identified deployed on the server. The added process of obtaining all JAR files of the application to be identified on the server will be described in detail below:
[0067] Log in to the server remotely via SSH and download all JAR files of the application to be identified.
[0068] Specifically, after listening to the information sent by vpaas that the application to be identified has been successfully deployed on the server, you can remotely log in to the server via the SSH protocol.
[0069] Download the script and algorithm package from the server.
[0070] As can be seen from the above technical solution, compared with the previous embodiment, this embodiment adds an optional method to obtain all JAR packages of the application to be identified from the server. Through the above method, naming conflict identification can be performed on the application to be identified from the server, and the deployment of the application to be identified can be completed better.
[0071] In some embodiments of this application, the process of step S1, scanning all JAR files of the application to be identified and analyzing whether there are programming entities with the same signature in different JAR files, is described in detail as follows:
[0072] S10. Extract all bytecode files from each jar package.
[0073] Specifically, bytecode files can be extracted from each JAR file in several ways.
[0074] For example, you can use a decompilation tool to extract all the bytecode files from each JAR file; you can also use a command-line tool to extract all the bytecode files from each JAR file.
[0075] The decompilation tool can be JD-GUI or FernFlower.
[0076] S11. Parse the bytecode files of different JAR packages and analyze whether there are programming entities with the same signature in different JAR packages.
[0077] Specifically, the signature of each programming entity in each bytecode file can be obtained; for example, the signature of each programming entity can be found through a command; or a bytecode manipulation library can be used to parse each bytecode file and determine the signature of each programming entity.
[0078] After determining the signature of each programming entity in all bytecode files, the signatures of each programming entity in similar bytecode files in different JAR packages can be compared to determine whether there are programming entities with the same signature in different JAR packages.
[0079] As can be seen from the above technical solution, this embodiment provides an optional method to scan all JAR packages of the application to be identified and analyze whether there are programming entities with the same signature in different JAR packages. In this way, each JAR package can be decomposed into multiple bytecode files, and by comparing the programming entity signatures of each bytecode file in different JAR packages, it can be determined whether there are programming entities with the same signature in different JAR packages. This allows for a better step-by-step comparison of signatures and avoids errors caused by excessive data volume.
[0080] In some embodiments of this application, the process of step S10, extracting all bytecode files from each jar package, is described in detail below:
[0081] S100. Use command-line tools to extract class files from each jar package.
[0082] Specifically, the javap command can be used to extract class files from each jar package.
[0083] As can be seen from the above technical solution, this embodiment provides an optional method for extracting all bytecode files of each jar package. The class files can be extracted in this way so that the signatures of the programming entities can be extracted later.
[0084] In some embodiments of this application, combined with Figure 2 Step S11, which involves parsing the bytecode files of different JAR files and analyzing whether there are programming entities with the same signature in different JAR files, is explained in detail below:
[0085] Step S110: Compare the bytecode files of different JAR packages to determine whether there are bytecode files that constitute the same structure in different JAR packages; if yes, proceed to step S111; if no, it can be determined that there is no naming conflict in the application to be identified.
[0086] Specifically, the contents of each bytecode file can be compared sequentially with the contents of each bytecode file in other JAR packages to determine whether there are bytecode files with the same structure in different JAR packages.
[0087] If so, there may be naming conflicts between bytecode files that constitute the same structure but correspond to different JAR packages, then step S111 can be executed.
[0088] If not, the probability that the bytecode in different JAR packages contains the same signed programming entity is low. Therefore, it can be determined that there is no naming conflict in the application to be identified.
[0089] Step S111: Determine whether there are programming entities with the same signature in the same bytecode file.
[0090] Specifically, the signatures of the various programming entities in a bytecode file with the same structure can be compared to assess whether there are programming entities with the same signature in the same bytecode file.
[0091] As can be seen from the above technical solution, this embodiment provides an optional method for parsing bytecode files of different JAR packages and analyzing whether there are programming entities with the same signature in different JAR packages. Through the above method, it is possible to find bytecode files with the same structure in different JAR packages and then identify whether there are programming entities with the same signature in the bytecode files with the same structure. This reduces the amount of data for comparing programming entity signatures and reduces the probability of errors in the comparison results, thereby improving the comparison reliability of this application and improving the accuracy of naming conflict identification in this application.
[0092] In some embodiments of this application, step S110, which involves comparing the bytecode files of different JAR packages to determine whether there are bytecode files constituting the same bytecode file in different JAR packages, is described in detail below:
[0093] S1100: Determine the definition type and modifiers of the programming entities in each bytecode file.
[0094] Specifically, the definition type and modifiers of each programming entity can be extracted from each bytecode file.
[0095] For example, you can use javap to get detailed information about each class in each class file. The detailed information can include the programming entity definition type and modifiers.
[0096] S1101. Determine whether there are bytecode files in different JAR packages where the definition type and modifiers of programming entities are consistent.
[0097] Specifically, the programming entity definition types and modifiers of each bytecode file in different JAR packages can be compared, and bytecode files with the same programming entity definition types and modifiers but belonging to different JAR packages can be considered as constituting the same bytecode file.
[0098] As can be seen from the above technical solution, this embodiment provides an optional method for comparing bytecode files in different JAR packages to determine whether there are bytecode files with the same structure in different JAR packages. Through this method, this application can convert the structural comparison between bytecode files into a comparison of programming entity definition types and modifiers. Once the definition types and modifiers of the programming entities are all the same, the bytecode files have the same structure. Based on this, bytecode files with the same structure but belonging to different JAR packages can be more easily identified.
[0099] In some embodiments of this application, the process of step S2, extracting the operation instructions corresponding to each programming entity with the same signature, and identifying whether the operation instructions corresponding to each programming entity with the same signature are the same, is described in detail as follows:
[0100] S20. Extract the set of operation instructions for each method corresponding to the same signature, and identify whether the set of operation instructions for each method corresponding to the same signature is the same.
[0101] Specifically, considering that naming conflicts usually cause runtime errors because the class loader loads a method that does not meet expectations, it is more important to identify whether there are naming conflicts between methods in different JAR packages during the naming conflict identification process. Therefore, we can try to identify whether the methods in different JAR packages have the same signature but different functions.
[0102] Based on this, all operation instructions of various methods with the same signature but belonging to different JAR packages can be extracted, and all operation instructions of the same method can be written into the same operation instruction set;
[0103] Multiple sets of operation instructions with the same method signature but different corresponding JAR packages can be compared to determine whether the sets of operation instructions with the same method signature but different corresponding JAR packages are completely identical.
[0104] If they are completely identical, then it can be determined that there is a conflict between the various programming entities corresponding to the same signature;
[0105] If they are not completely identical, then it can be determined that there is no conflict between the various programming entities corresponding to the same signature.
[0106] As can be seen from the above technical solution, this embodiment provides an optional method to extract the operation instructions of each programming entity corresponding to the same signature and identify whether the operation instructions of each programming entity corresponding to the same signature are the same. The above method can identify the operation failure caused by methods with the same signature but different functions, and promptly identify method naming conflicts.
[0107] Next, we will combine Figure 3 The naming conflict identification device provided in this application is described in detail. The naming conflict identification device described below can be compared with the naming conflict identification method described above.
[0108] See Figure 3 It can be observed that the naming conflict identification device may include:
[0109] The scanning module 10 is used to scan all JAR packages of the application to be identified and analyze whether there are programming entities with the same signature in different JAR packages; if not, the determination module is called; if they exist, the extraction module is called.
[0110] The determining module 20 is used to determine that there is no naming conflict in the application to be identified;
[0111] The extraction module 30 is used to extract the operation instructions of each programming entity corresponding to the same signature, and identify whether the operation instructions of each programming entity corresponding to the same signature are the same; if they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature; if they are the same, the determination module is called.
[0112] Furthermore, the naming conflict identification device may also include:
[0113] The JAR package download module is used to remotely log in to the server via the SSH protocol and download all JAR packages of the application to be identified.
[0114] Furthermore, the scanning module may include:
[0115] The bytecode file extraction unit is used to extract all bytecode files from each JAR file.
[0116] The bytecode file parsing unit is used to parse the bytecode files of different JAR packages and analyze whether there are programming entities with the same signature in different JAR packages.
[0117] Furthermore, the bytecode file extraction unit may include:
[0118] The class file extraction unit is used to extract class files from each JAR package using command-line tools.
[0119] Furthermore, the bytecode file parsing unit may include:
[0120] The bytecode file comparison component is used to compare the bytecode files of different JAR packages to determine whether there are bytecode files that constitute the same structure in different JAR packages; if so, the signature comparison component is called.
[0121] The signature comparison component is used to determine whether there are programming entities with the same signature in the same bytecode file.
[0122] Furthermore, the bytecode file comparison component may include:
[0123] Modifiers determine sub-components and are used to determine the definition type and modifiers of programming entities in each bytecode file;
[0124] The consistency judgment subcomponent is used to determine whether there are bytecode files in different JAR packages where the definition type and modifiers of programming entities are consistent.
[0125] Furthermore, the extraction module may include:
[0126] The operation instruction set comparison unit is used to extract the operation instruction sets corresponding to each method with the same signature and to identify whether the operation instruction sets corresponding to each method with the same signature are the same.
[0127] The naming conflict identification device provided in this application embodiment can be applied to naming conflict identification devices, such as PC terminals, cloud platforms, servers, and server clusters. Optionally, Figure 4 The hardware structure block diagram of the naming conflict identification device is shown, with reference to... Figure 4 The hardware structure of a naming conflict identification device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0128] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0129] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0130] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0131] The memory stores a program, which the processor can call. The program is used for:
[0132] Scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files;
[0133] If not, then it is determined that there is no naming conflict in the application to be identified;
[0134] If they exist, extract the operation instructions corresponding to each programming entity with the same signature, and identify whether the operation instructions corresponding to each programming entity with the same signature are the same.
[0135] If they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature;
[0136] If they are the same, proceed to the step of determining that there is no naming conflict in the application to be identified.
[0137] Optionally, the refined and extended functions of the program can be referred to the above description.
[0138] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0139] Scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files;
[0140] If not, then it is determined that there is no naming conflict in the application to be identified;
[0141] If they exist, extract the operation instructions corresponding to each programming entity with the same signature, and identify whether the operation instructions corresponding to each programming entity with the same signature are the same.
[0142] If they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature;
[0143] If they are the same, proceed to the step of determining that there is no naming conflict in the application to be identified.
[0144] Optionally, the refined and extended functions of the program can be referred to the above description.
[0145] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0146] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0147] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. The various embodiments of this application can be combined with each other. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A naming conflict identification method, characterized in that, include: Scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files; If not, then it is determined that there is no naming conflict in the application to be identified; If it exists, extract the set of operation instructions for each method corresponding to the same signature, and identify whether the set of operation instructions for each method corresponding to the same signature is the same; If they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature; If they are the same, proceed to the step of determining that there is no naming conflict in the application to be identified; The process involves scanning all JAR files of the application to be identified and analyzing whether there are programming entities with the same signature in different JAR files, including: Extract all bytecode files from each JAR file; Compare the bytecode files of different JAR packages to determine whether there are bytecode files that constitute the same structure in different JAR packages; If so, then determine whether there are programming entities with the same signature in the same bytecode file.
2. The naming conflict identification method according to claim 1, characterized in that, The comparison of bytecode files in different JAR packages to determine whether there are bytecode files constituting the same structure in different JAR packages includes: Determine the definition type and modifiers of the programming entities in each bytecode file; Determine whether different JAR files contain bytecode files with identical definition types and modifiers for programming entities.
3. The naming conflict identification method according to claim 1, characterized in that, The extraction of all bytecode files from each JAR file includes: Use command-line tools to extract class files from each JAR file.
4. The naming conflict identification method according to claim 1, characterized in that, Before extracting all bytecode files from each JAR file, the process also includes: Log in to the server remotely via SSH and download all JAR files of the application to be identified.
5. A naming conflict identification device, characterized in that, include: The scanning module is used to scan all JAR files of the application to be identified and analyze whether there are programming entities with the same signature in different JAR files; If it does not exist, the determination module is invoked; If it exists, then call the extraction module; The determination module is used to determine that there are no naming conflicts in the application to be identified; The extraction module is used to extract the set of operation instructions corresponding to each method with the same signature, and to identify whether the set of operation instructions corresponding to each method with the same signature are the same; if they are different, it is determined that there is a conflict between the programming entities corresponding to the same signature. If they are the same, then the determining module is invoked; The scanning module includes: The bytecode file extraction unit is used to extract all bytecode files from each JAR file. The bytecode file parsing unit is used to compare the bytecode files of different JAR packages to determine whether there are bytecode files with the same structure in different JAR packages; if so, it determines whether there are programming entities with the same signature in the bytecode files with the same structure.
6. A naming conflict identification device, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the various steps of the naming conflict identification method as described in any one of claims 1-4.
7. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the various steps of the naming conflict identification method as described in any one of claims 1-4.