/**
 * Repair Templates Module
 *
 * Defines common repair patterns and templates for automated program repair.
 *
 * Based on research:
 * - PAR (Kim et al., 2013) - Pattern-based repair
 * - ITER (arXiv 2403.00418) - Iterative template repair
 * - Genesis (Long et al., 2017) - Code transform patterns
 */
import { RepairTemplate, Fault, RepairPatch } from "./types.js";
/**
 * Collection of repair templates
 */
export declare const REPAIR_TEMPLATES: RepairTemplate[];
/**
 * Template-based Repair Engine
 */
export declare class TemplateRepairEngine {
    private templates;
    private successCounts;
    constructor(customTemplates?: RepairTemplate[]);
    /**
     * Find applicable templates for a fault
     */
    findApplicableTemplates(fault: Fault): RepairTemplate[];
    /**
     * Apply a template to generate a patch
     */
    applyTemplate(template: RepairTemplate, fault: Fault, codeContext: string): RepairPatch | null;
    /**
     * Generate multiple patches from templates
     */
    generatePatches(fault: Fault, codeContext: string, maxPatches?: number): RepairPatch[];
    /**
     * Calculate confidence for a template application
     */
    private calculateConfidence;
    /**
     * Record template success/failure for learning
     */
    recordResult(templateId: string, success: boolean): void;
    /**
     * Get success rate for a template
     */
    getSuccessRate(templateId: string): number;
    /**
     * Get all template statistics
     */
    getStatistics(): Map<string, {
        id: string;
        name: string;
        successRate: number;
        attempts: number;
    }>;
    /**
     * Add a custom template
     */
    addTemplate(template: RepairTemplate): void;
    /**
     * Remove a template by ID
     */
    removeTemplate(templateId: string): boolean;
    /**
     * Get all templates
     */
    getTemplates(): RepairTemplate[];
}
/**
 * Create a template repair engine
 */
export declare function createTemplateRepairEngine(customTemplates?: RepairTemplate[]): TemplateRepairEngine;
