model/load_data.py
def _get_file_data(pr_id, file_names, file_level_signals, cl_data_dict):
        """
        Fill in the file level features of the cl_data_dict and compute the
        number of old files

        Args:
            pr_id: A integer of pull request id.
            file_names: A list of file names.
            file_level_signals: A dataframe holds the file level signals.
            cl_data_dict: A dict of cl_data to fill in.

        Returns:
            An integer indicating the number of old files.
        """
        num_old_files = 0
        for i in range(len(file_level_signals)):
            file_signals = file_level_signals.iloc[i]
            file_name = file_signals['file name']
            if file_name in file_names:
                file_data = []
                for feature in COMMON_FILE_LEVEL_FEATURES:
                    file_data.append(file_signals[feature])
                reverted_cl_rate = \
                    file_signals['reverted pull request id count'] / \
                    file_signals['pull request id count']
                file_data.append(reverted_cl_rate)
                cl_data_dict[pr_id].file_level_features[file_name] = file_data
                num_old_files += 1
        return num_old_files

        Fill in the file level features of the cl_data_dict and compute the
        number of old files

        Args:
            pr_id: A integer of pull request id.
            file_names: A list of file names.
            file_level_signals: A dataframe holds the file level signals.
            cl_data_dict: A dict of cl_data to fill in.

        Returns:
            An integer indicating the number of old files.
        
Fill in the file level features of the cl_data_dict and compute the
number of old files
Fill in the file level features of the cl_data_dict and compute the number of old files
def _get_file_data(pr_id, file_names, file_level_signals, cl_data_dict):
        num_old_files = 0
        for i in range(len(file_level_signals)):
            file_signals = file_level_signals.iloc[i]
            file_name = file_signals['file name']
            if file_name in file_names:
                file_data = []
                for feature in COMMON_FILE_LEVEL_FEATURES:
                    file_data.append(file_signals[feature])
                reverted_cl_rate = \
                    file_signals['reverted pull request id count'] / \
                    file_signals['pull request id count']
                file_data.append(reverted_cl_rate)
                cl_data_dict[pr_id].file_level_features[file_name] = file_data
                num_old_files += 1
        return num_old_files
def _get_file_data ( pr_id , file_names , file_level_signals , cl_data_dict ) : num_old_files = 0 for i in range ( len ( file_level_signals ) ) : file_signals = file_level_signals . iloc [ i ] file_name = file_signals [ 'file name' ] if file_name in file_names : file_data = [ ] for feature in COMMON_FILE_LEVEL_FEATURES : file_data . append ( file_signals [ feature ] ) reverted_cl_rate = file_signals [ 'reverted pull request id count' ] / file_signals [ 'pull request id count' ] file_data . append ( reverted_cl_rate ) cl_data_dict [ pr_id ] . file_level_features [ file_name ] = file_data num_old_files += 1 return num_old_files
Fill in the file level features of the cl_data_dict and compute the
number of old files
Fill in the file level features of the cl_data_dict and compute the number of old files
"""
        Fill in the file level features of the cl_data_dict and compute the
        number of old files

        Args:
            pr_id: A integer of pull request id.
            file_names: A list of file names.
            file_level_signals: A dataframe holds the file level signals.
            cl_data_dict: A dict of cl_data to fill in.

        Returns:
            An integer indicating the number of old files.
        """
An integer indicating the number of old files.
An integer indicating the number of old files .
pr_id
A integer of pull request id.
A integer of pull request id .
file_names
A list of file names.
A list of file names .
file_level_signals
A dataframe holds the file level signals.
A dataframe holds the file level signals .
cl_data_dict
A dict of cl_data to fill in.
A dict of cl_data to fill in .