Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nharrand committed Jan 11, 2017
1 parent e0063f9 commit 6bddb50
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
9 changes: 9 additions & 0 deletions configurationFiles/commons-codec/fromlist.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project=../commons-codec
result=withFailure3/commons-codec/codec
jacoco=configurationFiles/commons-codec/jacoco.exec
javaVersion=6
nbRun=-1
timeOut=-1
runner=simple
transformation.type=fromlist
transformation.directory=transformationsToExplore/static_internal/commons-codec/0.json
1 change: 0 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<artifactId>java-uuid-generator</artifactId>
<version>3.1.3</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ public CodeFragment findCodeFragment(String position, String searchValue,
//Analyze only code fragments in the file of the one we are looking for
if (cfPos[0].equals(position)) {
int cfLine = Integer.parseInt(cfPos[1]);
if(codeFragment.getCtCodeFragment().toString().equals(searchValue) && cfLine == lineNumber) {
/*if(codeFragment.getCtCodeFragment().toString().equals(searchValue) && cfLine == lineNumber) {
//If it is of the same code and the same line: we found it!!
return codeFragment;
}
}*/
String ctValue = accesor.getValue(codeFragment);
if (ctValue.equals(searchValue) && cfLine == lineNumber) {
//If it is of the same code and the same line: we found it!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ protected void writeToJson() {
*/
public void write() {

System.out.println("Attempt to write in: " + outputPath);
writeToJson();

try {
FileWriter fw = new FileWriter(outputPath);
outputObject.write(fw);
fw.close();
} catch (IOException | JSONException e) {
throw new PersistenceException(UNABLE_WRITE_JSON_MSG + e.getMessage(), e);
throw new PersistenceException(UNABLE_WRITE_JSON_MSG + "\n" + e.getMessage(), e);
}
}
}
4 changes: 4 additions & 0 deletions main/src/main/java/fr/inria/diversify/DiversifyMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ public DiversifyMain(String propertiesFile) throws Exception, InvalidSdkExceptio
TransformationQuery query = initTransformationQuery();

int maxTransformationPerFile = Integer.parseInt(inputConfiguration.getProperty("maxTransformationPerFile", "100"));

File outputDir = new File("./" + inputConfiguration.getProperty("transformationsOutput", "transoformationOutput"));
if(!outputDir.exists()) outputDir.mkdirs();
JsonTransformationWriter writer = new JsonTransformationWriter();


int i = 0;
int j = 0;
List<Transformation> transformations = new ArrayList<>();
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>fr.inria.gforge.spoon</groupId>
<artifactId>spoon-core</artifactId>
<version>5.1.0</version>
<version>5.1.1</version>
<!--<version>5.1.1</version> -->
</dependency>

Expand Down

0 comments on commit 6bddb50

Please sign in to comment.