461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0,src/python/pants/backend/android/tasks/aapt_builder.py,AaptBuilder,execute,#AaptBuilder#,69

Before Change


        invalid_targets.extend(vt.targets)
      for target in invalid_targets:
        // "input_dirs" is the folder containing the Android dex file.
        input_dirs = []
        // "gen_out" holds resource folders (e.g. "res").
        gen_out = []
        mapping = self.context.products.get("dex")
        for basedir in mapping.get(target):
          input_dirs.append(basedir)

        def gather_resources(target):
          Gather the "resource_dir" of the target.
          if isinstance(target, AndroidResources):
            gen_out.append(os.path.join(get_buildroot(), target.resource_dir))

        target.walk(gather_resources)
        args = self.render_args(target, gen_out, input_dirs)
        with self.context.new_workunit(name="apk-bundle", labels=[WorkUnit.MULTITOOL]) as workunit:
          returncode = subprocess.call(args, stdout=workunit.output("stdout"),
                                       stderr=workunit.output("stderr"))
          if returncode:

After Change


          dex_files.append(dex)

        resource_deps = self.context.build_graph.transitive_subgraph_of_addresses([binary.address])
        resource_dirs = [t.resource_dir for t in resource_deps if isinstance(t, AndroidResources)]

        // Priority for resources is left to right, so reverse the collection order (DFS preorder).
        args = self._render_args(binary, reversed(resource_dirs), dex_files)
        with self.context.new_workunit(name="apk-bundle",
                                       labels=[WorkUnit.MULTITOOL]) as workunit:
          returncode = subprocess.call(args, stdout=workunit.output("stdout"),
                                       stderr=workunit.output("stderr"))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: src/python/pants/backend/android/tasks/aapt_builder.py
Class Name: AaptBuilder
Method Name: execute


Project Name: pantsbuild/pants
Commit Name: fac976efbc71aef758382015854f550c57d96461
Time: 2015-11-13
Author: tansy.arron@gmail.com
File Name: src/python/pants/backend/core/tasks/sorttargets.py
Class Name: SortTargets
Method Name: console_output


Project Name: kengz/SLM-Lab
Commit Name: ec849adaf4ceb42ed52ca142c839f627c34b9434
Time: 2018-05-21
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/reinforce.py
Class Name: Reinforce
Method Name: calc_advantage


Project Name: ilastik/ilastik
Commit Name: 5e5b4d43ba1561468c69c2270b2f61157dc69dd6
Time: 2013-09-18
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/labeling/labelingGui.py
Class Name: LabelingGui
Method Name: _updateLabelList