Commit 4b5522b3 authored by John Zhang's avatar John Zhang

Merge branch 'master-gitlab' into release-uncalibrated-9.13

parents ac7322d8 9c822376
......@@ -3,7 +3,7 @@ RELEASE PROCEDURES
0. Update and commit the release notes.
1. Determine a version number and optionally a nickname, specify that in dacapo.properties file
dacapo.version=9.13
dacapo.version=3.27
dacapo.nickname=uncalibrated
2. Make fresh git clone
......
......@@ -15,8 +15,8 @@ import org.dacapo.harness.Benchmark;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Avrora.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Avrora.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Avrora extends Benchmark {
......
......@@ -16,12 +16,6 @@
<property name="bm-src" value="${bm-name}-src-${bm-version}.zip"/>
<property name="bm-url" value="${apache.mirror}/xmlgraphics/batik/source"/>
<!--property name="bm-name" value="batik"/>
<property name="batik.major.version" value="1.7"/>
<property name="bm-version" value="${batik.major.version}"/>
<property name="bm-src" value="${bm-name}-src-${bm-version}.zip"/>
<property name="bm-url" value="${apache.dl.url}/xmlgraphics/batik"/-->
<import file="../common.xml"/>
<property name="batik-top" value="${bm-build-dir}/batik-${batik.major.version}"/>
......
......@@ -15,8 +15,8 @@ import org.dacapo.harness.Benchmark;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Batik.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Batik.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Batik extends Benchmark {
......
......@@ -16,8 +16,8 @@ import org.dacapo.harness.Benchmark;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Eclipse.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Eclipse.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Eclipse extends Benchmark {
......
......@@ -14,8 +14,8 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Activator.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Activator.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Activator extends Plugin {
......
......@@ -21,8 +21,8 @@ import org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceTests;
import org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceTypeHierarchyTests;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: BenchmarkRunner.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: BenchmarkRunner.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class BenchmarkRunner implements IApplication {
......
......@@ -29,8 +29,8 @@ import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: TestingEnvironment.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: TestingEnvironment.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class TestingEnvironment {
private boolean isOpen = false;
......
......@@ -30,8 +30,8 @@ import org.eclipse.jdt.core.search.TypeNameRequestor;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: AbstractJavaModelTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: AbstractJavaModelTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class AbstractJavaModelTests {
public static void waitForAutoBuild() {
......
......@@ -30,8 +30,8 @@ import org.eclipse.jdt.core.dom.*;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceASTTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceASTTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceASTTests extends FullSourceWorkspaceTests {
......
......@@ -37,8 +37,8 @@ import org.eclipse.jdt.core.JavaCore;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceBuildTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceBuildTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceBuildTests extends FullSourceWorkspaceTests {
......
......@@ -30,8 +30,8 @@ import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
* within eclipse-Automated-Tests-3.5.1.zip which is downloadable from the
* eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceCompleteSearchTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceCompleteSearchTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceCompleteSearchTests extends FullSourceWorkspaceSearchTests {
......
......@@ -26,8 +26,8 @@ import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
* within eclipse-Automated-Tests-3.5.1.zip which is downloadable from the
* eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceCompletionTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceCompletionTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceCompletionTests extends FullSourceWorkspaceTests {
......
......@@ -26,8 +26,8 @@ import org.eclipse.jdt.internal.formatter.DefaultCodeFormatter;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceFormatterTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceFormatterTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceFormatterTests extends FullSourceWorkspaceTests {
......
......@@ -31,8 +31,8 @@ import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceModelTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceModelTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceModelTests extends FullSourceWorkspaceTests {
public static void runDaCapoTests() {
......
......@@ -29,8 +29,8 @@ import org.eclipse.jdt.internal.core.search.processing.IJob;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceSearchTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceSearchTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceSearchTests extends FullSourceWorkspaceTests implements IJavaSearchConstants {
......
......@@ -45,8 +45,8 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public abstract class FullSourceWorkspaceTests {
......
......@@ -23,8 +23,8 @@ import org.eclipse.jdt.core.ICompilationUnit;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: FullSourceWorkspaceTypeHierarchyTests.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: FullSourceWorkspaceTypeHierarchyTests.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class FullSourceWorkspaceTypeHierarchyTests extends FullSourceWorkspaceTests {
......
......@@ -22,8 +22,8 @@ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
* eclipse-Automated-Tests-3.5.1.zip
* which can be downloaded from the eclipse web site
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: AbstractCompilerTest.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: AbstractCompilerTest.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class AbstractCompilerTest {
public static final int F_1_3 = 0x01;
......
......@@ -25,8 +25,8 @@ public class Util {
*
* Example of use: [org.eclipse.jdt.core.tests.util.Util.getJavaClassLib()]
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Util.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Util.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public static String[] getJavaClassLibs() {
// check bootclasspath properties for Sun, JRockit and Harmony VMs
......
......@@ -15,8 +15,8 @@ import org.dacapo.harness.Benchmark;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Fop.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Fop.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Fop extends Benchmark {
......
benchmark h2
class org.dacapo.harness.H2
thread-model per_cpu
jars "dacapo-h2.jar","derbyTesting.jar","junit-3.8.1.jar","h2-1.4.196.jar";
jars "dacapo-h2.jar","derbyTesting.jar","junit-4.12.jar","h2-1.4.196.jar";
size small args
"--total-transactions", "400",
......
......@@ -3,8 +3,8 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License v2.0
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: H2.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: H2.java 738 2009-12-24 00:19:36Z steveb-oss $
*******************************************************************************/
package org.dacapo.harness;
......
......@@ -56,8 +56,8 @@ import org.apache.derbyTesting.system.oe.model.Warehouse;
* The method <code>paymentById</code> is taken from the clas Standard and is
* modified to remove the call-back.
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Operation.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Operation.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public final class Operation extends Standard {
......
......@@ -43,8 +43,8 @@ import org.h2.tools.Restore;
import org.h2.tools.Script;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: TPCC.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: TPCC.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class TPCC {
public final static int RETRY_LIMIT = 5;
......
......@@ -25,8 +25,8 @@ import javax.sql.DataSource;
* Simple DataSource for providing a wrapped connection for the Derby TPC-C to
* populate the database.
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: TPCCDataSource.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: TPCCDataSource.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class TPCCDataSource implements DataSource {
......
......@@ -9,8 +9,8 @@
package org.dacapo.h2;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: TPCCReporter.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: TPCCReporter.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class TPCCReporter {
private int count = 0;
......
......@@ -30,8 +30,8 @@ import org.apache.derbyTesting.system.oe.util.OERandom;
* counting those transactions that succeed. Failed transactions are ignored and
* another transaction is tried. Based on Apache Derby implementation.
*
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: TPCCSubmitter.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: TPCCSubmitter.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class TPCCSubmitter extends Submitter {
// percentage of transactions that we will tolerate failing
......
......@@ -15,8 +15,8 @@ import org.dacapo.harness.Benchmark;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Jython.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Jython.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Jython extends Benchmark {
......
<project name="pybench" default="pybench" basedir="..">
<description>pybench benchmark, used by jython</description>
<property name="py-version" value="2.5.4"/>
<property name="py-url" value="http://www.python.org/ftp/python/${py-version}"/>
<property name="py-version" value="2.7"/>
<property name="py-url" value="https://www.python.org/ftp/python/${py-version}"/>
<property name="py-src" value="Python-${py-version}.tgz"/>
<target name="py-source">
......
......@@ -32,7 +32,7 @@
<target name="bm-build" depends="lucene">
<mkdir dir="${bm-build-dir}"/>
<javac srcdir="${bm-src-dir}" source="1.5"
<javac srcdir="${bm-src-dir}" source="1.8"
classpath="${harness-classpath}:${lucene-jars}/${lucene-core-jar-name}:${lucene-jars}/${lucene-demos-jar-name}"
destdir="${bm-build-dir}"
includes="org/dacapo/luindex/*" debug="true" debuglevel="lines,vars,source"/>
......
......@@ -16,8 +16,8 @@ import org.dacapo.harness.DacapoException;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Luindex.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Luindex.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Luindex extends Benchmark {
......
benchmark luindex
class org.dacapo.harness.Luindex
thread-model single
jars "dacapo-luindex.jar", "lucene-core-2.4.jar", "lucene-demos-2.4.jar";
jars "dacapo-luindex.jar", "lucene-core-7.1.0-SNAPSHOT.jar", "lucene-demo-7.1.0-SNAPSHOT.jar";
size small args "${SCRATCH}/luindex/william/poetry"
output stdout digest 0xebb11b9e1c56c6ef5620b890cca24ec773301388,
stderr digest 0xda39a3ee5e6b4b0d3255bfef95601890afd80709,
"index/segments.gen" bytes 20,
"index/segments_2" bytes 62;
"index/segments_1" bytes 136;
size default args "${SCRATCH}/luindex/william","${SCRATCH}/luindex/kjv"
output stdout digest 0xc90792fce1594b4b9ea1b01d593aefe801e6e58b,
stderr digest 0xda39a3ee5e6b4b0d3255bfef95601890afd80709,
"index/segments.gen" bytes 20,
"index/segments_2" bytes 62;
"index/segments_1" bytes 136;
description
short "A text indexing tool",
......@@ -22,6 +20,6 @@ description
author "Lucene Project Management Committee",
license "Apache License, Version 2.0",
url "http://lucene.apache.org/",
version "2.4.1",
version "7.1.0",
repeats "Single iteration indexes two multi-file documents",
threads "Externally single-threaded. Limited internal concurrency.";
......@@ -37,17 +37,26 @@ package org.dacapo.luindex;
*/
import java.io.File;
import java.nio.file.Paths;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;
import org.apache.lucene.document.DateTools;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.index.LogByteSizeMergePolicy;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.demo.FileDocument;
import org.apache.lucene.index.IndexWriterConfig;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: Index.java 738 2009-12-24 00:19:36Z steveb-oss $
* date: $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* id: $Id: Index.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class Index {
......@@ -61,7 +70,10 @@ public class Index {
* Index all text files under a directory.
*/
public void main(final File INDEX_DIR, final String[] args) throws IOException {
IndexWriter writer = new IndexWriter(INDEX_DIR, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
IndexWriterConfig IWConfig = new IndexWriterConfig();
IWConfig.setOpenMode (IndexWriterConfig.OpenMode.CREATE);
IWConfig.setMergePolicy (new LogByteSizeMergePolicy());
IndexWriter writer = new IndexWriter(FSDirectory.open(Paths.get(INDEX_DIR.getCanonicalPath())), IWConfig);
for (int arg = 0; arg < args.length; arg++) {
final File docDir = new File(args[arg]);
if (!docDir.exists() || !docDir.canRead()) {
......@@ -71,7 +83,7 @@ public class Index {
indexDocs(writer, docDir);
System.out.println("Optimizing...");
writer.optimize();
writer.forceMerge(1);
}
writer.close();
}
......@@ -102,7 +114,31 @@ public class Index {
} else {
System.out.println("adding " + file.getCanonicalPath().substring(scratchP));
try {
writer.addDocument(FileDocument.Document(file));
Document doc = new Document();
FieldType docFT = new FieldType();
docFT.setTokenized (false);
docFT.setStored (true);
docFT.setIndexOptions (IndexOptions.DOCS);
// Add the path of the file as a field named "path". Use a field that is
// indexed (i.e. searchable), but don't tokenize the field into words.
doc.add(new Field("path", file.getPath(), docFT));
// Add the last modified date of the file a field named "modified". Use
// a field that is indexed (i.e. searchable), but don't tokenize the field
// into words.
doc.add(new Field("modified",
DateTools.timeToString(file.lastModified(), DateTools.Resolution.MINUTE),
docFT));
// Add the contents of the file to a field named "contents". Specify a Reader,
// so that the text of the file is tokenized and indexed, but not stored.
// Note that FileReader expects the file to be in the system's default encoding.
// If that's not the case searching for special characters will fail.
docFT.setTokenized (true);
docFT.setStored (false);
doc.add(new Field("contents", new FileReader(file), docFT));
writer.addDocument(doc);
}
// at least on windows, some temporary files raise this exception with
// an "access denied" message
......
<!--
* Copyright (c) 2017 The Australian National University.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License v2.0.
* You may obtain the license at
*
* http://www.opensource.org/licenses/apache2.0.php
-->
<project name="lusearch-fix" default="all" basedir="../..">
<description>DaCapo lusearch-fix benchmark</description>
<property file="dacapo.properties"/>
<property name="bm-name" value="lusearch-fix"/>
<import file="../common.xml"/>
<target name="fix-operation">
<move file="libs/lucene/build.xml" tofile="libs/lucene/build-tmp.xml"/>
<copy file="libs/lucene/build-tmp.xml" tofile="libs/lucene/build.xml"/>
<touch file="libs/lucene/lucene.patch"/>
<patch patchfile="${bm-files}/lusearch-fix.patch" dir="${basedir}" strip="0" ignorewhitespace="yes"/>
</target>
<target name="bm-build" depends="fix-operation, lucene">
<mkdir dir="${bm-build-dir}"/>
<javac srcdir="${bm-src-dir}" source="1.5"
classpath="${harness-classpath}:${lucene-jars}/${lucene-core-jar-name}:${lucene-jars}/${lucene-demos-jar-name}"
destdir="${bm-build-dir}"
includes="org/dacapo/lusearchFix/*" debug="true" debuglevel="lines,vars,source"/>
<delete file="libs/lucene/build.xml"/>
<delete file="libs/lucene/lucene.patch"/>
<move file="libs/lucene/build-tmp.xml" tofile="libs/lucene/build.xml"/>
</target>
<target name="jar">
<jar destfile="${bm-jars}/dacapo-${bm-name}.jar" basedir="${bm-build-dir}"/>
</target>
<target name="copy-data">
<mkdir dir="${bm-data}/lusearchFix"/>
<copy todir="${bm-data}/lusearchFix">
<fileset dir="bms/lusearch/data/lusearch">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="data" depends="copy-data">
<zip basedir="${bm-data}" includes="**" destfile="${bm-dat}/${bm-name}.zip"/>
<delete dir="${bm-data}"/>
</target>
</project>
<HTML>
<HEAD>
<TITLE>DaCapo Benchmarks: Avrora</TITLE>
<META HTTP-EQUIV="Description" NAME="DaCapo Benchmark: Avrora"
CONTENT="The DaCapo Benchmark: Avrora.">
<META HTTP-EQUIV="Keywords" NAME="Keywords"
CONTENT="dacapo benchmarks performance java lusearch">
<LINK REL="stylesheet" TYPE="text/css" HREF="../dacapo.css"/>
</HEAD>
<BODY>
<CENTER><H3>lusearch</H3></CENTER>
<H4>Description:</H4>
<H4>Characteristics:</H4>
<H4>References:</H4>
<H4>Harness:</H4>
<A HREF="index.html" TARGET="_top">Javadoc for lusearch harness.</A>
</BODY>
</HTML>
/*
* Copyright (c) 2005, 2009 The Australian National University.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License v2.0.
* You may obtain the license at
*
* http://www.opensource.org/licenses/apache2.0.php
*/
package org.dacapo.harness;
import java.io.File;
import java.lang.reflect.Constructor;
import org.dacapo.parser.Config;
/**
* @date $Date: 2009-12-24 11:19:36 +1100 (Thu, 24 Dec 2009) $
* @id $Id: LusearchFix.java 738 2009-12-24 00:19:36Z steveb-oss $
*/
public class LusearchFix extends org.dacapo.harness.Benchmark {
private final Object benchmark;
public LusearchFix(Config config, File scratch) throws Exception {
super(config, scratch, false);
Class<?> clazz = Class.forName("org.dacapo.lusearchFix.Search", true, loader);
this.method = clazz.getMethod("main", String[].class);
Constructor<?> cons = clazz.getConstructor();
useBenchmarkClassLoader();
try {
benchmark = cons.newInstance();
} finally {
revertClassLoader();
}
}
@Override
public void iterate(String size) throws Exception {
method.invoke(benchmark, (Object) (config.preprocessArgs(size, scratch)));
}
}
This diff is collapsed.
--- libs/lucene/build.xml 2017-12-15 17:21:59.294405463 +1100
+++ bms/lusearch-fix/build-cmp.xml 2017-12-15 17:29:27.945796046 +1100
@@ -20,7 +20,10 @@
<property name="lib-build-top" value="${lib-build-dir}/lucene-${lib-version}"/>
- <target name="unpack" depends="untar"/>
+ <target name="unpack" depends="untar">
+ <patch patchfile="libs/${lib-name}/${lib-name}.patch" dir="${lib-build-dir}/lucene-${lib-version}" strip="0" ignorewhitespace="yes"/>
+ </target>
+
<target name="build">
<ant antfile="build.xml" target="jar-core" dir="${lib-build-top}" inheritall="false"/>
--- libs/lucene/lucene.patch 2017-12-15 17:54:32.680162962 +1100
+++ bms/lusearch-fix/lucene.patch 2017-12-15 17:54:28.000000000 +1100
@@ -0,0 +1,19 @@
+--- src/java/org/apache/lucene/queryParser/QueryParser.java 2009-03-03 04:10:43.000000000 +1100
++++ ../../QueryParser.java 2017-12-15 17:47:20.165965512 +1100
+@@ -506,8 +506,15 @@
+ protected Query getFieldQuery(String field, String queryText) throws ParseException {
+ // Use the analyzer to get all the tokens, and then build a TermQuery,
+ // PhraseQuery, or nothing based on the term count
++ // TokenStream source = analyzer.tokenStream(field, new StringReader(queryText));\
++ TokenStream source;
++ try {
++ source = analyzer.reusableTokenStream(field, new StringReader(queryText));
++ source.reset();
++ } catch (IOException e) {
++ source = analyzer.tokenStream(field, new StringReader(queryText));
++ }
+
+- TokenStream source = analyzer.tokenStream(field, new StringReader(queryText));
+ List list = new ArrayList();
+ final org.apache.lucene.analysis.Token reusableToken = new org.apache.lucene.analysis.Token();
+ org.apache.lucene.analysis.Token nextToken;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with