def METHOD_NAME(module, pom):
    """
    Replace artifactId in dependency and plugin part.
    :param module: module name
    :param pom: pom file path
    """
    log.debug('Replacing artifact id in file: {}'.format(pom))
    pom_dict = config[module][pom]
    if ARTIFACT_ID_PAIRS not in pom_dict:
        log.warn('No config key {} in pom parameters.'.format(ARTIFACT_ID_PAIRS))
        return
    artifact_id_pairs = pom_dict[ARTIFACT_ID_PAIRS]
    log.debug('Module: {}, artifact ids: {}'.format(module, get_str(artifact_id_pairs)))
    with in_place.InPlace(pom) as file:
        line_num = 0
        for line in file:
            line_num = line_num + 1
            for artifact_id_pair in artifact_id_pairs:
                if artifact_id_pair.old_artifact_id in line:
                    new_line = line.replace(artifact_id_pair.old_artifact_id, artifact_id_pair.new_artifact_id)
                    log.debug('Updating artifact id in line {}'.format(line_num))
                    log.debug('    old_line = {}.'.format(line.strip('\n')))
                    log.debug('    new_line = {}.'.format(new_line.strip('\n')))
                    line = new_line
            file.write(line)