c8788d2eedcdb2671289d7d47a41b8fdcb0294f1,src/sos/sos_executor.py,Base_Executor,resolve_dangling_targets,#Base_Executor#Any#Any#,417

Before Change


                mo = [x for x in mo if x[1] is not False]
                if not mo:
                    for x in self.workflow.auxiliary_sections:
                        env.logger.debug("{}: {}".format(x.step_name(),
                            x.options["provides"] if "provides" in x.options else ""))
                    raise RuntimeError("No step to generate target {}{}".format(target, dag.steps_depending_on(target, self.workflow)))
                if len(mo) > 1:
                    raise RuntimeError("Multiple steps {} to generate target {}".format(", ".join(x[0].step_name() for x in mo), target))
                //

After Change


                    nodes = dag._all_dependent_files[target]
                    for node in nodes:
                        // if this is an index step... simply let it depends on previous steps
                        if node._node_index is not None:
                            indexed = [x for x in dag.nodes() if x._node_index is not None and x._node_index < node._node_index and isinstance(x._output_targets, Undetermined)]
                            indexed.sort(key = lambda x: x._node_index)
                            if not indexed:
                                raise RuntimeError("No step to generate target {}{}".format(target, dag.steps_depending_on(target, self.workflow)))
                            if not isinstance(node._input_targets, Undetermined):
                                node._input_targets = Undetermined("")
                            if not isinstance(node._depends_targets, Undetermined):
                                node._depends_targets = Undetermined("")
                        else:
                            raise RuntimeError("No step to generate target {}{}".format(target, dag.steps_depending_on(target, self.workflow)))
                    resolved += 1
                    continue
                if len(mo) > 1:
                    raise RuntimeError("Multiple steps {} to generate target {}".format(", ".join(x[0].step_name() for x in mo), target))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: vatlab/SoS
Commit Name: c8788d2eedcdb2671289d7d47a41b8fdcb0294f1
Time: 2017-09-11
Author: ben.bog@gmail.com
File Name: src/sos/sos_executor.py
Class Name: Base_Executor
Method Name: resolve_dangling_targets


Project Name: HazyResearch/fonduer
Commit Name: 8946a24d7c1a21a80ccaf86418c354cf87e84bfa
Time: 2018-09-04
Author: lwhsiao@stanford.edu
File Name: src/fonduer/supervision/labeler.py
Class Name: LabelerUDF
Method Name: apply


Project Name: pantsbuild/pants
Commit Name: dbf744f0af02efeab9fefc708292786385aec030
Time: 2020-10-08
Author: greg.shuflin@toolchain.com
File Name: src/python/pants/bin/remote_pants_runner.py
Class Name: RemotePantsRunner
Method Name: run