BinClone/CloneSearcherLib/CSController.cpp
//
// Search the DB for targetFragement.
// Return false if error.
//
Search the DB for targetFragement.
Return false if error.
Search the DB for targetFragement . Return false if error .
bool CCSController::findFragmentClones(LPCTSTR targetFragment,
                                       const CCSParam& param,
                                       bool bFindExactClones, 
                                       bool bFindInexactClones, 
                                       double minCoOccThreshold, 
                                       const CCSClones*& pClones,
                                       CString& tempAssemblyFilePath)
{
    if (!m_assemblyFileMgr.createAssemblyFile(targetFragment, tempAssemblyFilePath)) {
        tcout << _T("Error: failed to create temporary assembly file.") << endl;
        CBFFileHelper::removeFile((LPCTSTR) tempAssemblyFilePath);
        return false;
    }  
    if (!findFileClones((LPCTSTR) tempAssemblyFilePath, param, bFindExactClones, bFindInexactClones, minCoOccThreshold, pClones)) {
        CBFFileHelper::removeFile((LPCTSTR) tempAssemblyFilePath);
        return false;
    }
    return true;
}
bool CCSController :: findFragmentClones ( LPCTSTR targetFragment , const CCSParam & param , bool bFindExactClones , bool bFindInexactClones , double minCoOccThreshold , const CCSClones * & pClones , CString & tempAssemblyFilePath ) { if ( ! m_assemblyFileMgr . createAssemblyFile ( targetFragment , tempAssemblyFilePath ) ) { tcout << _T ( " " ) << endl ; CBFFileHelper :: removeFile ( ( LPCTSTR ) tempAssemblyFilePath ) ; return false ; } if ( ! findFileClones ( ( LPCTSTR ) tempAssemblyFilePath , param , bFindExactClones , bFindInexactClones , minCoOccThreshold , pClones ) ) { CBFFileHelper :: removeFile ( ( LPCTSTR ) tempAssemblyFilePath ) ; return false ; } return true ; }
Search the DB for targetFragement.
Search the DB for targetFragement .
//CBFFileHelper::removeFile((LPCTSTR) tempAssemblyFilePath);