ArKanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
ToolMethod Class Reference

Main code duplication detection tool. More...

#include <tool_method.hpp>

+ Inheritance diagram for ToolMethod:
+ Collaboration diagram for ToolMethod:

Public Member Functions

 ToolMethod (const fs::path &base_path_, double similarity_)
 Constructs the duplication finder tool.
 
void execute_by_feature (const fs::path &path, const std::string feature_name="")
 Executes the full duplication analysis pipeline.
 
void on_function (const FunctionData &fd) override
 
void execute () override
 
- Public Member Functions inherited from IMethod
virtual ~IMethod ()=default
 
virtual void save_duplications (std::vector< DuplicationEntry > &)
 Output line format:
 

Detailed Description

Main code duplication detection tool.

Orchestrates the preprocessing pipeline that analyzes the entire codebase to identify and catalog potential code duplications, creating the foundation for efficient similarity queries during the tool's operation phase.

Definition at line 29 of file tool_method.hpp.

Constructor & Destructor Documentation

◆ ToolMethod()

ToolMethod::ToolMethod ( const fs::path & base_path_,
double similarity_ )

Constructs the duplication finder tool.

Parameters
base_path_Root path of the codebase to analyze
similarity_Minimum similarity threshold (0-100) to consider as duplicate

Definition at line 10 of file tool_method.cpp.

Member Function Documentation

◆ execute()

void ToolMethod::execute ( )
overridevirtual

Implements IMethod.

Definition at line 59 of file tool_method.cpp.

◆ execute_by_feature()

void ToolMethod::execute_by_feature ( const fs::path & path,
const std::string feature_name = "" )

Executes the full duplication analysis pipeline.

Performs the complete preprocessing and analysis of the codebase, including file scanning, similarity comparison, and result saving.

Definition at line 15 of file tool_method.cpp.

◆ on_function()

void ToolMethod::on_function ( const FunctionData & fd)
overridevirtual

Implements IMethod.

Definition at line 46 of file tool_method.cpp.


The documentation for this class was generated from the following files: