Skip to content

Commit 243a698

Browse files
committed
Bug fix
1 parent 51a45fd commit 243a698

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

swan_core/src/de/fraunhofer/iem/swan/Writer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ public void printResultsJSON(Set<Method> methods, String outputFile) throws IOEx
122122

123123
Map<Category, Integer> counters = new HashMap<Category, Integer>();
124124

125-
126125
File file = new File(outputFile.substring(0, outputFile.lastIndexOf(File.separator)));
127126
if (!file.exists())
128127
file.mkdir();
@@ -138,7 +137,7 @@ public void printResultsJSON(Set<Method> methods, String outputFile) throws IOEx
138137
for (Method method : methods) {
139138

140139
JSONObject obj = new JSONObject();
141-
if (method.getCategoriesTrained().isEmpty())
140+
if (method.getCategoriesClassified().isEmpty())
142141
continue;
143142

144143
obj.put(Constants.NAME, method.getClassName() + "." + method.getMethodName());
@@ -184,7 +183,7 @@ public void printResultsJSON(Set<Method> methods, String outputFile) throws IOEx
184183
JSONArray types = new JSONArray();
185184
JSONArray cwes = new JSONArray();
186185

187-
for (Category category : method.getCategoriesTrained()) {
186+
for (Category category : method.getCategoriesClassified()) {
188187

189188
if (category.isCwe())
190189
cwes.add(category.toString());

0 commit comments

Comments
 (0)