|
1
|
|
package org.europa.together.application; |
|
2
|
|
|
|
3
|
|
import java.awt.Graphics; |
|
4
|
|
import java.awt.image.BufferedImage; |
|
5
|
|
import java.awt.image.DataBuffer; |
|
6
|
|
import java.io.File; |
|
7
|
|
import java.util.ArrayList; |
|
8
|
|
import java.util.List; |
|
9
|
|
import javax.imageio.ImageIO; |
|
10
|
|
import org.apache.commons.imaging.ImageFormat; |
|
11
|
|
import org.apache.commons.imaging.Imaging; |
|
12
|
|
import org.apache.commons.imaging.common.ImageMetadata; |
|
13
|
|
import org.apache.commons.imaging.common.ImageMetadata.ImageMetadataItem; |
|
14
|
|
import org.europa.together.business.ImageProcessor; |
|
15
|
|
import org.europa.together.business.Logger; |
|
16
|
|
import org.europa.together.domain.LogLevel; |
|
17
|
|
import org.europa.together.exceptions.MisconfigurationException; |
|
18
|
|
import org.imgscalr.Scalr; |
|
19
|
|
import org.springframework.stereotype.Repository; |
|
20
|
|
|
|
21
|
|
/** |
|
22
|
|
* Implementation of a simple image processor. |
|
23
|
|
*/ |
|
24
|
|
@Repository |
|
25
|
|
public class ImgSclrProcessor implements ImageProcessor { |
|
26
|
|
|
|
27
|
|
private static final long serialVersionUID = 12L; |
|
28
|
|
private static final Logger LOGGER = new LogbackLogger(ImgSclrProcessor.class); |
|
29
|
|
|
|
30
|
|
private static final long MULTIPLIER = 4L; |
|
31
|
|
private static final int DIVISOR = 100; |
|
32
|
|
private BufferedImage image = null; |
|
33
|
|
private ImageMetadata metadata = null; |
|
34
|
|
private String fileName = null; |
|
35
|
|
private String fileExtension = null; |
|
36
|
|
private int height = 0; |
|
37
|
|
private int width = 0; |
|
38
|
|
|
|
39
|
|
/** |
|
40
|
|
* Constructor. |
|
41
|
|
*/ |
|
42
|
|
public ImgSclrProcessor() { |
|
43
|
|
LOGGER.log("instance class", LogLevel.INFO); |
|
44
|
|
} |
|
45
|
|
|
|
46
|
|
@Override |
|
47
|
|
public boolean loadImage(final BufferedImage image) { |
|
48
|
|
boolean success = false; |
|
49
|
1
1. loadImage : negated conditional → SURVIVED
|
if (isImageSet()) { |
|
50
|
1
1. loadImage : removed call to org/europa/together/application/ImgSclrProcessor::clearImage → SURVIVED
|
this.clearImage(); |
|
51
|
|
} |
|
52
|
1
1. loadImage : negated conditional → KILLED
|
if (image != null) { |
|
53
|
|
this.image = copyImage(image); |
|
54
|
|
this.height = image.getHeight(); |
|
55
|
|
this.width = image.getWidth(); |
|
56
|
|
success = true; |
|
57
|
|
} |
|
58
|
2
1. loadImage : replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
2. loadImage : replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
|
return success; |
|
59
|
|
} |
|
60
|
|
|
|
61
|
|
@Override |
|
62
|
|
public boolean loadImage(final File imageFile) { |
|
63
|
|
boolean success = false; |
|
64
|
1
1. loadImage : negated conditional → SURVIVED
|
if (isImageSet()) { |
|
65
|
1
1. loadImage : removed call to org/europa/together/application/ImgSclrProcessor::clearImage → SURVIVED
|
this.clearImage(); |
|
66
|
|
} |
|
67
|
|
try { |
|
68
|
|
this.image = Imaging.getBufferedImage(imageFile); |
|
69
|
|
this.metadata = Imaging.getMetadata(imageFile); |
|
70
|
|
this.fileName = imageFile.getName(); |
|
71
|
|
this.height = image.getHeight(); |
|
72
|
|
this.width = image.getWidth(); |
|
73
|
|
LOGGER.log("Load Image: " + this.fileName, LogLevel.DEBUG); |
|
74
|
|
ImageFormat format = Imaging.guessFormat(imageFile); |
|
75
|
|
this.fileExtension = format.getDefaultExtension(); |
|
76
|
|
LOGGER.log("Extension: " + this.fileExtension, LogLevel.DEBUG); |
|
77
|
|
success = true; |
|
78
|
|
} catch (Exception ex) { |
|
79
|
|
LOGGER.catchException(ex); |
|
80
|
|
} |
|
81
|
2
1. loadImage : replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
2. loadImage : replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
|
return success; |
|
82
|
|
} |
|
83
|
|
|
|
84
|
|
@Override |
|
85
|
|
public boolean saveImage(final BufferedImage renderedImage, final File file, |
|
86
|
|
final String format) throws MisconfigurationException { |
|
87
|
|
boolean success = false; |
|
88
|
1
1. saveImage : negated conditional → KILLED
|
if (!isFormatAccepted(format)) { |
|
89
|
|
throw new MisconfigurationException(format + " is not supported."); |
|
90
|
|
} |
|
91
|
|
try { |
|
92
|
1
1. saveImage : negated conditional → SURVIVED
|
if (format.equalsIgnoreCase("png")) { |
|
93
|
|
ImageIO.write(renderedImage, "PNG", file); |
|
94
|
|
} |
|
95
|
1
1. saveImage : negated conditional → SURVIVED
|
if (format.equalsIgnoreCase("gif")) { |
|
96
|
|
ImageIO.write(renderedImage, "GIF", file); |
|
97
|
|
} |
|
98
|
1
1. saveImage : negated conditional → KILLED
|
if (format.equalsIgnoreCase("jpg")) { |
|
99
|
|
int w = renderedImage.getWidth(); |
|
100
|
|
int h = renderedImage.getHeight(); |
|
101
|
|
BufferedImage newImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); |
|
102
|
|
int[] rgb = renderedImage.getRGB(0, 0, w, h, null, 0, w); |
|
103
|
1
1. saveImage : removed call to java/awt/image/BufferedImage::setRGB → SURVIVED
|
newImage.setRGB(0, 0, w, h, rgb, 0, w); |
|
104
|
|
ImageIO.write(newImage, "JPG", file); |
|
105
|
|
} |
|
106
|
|
success = true; |
|
107
|
|
String msg = "Image " + this.fileName + " successful to: " |
|
108
|
|
+ file.getPath() + " saved."; |
|
109
|
|
LOGGER.log(msg, LogLevel.DEBUG); |
|
110
|
|
} catch (Exception ex) { |
|
111
|
|
LOGGER.catchException(ex); |
|
112
|
|
} |
|
113
|
2
1. saveImage : replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::saveImage → KILLED
2. saveImage : replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::saveImage → KILLED
|
return success; |
|
114
|
|
} |
|
115
|
|
|
|
116
|
|
@Override |
|
117
|
|
public long getImageSize(final BufferedImage image) { |
|
118
|
|
long size = 0; |
|
119
|
1
1. getImageSize : negated conditional → KILLED
|
if (image != null) { |
|
120
|
|
DataBuffer dataBuffer = image.getData().getDataBuffer(); |
|
121
|
1
1. getImageSize : Replaced long multiplication with division → KILLED
|
size = ((long) dataBuffer.getSize()) * MULTIPLIER; |
|
122
|
|
} |
|
123
|
1
1. getImageSize : replaced long return with 0 for org/europa/together/application/ImgSclrProcessor::getImageSize → KILLED
|
return size; |
|
124
|
|
} |
|
125
|
|
|
|
126
|
|
@Override |
|
127
|
|
public int getHeight() { |
|
128
|
1
1. getHeight : replaced int return with 0 for org/europa/together/application/ImgSclrProcessor::getHeight → KILLED
|
return this.height; |
|
129
|
|
} |
|
130
|
|
|
|
131
|
|
@Override |
|
132
|
|
public int getWidth() { |
|
133
|
1
1. getWidth : replaced int return with 0 for org/europa/together/application/ImgSclrProcessor::getWidth → KILLED
|
return this.width; |
|
134
|
|
} |
|
135
|
|
|
|
136
|
|
@Override |
|
137
|
|
public void clearImage() { |
|
138
|
|
this.image = null; |
|
139
|
|
this.metadata = null; |
|
140
|
|
this.fileName = null; |
|
141
|
|
this.fileExtension = null; |
|
142
|
|
this.height = 0; |
|
143
|
|
this.width = 0; |
|
144
|
|
LOGGER.log("Loaded image reset.", LogLevel.TRACE); |
|
145
|
|
} |
|
146
|
|
|
|
147
|
|
@Override |
|
148
|
|
public BufferedImage crop(final int x, final int y, final int height, final int width) |
|
149
|
|
throws MisconfigurationException { |
|
150
|
|
BufferedImage renderedImg; |
|
151
|
|
try { |
|
152
|
|
renderedImg = Scalr.crop(this.image, x, y, width, height); |
|
153
|
|
|
|
154
|
|
} catch (Exception ex) { |
|
155
|
|
LOGGER.catchException(ex); |
|
156
|
|
throw new MisconfigurationException(ex.getMessage()); |
|
157
|
|
} |
|
158
|
1
1. crop : replaced return value with null for org/europa/together/application/ImgSclrProcessor::crop → KILLED
|
return renderedImg; |
|
159
|
|
} |
|
160
|
|
|
|
161
|
|
@Override |
|
162
|
|
public BufferedImage flipHorizontal() throws MisconfigurationException { |
|
163
|
|
BufferedImage renderdImg; |
|
164
|
|
try { |
|
165
|
|
renderdImg = Scalr.rotate(this.image, Scalr.Rotation.FLIP_HORZ); |
|
166
|
|
} catch (Exception ex) { |
|
167
|
|
LOGGER.catchException(ex); |
|
168
|
|
throw new MisconfigurationException(ex.getMessage()); |
|
169
|
|
} |
|
170
|
1
1. flipHorizontal : replaced return value with null for org/europa/together/application/ImgSclrProcessor::flipHorizontal → KILLED
|
return renderdImg; |
|
171
|
|
} |
|
172
|
|
|
|
173
|
|
@Override |
|
174
|
|
public BufferedImage flipVertical() throws MisconfigurationException { |
|
175
|
|
BufferedImage renderdImg; |
|
176
|
|
try { |
|
177
|
|
renderdImg = Scalr.rotate(this.image, Scalr.Rotation.FLIP_VERT); |
|
178
|
|
} catch (Exception ex) { |
|
179
|
|
LOGGER.catchException(ex); |
|
180
|
|
throw new MisconfigurationException(ex.getMessage()); |
|
181
|
|
} |
|
182
|
1
1. flipVertical : replaced return value with null for org/europa/together/application/ImgSclrProcessor::flipVertical → KILLED
|
return renderdImg; |
|
183
|
|
} |
|
184
|
|
|
|
185
|
|
@Override |
|
186
|
|
public BufferedImage getImage() { |
|
187
|
1
1. getImage : replaced return value with null for org/europa/together/application/ImgSclrProcessor::getImage → KILLED
|
return copyImage(this.image); |
|
188
|
|
} |
|
189
|
|
|
|
190
|
|
@Override |
|
191
|
|
public BufferedImage resize(final int percentage) throws MisconfigurationException { |
|
192
|
|
BufferedImage renderdImg; |
|
193
|
2
1. resize : changed conditional boundary → SURVIVED
2. resize : negated conditional → KILLED
|
if (percentage < 1) { |
|
194
|
|
throw new MisconfigurationException( |
|
195
|
|
"The size of the new Image have to have minimum 1%."); |
|
196
|
|
} else { |
|
197
|
|
try { |
|
198
|
2
1. resize : Replaced integer division with multiplication → SURVIVED
2. resize : Replaced integer multiplication with division → KILLED
|
int newHeight = (this.height * percentage) / DIVISOR; |
|
199
|
2
1. resize : Replaced integer division with multiplication → SURVIVED
2. resize : Replaced integer multiplication with division → KILLED
|
int newWidth = (this.width * percentage) / DIVISOR; |
|
200
|
|
String msg = "Image " + this.fileName + " resize (" + percentage + "%)" |
|
201
|
|
+ " to height:" + newHeight |
|
202
|
|
+ " width:" + newWidth; |
|
203
|
|
LOGGER.log(msg, LogLevel.DEBUG); |
|
204
|
|
|
|
205
|
|
renderdImg = Scalr.resize(this.image, newWidth, newHeight); |
|
206
|
|
|
|
207
|
|
} catch (Exception ex) { |
|
208
|
|
LOGGER.catchException(ex); |
|
209
|
|
throw new MisconfigurationException(ex.getMessage()); |
|
210
|
|
} |
|
211
|
|
} |
|
212
|
1
1. resize : replaced return value with null for org/europa/together/application/ImgSclrProcessor::resize → KILLED
|
return renderdImg; |
|
213
|
|
} |
|
214
|
|
|
|
215
|
|
@Override |
|
216
|
|
public BufferedImage rotateRight() throws MisconfigurationException { |
|
217
|
|
BufferedImage renderedImg; |
|
218
|
|
try { |
|
219
|
|
renderedImg = Scalr.rotate(this.image, Scalr.Rotation.CW_90); |
|
220
|
|
} catch (Exception ex) { |
|
221
|
|
LOGGER.catchException(ex); |
|
222
|
|
throw new MisconfigurationException(ex.getMessage()); |
|
223
|
|
} |
|
224
|
1
1. rotateRight : replaced return value with null for org/europa/together/application/ImgSclrProcessor::rotateRight → KILLED
|
return renderedImg; |
|
225
|
|
} |
|
226
|
|
|
|
227
|
|
@Override |
|
228
|
|
public List<ImageMetadataItem> getMetaData() { |
|
229
|
|
List<ImageMetadataItem> collection = new ArrayList<>(); |
|
230
|
1
1. getMetaData : negated conditional → KILLED
|
if (this.metadata != null) { |
|
231
|
|
collection.addAll(metadata.getItems()); |
|
232
|
|
} |
|
233
|
1
1. getMetaData : replaced return value with Collections.emptyList for org/europa/together/application/ImgSclrProcessor::getMetaData → KILLED
|
return collection; |
|
234
|
|
} |
|
235
|
|
|
|
236
|
|
@Override |
|
237
|
|
public String toString() { |
|
238
|
|
StringBuilder out = new StringBuilder(); |
|
239
|
|
List<ImageMetadataItem> metaList = new ArrayList<>(); |
|
240
|
|
metaList.addAll(getMetaData()); |
|
241
|
|
|
|
242
|
1
1. toString : negated conditional → KILLED
|
if (!metaList.isEmpty()) { |
|
243
|
|
for (final ImageMetadataItem item : metaList) { |
|
244
|
|
out.append("\n\t" + item); |
|
245
|
|
} |
|
246
|
|
} else { |
|
247
|
|
out.append("No meta data from " + fileName + " extracted."); |
|
248
|
|
} |
|
249
|
1
1. toString : replaced return value with "" for org/europa/together/application/ImgSclrProcessor::toString → KILLED
|
return out.toString(); |
|
250
|
|
} |
|
251
|
|
|
|
252
|
|
@Override //make private |
|
253
|
|
public boolean isImageSet() { |
|
254
|
|
boolean success = false; |
|
255
|
1
1. isImageSet : negated conditional → KILLED
|
if (this.image != null) { |
|
256
|
|
success = true; |
|
257
|
|
} |
|
258
|
2
1. isImageSet : replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::isImageSet → KILLED
2. isImageSet : replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::isImageSet → KILLED
|
return success; |
|
259
|
|
} |
|
260
|
|
|
|
261
|
|
@Override |
|
262
|
|
public BufferedImage copyImage(final BufferedImage source) { |
|
263
|
|
BufferedImage grapic = new BufferedImage(source.getWidth(), |
|
264
|
|
source.getHeight(), source.getType()); |
|
265
|
|
Graphics graphics = grapic.getGraphics(); |
|
266
|
|
graphics.drawImage(source, 0, 0, null); |
|
267
|
1
1. copyImage : removed call to java/awt/Graphics::dispose → SURVIVED
|
graphics.dispose(); |
|
268
|
1
1. copyImage : replaced return value with null for org/europa/together/application/ImgSclrProcessor::copyImage → KILLED
|
return grapic; |
|
269
|
|
} |
|
270
|
|
|
|
271
|
|
private boolean isFormatAccepted(final String imageFormat) { |
|
272
|
|
boolean accept = false; |
|
273
|
1
1. isFormatAccepted : negated conditional → KILLED
|
if (imageFormat.equalsIgnoreCase("jpg") |
|
274
|
1
1. isFormatAccepted : negated conditional → KILLED
|
|| imageFormat.equalsIgnoreCase("jpeg") |
|
275
|
1
1. isFormatAccepted : negated conditional → KILLED
|
|| imageFormat.equalsIgnoreCase("png") |
|
276
|
1
1. isFormatAccepted : negated conditional → KILLED
|
|| imageFormat.equalsIgnoreCase("gif")) { |
|
277
|
|
accept = true; |
|
278
|
|
} |
|
279
|
2
1. isFormatAccepted : replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::isFormatAccepted → KILLED
2. isFormatAccepted : replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::isFormatAccepted → KILLED
|
return accept; |
|
280
|
|
} |
|
281
|
|
} |
| | Mutations |
| 49 |
|
1.1 Location : loadImage Killed by : none negated conditional → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failLoadImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsBufferedImage()]
|
| 50 |
|
1.1 Location : loadImage Killed by : none removed call to org/europa/together/application/ImgSclrProcessor::clearImage → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsBufferedImage()]
|
| 52 |
|
1.1 Location : loadImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failLoadImage()] negated conditional → KILLED
|
| 58 |
|
1.1 Location : loadImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsBufferedImage()] replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
2.2 Location : loadImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failLoadImage()] replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
|
| 64 |
|
1.1 Location : loadImage Killed by : none negated conditional → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failLoadImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageDimensions()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:reset()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResizeImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCropImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:generateToStringWhitoutMetaData()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageWrongType()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsBufferedImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsFile()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpeg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:cropImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipVertical()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageRotate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipHorizontal()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsPng()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsGif()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:generateToString()]
|
| 65 |
|
1.1 Location : loadImage Killed by : none removed call to org/europa/together/application/ImgSclrProcessor::clearImage → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsFile()]
|
| 81 |
|
1.1 Location : loadImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
2.2 Location : loadImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::loadImage → KILLED
|
| 88 |
|
1.1 Location : saveImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()] negated conditional → KILLED
|
| 92 |
|
1.1 Location : saveImage Killed by : none negated conditional → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpeg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:cropImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipVertical()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageRotate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipHorizontal()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsPng()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsGif()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
|
| 95 |
|
1.1 Location : saveImage Killed by : none negated conditional → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpeg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:cropImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipVertical()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageRotate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipHorizontal()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsPng()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsGif()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
|
| 98 |
|
1.1 Location : saveImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()] negated conditional → KILLED
|
| 103 |
|
1.1 Location : saveImage Killed by : none removed call to java/awt/image/BufferedImage::setRGB → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpg()]
|
| 113 |
|
1.1 Location : saveImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()] replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::saveImage → KILLED
2.2 Location : saveImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpeg()] replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::saveImage → KILLED
|
| 119 |
|
1.1 Location : getImageSize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:calculateImageSize()] negated conditional → KILLED
|
| 121 |
|
1.1 Location : getImageSize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()] Replaced long multiplication with division → KILLED
|
| 123 |
|
1.1 Location : getImageSize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()] replaced long return with 0 for org/europa/together/application/ImgSclrProcessor::getImageSize → KILLED
|
| 128 |
|
1.1 Location : getHeight Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced int return with 0 for org/europa/together/application/ImgSclrProcessor::getHeight → KILLED
|
| 133 |
|
1.1 Location : getWidth Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageDimensions()] replaced int return with 0 for org/europa/together/application/ImgSclrProcessor::getWidth → KILLED
|
| 158 |
|
1.1 Location : crop Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:cropImage()] replaced return value with null for org/europa/together/application/ImgSclrProcessor::crop → KILLED
|
| 170 |
|
1.1 Location : flipHorizontal Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageFlipHorizontal()] replaced return value with null for org/europa/together/application/ImgSclrProcessor::flipHorizontal → KILLED
|
| 182 |
|
1.1 Location : flipVertical Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced return value with null for org/europa/together/application/ImgSclrProcessor::flipVertical → KILLED
|
| 187 |
|
1.1 Location : getImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()] replaced return value with null for org/europa/together/application/ImgSclrProcessor::getImage → KILLED
|
| 193 |
|
1.1 Location : resize Killed by : none changed conditional boundary → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResize()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResizeImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
2.2 Location : resize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResizeImage()] negated conditional → KILLED
|
| 198 |
|
1.1 Location : resize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()] Replaced integer multiplication with division → KILLED
2.2 Location : resize Killed by : none Replaced integer division with multiplication → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResize()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
|
| 199 |
|
1.1 Location : resize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] Replaced integer multiplication with division → KILLED
2.2 Location : resize Killed by : none Replaced integer division with multiplication → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failResize()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageNoEffect()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageInflate()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
|
| 212 |
|
1.1 Location : resize Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced return value with null for org/europa/together/application/ImgSclrProcessor::resize → KILLED
|
| 224 |
|
1.1 Location : rotateRight Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:imageRotate()] replaced return value with null for org/europa/together/application/ImgSclrProcessor::rotateRight → KILLED
|
| 230 |
|
1.1 Location : getMetaData Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:generateToStringWhitoutMetaData()] negated conditional → KILLED
|
| 233 |
|
1.1 Location : getMetaData Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:generateToString()] replaced return value with Collections.emptyList for org/europa/together/application/ImgSclrProcessor::getMetaData → KILLED
|
| 242 |
|
1.1 Location : toString Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:generateToStringWhitoutMetaData()] negated conditional → KILLED
|
| 249 |
|
1.1 Location : toString Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced return value with "" for org/europa/together/application/ImgSclrProcessor::toString → KILLED
|
| 255 |
|
1.1 Location : isImageSet Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] negated conditional → KILLED
|
| 258 |
|
1.1 Location : isImageSet Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:reset()] replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::isImageSet → KILLED
2.2 Location : isImageSet Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:reset()] replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::isImageSet → KILLED
|
| 267 |
|
1.1 Location : copyImage Killed by : none removed call to java/awt/Graphics::dispose → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageWrongType()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:loadImageAsBufferedImage()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpeg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsPng()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsJpg()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageAsGif()]
|
| 268 |
|
1.1 Location : copyImage Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failCalculateImageSize()] replaced return value with null for org/europa/together/application/ImgSclrProcessor::copyImage → KILLED
|
| 273 |
|
1.1 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:failSaveImage()] negated conditional → KILLED
|
| 274 |
|
1.1 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] negated conditional → KILLED
|
| 275 |
|
1.1 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageWrongType()] negated conditional → KILLED
|
| 276 |
|
1.1 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageWrongType()] negated conditional → KILLED
|
| 279 |
|
1.1 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest] replaced boolean return with false for org/europa/together/application/ImgSclrProcessor::isFormatAccepted → KILLED
2.2 Location : isFormatAccepted Killed by : org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:saveImageWrongType()] replaced boolean return with true for org/europa/together/application/ImgSclrProcessor::isFormatAccepted → KILLED
|