<NME> pom.xml
<BEF> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.scala-ide</groupId>
    <artifactId>org.scala-ide.sdt.build</artifactId>
    <version>4.7.1-SNAPSHOT</version>
    <relativePath>../org.scala-ide.sdt.build/pom.xml</relativePath>
  </parent>
  <artifactId>org.scala-ide.sdt.core.tests</artifactId>
  <packaging>eclipse-test-plugin</packaging>

  <dependencies>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <dependency>
      <!-- log4j without its dependencies -->
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
  </profiles>

  <properties>
    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.nodiagnostics ${tycho.test.OSspecific}</tycho.test.jvmArgs>
  </properties>

  <dependencies>
  </dependencies>

  <profiles>
    <profile>
      <!-- profile used to run the memory test -->
      <id>memory-test</id>
      <dependencies>
        <dependency>
          <groupId>org.scala-lang</groupId>
          <artifactId>scala-compiler</artifactId>
          <version>${scala.version}</version>
        </dependency>
        <dependency>
          <groupId>org.scala-lang</groupId>
          <artifactId>scala-reflect</artifactId>
          <version>${scala.version}</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <!-- unpack the compiler sources -->
              <execution>
                <id>unpack</id>
                <phase>initialize</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
        <artifactId>maven-osgi-test-plugin</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <useUIHarness>true</useUIHarness>
          <useUIThread>true</useUIThread> 

          <!-- Enable JDT weaving -->
          <!-- <systemProperties combine.children="append"> -->
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.scala-lang</groupId>
                      <artifactId>scala-reflect</artifactId>
                      <classifier>sources</classifier>
                      <outputDirectory>${basedir}/test-workspace/scala-compiler/src</outputDirectory>
                      <includes>scala/</includes>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- configuration of which test to run -->
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-surefire-plugin</artifactId>
            <configuration>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
              <testSuite>${project.artifactId}</testSuite>
              <testClass>org.scalaide.core.leaks.MemoryLeaksTest</testClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <!-- automatically clean up the sources which are unpacked for the memory test -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>./</directory>
              <includes>
                <include>test-workspace/scala-compiler/src/**/*</include>
                <include>test-workspace/scala-compiler/src</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <!-- force run the scala compiler projects before tycho compilation is run -->
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- configuration of which test suite to run -->
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-surefire-plugin</artifactId>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <testSuite>${project.artifactId}</testSuite>
          <testClass>org.scalaide.TestsSuite</testClass>
        </configuration>
      </plugin>
      <plugin>
        <!-- copy the mockito jar, so it can be used in eclipse -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
        <execution>
            <id>copy</id>
            <phase>initialize</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.mockito</groupId>
                  <artifactId>mockito-all</artifactId>
                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>log4j</groupId>
                  <artifactId>log4j</artifactId>
                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Scalastyle -->
      <plugin>
        <groupId>org.scalastyle</groupId>
        <artifactId>scalastyle-maven-plugin</artifactId>
        <configuration>
          <sourceDirectories>
            <dir>src</dir>
            <dir>test-workspace</dir>
          </sourceDirectories>
          <configLocation>../org.scala-ide.sdt.core/scala-ide-style-config.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>


<MSG> Run tests headless.
<DFF> @@ -34,7 +34,7 @@
   </profiles>
 
   <properties>
-    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.nodiagnostics ${tycho.test.OSspecific}</tycho.test.jvmArgs>
+    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.OSspecific}</tycho.test.jvmArgs>
   </properties>
 
   <dependencies>
@@ -72,8 +72,8 @@
         <artifactId>maven-osgi-test-plugin</artifactId>
         <version>${tycho.version}</version>
         <configuration>
-          <useUIHarness>true</useUIHarness>
-          <useUIThread>true</useUIThread> 
+          <useUIHarness>false</useUIHarness>
+          <useUIThread>false</useUIThread> 
 
           <!-- Enable JDT weaving -->
           <!-- <systemProperties combine.children="append"> -->

{'commit': 'diff --git a/org.scala-ide.sdt.core.tests/pom.xml b/org.scala-ide.sdt.core.tests/pom.xml\nindex f17b47120..97e732f7e 100644\n--- a/org.scala-ide.sdt.core.tests/pom.xml\n+++ b/org.scala-ide.sdt.core.tests/pom.xml\n@@ -34,7 +34,7 @@\n   </profiles>\n \n   <properties>\n-    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.nodiagnostics ${tycho.test.OSspecific}</tycho.test.jvmArgs>\n+    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.OSspecific}</tycho.test.jvmArgs>\n   </properties>\n \n   <dependencies>\n@@ -72,8 +72,8 @@\n         <artifactId>maven-osgi-test-plugin</artifactId>\n         <version>${tycho.version}</version>\n         <configuration>\n-          <useUIHarness>true</useUIHarness>\n-          <useUIThread>true</useUIThread> \n+          <useUIHarness>false</useUIHarness>\n+          <useUIThread>false</useUIThread> \n \n           <!-- Enable JDT weaving -->\n           <!-- <systemProperties combine.children="append"> -->\ndiff --git a/org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala b/org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala\nindex bfe487d70..ed2bfb921 100644\n--- a/org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala\n+++ b/org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala\n@@ -44,7 +44,7 @@ object ScalaPlugin {\n class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IElementChangedListener with IPartListener {\n   ScalaPlugin.plugin = this\n \n-  final val NO_DIAGNOSTICS = "sdtcore.nodiagnostics"\n+  final val HEADLESS_TEST  = "sdtcore.headless"\n   \n   def pluginId = "org.scala-ide.sdt.core"\n   def compilerPluginId = "org.scala-ide.scala.compiler"\n@@ -102,15 +102,16 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl\n   override def start(context: BundleContext) = {\n     super.start(context)\n \n-    ResourcesPlugin.getWorkspace.addResourceChangeListener(this, IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.POST_CHANGE)\n-    JavaCore.addElementChangedListener(this)\n-    PlatformUI.getWorkbench.getEditorRegistry.setDefaultEditor("*.scala", editorId)\n-    ScalaPlugin.getWorkbenchWindow map (_.getPartService().addPartListener(ScalaPlugin.this))\n+    if (System.getProperty(HEADLESS_TEST) eq null) {\n+      ResourcesPlugin.getWorkspace.addResourceChangeListener(this, IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.POST_CHANGE)\n+      JavaCore.addElementChangedListener(this)\n+      PlatformUI.getWorkbench.getEditorRegistry.setDefaultEditor("*.scala", editorId)\n+      ScalaPlugin.getWorkbenchWindow map (_.getPartService().addPartListener(ScalaPlugin.this))\n \n+      PerspectiveFactory.updatePerspective\n+      diagnostic.StartupDiagnostics.run\n+    }\n     println("Scala compiler bundle: " + scalaCompilerBundle.getLocation)\n-    PerspectiveFactory.updatePerspective\n-    if (System.getProperty(NO_DIAGNOSTICS) eq null)\n-        diagnostic.StartupDiagnostics.run\n   }\n \n   override def stop(context: BundleContext) = {\n', 'commit_subject': 'Run tests headless.', 'repo_name': 'scala-ide/scala-ide', 'committer': {'name': 'Iulian Dragos', 'email': '53fdba43521c8d2c2b4ff3a6f81e9f27ad86e7ac@gmail.com', 'time_sec': '1304945349', 'tz_offset': '120', 'date': {'seconds': '1304945349'}}, 'commit_tree': '63edf5ccf1d417547a9c26b40ba9d625ec361587', 'commit_message': 'Run tests headless.', 'language_name': 'R', 'license': 'bsd-3-clause', 'hunks': '@@ -34,7 +34,7 @@\n   </profiles>\n \n   <properties>\n-    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.nodiagnostics ${tycho.test.OSspecific}</tycho.test.jvmArgs>\n+    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.OSspecific}</tycho.test.jvmArgs>\n   </properties>\n \n   <dependencies>\n@@ -72,8 +72,8 @@\n         <artifactId>maven-osgi-test-plugin</artifactId>\n         <version>${tycho.version}</version>\n         <configuration>\n-          <useUIHarness>true</useUIHarness>\n-          <useUIThread>true</useUIThread> \n+          <useUIHarness>false</useUIHarness>\n+          <useUIThread>false</useUIThread> \n \n           <!-- Enable JDT weaving -->\n           <!-- <systemProperties combine.children="append"> -->\n', 'addition_count': 3, 'deletion_count': 3, 'src_file': 'a/org.scala-ide.sdt.core.tests/pom.xml', 'tgt_file': 'b/org.scala-ide.sdt.core.tests/pom.xml', 'file_extension': '.xml', 'before_file': '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.scala-ide</groupId>\n    <artifactId>org.scala-ide.sdt.build</artifactId>\n    <version>4.7.1-SNAPSHOT</version>\n    <relativePath>../org.scala-ide.sdt.build/pom.xml</relativePath>\n  </parent>\n  <artifactId>org.scala-ide.sdt.core.tests</artifactId>\n  <packaging>eclipse-test-plugin</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.mockito</groupId>\n      <artifactId>mockito-core</artifactId>\n    </dependency>\n    <dependency>\n      <!-- log4j without its dependencies -->\n      <groupId>log4j</groupId>\n      <artifactId>log4j</artifactId>\n      <scope>compile</scope>\n      <exclusions>\n        <exclusion>\n          <groupId>javax.mail</groupId>\n          <artifactId>mail</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>javax.jms</groupId>\n          <artifactId>jms</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>com.sun.jdmk</groupId>\n          <artifactId>jmxtools</artifactId>\n  </profiles>\n\n  <properties>\n    <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.nodiagnostics ${tycho.test.OSspecific}</tycho.test.jvmArgs>\n  </properties>\n\n  <dependencies>\n  </dependencies>\n\n  <profiles>\n    <profile>\n      <!-- profile used to run the memory test -->\n      <id>memory-test</id>\n      <dependencies>\n        <dependency>\n          <groupId>org.scala-lang</groupId>\n          <artifactId>scala-compiler</artifactId>\n          <version>${scala.version}</version>\n        </dependency>\n        <dependency>\n          <groupId>org.scala-lang</groupId>\n          <artifactId>scala-reflect</artifactId>\n          <version>${scala.version}</version>\n        </dependency>\n      </dependencies>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-dependency-plugin</artifactId>\n            <executions>\n              <!-- unpack the compiler sources -->\n              <execution>\n                <id>unpack</id>\n                <phase>initialize</phase>\n                <goals>\n                  <goal>unpack</goal>\n                </goals>\n        <artifactId>maven-osgi-test-plugin</artifactId>\n        <version>${tycho.version}</version>\n        <configuration>\n          <useUIHarness>true</useUIHarness>\n          <useUIThread>true</useUIThread> \n\n          <!-- Enable JDT weaving -->\n          <!-- <systemProperties combine.children="append"> -->\n                    </artifactItem>\n                    <artifactItem>\n                      <groupId>org.scala-lang</groupId>\n                      <artifactId>scala-reflect</artifactId>\n                      <classifier>sources</classifier>\n                      <outputDirectory>${basedir}/test-workspace/scala-compiler/src</outputDirectory>\n                      <includes>scala/</includes>\n                    </artifactItem>\n                  </artifactItems>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <!-- configuration of which test to run -->\n            <groupId>org.eclipse.tycho</groupId>\n            <artifactId>tycho-surefire-plugin</artifactId>\n            <configuration>\n              <redirectTestOutputToFile>true</redirectTestOutputToFile>\n              <testSuite>${project.artifactId}</testSuite>\n              <testClass>org.scalaide.core.leaks.MemoryLeaksTest</testClass>\n            </configuration>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n\n  <build>\n    <plugins>\n      <plugin>\n        <!-- automatically clean up the sources which are unpacked for the memory test -->\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-clean-plugin</artifactId>\n        <configuration>\n          <filesets>\n            <fileset>\n              <directory>./</directory>\n              <includes>\n                <include>test-workspace/scala-compiler/src/**/*</include>\n                <include>test-workspace/scala-compiler/src</include>\n              </includes>\n              <followSymlinks>false</followSymlinks>\n            </fileset>\n          </filesets>\n        </configuration>\n      </plugin>\n      <plugin>\n        <!-- force run the scala compiler projects before tycho compilation is run -->\n        <groupId>net.alchim31.maven</groupId>\n        <artifactId>scala-maven-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>process-resources</phase>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <!-- configuration of which test suite to run -->\n        <groupId>org.eclipse.tycho</groupId>\n        <artifactId>tycho-surefire-plugin</artifactId>\n        <configuration>\n          <redirectTestOutputToFile>true</redirectTestOutputToFile>\n          <testSuite>${project.artifactId}</testSuite>\n          <testClass>org.scalaide.TestsSuite</testClass>\n        </configuration>\n      </plugin>\n      <plugin>\n        <!-- copy the mockito jar, so it can be used in eclipse -->\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-dependency-plugin</artifactId>\n        <executions>\n        <execution>\n            <id>copy</id>\n            <phase>initialize</phase>\n            <goals>\n              <goal>copy</goal>\n            </goals>\n            <configuration>\n              <artifactItems>\n                <artifactItem>\n                  <groupId>org.mockito</groupId>\n                  <artifactId>mockito-all</artifactId>\n                  <outputDirectory>${project.build.directory}/lib</outputDirectory>\n                </artifactItem>\n                <artifactItem>\n                  <groupId>log4j</groupId>\n                  <artifactId>log4j</artifactId>\n                  <outputDirectory>${project.build.directory}/lib</outputDirectory>\n                </artifactItem>\n              </artifactItems>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n      <!-- Scalastyle -->\n      <plugin>\n        <groupId>org.scalastyle</groupId>\n        <artifactId>scalastyle-maven-plugin</artifactId>\n        <configuration>\n          <sourceDirectories>\n            <dir>src</dir>\n            <dir>test-workspace</dir>\n          </sourceDirectories>\n          <configLocation>../org.scala-ide.sdt.core/scala-ide-style-config.xml</configLocation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n\n', 'message': 'Run tests headless.', 'author_name': 'Iulian Dragos', 'lang': 'scala-ide'}