1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Code clone detection module.
//!
//! Provides detection of code duplicates (clones) using various techniques:
//!
//! - **Type-1 (textual)**: Exact copies ignoring whitespace/comments
//! - **Type-2 (structural)**: Same structure with renamed identifiers/literals
//! - **Type-3 (near-miss)**: Similar structure with small modifications
//!
//! # Example
//!
//! ```ignore
//! use go_brrr::quality::clones::{detect_clones, CloneConfig, TextualCloneDetector};
//!
//! // Quick Type-1 detection with defaults
//! let result = detect_clones("./src", Some(6), None)?;
//!
//! // Custom configuration
//! let config = CloneConfig::default()
//! .with_min_lines(10)
//! .with_language("rust");
//! let detector = TextualCloneDetector::new(config);
//! let result = detector.detect("./src")?;
//! ```
//!
//! # Structural Clone Detection (Type-2/Type-3)
//!
//! ```ignore
//! use go_brrr::quality::clones::{
//! detect_structural_clones, StructuralCloneConfig, StructuralCloneDetector
//! };
//!
//! // Detect structural clones with 80% similarity threshold
//! let result = detect_structural_clones("./src", Some(0.8), None)?;
//!
//! // Custom configuration
//! let config = StructuralCloneConfig::default()
//! .with_similarity_threshold(0.85)
//! .with_min_nodes(15);
//! let detector = StructuralCloneDetector::new(config);
//! let result = detector.detect("./src")?;
//!
//! // Get only Type-2 (exact structural) clones
//! for clone in result.type2_clones() {
//! println!("Type-2 clone: {} instances", clone.instances.len());
//! }
//! ```
// Re-export textual clone detection (Type-1)
pub use ;
// Re-export structural clone detection (Type-2/Type-3)
pub use ;