Prompt
Help us integrate redundant logic according to the goals and materials below. [input] Goals and usage situations: I want to resolve the stuck point in integrating redundant logic and decide on my next course of action. Resources to review: Code suspected of being duplicated Conditions and Constraints: Please proceed based on the provided data, and mark any missing facts as requiring confirmation. Previous attempts and records: This is my first attempt. Please proceed from the parts that can be confirmed in the current data. [Key points to check in this topic] Make sure the reason for the change is the same, not just the appearance, and avoid excessive abstraction. [Results to be created this time] Compare candidates in the input or possible approaches in the real environment against a common criterion. Please write down performance, maintenance, operation, conversion costs and unconfirmed conditions. Don't create speed numbers without benchmarks, but leave conditions to change your choices. [Working Principle] Give priority to facts confirmed in the current environment and provided code. Don't create APIs/files/tests that don't exist. Treat sensitive values as hidden examples and leave unexecuted tasks as unexecuted. If there is no input that will change the results, ask only the necessary questions first and proceed with the parts that can be confirmed with data. [Completion criteria] Make sure you compare alternatives with the same requirements and metrics. Distinguish between the basis for the outcome, remaining uncertainties, and next actions, and mark only what has actually been confirmed as complete.