def _test_compile(self, target_level, class_name, source_contents, platform_args=None):
    with temporary_dir(root_dir=os.path.abspath('.')) as tmpdir:
      with open(os.path.join(tmpdir, 'BUILD'), 'w') as f:
        f.write(dedent('''
        java_library(name='{target_name}',
          sources=['{class_name}.java'],
          platform='{target_level}',
        )
        '''.format(target_name=os.path.basename(tmpdir),
                   class_name=class_name,
                   target_level=target_level)))
      with open(os.path.join(tmpdir, '{}.java'.format(class_name)), 'w') as f:
        f.write(source_contents)
      platforms = str({
        str(target_level): {
          'source': str(target_level),
          'target': str(target_level),
          'args': platform_args and [],
        }
      })
      command = []
      command.extend(['--jvm-platform-platforms={}'.format(platforms),
                      '--jvm-platform-default-platform={}'.format(target_level)])
      command.extend(self.get_pants_compile_args())
      command.extend([tmpdir])

      pants_run = self.run_pants(command)
      return pants_run
dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/backend/jvm/tasks/jvm_compile/java/jvm_platform_integration_mixin.py/JvmPlatformIntegrationMixin._test_compile/operator `or` -> `and`