Exemplo n.º 1
0
        /// <summary>
        /// Выполнить поиск дублирующихся строк программного кода
        /// </summary>
        /// <param name="AllSourceRows"></param>
        public override void FindDuplicatedRows(List <CExtendedCodeUnit> AllSourceRows)
        {
            OnCloneSearchStart();

            m_ClonedRowsMatrix = new CClonedRowsMatrix(AllSourceRows.Count);

            if (!GetCancelOperationFlag())
            {
                for (int first_rows_counter = 0; first_rows_counter < AllSourceRows.Count; first_rows_counter++)
                {
                    if (!GetCancelOperationFlag())
                    {
                        for (int second_rows_counter = first_rows_counter + 1; second_rows_counter < AllSourceRows.Count; second_rows_counter++)
                        {
                            if (!GetCancelOperationFlag())
                            {
                                CExtendedCodeUnit first  = AllSourceRows[first_rows_counter];
                                CExtendedCodeUnit second = AllSourceRows[second_rows_counter];

                                if (first.Text.Equals(second.Text))
                                {
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                        OnCloneSearchProgress();
                    }
                    else
                    {
                        break;
                    }
                }
            }

            OnCloneSearchEnd();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Выполнить поиск дублирующихся строк программного кода
 /// </summary>
 /// <param name="AllSourceRows"></param>
 public void FindDuplicatedRows(List <CExtendedCodeUnit> AllSourceRows)
 {
     m_CloneSearchStrategy.FindDuplicatedRows(AllSourceRows);
     m_ClonedRowsMatrix = m_CloneSearchStrategy.GetClonedRowsMatrix();
 }
Exemplo n.º 3
0
 public CCloneSearchProvider(CBaseCloneSearchStrategy _CloneSearchStrategy)
 {
     m_CloneSearchStrategy = _CloneSearchStrategy;
     m_ClonedRowsMatrix    = new CClonedRowsMatrix();
 }
Exemplo n.º 4
0
 public CBaseCloneSearchStrategy()
 {
     m_ClonedRowsMatrix = new CClonedRowsMatrix();
 }