WO2024034720A1 - 전자 장치 및 그의 정보 제공 방법 - Google Patents
전자 장치 및 그의 정보 제공 방법 Download PDFInfo
- Publication number
- WO2024034720A1 WO2024034720A1 PCT/KR2022/012278 KR2022012278W WO2024034720A1 WO 2024034720 A1 WO2024034720 A1 WO 2024034720A1 KR 2022012278 W KR2022012278 W KR 2022012278W WO 2024034720 A1 WO2024034720 A1 WO 2024034720A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- logic
- subcode
- code
- change
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3698—Environments for analysis, debugging or testing of software
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3604—Analysis of software for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3628—Debugging of software of optimised code
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/433—Dependency analysis; Data or control flow analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/75—Structural analysis for program understanding
Definitions
- the present disclosure relates to an electronic device and a control method for detecting in advance codes related to changes in existing logic among codes newly written by a user and providing information to the user regarding codes related to changes to existing logic.
- A/B testing is being conducted in various fields such as e-commerce/online purchasing and digital content provision.
- A/B testing is widely used as a way to improve user satisfaction, to the extent that hundreds of A/B tests are performed to provide one application.
- A/B testing is a test performed to compare the responses of users who use each service by dividing users into two or more groups and providing services according to different logic to each user in the groups.
- the code implementing the service must be modified to include the logic to be applied to the experimental group in order to provide the current service to the control group and the changed service to the experimental group.
- the logic corresponding to the control group is unintentionally changed. In this case, even if all users are reassigned to the control group, the logic corresponding to the changed control group is not applied. There was a problem.
- an incident occurs due to A/B testing, even if users are immediately unassigned to B logic and all users are returned to A logic, there is a problem in which the unintentionally changed A logic is applied. do.
- the disclosed embodiments seek to provide an electronic device and a method of providing information thereof. More specifically, an electronic device and a control method for detecting in advance codes related to changes in existing logic among newly written codes by the user and providing information to the user regarding codes related to changes in existing logic are provided. The purpose is to
- One aspect of the present disclosure includes identifying a first code and a second code; based on the first code and the second code, identifying a different sub-code set; Confirming the difference type of one or more nodes corresponding to the sub-code set using a set algorithm; Based on the difference type of the one or more nodes, identifying a subcode related to a change in first logic according to the first code among the subcode set; and providing information on a subcode related to a change in the first logic.
- the set algorithm may provide an information provision method including an abstract syntax tree (AST).
- AST abstract syntax tree
- the step of checking the difference type of the one or more nodes includes obtaining a first abstract syntax tree and a second abstract syntax tree corresponding to each of the first code and the second code. ; Comparing the first abstract syntax tree and the second abstract syntax tree to confirm a mapping relationship between a plurality of nodes included in each of the first abstract syntax tree and the second abstract syntax tree; and confirming the difference type of the one or more nodes based on the mapping relationship between the plurality of nodes.
- the difference type of the node without a mapped node is confirmed as addition or deletion, and compared with the mapped node, the corresponding subcode is the same and the parent node is different.
- a method of providing information in which the difference type of a node is confirmed by movement, and compared with a mapped node, the difference type of a node with a similar corresponding subcode or a node with the same corresponding subcode and a changed child node is confirmed by modification. can be provided.
- the step of checking the subcode related to the change of the first logic includes selecting a node related to the change of the first logic among the one or more nodes based on the difference type of the one or more nodes.
- a method of providing information may be provided, including the step of checking.
- the step of checking the node related to the change of the first logic includes the subcode corresponding to the first node whose difference type is addition among the one or more nodes using a declaration syntax. or checking whether or not it includes an expression syntax, and when the subcode corresponding to the first node includes a declaration syntax, when the declaration syntax is not called from another subcode, The first node is confirmed as a node that does not change the first logic, and when the subcode corresponding to the first node includes an expression syntax, it is determined whether the expression syntax is a conditional expression syntax and whether the expression syntax is the first 2
- a method of providing information can be provided in which it is confirmed whether the first node is a node related to a change in the first logic based on whether it is included in a conditional statement regarding the second logic newly added according to the code.
- the step of identifying a node related to a change in the first logic includes a subcode corresponding to a second node whose difference type is modification among the one or more nodes having a declaration syntax or an expression syntax. and checking whether the sub-code corresponding to the second node includes an expression syntax, the second node is identified as a node related to a change in the first logic, and the second node
- the subcode corresponding to includes a declaration statement
- the declaration statement includes content related to the first logic
- the second node is identified as a node related to a change in the first logic, providing information
- a method can be provided.
- the third node is the first node.
- a method of providing information can be provided, identified as a node related to a change in logic.
- the fourth node when the subcode corresponding to the fourth node whose difference type is delete among the one or more nodes includes content related to the first logic, the fourth node is the first logic.
- a method of providing information can be provided, identified as a node related to a change in logic.
- the information providing method further includes the step of identifying a node that causes the change in the first logic among nodes related to the change in the first logic, and A method of providing information can be provided in which the subcode corresponding to the node causing the change is identified as the subcode related to the change of the first logic.
- a subcode related to the first logic and a sub-code related to a second logic newly added according to the second code.
- checking the difference type of the one or more nodes includes checking a subcode related to the first logic among the subcode set; and confirming the difference type of the node corresponding to the subcode related to the first logic.
- the step of checking the subcode related to the change of the first logic is based on the difference type of the node corresponding to the subcode related to the first logic.
- a method of providing information may be provided, including the step of checking a subcode related to a change in the first logic among subcodes.
- the information on the subcode related to the change in the first logic may include a change in the subcode related to the change in the first logic, and may provide an information providing method.
- a method of providing information may be provided in which the first code is obtained from a repository and the second code is obtained from a user terminal.
- a method of providing information that is initiated by obtaining a pull request from a user terminal may be provided.
- Another aspect of the present disclosure is a communication unit; Memory; and a controller, wherein the control unit checks the first code and the second code, compares the first code and the second code, checks a set of subcodes with differences, and executes a set algorithm. Using the method, the difference type of one or more nodes corresponding to the sub-code set is confirmed, and based on the difference type of the one or more nodes, a sub code associated with a change in the first logic according to the first code among the sub-code sets is used.
- An electronic device can be provided that verifies a code and provides information about a subcode related to a change in the first logic.
- Another aspect of the present disclosure may provide a computer-readable recording medium on which a program for implementing a method performed by an electronic device is recorded.
- an electronic device can provide an automated system that detects changes in A logic during a code review process before executing an A/B test. Accordingly, the user can check whether the code he or she has written is likely to change the A logic before merging the newly written code into the master branch or the original code. As a result, if an incident occurs due to A/B testing, the problem of not being able to return to the existing A logic can be prevented even if the B logic is immediately rolled back.
- FIG. 1 shows a system according to one embodiment.
- FIG. 2 is a diagram illustrating a process in which an electronic device provides information according to an embodiment.
- FIGS. 3A and 3B are diagrams for explaining a process in which an electronic device provides information, according to an embodiment.
- FIGS. 4A to 4D are diagrams for explaining a process by which an electronic device checks the difference type of one or more nodes, according to an embodiment.
- FIG. 5 is a diagram illustrating a process in which an electronic device checks whether a node with an additional difference type changes the existing first logic, according to an embodiment.
- FIG. 6 is a diagram illustrating a process in which an electronic device checks whether a node whose difference type is modification changes the existing first logic, according to an embodiment.
- FIG. 7 is a diagram illustrating a process in which an electronic device checks whether a node whose difference type is movement changes the existing first logic, according to an embodiment.
- FIG. 8 is a diagram illustrating a process in which an electronic device checks whether a node whose difference type is delete changes the existing first logic, according to an embodiment.
- 9A to 9B are diagrams for explaining a process in which an electronic device performs filtering, according to an embodiment.
- 10A to 10D are diagrams for explaining a process in which an electronic device provides information, according to an embodiment.
- Figure 11 shows a flowchart of a method for providing information by an electronic device according to an embodiment.
- the foregoing description may apply to overlapping content.
- Figure 12 shows a block diagram of an electronic device according to an embodiment.
- the “terminal” mentioned below may be implemented as a computer or portable terminal that can connect to a server or other terminal through a network.
- the computer includes, for example, a laptop, desktop, laptop, etc. equipped with a web browser
- the portable terminal is, for example, a wireless communication device that guarantees portability and mobility.
- all types of communication-based terminals such as IMT (International Mobile Telecommunication), CDMA (Code Division Multiple Access), W-CDMA (W-Code Division Multiple Access), and LTE (Long Term Evolution), smartphones, tablet PCs, etc. It may include a handheld-based wireless communication device.
- A/B testing refers to a test performed to compare user experience and satisfaction for an existing function or service and a new function or service.
- the logic corresponding to the existing function or service may be expressed as A logic, first logic, or control group logic
- the logic corresponding to the new function or service may be expressed as B logic, second logic, or experimental group ( experimental group) may be expressed as logic, etc., but is not limited to the above.
- FIG. 1 shows a system according to one embodiment.
- the system may include at least one of an electronic device 100, one or more user terminals 120, 140, and 160, and a network 180. Meanwhile, the system shown in FIG. 1 shows only components related to this embodiment. Accordingly, those skilled in the art can understand that other general-purpose components may be included in addition to the components shown in FIG. 1.
- the electronic device 100 is a device that configures and provides various information.
- the electronic device 100 may provide the configured information in the form of a web page or application screen, or may provide information in a form that can be displayed as a web page or application screen on the receiving terminal.
- the electronic device 100 obtains a code written to perform A/B testing from one or more terminals 120, 140, and 160, and subcodes related to a change in the existing first logic. You can check it. Thereafter, the electronic device 100 may transmit information about the subcode related to the change of the first logic to one or more terminals 120, 140, and 160.
- One or more user terminals 120, 140, and 160 are terminals used by each user, and the users can access services provided by the network 180 using their respective user terminals 120, 140, and 160. You can.
- the electronic device 100 provides one or more user terminals 120, 140, and 160 with a platform or application that provides information about subcodes related to changes in existing first logic among codes written by the user. can do. Users can use platforms or applications installed on their respective user terminals 120, 140, and 160 to check whether the code they have written has the potential to change the existing first logic.
- the network 180 includes a local area network (LAN), a wide area network (WAN), a value added network (VAN), a mobile radio communication network, a satellite communication network, and their respective networks. It is a comprehensive data communication network that includes a combination and allows each network constituent shown in FIG. 1 to communicate smoothly with each other, and may include wired Internet, wireless Internet, and mobile wireless communication network.
- Wireless communications include, for example, wireless LAN (Wi-Fi), Bluetooth, Bluetooth low energy, ZigBee, WFD (Wi-Fi Direct), UWB (ultra wideband), and infrared communication (IrDA, infrared Data Association). ), NFC (Near Field Communication), etc., but are not limited thereto.
- FIG. 2 is a diagram illustrating a process in which the electronic device 100 provides information according to an embodiment.
- the electronic device 100 may check the sub-code set with a difference.
- the electronic device 100 may check the first code and the second code and then check a different sub-code set based on the first code and the second code. For example, as the electronic device 100 obtains a pull request from a user terminal, the electronic device 100 may obtain a first code from a repository and obtain a second code from the user terminal. Thereafter, the electronic device 100 may compare the first code and the second code to identify a different set of subcodes among one or more subcodes included in the first code and the second code.
- the first code is an existing code and may represent a code related to the existing first logic.
- the second code is a newly written code to perform A/B testing, and may include a subcode related to the first logic (A logic) and a subcode related to the newly added second logic (B logic). .
- the electronic device 100 may use a set algorithm to check the difference type of one or more nodes corresponding to the subcode set with a difference.
- the electronic device 100 may obtain a first abstract syntax tree and a second abstract syntax tree corresponding to the first code and the second code, respectively. Thereafter, the electronic device 100 compares the first abstract syntax tree and the second abstract syntax tree to confirm a mapping relationship between a plurality of nodes included in each of the first abstract syntax tree and the second abstract syntax tree, Based on the mapping relationship between a plurality of nodes, the difference type of one or more nodes can be confirmed.
- the difference type of one or more nodes may include at least one of addition, modification, movement, and deletion. This will be described in detail with reference to FIGS. 4A to 4D.
- the electronic device 100 may analyze the difference type of one or more nodes. According to one embodiment, the electronic device 100 may check whether each of one or more nodes has the possibility of changing the existing A logic based on a process set for each difference type of one or more nodes. This will be described in detail with reference to FIGS. 5 to 8.
- the electronic device 100 may perform filtering to identify the node causing the change in the existing first logic.
- the electronic device 100 may identify the node that causes the change in the A logic among the nodes related to the change in the existing A logic. Thereafter, the electronic device 100 identifies the subcode corresponding to the node causing the change in A logic as the subcode related to the change in A logic, and sends information about the subcode related to the change in A logic to the user terminal. Can be transmitted. This will be described in detail with reference to FIGS. 9A to 9B.
- FIGS. 3A and 3B are diagrams for explaining a process in which the electronic device 100 provides information according to an embodiment.
- the electronic device 100 may obtain the pull request 300 from the user terminal. For example, a user writes a new second code to perform A/B testing, saves it in a local repository, and then merges the second code into the master branch or original code stored in the integrated repository. You can enter what you want to do into the user terminal.
- the user terminal may transmit a pull request 300 including information about the second code to the electronic device 100 based on the user's input. As the electronic device 100 obtains the pull request 300, it may initiate a method of providing information regarding whether the existing first logic has been changed.
- the electronic device 100 is a device or worker terminal for merging and managing codes written by multiple users, and can receive the pull request 300 directly from the user terminal, but is a device that exists separately from the worker terminal. It can be. In this case, instead of receiving the pull request 300 directly from the user terminal, the electronic device 100 may obtain information that the user terminal has transmitted the pull request 300 to the worker terminal. As the electronic device 100 obtains information that the user terminal has transmitted the pull request 300 to the worker terminal, the electronic device 100 may initiate a method of providing information regarding whether the existing first logic has been changed.
- the electronic device 100 may check the target branch 310 based on the pull request 300. For example, the electronic device 100 may check the second code newly created by the user based on the pull request 300. Thereafter, based on the second code, the electronic device 100 may check the target branch 310 related to the second code and the first code corresponding to the second code among the master branches stored in the integrated storage.
- the electronic device 100 may compare the first code and the second code according to an embodiment to identify a different sub-code set. For example, the electronic device 100 compares the first code and the second code, and selects a subcode 330 newly added to the second code, a subcode 332 modified from the second code, or a subcode 332 modified from the first code. You can check the deleted subcode 334.
- the electronic device 100 may perform parsing according to one embodiment. For example, the electronic device 100 performs parsing on the first code and the second code to obtain a first abstract syntax tree (AST) and a second abstract syntax tree, and subcodes with differences. It is possible to identify one or more nodes corresponding to a set. Alternatively, the electronic device 100 may parse the modified subcode 332 to obtain an abstract syntax tree and identify one or more nodes corresponding to the modified subcode 332.
- AST abstract syntax tree
- subcodes with differences It is possible to identify one or more nodes corresponding to a set.
- the electronic device 100 may parse the modified subcode 332 to obtain an abstract syntax tree and identify one or more nodes corresponding to the modified subcode 332.
- the electronic device 100 may check the difference type of one or more nodes according to an embodiment. For example, the electronic device 100 adds, modifies, moves, or deletes the difference type of one or more nodes based on a mapping relationship between a plurality of nodes included in each of the first abstract syntax tree and the second abstract syntax tree. You can check which one is which. Accordingly, the electronic device 100 may classify one or more nodes into one of an added node 360, a modified node 362, a moved node 364, and a deleted node 366.
- the electronic device 100 may analyze the difference type of one or more nodes. According to one embodiment, the electronic device 100 may identify a node related to a change in the existing first logic among one or more nodes based on a process set for each difference type of one or more nodes.
- the electronic device 100 may perform filtering to identify the node causing the change in the existing first logic.
- the electronic device 100 may identify the node that causes the change in the A logic among the nodes related to the change in the existing A logic. Thereafter, the electronic device 100 identifies the subcode corresponding to the node causing the change in A logic as the subcode related to the change in A logic, and sends information about the subcode related to the change in A logic to the user terminal. Can be transmitted.
- the electronic device 100 compares the first code and the second code in step S320, identifies a sub-code set with a difference, and then selects the first of the second codes according to an embodiment in step S390. You can check subcodes related to logic. Thereafter, the electronic device 100 may perform steps S340, S350, S370, and S380 on the subcode related to the first logic. For example, the electronic device 100 determines the difference type of the node corresponding to the subcode related to A logic, and based on the difference type of the node corresponding to the subcode related to A logic, the subcode related to A logic You can check the subcode related to the change in A logic.
- FIGS. 4A to 4D are diagrams for explaining a process by which the electronic device 100 confirms the difference type of one or more nodes, according to an embodiment.
- the electronic device 100 may obtain the first abstract syntax tree 400 and the second abstract syntax tree 450 by parsing the first code and the second code.
- the electronic device 100 checks the mapping relationship between a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450, and determines that the mapped nodes are identical to each other. It can be expressed with the alphabet. More specifically, the electronic device 100 operates in a top-down manner, where the corresponding subcodes among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 are the same or similar. You can check the node. The electronic device 100 may express nodes with identical or similar subcodes using the same alphabet. At this time, nodes with similar corresponding subcodes may be expressed using an apostrophe. Thereafter, the electronic device 100 may represent a node with the same corresponding subcode among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 as a set pattern.
- the electronic device 100 can confirm that the subcodes corresponding to the F node, G node, H node, I node, K node, L node, N node, and O node are the same. there is. Accordingly, the electronic device 100 may represent the F node, G node, H node, I node, K node, L node, N node, and O node as an upward diagonal pattern.
- the electronic device 100 may identify a node whose difference type is modified among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450. More specifically, the electronic device 100 can check the parent node-child node relationship of a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 in a bottom-up manner. there is. Based on the parent node-child node relationship of the plurality of nodes, the electronic device 100 may identify a node with a similar corresponding subcode or a node with the same corresponding subcode and a changed child node among the plurality of nodes. Thereafter, the electronic device 100 may express a node whose difference type is modified among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 with a set pattern.
- the electronic device 100 can confirm that the subcodes corresponding to the M nodes are similar. Accordingly, the electronic device 100 can confirm that the difference type of the M node is crystal and express the M node as a downward diagonal pattern. Additionally, the electronic device 100 may confirm that the subcodes corresponding to the A node, B node, C node, D node, E node, and J node are the same, but the child node has changed.
- the electronic device 100 confirms that the difference types of the A node, B node, C node, D node, E node, and J node are correction, and the A node, B node, C node, D node, E node, and The J node can be expressed as a downward diagonal pattern.
- the electronic device 100 may identify a node whose difference type is movement among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450. More specifically, the electronic device 100 can check the parent node-child node relationship of a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 in a bottom-up manner. there is. Based on the parent node-child node relationship of the plurality of nodes, the electronic device 100 may identify a node among the plurality of nodes with the same subcode and a different parent node. Thereafter, the electronic device 100 may express a node whose difference type is movement among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450 with a set pattern.
- the parent node of the I node included in the first abstract syntax tree 400 is a D node
- the parent node of the I node included in the second abstract syntax tree 450 is a D node. It can be confirmed that the parent node of is the B' node. Accordingly, the electronic device 100 can confirm that the difference type of the I node is movement and express the I node as a checkered pattern.
- the electronic device 100 may check a node whose difference type is addition or deletion among a plurality of nodes included in each of the first abstract syntax tree 400 and the second abstract syntax tree 450. . More specifically, the electronic device 100 may identify nodes for which no mapping relationship exists and then express the nodes for which no mapping relationship exists with a set pattern.
- the electronic device 100 may confirm that a P node that is not in the first abstract syntax tree 400 is included in the second abstract syntax tree 450. Accordingly, the electronic device 100 can confirm that the difference type of the P node is additive and express the P node as a vertical pattern. Additionally, the electronic device 100 may confirm that the Z node included in the first abstract syntax tree 400 is not in the second abstract syntax tree 450. Accordingly, the electronic device 100 can confirm that the difference type of the Z node is deletion and express the Z node as a horizontal pattern.
- the electronic device 100 uses an equality and similarity comparison algorithm to connect the first abstract syntax tree 400 and the second abstract syntax tree 450. You can check the difference type of one or more included nodes. For example, referring to FIG. 4D, the electronic device 100 checks the difference types of the A node to the P node and Z node included in the first abstract syntax tree 400 and the second abstract syntax tree 450, and , A node to P node and Z node can be expressed in different patterns depending on each difference type.
- FIG. 5 is a diagram illustrating a process in which the electronic device 100 checks whether a node with a difference type of addition changes the existing first logic, according to an embodiment.
- the electronic device 100 may check whether the subcode corresponding to the added node 500 includes a declaration statement according to an embodiment.
- the electronic device 100 may check whether the subcode corresponding to the added node 500 includes a declaration syntax or an expression syntax.
- the declaration syntax may include a class declaration expression, a method declaration expression, or a property declaration expression, etc.
- the electronic device 100 performs step S520, and the subcode corresponding to the added node 500 includes the declaration syntax. In this case, the electronic device 100 may perform step S570.
- step S520 the electronic device 100 may check whether the expression syntax included in the subcode corresponding to the added node 500 is a conditional expression syntax, according to an embodiment. As a result of the confirmation, if the expression syntax included in the subcode corresponding to the added node 500 is not a conditional expression syntax, the electronic device 100 performs step S530 and adds the subcode corresponding to the added node 500. If the expression syntax included in is a conditional expression syntax, the electronic device 100 may perform step S560.
- step S530 the electronic device 100 checks whether the expression syntax included in the subcode corresponding to the added node 500 includes content that is irrelevant (irrelevant) to the existing first logic. You can. For example, the electronic device 100 may determine that the expression syntax included in the subcode corresponding to the added node 500 is content about a comment, content about a non-runtime annotation, or access control. You can check whether it includes information about control).
- the expression syntax included in the subcode corresponding to the added node 500 contains content unrelated to the existing first logic, such as content related to comments, content related to non-runtime annotations, or content related to access control.
- the electronic device 100 can confirm that the added node 500 is a node that does not change the existing first logic.
- the electronic device 100 may perform step S540.
- step S540 the electronic device 100 may check whether the expression syntax included in the subcode corresponding to the added node 500 is included in a conditional statement called only in the newly added second logic. . As a result of confirmation, if the expression syntax included in the subcode corresponding to the added node 500 is included in a conditional statement called only in the second logic, the electronic device 100 determines that the added node 500 is connected to the existing first logic. You can confirm that it is a node that does not change. Alternatively, if the expression syntax included in the subcode corresponding to the added node 500 is not included in the conditional statement called only in the second logic, the electronic device 100 may perform step S550.
- step S550 the electronic device 100 may check whether the expression syntax included in the subcode corresponding to the node 500 added according to one embodiment calls a method that is not called in other subcodes. As a result of confirmation, if the expression syntax included in the subcode corresponding to the added node 500 calls a method that is not called in other subcodes, the electronic device 100 determines that the added node 500 is connected to the existing first You can confirm that it is a node that does not change the logic.
- the electronic device 100 may determine that the added node 500 is connected to the existing first You can confirm that it is a node related to a change in logic.
- step S560 if the expression syntax included in the subcode corresponding to the added node 500 is a conditional expression syntax, the electronic device 100, according to one embodiment, has the conditional expression syntax added. It is possible to check whether only the decision of the node 500 is affected. As a result of verification, if the condition expression syntax included in the subcode corresponding to the added node 500 only affects the judgment of the added node 500, the electronic device 100 determines that the added node 500 is It can be confirmed that it is a node that does not change the first logic.
- the electronic device 100 may determine whether the added node 500 is It can be confirmed that it is a node related to a change in the first logic.
- step S570 if the subcode corresponding to the added node 500 includes a declaration statement, the electronic device 100 may display the declaration statement included in the subcode corresponding to the added node 500 according to an embodiment. You can check whether this is called from another subcode. As a result of verification, if the declaration statement included in the subcode corresponding to the added node 500 is not called in another subcode, the electronic device 100 determines that the added node 500 does not change the existing first logic. You can confirm that it is a node that does not work. Alternatively, when the declaration statement included in the subcode corresponding to the added node 500 is called from another subcode, the electronic device 100 may determine that the added node 500 is a node related to a change in the existing first logic. You can confirm that it is.
- FIG. 6 is a diagram illustrating a process in which the electronic device 100 checks whether a node whose difference type is modification changes the existing first logic, according to an embodiment.
- step S620 the electronic device 100 may check whether the subcode corresponding to the modified node 600 includes a declaration statement according to an embodiment. For example, the electronic device 100 may check whether the subcode corresponding to the modified node 600 includes a declaration syntax or an expression syntax. As a result of confirmation, if the subcode corresponding to the modified node 600 includes an expression syntax, the electronic device 100 can confirm that the modified node 600 is a node related to a change in the existing first logic. Alternatively, if the subcode corresponding to the modified node 600 includes a declaration statement, the electronic device 100 may perform step S640.
- step S640 the electronic device 100 may check whether the declaration statement included in the subcode corresponding to the modified node 600 is renamed according to an embodiment. For example, the electronic device 100 may check whether the class, property, or method declared by the declaration statement is renamed. As a result of confirmation, if the class, property, or method declared by the declaration statement is renamed, the electronic device 100 can perform step S660. Alternatively, if the class, property, or method declared by the declaration statement is not renamed, the electronic device 100 may perform step S680.
- step S660 the electronic device 100 may rename the modified node 600 according to one embodiment. For example, as the declaration statement included in the subcode corresponding to the modified node 600 is renamed, the electronic device 100 may rename the modified node 600. Afterwards, the electronic device 100 may perform step S680.
- the electronic device 100 may check whether the expression syntax included in the subcode corresponding to the modified node 600 includes content unrelated to the existing first logic, according to an embodiment. For example, the electronic device 100 determines whether the expression syntax included in the subcode corresponding to the modified node 600 includes content related to a comment, content related to a non-runtime annotation, or content related to access control. You can check.
- the expression syntax included in the subcode corresponding to the modified node 600 contains content unrelated to the existing first logic, such as content related to comments, content related to non-runtime annotations, or content related to access control.
- the electronic device 100 can confirm that the modified node 600 is a node that does not change the existing first logic.
- the expression syntax included in the subcode corresponding to the modified node 600 includes content related to the existing first logic, the electronic device 100 may determine that the modified node 600 is connected to the existing first logic. You can confirm that it is a node related to a change in logic.
- FIG. 7 is a diagram illustrating a process in which the electronic device 100 checks whether a node whose difference type is movement changes the existing first logic, according to an embodiment.
- step S720 the electronic device 100 may check whether the conditional path changes due to the moved node 700 according to an embodiment. For example, as the node 700 moves, the condition path changes from a to !(!a), from a ⁇ b to b ⁇ a, and from !a ⁇ !b to !(a&&b). In this case or when (a ⁇ b)&&c is changed to (a&&c) ⁇ (b&&c), the electronic device 100 can confirm that the condition path has not changed.
- the electronic device 100 can confirm that the moved node 700 is a node related to a change in the existing first logic. Alternatively, if the conditional path does not change due to the moved node 700, the electronic device 100 may perform step S740.
- step S740 the electronic device 100 may check whether the execution path changes due to the moved node 700 according to an embodiment. As a result of confirmation, if the execution path is changed due to the moved node 700, the electronic device 100 can confirm that the moved node 700 is a node related to a change in the existing first logic. Alternatively, when the execution path does not change due to the moved node 700, the electronic device 100 may confirm that the moved node 700 is a node that does not change the existing first logic.
- FIG. 8 is a diagram illustrating a process in which the electronic device 100 checks whether a node whose difference type is delete changes the existing first logic, according to an embodiment.
- the electronic device 100 may check whether the expression syntax included in the subcode corresponding to the deleted node 800 includes content unrelated to the existing first logic, according to an embodiment. For example, the electronic device 100 determines whether the expression syntax included in the subcode corresponding to the deleted node 800 includes content related to a comment, content related to a non-runtime annotation, or content related to access control. You can check.
- the expression syntax included in the subcode corresponding to the deleted node 800 contains content unrelated to the existing first logic, such as content related to comments, content related to non-runtime annotations, or content related to access control.
- the electronic device 100 can confirm that the deleted node 800 is a node that does not change the existing first logic.
- the expression syntax included in the subcode corresponding to the deleted node 800 includes content related to the existing first logic, the electronic device 100 may determine that the deleted node 800 is related to the existing first logic. You can confirm that it is a node related to a change in logic.
- FIGS. 9A and 9B are diagrams for explaining a process in which the electronic device 100 performs filtering according to an embodiment.
- the electronic device 100 selects an existing node among a plurality of nodes included in the first abstract syntax tree 900 and the second abstract syntax tree 950 based on a process set for each difference type of the node.
- a node related to a change in the first logic can be confirmed.
- the electronic device 100 performs the operations disclosed with respect to FIGS. 5 to 8 to generate syntax included in the first abstract syntax tree 900 and the second abstract syntax tree 950.
- the electronic device 100 may display dotted circles on the A' node, B' node, C' node, E' node, J' node, M' node, I node, P node, and Z node. .
- some nodes included in the first abstract syntax tree 900 and the second abstract syntax tree 950, due to the complex parent node-child node relationship, are It may be judged to be related to a change in logic. For example, although the corresponding code of the J' node has not been directly changed, it may be determined that there is a possibility of changing the existing first logic as the M node, which is a child node, is modified. Therefore, if the electronic device 100 provides information to the user about all nodes identified as having the possibility of changing the existing first logic, it may cause confusion to the user, and thus, information related to the change of the first logic may cause confusion to the user. It is necessary to provide the user with information only about the node that causes the change in the first logic among the nodes.
- the electronic device 100 may perform filtering to identify the node that causes the change in the first logic among nodes related to the change in the first logic. For example, referring to FIG. 9B, the electronic device 100 has M nodes among A' node, B' node, C' node, E' node, J' node, M' node, I node, P node, and Z node. It can be confirmed that only the 'node, I node, P node, and Z node are the nodes that cause the first logic to be changed. Accordingly, the electronic device 100 may display dotted circles only on the M' node, I node, P node, and Z node.
- FIGS. 10A to 10D are diagrams for explaining a process in which the electronic device 100 provides information according to an embodiment.
- FIG. 10A shows an example in which information about a subcode related to a change in the existing first logic among the newly written second code for performing A/B testing by the user is displayed on the display of the user terminal.
- the electronic device 100 can check the existing first code and the second code newly created by the user, and check the sub-code set with differences based on the first code and the second code. .
- the electronic device 100 may confirm that the subcode of code line 265 has been newly added to the second code by comparing it to the first code.
- the electronic device 100 may use a set algorithm to check the difference type of one or more nodes corresponding to the subcode set. For example, the electronic device 100 may confirm that the difference type of the node corresponding to the subcode of code line 265 is additive.
- the electronic device 100 may identify a subcode related to a change in the existing first logic among the subcode set based on the difference type of one or more nodes. For example, the electronic device 100 may check whether the node corresponding to the subcode of code line 265 is likely to change A logic based on the process shown in FIG. 5. More specifically, the electronic device 100 may confirm that the subcode of code line 265 includes an expression syntax other than a conditional expression syntax. Afterwards, the electronic device 100 determines that the expression syntax included in the subcode of code line 265 includes content related to A logic, is not included in a conditional statement called only in B logic, and is not called in any other subcode. You can confirm that it is not called. Accordingly, the electronic device 100 can confirm that the node corresponding to the subcode of code line 265 is a node related to a change in A logic.
- the electronic device 100 may identify a node that causes a change in the first logic among nodes related to a change in the first logic. For example, the electronic device 100 can confirm that the node corresponding to the subcode of code line 265 is the node that causes the change in A logic by performing filtering based on the process shown in FIGS. 9A and 9B. there is.
- the electronic device 100 may provide information about a subcode related to a change in the first logic. For example, the electronic device 100 may transmit to the user terminal that the subcode of code line 265 is a subcode related to a change in A logic.
- the user terminal may display information about a subcode related to a change in the first logic on the display. For example, the user terminal may display a comment that the subcode of code line 265 has the possibility of changing A logic and that the expression syntax of showEmptyCart(false) has been added compared to the existing first code.
- FIG. 10B shows an example in which information about a subcode related to a change in the existing first logic among the second codes newly written by the user for performing A/B testing is displayed on the display of the user terminal.
- the electronic device 100 can check the existing first code and the second code newly created by the user, and check the sub-code set with differences based on the first code and the second code. .
- the electronic device 100 may confirm that the subcode of code line 2075 of the second code has been modified compared to the first code.
- the electronic device 100 may use a set algorithm to check the difference type of one or more nodes corresponding to the subcode set. For example, the electronic device 100 may confirm that the difference type of the node corresponding to the subcode of code line 2075 is modified.
- the electronic device 100 may identify a subcode related to a change in the existing first logic among the subcode set based on the difference type of one or more nodes. For example, the electronic device 100 may check whether the node corresponding to the subcode of code line 2075 is likely to change the A logic based on the process shown in FIG. 6. More specifically, the electronic device 100 can confirm that the node corresponding to the subcode of code line 2075 is a node related to a change in A logic because the subcode of code line 2075 includes an expression syntax.
- the electronic device 100 may identify a node that causes a change in the first logic among nodes related to a change in the first logic. For example, the electronic device 100 can confirm that the node corresponding to the subcode of code line 2075 is the node that causes the change in A logic by performing filtering based on the process shown in FIGS. 9A and 9B. there is.
- the electronic device 100 may provide information about a subcode related to a change in the first logic. For example, the electronic device 100 may transmit to the user terminal that the subcode of code line 2075 is a subcode related to a change in A logic.
- the user terminal may display information about a subcode related to a change in the first logic on the display.
- the user terminal has the possibility that the subcode of code line 2075 changes the A logic, and compared to the existing first code, RecommendCarouselSection.CAROUSEL_TYPE.equals(carouselType)? 5:3's expression syntax is RecommendCarouselSection.CAROUSEL_TYPE.equals(carouselManager.carouselType)? A comment indicating that it has been changed to 5:3 can be displayed.
- Figure 10c shows an example in which information about the existing first code is displayed on the display of the user terminal.
- FIG. 10D shows an example in which information about a subcode related to a change in the existing first logic among the second code newly written by the user for performing A/B testing is displayed on the display of the user terminal.
- the electronic device 100 can check the existing first code and the second code newly created by the user, and check the sub-code set with differences based on the first code and the second code. .
- the electronic device 100 may compare the first code and the second code and confirm that the subcode sets of code lines 1807 to 1820 among the second codes are different.
- the electronic device 100 may use a set algorithm to check the difference type of one or more nodes corresponding to the subcode set. For example, the electronic device 100 may confirm that the difference type of the nodes corresponding to the subcode set of code lines 1807 to 1818 is addition, and the difference type of the node corresponding to the subcode set of code line 1820 is movement.
- the electronic device 100 may identify a subcode related to a change in the existing first logic among the subcode set based on the difference type of one or more nodes. For example, the electronic device 100 may check whether nodes corresponding to the subcode sets of code lines 1807 to 1818 and 1820 are likely to change A logic based on the process shown in FIG. 5 or 7. .
- the electronic device 100 may confirm that the subcode of code line 1807 includes a declaration statement for declaring a variable, and that the declaration statement is called from another subcode. Accordingly, the electronic device 100 can confirm that the node corresponding to the subcode of code line 1807 is a node related to a change in A logic.
- the electronic device 100 may confirm that the subcode sets of code lines 1808, 1810, 1812, and 1818 each include a conditional expression syntax. Thereafter, the electronic device 100 may confirm that the conditional expression syntax only affects the judgment of nodes corresponding to the subcode sets of code lines 1808, 1810, 1812, and 1818. Accordingly, the electronic device 100 can confirm that the nodes corresponding to the subcode sets of 1808, 1810, 1812, and 1818 are nodes that do not change the A logic.
- the electronic device 100 may confirm that the subcode of code line 1809 includes a declaration statement for declaring a variable and that the declaration statement is not called from another subcode. Accordingly, the electronic device 100 can confirm that the node corresponding to the subcode of code line 1809 is a node that does not change the A logic.
- the electronic device 100 can confirm that the subcode sets of code lines 1811, 1813, 1816, and 1817 each include an expression syntax other than a conditional expression syntax. Afterwards, the electronic device 100 may confirm that the expression syntax included in the sub-code sets of code lines 1811, 1813, 1816, and 1817 is included in a conditional statement called only from B logic. Accordingly, the electronic device 100 can confirm that the nodes corresponding to the subcode sets of code lines 1811, 1813, 1816, and 1817 are nodes that do not change the A logic.
- the electronic device 100 may confirm that the execution path has changed as the expression syntax included in the subcode of code line 1820 is moved. Accordingly, the electronic device 100 can confirm that the node corresponding to the subcode of code line 1820 is a node related to a change in A logic.
- the electronic device 100 may identify a node that causes a change in the first logic among nodes related to a change in the first logic. For example, the electronic device 100 performs filtering based on the process shown in FIGS. 9A and 9B so that the nodes corresponding to each of the subcode sets of code lines 1807 and 1820 are the cause of the change in A logic. You can confirm that it is a node.
- the electronic device 100 may provide information about a subcode related to a change in the first logic. For example, the electronic device 100 may transmit to the user terminal that the subcodes of code lines 1807 and 1820 are subcodes related to a change in A logic.
- the electronic device 100 compares the first code and the second code, identifies a sub-code set with a difference, and then checks the sub-code related to the first logic among the sub-code set with a difference. You can. Thereafter, the electronic device 100 checks the difference type of the node corresponding to the subcode related to the first logic, and based on the difference type of the node corresponding to the subcode related to the first logic, the subcode related to the first logic Among the codes, you can check the subcode related to the change in the first logic.
- the electronic device 100 may confirm that among the subcode sets of code lines 1807 to 1820, the subcode sets of code lines 1807 and 1818 to 1820 are subcodes related to A logic. Thereafter, the electronic device 100 determines the difference type of the node corresponding to the subcode set of code lines 1807 and 1818 to 1820, and based on the difference type of the node, selects one of the subcode sets of code lines 1807 and 1818 to 1820. You can check the subcode related to the change in A logic.
- Figure 11 shows a flowchart of a method for providing information by an electronic device according to an embodiment.
- the foregoing description may apply to overlapping content.
- step S1100 the electronic device can check the first code and the second code.
- the first code may be obtained from a repository
- the second code may be obtained from a user terminal.
- the second code may include a subcode related to the first logic and a subcode related to the second logic newly added according to the second code. Accordingly, when checking the difference type of one or more nodes, the electronic device can check the subcode related to the first logic among the subcode set and check the difference type of the node corresponding to the subcode related to the first logic. In addition, when checking the subcode related to the change of the first logic, the electronic device determines the change of the first logic among the subcodes related to the first logic based on the difference type of the node corresponding to the subcode related to the first logic. You can check the related subcode.
- step S1120 the electronic device may identify a different sub-code set based on the first code and the second code.
- step S1140 the electronic device may check the difference type of one or more nodes corresponding to the subcode set using a set algorithm.
- the established algorithm may include an abstract syntax tree (AST).
- AST abstract syntax tree
- the electronic device when checking the difference type of one or more nodes, obtains a first abstract syntax tree and a second abstract syntax tree corresponding to each of the first code and the second code, and the first abstract syntax tree and comparing the second abstract syntax tree to confirm a mapping relationship between a plurality of nodes included in each of the first abstract syntax tree and the second abstract syntax tree, and based on the mapping relationship between the plurality of nodes, one or more nodes You can check the difference type.
- the difference type of a node without a mapped node is confirmed as addition or deletion, and compared with the mapped node, the difference type of the node whose corresponding subcode is the same and the parent node is different is confirmed by movement, and compared to the mapped node, the difference type of a node with a similar corresponding subcode or a node with the same corresponding subcode and a changed child node can be confirmed by modification.
- step S1160 the electronic device may check a subcode related to a change in the first logic according to the first code among the subcode set, based on the difference type of one or more nodes.
- the electronic device when checking a subcode related to a change in the first logic, may identify a node related to the change in the first logic among the one or more nodes based on the difference type of the one or more nodes.
- the subcode corresponding to the first node with a difference type of addition among one or more nodes has a declaration syntax or an expression syntax (You can check whether it includes expression syntax.
- the subcode corresponding to the first node includes a declaration statement
- the declaration statement when the declaration statement is not called in another subcode, the first node is confirmed as a node that does not change the first logic, and the first node is
- the corresponding subcode includes an expression syntax, based on whether the expression syntax is a conditional expression syntax and whether the expression syntax is included in a conditional statement regarding the second logic newly added according to the second code, the first node It can be confirmed whether the node is related to a change in the first logic.
- the electronic device determines whether, among one or more nodes, the subcode corresponding to the second node whose difference type is modification includes a declaration syntax or an expression syntax. You can check. At this time, if the subcode corresponding to the second node includes an expression syntax, the second node is confirmed as a node related to a change in the first logic, and if the subcode corresponding to the second node includes a declaration syntax, When the declaration statement includes content related to the first logic, the second node may be identified as a node related to a change in the first logic.
- the third node is a node related to the change of the first logic. It can be confirmed with .
- the fourth node when the subcode corresponding to the fourth node whose difference type is deletion among one or more nodes includes content related to the first logic, the fourth node is a node related to a change in the first logic. It can be confirmed.
- the electronic device may identify the node that causes the change in the first logic among nodes related to the change in the first logic. At this time, the subcode corresponding to the node causing the change in the first logic can be confirmed as a subcode related to the change in the first logic.
- the electronic device may provide information about the subcode related to the change of the first logic.
- the information about the subcode related to the change of the first logic may include change details of the subcode related to the change of the first logic.
- the electronic device may initiate an information provision method as it obtains a pull request from the user terminal.
- FIG. 12 shows a block diagram of an electronic device 100 according to an embodiment.
- the electronic device 100 may include a communication device 1220, a memory 1240, and a controller 1260.
- the electronic device 100 shown in FIG. 12 shows only components related to this embodiment. Accordingly, those skilled in the art can understand that other general-purpose components may be included in addition to the components shown in FIG. 12. Since the electronic device 100 may include content related to the above-described server, description of overlapping content will be omitted.
- the communication unit may include one or more transceivers.
- the control unit may include one or more processors.
- the communication unit 1220 is a device for performing wired/wireless communication and can communicate with external electronic devices.
- the external electronic device may be a terminal or server.
- communication technologies used by the communication unit 1220 include Global System for Mobile communication (GSM), Code Division Multi Access (CDMA), Long Term Evolution (LTE), 5G, Wireless LAN (WLAN), and Wireless-Fidelity (Wi-Fi). ), Bluetooth, RFID (Radio Frequency Identification), Infrared Data Association (IrDA), ZigBee, NFC (Near Field Communication), etc.
- the control unit 1260 can control the overall operation of the electronic device 100 and process data and signals.
- the control unit 1260 may be composed of at least one hardware unit. Additionally, the control unit 1260 may operate by one or more software modules generated by executing program codes stored in the memory 1240.
- the control unit 1260 may include a processor and a memory, and the processor may execute program codes stored in the memory to control the overall operation of the electronic device 100 and process data and signals. Additionally, in an embodiment, the control unit 1260 may include at least one processor.
- the control unit 1260 checks the first code and the second code, compares the first code and the second code, identifies a sub-code set with a difference, and uses a set algorithm to determine one sub-code set corresponding to the sub-code set. You can check the difference types of the above nodes. Based on the difference type of one or more nodes, the control unit 1260 checks the subcode related to the change of the first logic according to the first code among the subcode set, and provides information about the subcode related to the change of the first logic. can be provided.
- Electronic devices include a processor, memory for storing and executing program data, permanent storage such as a disk drive, a communication port for communicating with an external device, a touch panel, keys, buttons, etc. It may include the same user interface device, etc.
- Methods implemented as software modules or algorithms may be stored on a computer-readable recording medium as computer-readable codes or program instructions executable on the processor.
- computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disk, hard disk, etc.) and optical read media (e.g., CD-ROM). ), DVD (Digital Versatile Disc), etc.
- the computer-readable recording medium is distributed among computer systems connected to a network, so that computer-readable code can be stored and executed in a distributed manner.
- the media may be readable by a computer, stored in memory, and executed by a processor.
- This embodiment can be represented by functional block configurations and various processing steps. These functional blocks may be implemented in various numbers of hardware or/and software configurations that execute specific functions. For example, embodiments include integrated circuit configurations such as memory, processing, logic, look-up tables, etc. that can execute various functions under the control of one or more microprocessors or other control devices. can be hired. Similar to how the components can be implemented as software programming or software elements, the present embodiments include various algorithms implemented as combinations of data structures, processes, routines or other programming constructs, such as C, C++, Java ( It can be implemented in a programming or scripting language such as Java), assembler, etc. Functional aspects may be implemented as algorithms running on one or more processors.
- this embodiment may employ conventional technologies for electronic environment settings, signal processing, and/or data processing.
- Terms such as “mechanism,” “element,” “means,” and “configuration” may be used broadly and are not limited to mechanical and physical configurations. The term may include the meaning of a series of software routines in connection with a processor, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
전자 장치의 정보 제공 방법이 제공된다. 정보 제공 방법은 제1 코드 및 제2 코드를 확인하는 단계; 상기 제1 코드 및 상기 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인하는 단계; 설정된 알고리즘을 이용하여, 상기 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인하는 단계; 상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 서브 코드 세트 중 상기 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계; 및 상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는 단계를 포함할 수 있다.
Description
본 개시는 사용자가 새롭게 작성한 코드 중 기존의 로직의 변경과 관련된 코드를 사전에 탐지하고, 기존의 로직의 변경과 관련된 코드에 관한 정보를 사용자에게 제공하기 위한 전자 장치 및 그 제어 방법에 관한 것이다.
최근 보다 좋은 사용자 경험(user experience)을 제공하기 위하여, 전자상거래/온라인 구매 분야, 디지털 콘텐츠 제공 분야 등 다양한 분야에서 A/B 테스트가 수행되고 있다. 특히, 하나의 어플리케이션을 제공하기 위하여 수백 건의 A/B 테스트가 수행될 만큼, 사용자의 만족도를 제고하기 위한 방안으로서 A/B 테스트가 널리 사용되고 있다.
A/B 테스트는 사용자들을 둘 이상의 그룹들로 분리하여, 각기 다른 로직에 따른 서비스들을 그룹들 각각의 사용자에게 제공함으로써, 각 서비스를 이용하는 사용자들의 반응을 비교하기 위해 수행되는 테스트이다. A/B 테스트 수행 시, 현재의 서비스를 대조군에 제공하고 변경된 서비스를 실험군에 제공하기 위하여, 실험군에 적용할 로직을 포함하도록 서비스를 구현하는 코드가 수정되어야 한다. 다만, 수정 과정에서 실험군에 대응하는 로직을 추가하는 것 이외에 의도치 않게 대조군에 대응하는 로직이 변경되는 경우가 발생하고, 이 경우 모든 사용자를 다시 대조군으로 할당하더라도 변경된 대조군에 대응하는 로직이 적용되는 문제점이 있었다. 이와 같이, A/B 테스트로 인하여 인시던트(incident)가 발생하는 경우, 즉시 B 로직에 사용자가 할당되지 않도록 하고 모든 사용자를 A 로직으로 되돌리더라도, 의도치 않게 변경된 A 로직이 적용되는 문제가 존재한다.
관련하여, KR 10-2349495 B1 건 및 KR 10-2020-0179001 A1 건 등의 선행문헌들을 참조할 수 있다.
개시된 실시 예들은 전자 장치 및 그의 정보 제공 방법을 제공하고자 한다. 보다 구체적으로는, 사용자가 새롭게 작성한 코드 중 기존의 로직의 변경과 관련된 코드를 사전에 탐지하고, 기존의 로직의 변경과 관련된 코드에 관한 정보를 사용자에게 제공하기 위한 전자 장치 및 그 제어 방법을 제공하는 것을 목적으로 한다.
본 실시 예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 이하의 실시 예들로부터 또 다른 기술적 과제들이 유추될 수 있다.
본 개시의 일 측면은 제1 코드 및 제2 코드를 확인하는 단계; 상기 제1 코드 및 상기 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인하는 단계; 설정된 알고리즘을 이용하여, 상기 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인하는 단계; 상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 서브 코드 세트 중 상기 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계; 및 상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는 단계를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 설정된 알고리즘은, 추상 구문 트리(abstract syntax tree, AST)를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 하나 이상의 노드의 차이 타입을 확인하는 단계는, 상기 제1 코드 및 상기 제2 코드 각각에 대응하는 제1 추상 구문 트리 및 제2 추상 구문 트리를 획득하는 단계; 상기 제1 추상 구문 트리 및 상기 제2 추상 구문 트리를 비교하여, 상기 제1 추상 구문 트리 및 상기 제2 추상 구문 트리 각각에 포함된 복수의 노드들 간의 매핑 관계를 확인하는 단계; 및 상기 복수의 노드들 간의 매핑 관계에 기초하여, 상기 하나 이상의 노드의 차이 타입을 확인하는 단계를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 하나 이상의 노드 중, 매핑된 노드가 없는 노드의 차이 타입은 추가 또는 삭제로 확인되고, 매핑된 노드와 비교하여, 대응하는 서브 코드가 동일하고 부모 노드가 상이한 노드의 차이 타입은 이동으로 확인되고, 매핑된 노드와 비교하여, 대응하는 서브 코드가 유사한 노드 또는 대응하는 서브 코드가 동일하고 자식 노드가 변경된 노드의 차이 타입은 수정으로 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계는, 상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 하나 이상의 노드 중 상기 제1 로직의 변경과 관련된 노드를 확인하는 단계를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직의 변경과 관련된 노드를 확인하는 단계는, 상기 하나 이상의 노드 중, 차이 타입이 추가인 제1 노드에 대응하는 서브 코드가 선언 구문(declaration syntax) 또는 표현 구문(expression syntax)을 포함하는지 여부를 확인하는 단계를 포함하고, 상기 제1 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 상기 선언 구문이 다른 서브 코드에서 호출되지 않을 때, 상기 제1 노드는 상기 제1 로직을 변경하지 않는 노드로 확인되고, 상기 제1 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 상기 표현 구문이 조건 표현 구문인지 여부 및 상기 표현 구문이 상기 제2 코드에 따라 새롭게 추가된 제2 로직에 관한 조건문에 포함되는지 여부에 기초하여, 상기 제1 노드는 상기 제1 로직의 변경과 관련된 노드인지 여부가 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직의 변경과 관련된 노드를 확인하는 단계는, 상기 하나 이상의 노드 중, 차이 타입이 수정인 제2 노드에 대응하는 서브 코드가 선언 구문 또는 표현 구문을 포함하는지 여부를 확인하는 단계를 포함하고, 상기 제2 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 상기 제2 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되고, 상기 제2 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 상기 선언 구문이 상기 제1 로직과 관련 있는 내용을 포함할 때, 상기 제2 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 하나 이상의 노드 중, 차이 타입이 이동인 제3 노드로 인하여 조건 경로(conditional path) 또는 실행 경로(execute path)가 변경된 경우, 상기 제3 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 하나 이상의 노드 중, 차이 타입이 삭제인 제4 노드에 대응하는 서브 코드가 상기 제1 로직과 관련 있는 내용을 포함하는 경우, 상기 제4 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 정보 제공 방법은, 상기 제1 로직의 변경과 관련된 노드 중 상기 제1 로직의 변경의 원인이 되는 노드를 확인하는 단계를 더 포함하고, 상기 제1 로직의 변경의 원인이 되는 노드에 대응하는 서브 코드는 상기 제1 로직의 변경과 관련된 서브 코드로 확인되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직과 관련된 서브 코드; 및 상기 제2 코드에 따라 새롭게 추가된 제2 로직과 관련된 서브 코드를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 하나 이상의 노드의 차이 타입을 확인하는 단계는, 상기 서브 코드 세트 중 상기 제1 로직과 관련된 서브 코드를 확인하는 단계; 및 상기 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입을 확인하는 단계를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계는, 상기 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입에 기초하여, 상기 제1 로직과 관련된 서브 코드 중 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계를 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보는, 상기 제1 로직의 변경과 관련된 서브 코드의 변경 내용을 포함하는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 상기 제1 코드는 저장소(repository)로부터 획득되고, 상기 제2 코드는 사용자 단말로부터 획득되는, 정보 제공 방법을 제공할 수 있다.
또한, 본 개시의 일 실시 예에서 사용자 단말로부터 풀 리퀘스트(pull request)를 획득함에 따라 개시되는, 정보 제공 방법을 제공할 수 있다.
본 개시의 다른 측면은 통신부; 메모리; 및 제어부(controller)를 포함하고, 상기 제어부는, 제1 코드 및 제2 코드를 확인하고, 상기 제1 코드 및 상기 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인하고, 설정된 알고리즘을 이용하여, 상기 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인하고, 상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 서브 코드 세트 중 상기 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하고, 상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는, 전자 장치를 제공할 수 있다.
본 개시의 또 다른 측면은 전자 장치에 의해 수행되는 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 제공할 수 있다.
기타 실시 예들의 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.
제안되는 실시 예에 따를 경우 다음과 같은 효과를 하나 혹은 그 이상 기대할 수 있다.
본 명세서의 실시 예에 의할 경우, 전자 장치는 A/B 테스트를 실행하기 전에 코드 검토 과정에서 A 로직의 변경을 감지하는 자동화 시스템을 제공할 수 있다. 그에 따라, 사용자는 새롭게 작성한 코드를 마스터 브랜치 또는 원본 코드에 병합하기 이전에, 자신이 작성한 코드가 A 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다. 그 결과, A/B 테스트로 인하여 인시던트가 발생하는 경우, 즉시 B 로직을 롤백하더라도 기존의 A 로직으로 돌아오지 못하는 문제점을 예방할 수 있다.
발명의 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 청구범위의 기재로부터 당해 기술 분야의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.
도 1은 일 실시 예에 따른 시스템을 나타낸다.
도 2는 일 실시 예에 따라 전자 장치가 정보를 제공하는 과정을 설명하기 위한 도면이다.
도 3a 내지 도 3b는 일 실시 예에 따라 전자 장치가 정보를 제공하는 과정을 설명하기 위한 도면이다.
도 4a 내지 도 4d는 일 실시 예에 따라 전자 장치가 하나 이상의 노드의 차이 타입을 확인하는 과정을 설명하기 위한 도면이다.
도 5는 일 실시 예에 따라 전자 장치가 차이 타입이 추가인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
도 6은 일 실시 예에 따라 전자 장치가 차이 타입이 수정인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
도 7은 일 실시 예에 따라 전자 장치가 차이 타입이 이동인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
도 8은 일 실시 예에 따라 전자 장치가 차이 타입이 삭제인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
도 9a 내지 도 9b는 일 실시 예에 따라 전자 장치가 필터링을 수행하는 과정을 설명하기 위한 도면이다.
도 10a 내지 도 10d는 일 실시 예에 따라 전자 장치가 정보를 제공하는 과정을 설명하기 위한 도면이다.
도 11은 일 실시 예에 따른 전자 장치의 정보 제공 방법의 흐름도를 나타낸다. 중복되는 내용에 대해서는 전술한 기재가 적용될 수 있다.
도 12는 일 실시 예에 따른 전자 장치의 블록도를 나타낸다.
실시 예들에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.
명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다.
명세서 전체에서 기재된 "a, b, 및 c 중 적어도 하나"의 표현은, 'a 단독', 'b 단독', 'c 단독', 'a 및 b', 'a 및 c', 'b 및 c', 또는 'a, b, 및 c 모두'를 포괄할 수 있다.
이하에서 언급되는 "단말"은 네트워크를 통해 서버나 타 단말에 접속할 수 있는 컴퓨터나 휴대용 단말로 구현될 수 있다. 여기서, 컴퓨터는 예를 들어, 웹 브라우저(WEB Browser)가 탑재된 노트북, 데스크톱(desktop), 랩톱(laptop) 등을 포함하고, 휴대용 단말은 예를 들어, 휴대성과 이동성이 보장되는 무선 통신 장치로서, IMT(International Mobile Telecommunication), CDMA(Code Division Multiple Access), W-CDMA(W-Code Division Multiple Access), LTE(Long Term Evolution) 등의 통신 기반 단말, 스마트폰, 태블릿 PC 등과 같은 모든 종류의 핸드헬드(Handheld) 기반의 무선 통신 장치를 포함할 수 있다.
아래에서는 첨부한 도면을 참고하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다.
본 개시에서, A/B 테스트는 기존의 기능 또는 서비스와 새로운 기능 또는 서비스에 대한 사용자 경험(user experience) 및 만족도를 비교하기 위해 수행되는 테스트를 나타낸다. 이때, 기존의 기능 또는 서비스에 대응하는 로직은 A 로직, 제1 로직 또는 대조군(control group) 로직 등으로 표현될 수 있고, 새로운 기능 또는 서비스에 대응하는 로직은 B 로직, 제2 로직 또는 실험군(experimental group) 로직 등으로 표현될 수 있으나, 전술한 바에 한정되지 않는다. 한편, 실시 예에서 실험군에 대응하는 로직은 하나 이상일 수 있으며, 이 경우에도 본 명세서의 실시 예가 적용될 수 있다.
이하에서는 도면을 참조하여 본 개시의 실시 예들을 상세히 설명한다.
도 1은 일 실시 예에 따른 시스템을 나타낸다.
도 1을 참조하면, 시스템은 전자 장치(100), 하나 이상의 사용자 단말들(120, 140, 160) 및 네트워크(180) 중에서 적어도 하나를 포함할 수 있다. 한편, 도 1에 도시된 시스템은 본 실시 예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 1에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시 예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다.
전자 장치(100)는 다양한 정보를 구성하여 제공하는 장치이다. 전자 장치(100)는 구성된 정보를 웹 페이지 또는 어플리케이션 화면 등으로 제공하거나, 제공받는 단말에서 웹 페이지 또는 어플리케이션 화면 등으로 표시할 수 있는 형태의 정보로 제공할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 A/B 테스트를 수행하기 위해 작성된 코드를 하나 이상의 단말들(120, 140, 160)로부터 획득하고, 기존의 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다. 이후, 전자 장치(100)는 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 하나 이상의 단말들(120, 140, 160)로 전송할 수 있다.
하나 이상의 사용자 단말들(120, 140, 160)은 사용자들 각각이 사용하는 단말로서, 사용자들은 각자의 사용자 단말(120, 140, 160)을 이용하여 네트워크(180)에 의해 제공되는 서비스에 접근할 수 있다. 예를 들어, 전자 장치(100)는 사용자가 작성한 코드 중 기존의 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는 플랫폼 또는 어플리케이션을 하나 이상의 사용자 단말들(120, 140, 160)에 제공할 수 있다. 사용자들은 각자의 사용자 단말(120, 140, 160)에 설치된 플랫폼 또는 어플리케이션 등을 이용하여 자신이 작성한 코드가 기존의 제1 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다.
하나 이상의 사용자 단말들(120, 140, 160)과 전자 장치(100)는 네트워크(180) 내에서 서로 통신할 수 있다. 네트워크(180)는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 부가가치 통신망(Value Added Network; VAN), 이동 통신망(mobile radio communication network), 위성 통신망 및 이들의 상호 조합을 포함하며, 도 1에 도시된 각 네트워크 구성 주체가 서로 원활하게 통신을 할 수 있도록 하는 포괄적인 의미의 데이터 통신망이며, 유선 인터넷, 무선 인터넷 및 모바일 무선 통신망을 포함할 수 있다. 무선 통신은 예를 들어, 무선 랜(Wi-Fi), 블루투스, 블루투스 저 에너지(Bluetooth low energy), 지그비, WFD(Wi-Fi Direct), UWB(ultra wideband), 적외선 통신(IrDA, infrared Data Association), NFC(Near Field Communication) 등이 있을 수 있으나, 이에 한정되는 것은 아니다.
도 2는 일 실시 예에 따라 전자 장치(100)가 정보를 제공하는 과정을 설명하기 위한 도면이다.
S200 단계에서, 전자 장치(100)는 차이가 있는 서브 코드 세트를 확인할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 제1 코드를 및 제2 코드를 확인한 후, 제1 코드 및 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인할 수 있다. 예를 들어, 전자 장치(100)는 사용자 단말로부터 풀 리퀘스트(pull request)를 획득함에 따라, 제1 코드를 저장소(repository)로부터 획득하고, 제2 코드를 사용자 단말로부터 획득할 수 있다. 이후, 전자 장치(100)는 제1 코드 및 제2 코드에 비교하여, 제1 코드 및 제2 코드에 포함된 하나 이상의 서브 코드들 중 차이가 있는 서브 코드 세트를 확인할 수 있다.
이때, 제1 코드는 기존에 작성된 코드로서, 기존의 제1 로직과 관련된 코드를 나타낼 수 있다. 또한, 제2 코드는 A/B 테스트를 수행하기 위해 새롭게 작성된 코드로서, 제1 로직(A 로직)과 관련된 서브 코드 및 새롭게 추가된 제2 로직(B 로직)과 관련된 서브 코드를 포함할 수 있다.
S220 단계에서, 전자 장치(100)는 설정된 알고리즘을 이용하여, 차이가 있는 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 제1 코드 및 제2 코드 각각에 대응하는 제1 추상 구문 트리 및 제2 추상 구문 트리를 획득할 수 있다. 이후, 전자 장치(100)는, 제1 추상 구문 트리 및 제2 추상 구문 트리를 비교하여, 제1 추상 구문 트리 및 제2 추상 구문 트리 각각에 포함된 복수의 노드들 간의 매핑 관계를 확인하고, 복수의 노드들 간의 매핑 관계에 기초하여, 하나 이상의 노드의 차이 타입을 확인할 수 있다. 이때, 하나 이상의 노드의 차이 타입은 추가, 수정, 이동 및 삭제 중 적어도 하나를 포함할 수 있다. 이와 관련해서는 도 4a 내지 도 4d를 참조하여 자세히 설명하기로 한다.
S260 단계에서, 전자 장치(100)는 하나 이상의 노드의 차이 타입을 분석할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 하나 이상의 노드의 차이 타입마다 설정된 프로세스에 기초하여, 하나 이상의 노드 각각이 기존의 A 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다. 이와 관련해서는 도 5 내지 도 8을 참조하여 자세히 설명하기로 한다.
S280 단계에서, 전자 장치(100)는 필터링(filtering)을 수행하여 기존의 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 기존의 A 로직의 변경과 관련된 노드 중 A 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 이후, 전자 장치(100)는 A 로직의 변경의 원인이 되는 노드에 대응하는 서브 코드를 A 로직의 변경과 관련된 서브 코드로 확인하고, A 로직의 변경과 관련된 서브 코드에 대한 정보를 사용자 단말로 전송할 수 있다. 이와 관련해서는 도 9a 내지 도 9b를 참조하여 자세히 설명하기로 한다.
도 3a 내지 도 3b는 일 실시 예에 따라 전자 장치(100)가 정보를 제공하는 과정을 설명하기 위한 도면이다.
일 실시 예에 따르면, 전자 장치(100)는 풀 리퀘스트(300)를 사용자 단말로부터 획득할 수 있다. 예를 들어, 사용자는 A/B 테스트를 수행하기 위한 제2 코드를 새롭게 작성하여 로컬(local) 저장소에 저장한 후, 제2 코드를 통합 저장소에 저장된 마스터 브랜치(master branch) 또는 원본 코드에 병합할 것을 사용자 단말에 입력할 수 있다. 사용자 단말은 사용자의 입력에 기초하여, 제2 코드에 관한 정보를 포함하는 풀 리퀘스트(300)를 전자 장치(100)로 전송할 수 있다. 전자 장치(100)는 풀 리퀘스트(300)를 획득함에 따라, 기존의 제1 로직의 변경 여부에 관한 정보 제공 방법을 개시할 수 있다.
한편, 전자 장치(100)는 복수의 사용자가 작성한 코드를 병합 및 관리하기 위한 장치 또는 작업자 단말로서, 사용자 단말로부터 직접 풀 리퀘스트(300)를 수신할 수 있지만, 작업자 단말과는 별개로 존재하는 장치일 수 있다. 이 경우, 전자 장치(100)는 사용자 단말로부터 직접 풀 리퀘스트(300)를 수신하는 대신, 사용자 단말이 풀 리퀘스트(300)를 작업자 단말로 전송했다는 정보를 획득할 수 있다. 전자 장치(100)는 사용자 단말이 풀 리퀘스트(300)를 작업자 단말로 전송했다는 정보를 획득함에 따라, 기존의 제1 로직의 변경 여부에 관한 정보 제공 방법을 개시할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 풀 리퀘스트(300)에 기초하여 타겟 브랜치(310)를 확인할 수 있다. 예를 들어, 전자 장치(100)는 풀 리퀘스트(300)에 기초하여 사용자가 새롭게 작성한 제2 코드를 확인할 수 있다. 이후, 전자 장치(100)는 제2 코드에 기초하여, 통합 저장소에 저장된 마스터 브랜치 중 제2 코드에 관한 타겟 브랜치(310) 및 제2 코드에 대응하는 제1 코드를 확인할 수 있다.
S320 단계에서, 전자 장치(100)는 일 실시 예에 따라 제1 코드 및 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인할 수 있다. 예를 들어, 전자 장치(100)는 제1 코드 및 제2 코드를 비교하여, 제2 코드에 새롭게 추가된 서브 코드(330), 제2 코드에서 수정된 서브 코드(332) 또는 제1 코드에서 삭제된 서브 코드(334)를 확인할 수 있다.
S340 단계에서, 전자 장치(100)는 일 실시 예에 따라 파싱(parsing)을 수행할 수 있다. 예를 들어, 전자 장치(100)는 제1 코드 및 제2 코드에 대해 파싱을 수행하여 제1 추상 구문 트리(abstract syntax tree, AST) 및 제2 추상 구문 트리를 획득하고, 차이가 있는 서브 코드 세트에 대응하는 하나 이상의 노드를 확인할 있다. 또는, 전자 장치(100)는 수정된 서브 코드(332)에 대해 파싱을 수행하여 추상 구문 트리를 획득하고, 수정된 서브 코드(332)에 대응하는 하나 이상의 노드를 확인할 수 있다.
S350 단계에서, 전자 장치(100)는 일 실시 예에 따라 하나 이상의 노드의 차이 타입을 확인할 수 있다. 예를 들어, 전자 장치(100)는 제1 추상 구문 트리 및 제2 추상 구문 트리 각각에 포함된 복수의 노드들 간의 매핑 관계에 기초하여, 하나 이상의 노드의 차이 타입이 추가, 수정, 이동 또는 삭제 중 무엇인지 확인할 수 있다. 이에 따라 전자 장치(100)는 하나 이상의 노드를 추가된 노드(360), 수정된 노드(362), 이동된 노드(364) 및 삭제된 노드(366) 중 하나로 분류할 수 있다.
S370 단계에서, 전자 장치(100)는 하나 이상의 노드의 차이 타입을 분석할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 하나 이상의 노드의 차이 타입마다 설정된 프로세스에 기초하여, 하나 이상의 노드 중 기존의 제1 로직의 변경과 관련된 노드를 확인할 수 있다.
S380 단계에서, 전자 장치(100)는 필터링을 수행하여 기존의 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 기존의 A 로직의 변경과 관련된 노드 중 A 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 이후, 전자 장치(100)는 A 로직의 변경의 원인이 되는 노드에 대응하는 서브 코드를 A 로직의 변경과 관련된 서브 코드로 확인하고, A 로직의 변경과 관련된 서브 코드에 대한 정보를 사용자 단말로 전송할 수 있다.
도 3b를 참조하면, 전자 장치(100)는 S320 단계에서 제1 코드 및 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인한 후, S390 단계에서 일 실시 예에 따라 제2 코드 중 제1 로직과 관련된 서브 코드를 확인할 수 있다. 이후, 전자 장치(100)는 제1 로직과 관련된 서브 코드에 대하여, S340 단계, S350 단계, S370 단계 및 S380 단계를 수행할 수 있다. 예를 들어, 전자 장치(100)는 A 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입을 확인하고, A 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입에 기초하여, A 로직과 관련된 서브 코드 중 A 로직의 변경과 관련된 서브 코드를 확인할 수 있다.
도 4a 내지 도 4d는 일 실시 예에 따라 전자 장치(100)가 하나 이상의 노드의 차이 타입을 확인하는 과정을 설명하기 위한 도면이다.
일 실시 예에 따르면, 전자 장치(100)는 제1 코드 및 제2 코드에 대해 파싱을 수행하여 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450)를 획득할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 간의 매핑 관계를 확인하고, 매핑된 노드들끼리 동일한 알파벳으로 표현할 수 있다. 보다 구체적으로, 전자 장치(100)는 top-down 방식으로, 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 대응하는 서브 코드가 동일하거나 유사한 노드를 확인할 수 있다. 전자 장치(100)는 대응하는 서브 코드가 동일하거나 유사한 노드들을 동일한 알파벳으로 표현할 수 있다. 이때, 대응하는 서브 코드가 유사한 노드들은 아포스트로피(apostrophe)를 이용하여 표현될 수 있다. 이후, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 대응하는 서브 코드가 동일한 노드를 설정된 무늬로 표현할 수 있다.
예를 들어, 도 4a를 참조하면, 전자 장치(100)는 F 노드, G 노드, H 노드, I 노드, K 노드, L 노드, N 노드 및 O 노드에 대응하는 서브 코드가 동일함을 확인할 수 있다. 이에 따라, 전자 장치(100)는 F 노드, G 노드, H 노드, I 노드, K 노드, L 노드, N 노드 및 O 노드를 상향 대각선 무늬로 표현할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 차이 타입이 수정인 노드를 확인할 수 있다. 보다 구체적으로, 전자 장치(100)는 bottom-up 방식으로, 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들의 부모 노드-자식 노드 관계를 확인할 수 있다. 전자 장치(100)는 복수의 노드들의 부모 노드-자식 노드 관계에 기초하여, 복수의 노드들 중 대응하는 서브 코드가 유사한 노드 또는 대응하는 서브 코드가 동일하고 자식 노드가 변경된 노드를 확인할 수 있다. 이후, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 차이 타입이 수정인 노드를 설정된 무늬로 표현할 수 있다.
예를 들어, 도 4b를 참조하면, 전자 장치(100)는 M 노드에 대응하는 서브 코드가 유사함을 확인할 수 있다. 이에 따라, 전자 장치(100)는 M 노드의 차이 타입이 수정임을 확인하고, M 노드를 하향 대각선 무늬로 표현할 수 있다. 또한, 전자 장치(100)는 A 노드, B 노드, C 노드, D 노드, E 노드 및 J 노드에 대응하는 서브 코드가 동일하나 자식 노드가 변경되었음을 확인할 수 있다. 이에 따라, 전자 장치(100)는 A 노드, B 노드, C 노드, D 노드, E 노드 및 J 노드의 차이 타입이 수정임을 확인하고, A 노드, B 노드, C 노드, D 노드, E 노드 및 J 노드를 하향 대각선 무늬로 표현할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 차이 타입이 이동인 노드를 확인할 수 있다. 보다 구체적으로, 전자 장치(100)는 bottom-up 방식으로, 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들의 부모 노드-자식 노드 관계를 확인할 수 있다. 전자 장치(100)는 복수의 노드들의 부모 노드-자식 노드 관계에 기초하여, 복수의 노드들 중 대응하는 서브 코드가 동일하고 부모 노드가 상이한 노드를 확인할 수 있다. 이후, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 차이 타입이 이동인 노드를 설정된 무늬로 표현할 수 있다.
예를 들어, 도 4b를 참조하면, 전자 장치(100)는 제1 추상 구문 트리(400)에 포함된 I 노드의 부모 노드는 D 노드이나, 제2 추상 구문 트리(450)에 포함된 I 노드의 부모 노드는 B'노드 임을 확인할 수 있다. 이에 따라, 전자 장치(100)는 I 노드의 차이 타입이 이동임을 확인하고, I 노드를 체크 무늬로 표현할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450) 각각에 포함된 복수의 노드들 중 차이 타입이 추가 또는 삭제인 노드를 확인할 수 있다. 보다 구체적으로, 전자 장치(100)는 매핑 관계가 존재하지 않는 노드를 확인한 후, 매핑 관계가 존재하지 않는 노드를 설정된 무늬로 표현할 수 있다.
예를 들어, 도 4c를 참조하면, 전자 장치(100)는 제1 추상 구문 트리(400)에 없는 P 노드가 제2 추상 구문 트리(450)에 포함된 것을 확인할 수 있다. 이에 따라, 전자 장치(100)는 P 노드의 차이 타입이 추가임을 확인하고, P 노드를 수직 무늬로 표현할 수 있다. 또한, 전자 장치(100)는 제1 추상 구문 트리(400)에 포함된 Z 노드가 제2 추상 구문 트리(450)에 없는 것을 확인할 수 있다. 이에 따라, 전자 장치(100)는 Z 노드의 차이 타입이 삭제임을 확인하고, Z 노드를 수평 무늬로 표현할 수 있다.
전술한 바와 같이, 전자 장치(100)는 일 실시 예에 따라 동등 및 유사성 비교 알고리즘(equality and similarity comparison algorithm)을 이용하여, 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450)에 포함된 하나 이상의 노드들의 차이 타입을 확인할 수 있다. 예를 들어, 도 4d를 참조하면, 전자 장치(100)는 제1 추상 구문 트리(400) 및 제2 추상 구문 트리(450)에 포함된 A 노드 내지 P 노드 및 Z 노드의 차이 타입을 확인하고, 각각의 차이 타입에 따라 A 노드 내지 P 노드 및 Z 노드를 상이한 무늬로 표현할 수 있다.
도 5는 일 실시 예에 따라 전자 장치(100)가 차이 타입이 추가인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
S510 단계에서, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드가 선언 구문을 포함하는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 추가된 노드(500)에 대응하는 서브 코드가 선언 구문(declaration syntax)을 포함하는지 또는 표현 구문(expression syntax)을 포함하는지 여부를 확인할 수 있다. 이때, 선언 구문은 클래스 선언식, 메서드 선언식 또는 속성 선언식 등을 포함할 수 있다.
확인 결과, 추가된 노드(500)에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 전자 장치(100)는 S520 단계를 수행하고, 추가된 노드(500)에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 전자 장치(100)는 S570 단계를 수행할 수 있다.
S520 단계에서, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 조건 표현 구문인지 여부를 확인할 수 있다. 확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 조건 표현 구문이 아닌 경우, 전자 장치(100)는 S530 단계를 수행하고, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 조건 표현 구문인 경우, 전자 장치(100)는 S560 단계를 수행할 수 있다.
S530 단계에서, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 없는(irrelevant) 내용을 포함하는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션(non-runtime annotation)에 관한 내용 또는 액세스 제어(access control)에 관한 내용 등을 포함하는지 여부를 확인할 수 있다.
확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션에 관한 내용 또는 액세스 제어에 관한 내용 등과 같이 기존의 제1 로직과 관련 없는 내용을 포함하는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 있는 내용을 포함하는 경우, 전자 장치(100)는 S540 단계를 수행할 수 있다.
S540 단계에서, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 새롭게 추가된 제2 로직에서만 호출되는 조건문에 포함되는지 여부를 확인할 수 있다. 확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 제2 로직에서만 호출되는 조건문에 포함되는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 제2 로직에서만 호출되는 조건문에 포함되지 않는 경우, 전자 장치(100)는 S550 단계를 수행할 수 있다.
S550 단계에서, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 다른 서브 코드에서 호출되지 않는 메서드를 호출하는지 여부를 확인할 수 있다. 확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 다른 서브 코드에서 호출되지 않는 메서드를 호출하는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 다른 서브 코드에서 호출되지 않는 메서드를 호출하지 않는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다.
S560 단계에서, 추가된 노드(500)에 대응하는 서브 코드에 포함된 표현 구문이 조건 표현 구문인 경우, 전자 장치(100)는 일 실시 예에 따라 전자 장치(100)는 조건 표현 구문이 추가된 노드(500)의 판단에만 영향을 미치는지 여부를 확인할 수 있다. 확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 조건 표현 구문이 추가된 노드(500)의 판단에만 영향을 미치는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 추가된 노드(500)에 대응하는 서브 코드에 포함된 조건 표현 구문이 추가된 노드(500)의 판단에만 영향을 미치지 않는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다.
S570 단계에서, 추가된 노드(500)에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 전자 장치(100)는 일 실시 예에 따라 추가된 노드(500)에 대응하는 서브 코드에 포함된 선언 구문이 다른 서브 코드에서 호출되는지 여부를 확인할 수 있다. 확인 결과, 추가된 노드(500)에 대응하는 서브 코드에 포함된 선언 구문이 다른 서브 코드에서 호출되지 않는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 추가된 노드(500)에 대응하는 서브 코드에 포함된 선언 구문이 다른 서브 코드에서 호출되는 경우, 전자 장치(100)는 추가된 노드(500)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다.
도 6은 일 실시 예에 따라 전자 장치(100)가 차이 타입이 수정인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
S620 단계에서, 전자 장치(100)는 일 실시 예에 따라 수정된 노드(600)에 대응하는 서브 코드가 선언 구문을 포함하는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 수정된 노드(600)에 대응하는 서브 코드가 선언 구문을 포함하는지 또는 표현 구문을 포함하는지 여부를 확인할 수 있다. 확인 결과, 수정된 노드(600)에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 전자 장치(100)는 수정된 노드(600)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다. 또는, 수정된 노드(600)에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 전자 장치(100)는 S640 단계를 수행할 수 있다.
S640 단계에서, 전자 장치(100)는 일 실시 예에 따라 수정된 노드(600)에 대응하는 서브 코드에 포함된 선언 구문이 다시 명명되는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 선언 구문이 선언한 클래스, 속성 또는 메서드 등이 다시 명명된 것인지 여부를 확인할 수 있다. 확인 결과, 선언 구문이 선언한 클래스, 속성 또는 메서드 등이 다시 명명된 경우, 전자 장치(100)는 S660 단계를 수행할 수 있다. 또는, 선언 구문이 선언한 클래스, 속성 또는 메서드 등이 다시 명명되지 않은 경우, 전자 장치(100)는 S680 단계를 수행할 수 있다.
S660 단계에서, 전자 장치(100)는 일 실시 예에 따라 수정된 노드(600)를 다시 명명할 수 있다. 예를 들어, 수정된 노드(600)에 대응하는 서브 코드에 포함된 선언 구문이 다시 명명됨에 따라, 전자 장치(100)는 수정된 노드(600)를 다시 명명할 수 있다. 이후, 전자 장치(100)는 S680 단계를 수행할 수 있다.
S680 단계에서, 전자 장치(100)는 일 실시 예에 따라 수정된 노드(600)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 없는 내용을 포함하는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 수정된 노드(600)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션에 관한 내용 또는 액세스 제어에 관한 내용 등을 포함하는지 여부를 확인할 수 있다.
확인 결과, 수정된 노드(600)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션에 관한 내용 또는 액세스 제어에 관한 내용 등과 같이 기존의 제1 로직과 관련 없는 내용을 포함하는 경우, 전자 장치(100)는 수정된 노드(600)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 수정된 노드(600)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 있는 내용을 포함하는 경우, 전자 장치(100)는 수정된 노드(600)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다.
도 7은 일 실시 예에 따라 전자 장치(100)가 차이 타입이 이동인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
S720 단계에서, 전자 장치(100)는 일 실시 예에 따라 이동된 노드(700)로 인하여 조건 경로(conditional path)가 변경되는지 여부를 확인할 수 있다. 예를 들어, 노드(700)가 이동함에 따라, 조건 경로가 a에서 !(!a)로 변경된 경우, a∥b에서 b∥a로 변경된 경우, !a∥!b에서 !(a&&b)로 변경된 경우 또는 (a∥b)&&c에서 (a&&c)∥(b&&c)로 변경된 경우 등에는 전자 장치(100)는 조건 경로가 변경되지 않았다고 확인할 수 있다.
확인 결과, 이동된 노드(700)로 인하여 조건 경로가 변경된 경우, 전자 장치(100)는 이동된 노드(700)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다. 또는, 이동된 노드(700)로 인하여 조건 경로가 변경되지 않은 경우, 전자 장치(100)는 S740 단계를 수행할 수 있다.
S740 단계에서, 전자 장치(100)는 일 실시 예에 따라 이동된 노드(700)로 인하여 실행 경로(execute path)가 변경되는지 여부를 확인할 수 있다. 확인 결과, 이동된 노드(700)로 인하여 실행 경로가 변경된 경우, 전자 장치(100)는 이동된 노드(700)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다. 또는, 이동된 노드(700)로 인하여 실행 경로가 변경되지 않은 경우, 전자 장치(100)는 이동된 노드(700)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다.
도 8은 일 실시 예에 따라 전자 장치(100)가 차이 타입이 삭제인 노드가 기존의 제1 로직을 변경하는지 여부를 확인하는 과정을 설명하기 위한 도면이다.
S850 단계에서, 전자 장치(100)는 일 실시 예에 따라 삭제된 노드(800)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 없는 내용을 포함하는지 여부를 확인할 수 있다. 예를 들어, 전자 장치(100)는 삭제된 노드(800)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션에 관한 내용 또는 액세스 제어에 관한 내용 등을 포함하는지 여부를 확인할 수 있다.
확인 결과, 삭제된 노드(800)에 대응하는 서브 코드에 포함된 표현 구문이 코멘트에 관한 내용, 비-런타임 어노테이션에 관한 내용 또는 액세스 제어에 관한 내용 등과 같이 기존의 제1 로직과 관련 없는 내용을 포함하는 경우, 전자 장치(100)는 삭제된 노드(800)가 기존의 제1 로직을 변경하지 않는 노드임을 확인할 수 있다. 또는, 삭제된 노드(800)에 대응하는 서브 코드에 포함된 표현 구문이 기존의 제1 로직과 관련 있는 내용을 포함하는 경우, 전자 장치(100)는 삭제된 노드(800)가 기존의 제1 로직의 변경과 관련된 노드임을 확인할 수 있다.
도 9a 내지 도 9b는 일 실시 예에 따라 전자 장치(100)가 필터링을 수행하는 과정을 설명하기 위한 도면이다.
일 실시 예에 따르면, 전자 장치(100)는 노드의 차이 타입마다 설정된 프로세스에 기초하여, 제1 추상 구문 트리(900) 및 제2 추상 구문 트리(950)에 포함된 복수의 노드들 중 기존의 제1 로직의 변경과 관련된 노드를 확인할 수 있다. 예를 들어, 도 9a를 참조하면, 전자 장치(100)는 도 5 내지 도 8과 관련하여 개시된 동작을 수행하여, 제1 추상 구문 트리(900) 및 제2 추상 구문 트리(950)에 포함된 복수의 노드들 중 A' 노드, B' 노드, C' 노드, E' 노드, J' 노드, M' 노드, I 노드, P 노드 및 Z 노드가 기존의 A 로직을 변경할 가능성이 있음을 확인할 수 있다. 이에 따라, 전자 장치(100)는 A' 노드, B' 노드, C' 노드, E' 노드, J' 노드, M' 노드, I 노드, P 노드 및 Z 노드에 점선의 동그라미를 표시할 수 있다.
한편, 제1 추상 구문 트리(900) 및 제2 추상 구문 트리(950)에 포함된 일부 노드는 대응하는 코드가 직접적으로 변경되지 않았더라도, 복잡한 부모 노드-자식 노드 관계로 인하여, 기존의 제1 로직의 변경과 관련된 것으로 판단될 수 있다. 예를 들어, J' 노드는 대응하는 코드가 직접적으로 변경되지 않았지만, 자식 노드인 M노드가 수정됨에 따라 기존의 제1 로직을 변경할 가능성이 있는 것으로 판단될 수 있다. 따라서, 전자 장치(100)가 기존의 제1 로직을 변경할 가능성이 있는 것으로 확인된 모든 노드에 관한 정보를 사용자에 정보를 제공한다면, 사용자에게 혼란을 야기할 수 있으므로, 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드에 관한 정보만을 사용자에게 제공할 필요가 있다.
일 실시 예에 따르면, 전자 장치(100)는 필터링을 수행하여 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 예를 들어, 도 9b를 참조하면, 전자 장치(100)는 A' 노드, B' 노드, C' 노드, E' 노드, J' 노드, M' 노드, I 노드, P 노드 및 Z 노드 중 M' 노드, I 노드, P 노드 및 Z 노드만이 제1 로직을 변경하는 원인이 되는 노드임을 확인할 수 있다. 이에 따라, 전자 장치(100)는 M' 노드, I 노드, P 노드 및 Z 노드에만 점선의 동그라미를 표시할 수 있다.
도 10a 내지 도 10d는 일 실시 예에 따라 전자 장치(100)가 정보를 제공하는 과정을 설명하기 위한 도면이다.
도 10a는 사용자가 A/B 테스트를 수행하기 위한 새롭게 작성한 제2 코드 중 기존의 제1 로직의 변경과 관련된 서브 코드에 관한 정보가 사용자 단말의 디스플레이에 표시된 일 예를 도시한다.
일 실시 예에 따르면, 전자 장치(100)는 기존의 제1 코드 및 사용자가 새롭게 작성한 제2 코드를 확인하고, 제1 코드 및 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인할 수 있다. 예를 들어, 전자 장치(100)는 제1 코드와 비교하여, 코드 라인 265의 서브 코드가 제2 코드에 새롭게 추가된 것을 확인할 수 있다.
일 실시 예에 다르면, 전자 장치(100)는 설정된 알고리즘을 이용하여, 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 265의 서브 코드에 대응하는 노드의 차이 타입이 추가임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 하나 이상의 노드의 차이 타입에 기초하여, 서브 코드 세트 중 기존의 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 5에 도시된 프로세스에 기초하여 코드 라인 265의 서브 코드에 대응하는 노드가 A 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다. 보다 구체적으로, 전자 장치(100)는 코드 라인 265의 서브 코드가 조건 표현 구문이 아닌 표현 구문을 포함하는 것을 확인할 수 있다. 이후, 전자 장치(100)는 코드 라인 265의 서브 코드에 포함된 표현 구문이 A 로직과 관련 있는 내용을 포함하고, B 로직에서만 호출되는 조건문에 포함되지 않으며, 다른 서브 코드에서 호출되지 않는 메서드를 호출하지 않는다는 것을 확인할 수 있다. 이에 따라, 전자 장치(100)는 코드 라인 265의 서브 코드에 대응하는 노드가 A 로직의 변경과 관련된 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 9a 내지 도 9b에 도시된 프로세스에 기초하여 필터링을 수행함으로써, 코드 라인 265의 서브 코드에 대응하는 노드가 A 로직의 변경의 원인이 되는 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 265의 서브 코드가 A 로직의 변경과 관련된 서브 코드임을 사용자 단말로 전송할 수 있다.
일 실시 예에 따르면, 사용자 단말은 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 디스플레이에 표시할 수 있다. 예를 들어, 사용자 단말은 코드 라인 265의 서브 코드가 A 로직을 변경할 가능성이 있고, 기존의 제1 코드에 비교하여, showEmptyCart(false)의 표현 구문이 추가되었다는 코멘트를 표시할 수 있다.
도 10b는 사용자가 A/B 테스트를 수행하기 위한 새롭게 작성한 제2 코드 중 기존의 제1 로직의 변경과 관련된 서브 코드에 관한 정보가 사용자 단말의 디스플레이에 표시된 일 예를 도시한다.
일 실시 예에 따르면, 전자 장치(100)는 기존의 제1 코드 및 사용자가 새롭게 작성한 제2 코드를 확인하고, 제1 코드 및 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인할 수 있다. 예를 들어, 전자 장치(100)는 제1 코드와 비교하여, 제2 코드 중 코드 라인 2075의 서브 코드가 수정된 것을 확인할 수 있다.
일 실시 예에 다르면, 전자 장치(100)는 설정된 알고리즘을 이용하여, 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 2075의 서브 코드에 대응하는 노드의 차이 타입이 수정임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 하나 이상의 노드의 차이 타입에 기초하여, 서브 코드 세트 중 기존의 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 6에 도시된 프로세스에 기초하여 코드 라인 2075의 서브 코드에 대응하는 노드가 A 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다. 보다 구체적으로, 전자 장치(100)는 코드 라인 2075의 서브 코드가 표현 구문을 포함하므로, 코드 라인 2075의 서브 코드에 대응하는 노드가 A 로직의 변경과 관련된 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 9a 내지 도 9b에 도시된 프로세스에 기초하여 필터링을 수행함으로써, 코드 라인 2075의 서브 코드에 대응하는 노드가 A 로직의 변경의 원인이 되는 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 2075의 서브 코드가 A 로직의 변경과 관련된 서브 코드임을 사용자 단말로 전송할 수 있다.
일 실시 예에 따르면, 사용자 단말은 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 디스플레이에 표시할 수 있다. 예를 들어, 사용자 단말은 코드 라인 2075의 서브 코드가 A 로직을 변경할 가능성이 있고, 기존의 제1 코드에 비교하여, RecommendCarouselSection.CAROUSEL_TYPE.equals(carouselType) ? 5 : 3의 표현 구문이 RecommendCarouselSection.CAROUSEL_TYPE.equals(carouselManager.carouselType) ? 5 : 3로 변경되었다는 코멘트를 표시할 수 있다.
도 10c는 기존의 제1 코드에 관한 정보가 사용자 단말의 디스플레이에 표시된 일 예를 도시한다. 또한, 도 10d는 사용자가 A/B 테스트를 수행하기 위한 새롭게 작성한 제2 코드 중 기존의 제1 로직의 변경과 관련된 서브 코드에 관한 정보가 사용자 단말의 디스플레이에 표시된 일 예를 도시한다.
일 실시 예에 따르면, 전자 장치(100)는 기존의 제1 코드 및 사용자가 새롭게 작성한 제2 코드를 확인하고, 제1 코드 및 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인할 수 있다. 예를 들어, 전자 장치(100)는 제1 코드 및 제2 코드를 비교하여, 제2 코드 중 코드 라인 1807 내지 1820의 서브 코드 세트가 상이하다는 것을 확인할 수 있다.
일 실시 예에 다르면, 전자 장치(100)는 설정된 알고리즘을 이용하여, 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 1807 내지 1818의 서브 코드 세트에 대응하는 노드들의 차이 타입이 추가이고, 코드 라인 1820의 서브 코드에 대응하는 노드의 차이 타입이 이동임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 하나 이상의 노드의 차이 타입에 기초하여, 서브 코드 세트 중 기존의 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 5 또는 도 7에 도시된 프로세스에 기초하여 코드 라인 1807 내지 1818 및 1820의 서브 코드 세트에 대응하는 노드들이 A 로직을 변경할 가능성이 있는지 여부를 확인할 수 있다.
보다 구체적으로, 전자 장치(100)는 코드 라인 1807의 서브 코드가 변수를 선언하는 선언 구문을 포함하고, 선언 구문이 다른 서브 코드에서 호출됨을 확인할 수 있다. 이에 따라, 전자 장치(100)는 코드 라인 1807의 서브 코드에 대응하는 노드가 A 로직의 변경과 관련된 노드임을 확인할 수 있다.
또한, 전자 장치(100)는 코드 라인 1808, 1810, 1812 및 1818의 서브 코드 세트가 각각 조건 표현 구문을 포함하는 것을 확인할 수 있다. 이후, 전자 장치(100)는 조건 표현 구문이 코드 라인 1808, 1810, 1812 및 1818의 서브 코드 세트에 대응하는 노드들의 판단에만 영향을 미치는 것을 확인할 수 있다. 이에 따라, 전자 장치(100)는 1808, 1810, 1812 및 1818의 서브 코드 세트에 대응하는 노드들이 A 로직을 변경하지 않는 노드임을 확인할 수 있다.
또한, 전자 장치(100)는 코드 라인 1809의 서브 코드가 변수를 선언하는 선언 구문을 포함하고, 선언 구문이 다른 서브 코드에서 호출되지 않음을 확인할 수 있다. 이에 따라, 전자 장치(100)는 코드 라인 1809의 서브 코드에 대응하는 노드가 A 로직을 변경하지 않는 노드임을 확인할 수 있다.
또한, 전자 장치(100)는 코드 라인 1811, 1813, 1816 및 1817의 서브 코드 세트가 각각 조건 표현 구문이 아닌 표현 구문을 포함하는 것을 확인할 수 있다. 이후, 전자 장치(100)는 코드 라인 1811, 1813, 1816 및 1817의 서브 코드 세트에 포함된 표현 구문이 B 로직에서만 호출되는 조건문에 포함되는 것을 확인할 수 있다. 이에 따라, 전자 장치(100)는 코드 라인 1811, 1813, 1816 및 1817의 서브 코드 세트에 대응하는 노드들이 A 로직을 변경하지 않는 노드임을 확인할 수 있다.
또한, 전자 장치(100)는 코드 라인 1820의 서브 코드에 포함된 표현 구문이 이동됨에 따라 실행 경로가 변경되었음을 확인할 수 있다. 이에 따라, 전자 장치(100)는 코드 라인 1820의 서브 코드에 대응하는 노드가 A 로직의 변경과 관련된 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 예를 들어, 전자 장치(100)는 도 9a 내지 도 9b에 도시된 프로세스에 기초하여 필터링을 수행함으로써, 코드 라인 1807 및 1820의 서브 코드 세트 각각에 대응하는 노드가 A 로직의 변경의 원인이 되는 노드임을 확인할 수 있다.
일 실시 예에 따르면, 전자 장치(100)는 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공할 수 있다. 예를 들어, 전자 장치(100)는 코드 라인 1807 및 1820의 서브 코드가 A 로직의 변경과 관련된 서브 코드임을 사용자 단말로 전송할 수 있다.
일 실시 예에 따르면, 사용자 단말은 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 디스플레이에 표시할 수 있다. 예를 들어, 사용자 단말은 코드 라인 1807 의 서브 코드가 A 로직을 변경할 가능성이 있고, 기존의 제1 코드에 비교하여, List<CartSection> Sections = cartPageVO.getSections();의 선언 구문이 추가되었다는 코멘트를 표시할 수 있다. 또한, 사용자 단말은 코드 라인의 1820의 서브 코드가 A 로직을 변경할 가능성이 있고, 기존의 제1 코드에 비교하여, carouselSectionIndex = -1;의 표현 구문이 이동되었다는 코멘트를 표시할 수 있다.
한편, 전자 장치(100)는 일 실시 예에 따라 제1 코드 및 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인한 후, 차이가 있는 서브 코드 세트 중 제1 로직과 관련된 서브 코드를 확인할 수 있다. 이후, 전자 장치(100)는 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입을 확인하고, 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입에 기초하여, 제1 로직과 관련된 서브 코드 중 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다.
예를 들어, 도 10d를 참조하면, 전자 장치(100)는 코드 라인 1807 내지 1820의 서브 코드 세트 중 코드 라인 1807 및 1818 내지 1820의 서브 코드 세트가 A 로직과 관련된 서브 코드임을 확인할 수 있다. 이후, 전자 장치(100)는 코드 라인 1807 및 1818 내지 1820의 서브 코드 세트에 대응하는 노드의 차이 타입을 확인하고, 노드의 차이 타입에 기초하여, 코드 라인 1807 및 1818 내지 1820의 서브 코드 세트 중 A 로직의 변경과 관련된 서브 코드를 확인할 수 있다.
도 11은 일 실시 예에 따른 전자 장치의 정보 제공 방법의 흐름도를 나타낸다. 중복되는 내용에 대해서는 전술한 기재가 적용될 수 있다.
S1100 단계에서, 전자 장치는 제1 코드 및 제2 코드를 확인할 수 있다.
일 실시 예에 따르면, 제1 코드는 저장소(repository)로부터 획득되고, 제2 코드는 사용자 단말로부터 획득될 수 있다.
일 실시 예에 따르면, 제2 코드는, 제1 로직과 관련된 서브 코드 및 제2 코드에 따라 새롭게 추가된 제2 로직과 관련된 서브 코드를 포함할 수 있다. 이에 따라, 전자 장치는 하나 이상의 노드의 차이 타입을 확인할 때, 서브 코드 세트 중 제1 로직과 관련된 서브 코드를 확인하고, 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입을 확인할 수 있다. 또한, 전자 장치는 제1 로직의 변경과 관련된 서브 코드를 확인할 때, 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입에 기초하여, 제1 로직과 관련된 서브 코드 중 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다.
S1120 단계에서, 전자 장치는 제1 코드 및 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인할 수 있다.
S1140 단계에서, 전자 장치는 설정된 알고리즘을 이용하여, 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다.
일 실시 예에 따르면, 설정된 알고리즘은 추상 구문 트리(abstract syntax tree, AST)를 포함할 수 있다.
일 실시 예에 따르면, 전자 장치는 하나 이상의 노드의 차이 타입을 확인할 때, 제1 코드 및 제2 코드 각각에 대응하는 제1 추상 구문 트리 및 제2 추상 구문 트리를 획득하고, 제1 추상 구문 트리 및 제2 추상 구문 트리를 비교하여, 제1 추상 구문 트리 및 제2 추상 구문 트리 각각에 포함된 복수의 노드들 간의 매핑 관계를 확인하며, 복수의 노드들 간의 매핑 관계에 기초하여, 하나 이상의 노드의 차이 타입을 확인할 수 있다.
일 실시 예에 따르면, 하나 이상의 노드 중, 매핑된 노드가 없는 노드의 차이 타입은 추가 또는 삭제로 확인되고, 매핑된 노드와 비교하여, 대응하는 서브 코드가 동일하고 부모 노드가 상이한 노드의 차이 타입은 이동으로 확인되며, 매핑된 노드와 비교하여, 대응하는 서브 코드가 유사한 노드 또는 대응하는 서브 코드가 동일하고 자식 노드가 변경된 노드의 차이 타입은 수정으로 확인될 수 있다.
S1160 단계에서, 전자 장치는 하나 이상의 노드의 차이 타입에 기초하여, 서브 코드 세트 중 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인할 수 있다.
일 실시 예에 따르면, 전자 장치는 제1 로직의 변경과 관련된 서브 코드를 확인할 때, 하나 이상의 노드의 차이 타입에 기초하여, 하나 이상의 노드 중 제1 로직의 변경과 관련된 노드를 확인할 수 있다.
일 실시 예에 따르면, 전자 장치는 제1 로직의 변경과 관련된 노드를 확인할 때, 하나 이상의 노드 중, 차이 타입이 추가인 제1 노드에 대응하는 서브 코드가 선언 구문(declaration syntax) 또는 표현 구문(expression syntax)을 포함하는지 여부를 확인할 수 있다. 이때, 제1 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 선언 구문이 다른 서브 코드에서 호출되지 않을 때, 제1 노드는 제1 로직을 변경하지 않는 노드로 확인되고, 제1 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 표현 구문이 조건 표현 구문인지 여부 및 표현 구문이 제2 코드에 따라 새롭게 추가된 제2 로직에 관한 조건문에 포함되는지 여부에 기초하여, 제1 노드는 제1 로직의 변경과 관련된 노드인지 여부가 확인될 수 있다.
일 실시 예에 따르면, 전자 장치는 제1 로직의 변경과 관련된 서브 코드를 확인할 때, 하나 이상의 노드 중, 차이 타입이 수정인 제2 노드에 대응하는 서브 코드가 선언 구문 또는 표현 구문을 포함하는지 여부를 확인할 수 있다. 이때, 제2 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 제2 노드는 제1 로직의 변경과 관련된 노드로 확인되고, 제2 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 선언 구문이 제1 로직과 관련 있는 내용을 포함할 때, 제2 노드는 제1 로직의 변경과 관련된 노드로 확인될 수 있다.
일 실시 예에 따르면, 하나 이상의 노드 중, 차이 타입이 이동인 제3 노드로 인하여 조건 경로(conditional path) 또는 실행 경로(execute path)가 변경된 경우, 제3 노드는 제1 로직의 변경과 관련된 노드로 확인될 수 있다.
일 실시 예에 따르면, 하나 이상의 노드 중, 차이 타입이 삭제인 제4 노드에 대응하는 서브 코드가 제1 로직과 관련 있는 내용을 포함하는 경우, 제4 노드는 제1 로직의 변경과 관련된 노드로 확인될 수 있다.
일 실시 예에 따르면, 전자 장치는 제1 로직의 변경과 관련된 노드 중 제1 로직의 변경의 원인이 되는 노드를 확인할 수 있다. 이때, 제1 로직의 변경의 원인이 되는 노드에 대응하는 서브 코드는 제1 로직의 변경과 관련된 서브 코드로 확인될 수 있다.
S1180 단계에서, 전자 장치는 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공할 수 있다.
일 실시 예에 따르면, 제1 로직의 변경과 관련된 서브 코드에 관한 정보는, 제1 로직의 변경과 관련된 서브 코드의 변경 내용을 포함할 수 있다.
일 실시 예에 따르면, 전자 장치는 사용자 단말로부터 풀 리퀘스트(pull request)를 획득함에 따라 정보 제공 방법을 개시할 수 있다.
도 12는 일 실시 예에 따른 전자 장치(100)의 블록도를 나타낸다.
전자 장치(100)는 일 실시 예에 따라, 통신부(communication device)(1220), 메모리(1240) 및 제어부(controller)(1260)를 포함할 수 있다. 도 12에 도시된 전자 장치(100)는 본 실시 예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 12에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시 예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다. 전자 장치(100)는 전술한 서버에 관한 내용을 포함할 수 있는 바, 중복되는 내용에 대해서는 설명을 생략한다. 실시 예에서 통신부는 하나 이상의 트랜시버(transceiver)를 포함할 수 있다. 또한, 실시 예에서 제어부는 하나 이상의 프로세서(processor)를 포함할 수 있다.
통신부(1220)는 유/무선 통신을 수행하기 위한 장치로서, 외부의 전자 장치와 통신할 수 있다. 외부의 전자 장치는 단말 또는 서버가 될 수 있다. 또한, 통신부(1220)가 이용하는 통신 기술에는 GSM(Global System for Mobile communication), CDMA(Code Division Multi Access), LTE(Long Term Evolution), 5G, WLAN(Wireless LAN), Wi-Fi(Wireless-Fidelity), 블루투스(Bluetooth쪠), RFID(Radio Frequency Identification), 적외선 통신(Infrared Data Association; IrDA), ZigBee, NFC(Near Field Communication) 등이 있을 수 있다.
제어부(1260)는 전자 장치(100)의 전반의 동작을 제어하고 데이터 및 신호를 처리할 수 있다. 제어부(1260)는 적어도 하나의 하드웨어 유닛으로 구성될 수 있다. 또한, 제어부(1260)는 메모리(1240)에 저장된 프로그램 코드를 실행하여 생성되는 하나 이상의 소프트웨어 모듈에 의해 동작할 수 있다. 제어부(1260)는 프로세서 및 메모리를 포함할 수 있는 바, 프로세서는 메모리에 저장된 프로그램 코드를 실행하여 전자 장치(100)의 전반의 동작을 제어하고 데이터 및 신호를 처리할 수 있다. 또한 실시 예에서 제어부(1260)는 적어도 하나의 프로세서를 포함할 수 있다.
제어부(1260)는 제1 코드 및 제2 코드를 확인하고, 제1 코드 및 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인하며, 설정된 알고리즘을 이용하여, 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인할 수 있다. 제어부(1260)는 하나 이상의 노드의 차이 타입에 기초하여, 서브 코드 세트 중 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하고, 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공할 수 있다.
전술한 실시 예들에 따른 전자 장치는 프로세서, 프로그램 데이터를 저장하고 실행하는 메모리, 디스크 드라이브와 같은 영구 저장부(permanent storage), 외부 장치와 통신하는 통신 포트, 터치 패널, 키(key), 버튼 등과 같은 사용자 인터페이스 장치 등을 포함할 수 있다. 소프트웨어 모듈 또는 알고리즘으로 구현되는 방법들은 상기 프로세서상에서 실행 가능한 컴퓨터가 읽을 수 있는 코드들 또는 프로그램 명령들로서 컴퓨터가 읽을 수 있는 기록 매체 상에 저장될 수 있다. 여기서 컴퓨터가 읽을 수 있는 기록 매체로 마그네틱 저장 매체(예컨대, ROM(read-only memory), RAM(random-Access memory), 플로피 디스크, 하드 디스크 등) 및 광학적 판독 매체(예컨대, 시디롬(CD-ROM), 디브이디(DVD: Digital Versatile Disc)) 등이 있다. 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템들에 분산되어, 분산 방식으로 컴퓨터가 판독 가능한 코드가 저장되고 실행될 수 있다. 매체는 컴퓨터에 의해 판독 가능하며, 메모리에 저장되고, 프로세서에서 실행될 수 있다.
본 실시 예는 기능적인 블록 구성들 및 다양한 처리 단계들로 나타내어질 수 있다. 이러한 기능 블록들은 특정 기능들을 실행하는 다양한 개수의 하드웨어 또는/및 소프트웨어 구성들로 구현될 수 있다. 예를 들어, 실시 예는 하나 이상의 마이크로프로세서들의 제어 또는 다른 제어 장치들에 의해서 다양한 기능들을 실행할 수 있는, 메모리, 프로세싱, 로직(logic), 룩 업 테이블(look-up table) 등과 같은 직접 회로 구성들을 채용할 수 있다. 구성 요소들이 소프트웨어 프로그래밍 또는 소프트웨어 요소들로 실행될 수 있는 것과 유사하게, 본 실시 예는 데이터 구조, 프로세스들, 루틴들 또는 다른 프로그래밍 구성들의 조합으로 구현되는 다양한 알고리즘을 포함하여, C, C++, 자바(Java), 어셈블러(assembler) 등과 같은 프로그래밍 또는 스크립팅 언어로 구현될 수 있다. 기능적인 측면들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다. 또한, 본 실시 예는 전자적인 환경 설정, 신호 처리, 및/또는 데이터 처리 등을 위하여 종래 기술을 채용할 수 있다. "매커니즘", "요소", "수단", "구성"과 같은 용어는 넓게 사용될 수 있으며, 기계적이고 물리적인 구성들로서 한정되는 것은 아니다. 상기 용어는 프로세서 등과 연계하여 소프트웨어의 일련의 처리들(routines)의 의미를 포함할 수 있다.
전술한 실시 예들은 일 예시일 뿐 후술하는 청구항들의 범위 내에서 다른 실시 예들이 구현될 수 있다.
Claims (18)
- 전자 장치의 정보 제공 방법에 있어서,제1 코드 및 제2 코드를 확인하는 단계;상기 제1 코드 및 상기 제2 코드에 기초하여, 차이가 있는 서브 코드 세트를 확인하는 단계;설정된 알고리즘을 이용하여, 상기 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인하는 단계;상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 서브 코드 세트 중 상기 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계; 및상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는 단계를 포함하는, 정보 제공 방법.
- 제1 항에 있어서, 상기 설정된 알고리즘은,추상 구문 트리(abstract syntax tree, AST)를 포함하는, 정보 제공 방법.
- 제2 항에 있어서, 상기 하나 이상의 노드의 차이 타입을 확인하는 단계는,상기 제1 코드 및 상기 제2 코드 각각에 대응하는 제1 추상 구문 트리 및 제2 추상 구문 트리를 획득하는 단계;상기 제1 추상 구문 트리 및 상기 제2 추상 구문 트리를 비교하여, 상기 제1 추상 구문 트리 및 상기 제2 추상 구문 트리 각각에 포함된 복수의 노드들 간의 매핑 관계를 확인하는 단계; 및상기 복수의 노드들 간의 매핑 관계에 기초하여, 상기 하나 이상의 노드의 차이 타입을 확인하는 단계를 포함하는, 정보 제공 방법.
- 제3 항에 있어서, 상기 하나 이상의 노드 중,매핑된 노드가 없는 노드의 차이 타입은 추가 또는 삭제로 확인되고,매핑된 노드와 비교하여, 대응하는 서브 코드가 동일하고 부모 노드가 상이한 노드의 차이 타입은 이동으로 확인되고,매핑된 노드와 비교하여, 대응하는 서브 코드가 유사한 노드 또는 대응하는 서브 코드가 동일하고 자식 노드가 변경된 노드의 차이 타입은 수정으로 확인되는, 정보 제공 방법.
- 제1 항에 있어서, 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계는,상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 하나 이상의 노드 중 상기 제1 로직의 변경과 관련된 노드를 확인하는 단계를 포함하는, 정보 제공 방법.
- 제5 항에 있어서,상기 제1 로직의 변경과 관련된 노드를 확인하는 단계는, 상기 하나 이상의 노드 중, 차이 타입이 추가인 제1 노드에 대응하는 서브 코드가 선언 구문(declaration syntax) 또는 표현 구문(expression syntax)을 포함하는지 여부를 확인하는 단계를 포함하고,상기 제1 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 상기 선언 구문이 다른 서브 코드에서 호출되지 않을 때, 상기 제1 노드는 상기 제1 로직을 변경하지 않는 노드로 확인되고,상기 제1 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 상기 표현 구문이 조건 표현 구문인지 여부 및 상기 표현 구문이 상기 제2 코드에 따라 새롭게 추가된 제2 로직에 관한 조건문에 포함되는지 여부에 기초하여, 상기 제1 노드는 상기 제1 로직의 변경과 관련된 노드인지 여부가 확인되는, 정보 제공 방법.
- 제5 항에 있어서,상기 제1 로직의 변경과 관련된 노드를 확인하는 단계는, 상기 하나 이상의 노드 중, 차이 타입이 수정인 제2 노드에 대응하는 서브 코드가 선언 구문 또는 표현 구문을 포함하는지 여부를 확인하는 단계를 포함하고,상기 제2 노드에 대응하는 서브 코드가 표현 구문을 포함하는 경우, 상기 제2 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되고,상기 제2 노드에 대응하는 서브 코드가 선언 구문을 포함하는 경우, 상기 선언 구문이 상기 제1 로직과 관련 있는 내용을 포함할 때, 상기 제2 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법.
- 제5 항에 있어서,상기 하나 이상의 노드 중, 차이 타입이 이동인 제3 노드로 인하여 조건 경로(conditional path) 또는 실행 경로(execute path)가 변경된 경우, 상기 제3 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법.
- 제5 항에 있어서,상기 하나 이상의 노드 중, 차이 타입이 삭제인 제4 노드에 대응하는 서브 코드가 상기 제1 로직과 관련 있는 내용을 포함하는 경우, 상기 제4 노드는 상기 제1 로직의 변경과 관련된 노드로 확인되는, 정보 제공 방법.
- 제5 항에 있어서,상기 정보 제공 방법은, 상기 제1 로직의 변경과 관련된 노드 중 상기 제1 로직의 변경의 원인이 되는 노드를 확인하는 단계를 더 포함하고,상기 제1 로직의 변경의 원인이 되는 노드에 대응하는 서브 코드는 상기 제1 로직의 변경과 관련된 서브 코드로 확인되는, 정보 제공 방법.
- 제1 항에 있어서, 상기 제2 코드는,상기 제1 로직과 관련된 서브 코드; 및상기 제2 코드에 따라 새롭게 추가된 제2 로직과 관련된 서브 코드를 포함하는, 정보 제공 방법.
- 제11 항에 있어서, 상기 하나 이상의 노드의 차이 타입을 확인하는 단계는,상기 서브 코드 세트 중 상기 제1 로직과 관련된 서브 코드를 확인하는 단계; 및상기 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입을 확인하는 단계를 포함하는, 정보 제공 방법.
- 제12 항에 있어서, 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계는,상기 제1 로직과 관련된 서브 코드에 대응하는 노드의 차이 타입에 기초하여, 상기 제1 로직과 관련된 서브 코드 중 상기 제1 로직의 변경과 관련된 서브 코드를 확인하는 단계를 포함하는, 정보 제공 방법.
- 제1 항에 있어서, 상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보는,상기 제1 로직의 변경과 관련된 서브 코드의 변경 내용을 포함하는, 정보 제공 방법.
- 제1 항에 있어서,상기 제1 코드는 저장소(repository)로부터 획득되고,상기 제2 코드는 사용자 단말로부터 획득되는, 정보 제공 방법.
- 제1 항에 있어서,상기 정보 제공 방법은, 사용자 단말로부터 풀 리퀘스트(pull request)를 획득함에 따라 개시되는, 정보 제공 방법.
- 제1 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 비일시적 기록매체.
- 전자 장치로서,통신부;메모리; 및제어부(controller)를 포함하고, 상기 제어부는,제1 코드 및 제2 코드를 확인하고,상기 제1 코드 및 상기 제2 코드를 비교하여, 차이가 있는 서브 코드 세트를 확인하고,설정된 알고리즘을 이용하여, 상기 서브 코드 세트에 대응하는 하나 이상의 노드의 차이 타입을 확인하고,상기 하나 이상의 노드의 차이 타입에 기초하여, 상기 서브 코드 세트 중 상기 제1 코드에 따른 제1 로직의 변경과 관련된 서브 코드를 확인하고,상기 제1 로직의 변경과 관련된 서브 코드에 관한 정보를 제공하는, 전자 장치.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/463,760 US20240187894A1 (en) | 2022-08-17 | 2023-09-08 | Electronic device for transmitting measurement report and operating method of the same |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020220099883A KR102883916B1 (ko) | 2022-08-10 | 2022-08-10 | 전자 장치 및 그의 정보 제공 방법 |
| KR10-2022-0099883 | 2022-08-10 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/463,760 Continuation US20240187894A1 (en) | 2022-08-17 | 2023-09-08 | Electronic device for transmitting measurement report and operating method of the same |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024034720A1 true WO2024034720A1 (ko) | 2024-02-15 |
Family
ID=89851774
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2022/012278 Ceased WO2024034720A1 (ko) | 2022-08-10 | 2022-08-17 | 전자 장치 및 그의 정보 제공 방법 |
Country Status (3)
| Country | Link |
|---|---|
| KR (2) | KR102883916B1 (ko) |
| TW (1) | TWI895702B (ko) |
| WO (1) | WO2024034720A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101672378B1 (ko) * | 2013-12-18 | 2016-11-03 | 구글 인코포레이티드 | 코드 리뷰 동안 테스트 커버리지 데이터를 디스플레이하기 위한 프로세스 |
| KR101860642B1 (ko) * | 2016-10-14 | 2018-05-23 | 한국전력공사 | 소스코드 변경 영향 평가를 이용한 불법 행위 감시 장치 및 그 방법 |
| US20200310787A1 (en) * | 2019-03-27 | 2020-10-01 | Hitachi, Ltd. | Code management system and code management method |
| KR20210148346A (ko) * | 2019-05-21 | 2021-12-07 | 엑스 디벨롭먼트 엘엘씨 | 코드 변경들의 자동화된 식별 |
| JP2022114722A (ja) * | 2021-01-27 | 2022-08-08 | 富士通株式会社 | コード変更パターンマイニングプログラム及びコード変更パターンマイニング方法 |
-
2022
- 2022-08-10 KR KR1020220099883A patent/KR102883916B1/ko active Active
- 2022-08-17 WO PCT/KR2022/012278 patent/WO2024034720A1/ko not_active Ceased
-
2023
- 2023-03-09 TW TW112108793A patent/TWI895702B/zh active
-
2025
- 2025-11-05 KR KR1020250165264A patent/KR20250160335A/ko active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101672378B1 (ko) * | 2013-12-18 | 2016-11-03 | 구글 인코포레이티드 | 코드 리뷰 동안 테스트 커버리지 데이터를 디스플레이하기 위한 프로세스 |
| KR101860642B1 (ko) * | 2016-10-14 | 2018-05-23 | 한국전력공사 | 소스코드 변경 영향 평가를 이용한 불법 행위 감시 장치 및 그 방법 |
| US20200310787A1 (en) * | 2019-03-27 | 2020-10-01 | Hitachi, Ltd. | Code management system and code management method |
| KR20210148346A (ko) * | 2019-05-21 | 2021-12-07 | 엑스 디벨롭먼트 엘엘씨 | 코드 변경들의 자동화된 식별 |
| JP2022114722A (ja) * | 2021-01-27 | 2022-08-08 | 富士通株式会社 | コード変更パターンマイニングプログラム及びコード変更パターンマイニング方法 |
Non-Patent Citations (1)
| Title |
|---|
| COUPANG ENGINEERING: "Minimizing technical incidents during A/B testing at scale. How Coupang automated code review to detect changes in A logic", MEDIUM, 7 April 2022 (2022-04-07), XP093138233, Retrieved from the Internet <URL:ttps://medium.com/coupang-engineering/minimizing-technical-incidents-during-a-b-testing-at-scale-9615c53fcf4f> [retrieved on 20240306] * |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20240021493A (ko) | 2024-02-19 |
| TWI895702B (zh) | 2025-09-01 |
| KR102883916B1 (ko) | 2025-11-11 |
| TW202407539A (zh) | 2024-02-16 |
| KR20250160335A (ko) | 2025-11-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3167356A1 (en) | Display apparatus and control method thereof | |
| WO2015041436A1 (en) | Method of managing control right, client device therefor, and master device therefor | |
| WO2020087981A1 (zh) | 风控审核模型生成方法、装置、设备及可读存储介质 | |
| WO2020119369A1 (zh) | 智能it运维故障定位方法、装置、设备及可读存储介质 | |
| WO2015037851A1 (ko) | 스크린 샷 처리 디바이스 및 그 방법 | |
| WO2019024485A1 (zh) | 数据共享方法、装置及计算机可读存储介质 | |
| WO2020042464A1 (zh) | 数据交互方法、装置、设备及可读存储介质 | |
| WO2020233060A1 (zh) | 事件通知方法、事件通知服务器、存储介质及装置 | |
| WO2016190652A1 (en) | Electronic device, information providing system and information providing method thereof | |
| WO2020114184A1 (zh) | 联合建模方法、装置、设备以及计算机可读存储介质 | |
| WO2020062615A1 (zh) | 显示面板的伽马值调节方法、装置及显示设备 | |
| WO2013191408A1 (en) | Method for improving touch recognition and electronic device thereof | |
| WO2019112127A1 (en) | Electronic device and method for controlling the electronic device for joint transmission thereof | |
| WO2025033652A1 (en) | Method and apparatus for processing task | |
| WO2018070598A1 (ko) | 소스코드 변경 영향 평가를 이용한 불법 행위 감시 장치 및 그 방법 | |
| WO2021201344A1 (ko) | 통합 사용 로그 데이터를 생성하는 서버 및 그 동작 방법 | |
| WO2024143684A1 (ko) | 콘텐츠 추천 방법 및 시스템 | |
| WO2020253124A1 (zh) | 接口测试方法、装置、终端及计算机可读存储介质 | |
| WO2024128401A1 (ko) | 전자 장치 및 그의 정보 제공 방법 | |
| WO2025013979A1 (ko) | 전자 장치 및 그의 정보 제공 방법 | |
| WO2024058295A1 (ko) | 페이지에 대한 리포트를 제공하는 방법 및 장치 | |
| WO2017150841A1 (ko) | 전자장치, 어플리케이션 실행 시스템 및 그 제어방법 | |
| WO2010128711A1 (ko) | 시맨틱 브로커 시스템 및 시맨틱 브로커 서비스 방법 | |
| WO2024025027A1 (ko) | 전자 장치 및 그의 패키지 관리 방법 | |
| WO2017099338A1 (ko) | 사용자 단말 장치 및 그 제어 방법 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22955095 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22955095 Country of ref document: EP Kind code of ref document: A1 |