[86] | 1 | // Copyright 2015 Georg-August-Universität Göttingen, Germany
|
---|
[41] | 2 | //
|
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
---|
| 4 | // you may not use this file except in compliance with the License.
|
---|
| 5 | // You may obtain a copy of the License at
|
---|
| 6 | //
|
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 8 | //
|
---|
| 9 | // Unless required by applicable law or agreed to in writing, software
|
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS,
|
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
| 12 | // See the License for the specific language governing permissions and
|
---|
| 13 | // limitations under the License.
|
---|
| 14 |
|
---|
[32] | 15 | package de.ugoe.cs.cpdp.execution;
|
---|
[2] | 16 |
|
---|
[32] | 17 | import de.ugoe.cs.cpdp.ExperimentConfiguration;
|
---|
[2] | 18 | import de.ugoe.cs.cpdp.versions.SoftwareVersion;
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
[67] | 21 | * <p>
|
---|
| 22 | * Implements a cross project experiment where all versions not from the same project are used.
|
---|
| 23 | * </p>
|
---|
[2] | 24 | *
|
---|
| 25 | * @author Steffen Herbold
|
---|
| 26 | */
|
---|
[67] | 27 | public class CrossProjectExperiment extends AbstractCrossProjectExperiment {
|
---|
[2] | 28 |
|
---|
[41] | 29 | /**
|
---|
| 30 | * Constructor. Creates a new experiment based on a configuration.
|
---|
| 31 | *
|
---|
| 32 | * @param config
|
---|
| 33 | * configuration of the experiment
|
---|
| 34 | */
|
---|
| 35 | public CrossProjectExperiment(ExperimentConfiguration config) {
|
---|
[67] | 36 | super(config);
|
---|
[41] | 37 | }
|
---|
| 38 |
|
---|
[67] | 39 | /*
|
---|
| 40 | * (non-Javadoc)
|
---|
[41] | 41 | *
|
---|
[67] | 42 | * @see
|
---|
| 43 | * de.ugoe.cs.cpdp.execution.AbstractCrossProjectExperiment#isTrainingVersion(de.ugoe.cs.cpdp.
|
---|
| 44 | * versions.SoftwareVersion, de.ugoe.cs.cpdp.versions.SoftwareVersion)
|
---|
[41] | 45 | */
|
---|
| 46 | @Override
|
---|
[67] | 47 | protected boolean isTrainingVersion(SoftwareVersion trainingVersion,
|
---|
| 48 | SoftwareVersion testVersion)
|
---|
| 49 | {
|
---|
| 50 | return !trainingVersion.getProject().equals(testVersion.getProject());
|
---|
[41] | 51 | }
|
---|
[2] | 52 | }
|
---|