data/feature_extraction.py
def compute_avg_file_changes(lst: str, index: int) -> float:
        """Computes the average number of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the average number of file changes
            in the list.
        """
        if pd.isna(lst):
            return 0.0
        files_changes_lst = eval(lst)
        if len(files_changes_lst) == 0:
            return 0.0
        total = 0
        for t in files_changes_lst:
            changes = eval(t)[index]
            total += changes
        return total / len(files_changes_lst)
Computes the average number of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the average number of file changes
            in the list.
        
Computes the average number of file changes in the list.
Computes the average number of file changes in the list .
def compute_avg_file_changes(lst: str, index: int) -> float:
        if pd.isna(lst):
            return 0.0
        files_changes_lst = eval(lst)
        if len(files_changes_lst) == 0:
            return 0.0
        total = 0
        for t in files_changes_lst:
            changes = eval(t)[index]
            total += changes
        return total / len(files_changes_lst)
def compute_avg_file_changes ( lst : str , index : int ) -> float : if pd . isna ( lst ) : return 0.0 files_changes_lst = eval ( lst ) if len ( files_changes_lst ) == 0 : return 0.0 total = 0 for t in files_changes_lst : changes = eval ( t ) [ index ] total += changes return total / len ( files_changes_lst )
Computes the average number of file changes in the list.
Computes the average number of file changes in the list .
"""Computes the average number of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the average number of file changes
            in the list.
        """
lst
str
A str of list representation.
A str of list representation .
index
int
A integer indicating whether to count additions, deletions
or changes. 0 for additions, 1 for deletions, and 2 for changes.
A integer indicating whether to count additions deletions or changes . 0 for additions 1 for deletions and 2 for changes .