-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved progpedia data into a zip file.
- Loading branch information
1 parent
659e7c7
commit 7774c0c
Showing
211 changed files
with
126 additions
and
168,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
endtoend-testing/src/main/java/de/jplag/endtoend/helper/UnzipManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package de.jplag.endtoend.helper; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import de.jplag.endtoend.model.DataSet; | ||
|
||
public class UnzipManager { | ||
private final Map<DataSet, File> unzippedFiles; | ||
private static UnzipManager instance; | ||
|
||
private static UnzipManager getInstance() { | ||
if (instance == null) { | ||
synchronized (UnzipManager.class) { | ||
if (instance == null) { | ||
instance = new UnzipManager(); | ||
} | ||
} | ||
} | ||
|
||
return instance; | ||
} | ||
|
||
public static File unzipOrCache(DataSet dataSet, File zip) throws IOException { | ||
return getInstance().unzipOrCacheInternal(dataSet, zip); | ||
} | ||
|
||
private UnzipManager() { | ||
this.unzippedFiles = new HashMap<>(); | ||
} | ||
|
||
private File unzipOrCacheInternal(DataSet dataSet, File zip) throws IOException { | ||
if (!unzippedFiles.containsKey(dataSet)) { | ||
File target = Files.createTempDirectory(zip.getName()).toFile(); | ||
FileHelper.unzip(zip, target); | ||
this.unzippedFiles.put(dataSet, target); | ||
} | ||
|
||
return this.unzippedFiles.get(dataSet); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
endtoend-testing/src/main/java/de/jplag/endtoend/model/StorageFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package de.jplag.endtoend.model; | ||
|
||
public enum StorageFormat { | ||
DIRECTORY, | ||
ZIP | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
74 changes: 0 additions & 74 deletions
74
endtoend-testing/src/test/resources/data/progpedia/ACCEPTED/00000_00001/pa.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.