5f54d410357d3df37d48bf121b5f4d60c58928f3,src/python/pants/backend/project_info/tasks/ide_gen.py,IdeGen,map_external_jars,#IdeGen#,306

Before Change


    jar_paths = self.get_jar_infos(self.context.products.get_data("ivy_jar_products"), confs)
    for entry in jar_paths.values():
      jar = entry.get("default")
      if jar:
        cp_jar = os.path.join(external_jar_dir, os.path.basename(jar))
        shutil.copy(jar, cp_jar)

        cp_source_jar = None
        source_jar = entry.get("sources")
        if source_jar:
          cp_source_jar = os.path.join(external_source_jar_dir, os.path.basename(source_jar))
          shutil.copy(source_jar, cp_source_jar)

        cp_javadoc_jar = None
        javadoc_jar = entry.get("javadoc")
        if javadoc_jar:
          cp_javadoc_jar = os.path.join(external_javadoc_jar_dir, os.path.basename(javadoc_jar))
          shutil.copy(javadoc_jar, cp_javadoc_jar)

        self._project.external_jars.add(ClasspathEntry(cp_jar,
                                                       source_jar=cp_source_jar,

After Change


      cp_source_jars = self.copy_jars(sources_jars, external_source_jar_dir)
      cp_javadoc_jars = self.copy_jars(javadoc_jars, external_javadoc_jar_dir)
      for i in range(len(cp_jars)):
        cp_jar = cp_jars[i]
        if i < len(cp_source_jars):
          cp_source_jar = cp_source_jars[i]
        else:
          cp_source_jar = None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 5f54d410357d3df37d48bf121b5f4d60c58928f3
Time: 2015-05-11
Author: zundel@squareup.com
File Name: src/python/pants/backend/project_info/tasks/ide_gen.py
Class Name: IdeGen
Method Name: map_external_jars


Project Name: deepdrive/deepdrive
Commit Name: 974c2e4e0159d05a24fdc68eac3c85e73d341996
Time: 2019-05-25
Author: cquiter@gmail.com
File Name: recorder/Recorder.py
Class Name: Recorder
Method Name: upload_artifacts


Project Name: studioml/studio
Commit Name: 82c402cb7fab567e5becea9b8c92dd01dea953c2
Time: 2017-06-12
Author: peter.zhokhov@sentient.ai
File Name: studio/lworker.py
Class Name:
Method Name: main