test_class.declarator: rcpFeatureInTP
test_class.modifier: private static
test_class.original_string: private static ArtifactKey rcpFeatureInTP;
test_class.type: ArtifactKey
test_class.var_name: rcpFeatureInTP
test_class.declarator: junit4InTP
test_class.modifier: private static
test_class.original_string: private static ArtifactKey junit4InTP;
test_class.type: ArtifactKey
test_class.var_name: junit4InTP
test_class.declarator: junit4JarLocation
test_class.modifier: private static
test_class.original_string: private static File junit4JarLocation;
test_class.type: File
test_class.var_name: junit4JarLocation
test_class.declarator: subject
test_class.modifier: private
test_class.original_string: private FeatureXmlTransformer subject;
test_class.type: FeatureXmlTransformer
test_class.var_name: subject
test_class.file: tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/FeatureXmlTransformerTest.java
test_class.identifier: FeatureXmlTransformerTest
test_case.body: @SuppressWarnings("deprecation")
      @Test
      public void testExpandReferences() throws Exception {
          subject = new FeatureXmlTransformer(new SilentLog(), new NoopFileLockService());
          Feature feature = Feature
                  .read(new File(TestUtil.getBasedir("projects/featureXmlVersionExpansion/"), "feature.xml"));
  
          TargetPlatform tp = mock(TargetPlatform.class);
          when(tp.resolveArtifact("eclipse-feature", "org.eclipse.rcp", "4.5.0.qualifier")).thenReturn(rcpFeatureInTP);
          when(tp.resolveArtifact("eclipse-plugin", "org.junit4", "4.8.1.qualifier")).thenReturn(junit4InTP);
          when(tp.getArtifactLocation(junit4InTP)).thenReturn(junit4JarLocation);
  
          subject.expandReferences(feature, tp);
  
          assertThat(feature.getIncludedFeatures(), hasItem(feature("org.eclipse.rcp", "4.5.0.v20140918")));
  
          assertThat(feature.getPlugins(), hasItem(plugin("org.junit4", "4.8.1.v20100302")));
          PluginRef plugin = feature.getPlugins().get(0);
          assertThat(plugin.getId(), is("org.junit4"));
          assertThat(plugin.getDownloadSize(), is(1L)); // 1720 bytes rounded to kiB
          assertThat(plugin.getInstallSize(), is(2L)); // 2419 bytes rounded to kiB // TODO shouldn't installSize=downloadSize for unpack=false?
          assertThat(plugin.isUnpack(), is(false));
      }
test_case.class_method_signature: FeatureXmlTransformerTest.testExpandReferences()
test_case.full_signature: @SuppressWarnings("deprecation") @Test public void testExpandReferences()
test_case.identifier: testExpandReferences
test_case.invocations: read getBasedir mock thenReturn when resolveArtifact thenReturn when resolveArtifact thenReturn when getArtifactLocation expandReferences assertThat getIncludedFeatures hasItem feature assertThat getPlugins hasItem plugin get getPlugins assertThat getId is assertThat getDownloadSize is assertThat getInstallSize is assertThat isUnpack is
test_case.modifiers: @SuppressWarnings("deprecation") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExpandReferences()
focal_class.declarator: KBYTE = 1024
focal_class.modifier: private static final
focal_class.original_string: private static final int KBYTE = 1024;
focal_class.type: int
focal_class.var_name: KBYTE
focal_class.declarator: log
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private Logger log;
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: fileLockService
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private FileLockService fileLockService;
focal_class.type: FileLockService
focal_class.var_name: fileLockService
focal_class.file: tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/FeatureXmlTransformer.java
focal_class.identifier: FeatureXmlTransformer
focal_class.class_method_signature: FeatureXmlTransformer.FeatureXmlTransformer()
focal_class.full_signature: public  FeatureXmlTransformer()
focal_class.identifier: FeatureXmlTransformer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FeatureXmlTransformer()
focal_class.class_method_signature: FeatureXmlTransformer.FeatureXmlTransformer(Logger log, FileLockService fileLockService)
focal_class.full_signature: public  FeatureXmlTransformer(Logger log, FileLockService fileLockService)
focal_class.identifier: FeatureXmlTransformer
focal_class.modifiers: public
focal_class.parameters: (Logger log, FileLockService fileLockService)
focal_class.signature:  FeatureXmlTransformer(Logger log, FileLockService fileLockService)
focal_class.class_method_signature: FeatureXmlTransformer.expandReferences(Feature feature, TargetPlatform targetPlatform)
focal_class.full_signature: public Feature expandReferences(Feature feature, TargetPlatform targetPlatform)
focal_class.identifier: expandReferences
focal_class.modifiers: public
focal_class.parameters: (Feature feature, TargetPlatform targetPlatform)
focal_class.return: Feature
focal_class.signature: Feature expandReferences(Feature feature, TargetPlatform targetPlatform)
focal_class.class_method_signature: FeatureXmlTransformer.resolvePluginReference(TargetPlatform targetPlatform, PluginRef pluginRef)
focal_class.full_signature: private ArtifactKey resolvePluginReference(TargetPlatform targetPlatform, PluginRef pluginRef)
focal_class.identifier: resolvePluginReference
focal_class.modifiers: private
focal_class.parameters: (TargetPlatform targetPlatform, PluginRef pluginRef)
focal_class.return: ArtifactKey
focal_class.signature: ArtifactKey resolvePluginReference(TargetPlatform targetPlatform, PluginRef pluginRef)
focal_class.class_method_signature: FeatureXmlTransformer.resolveFeatureReference(TargetPlatform targetPlatform, FeatureRef featureRef)
focal_class.full_signature: private ArtifactKey resolveFeatureReference(TargetPlatform targetPlatform, FeatureRef featureRef)
focal_class.identifier: resolveFeatureReference
focal_class.modifiers: private
focal_class.parameters: (TargetPlatform targetPlatform, FeatureRef featureRef)
focal_class.return: ArtifactKey
focal_class.signature: ArtifactKey resolveFeatureReference(TargetPlatform targetPlatform, FeatureRef featureRef)
focal_class.class_method_signature: FeatureXmlTransformer.quote(String nullableString)
focal_class.full_signature: private static String quote(String nullableString)
focal_class.identifier: quote
focal_class.modifiers: private static
focal_class.parameters: (String nullableString)
focal_class.return: String
focal_class.signature: String quote(String nullableString)
focal_class.class_method_signature: FeatureXmlTransformer.setDownloadAndInstallSize(PluginRef pluginRefToEdit, File artifact)
focal_class.full_signature: private void setDownloadAndInstallSize(PluginRef pluginRefToEdit, File artifact)
focal_class.identifier: setDownloadAndInstallSize
focal_class.modifiers: private
focal_class.parameters: (PluginRef pluginRefToEdit, File artifact)
focal_class.return: void
focal_class.signature: void setDownloadAndInstallSize(PluginRef pluginRefToEdit, File artifact)
focal_class.class_method_signature: FeatureXmlTransformer.getInstallSize(File location)
focal_class.full_signature: protected long getInstallSize(File location)
focal_class.identifier: getInstallSize
focal_class.modifiers: protected
focal_class.parameters: (File location)
focal_class.return: long
focal_class.signature: long getInstallSize(File location)
focal_method.body: public Feature expandReferences(Feature feature, TargetPlatform targetPlatform) throws MojoFailureException {
  
          for (PluginRef pluginRef : feature.getPlugins()) {
              ArtifactKey plugin = resolvePluginReference(targetPlatform, pluginRef);
              pluginRef.setVersion(plugin.getVersion());
  
              File location = targetPlatform.getArtifactLocation(plugin);
              setDownloadAndInstallSize(pluginRef, location);
          }
  
          for (FeatureRef featureRef : feature.getIncludedFeatures()) {
              ArtifactKey includedFeature = resolveFeatureReference(targetPlatform, featureRef);
              featureRef.setVersion(includedFeature.getVersion());
          }
  
          return feature;
      }
focal_method.class_method_signature: FeatureXmlTransformer.expandReferences(Feature feature, TargetPlatform targetPlatform)
focal_method.full_signature: public Feature expandReferences(Feature feature, TargetPlatform targetPlatform)
focal_method.identifier: expandReferences
focal_method.invocations: getPlugins resolvePluginReference setVersion getVersion getArtifactLocation setDownloadAndInstallSize getIncludedFeatures resolveFeatureReference setVersion getVersion
focal_method.modifiers: public
focal_method.parameters: (Feature feature, TargetPlatform targetPlatform)
focal_method.return: Feature
focal_method.signature: Feature expandReferences(Feature feature, TargetPlatform targetPlatform)