File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartUtilities.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartUtilities.java | |||
Method name: void writeChartAsJPEG(OutputStream, JFreeChart, int, int, ChartRenderingInfo)
|
Method name: void writeChartAsJPEG(OutputStream, float, JFreeChart, int, int, ChartRenderingInfo)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (chart == null) {↵ | 1 | if (chart == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'chart' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'chart' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | BufferedImage image = chart.createBufferedImage(width, height, ↵ | 4 | BufferedImage image = chart.createBufferedImage(width, height, ↵ | |
5 | BufferedImage.TYPE_INT_RGB, info);↵ | 5 | BufferedImage.TYPE_INT_RGB, info);↵ | |
6 | EncoderUtil.writeBufferedImage(image, ImageFormat.JPEG, out); | 6 | EncoderUtil.writeBufferedImage(image, ImageFormat.JPEG, out, quality); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (chart == null) | 1 | if (chart == null) | |||||||||||||||
2 | throw new IllegalArgumentException("Null 'chart' argument."); | 2 | throw new IllegalArgumentException("Null 'chart' argument."); | |||||||||||||||
3 | BufferedImage image = chart.createBufferedImage(width, height, BufferedImage.TYPE_INT_RGB, info); | 3 | BufferedImage image = chart.createBufferedImage(width, height, BufferedImage.TYPE_INT_RGB, info); | |||||||||||||||
4 | EncoderUtil.writeBufferedImage(image, ImageFormat.JPEG, out); |
| 4 | EncoderUtil.writeBufferedImage(image, ImageFormat.JPEG, out, quality); |
Row | Violation |
---|---|
1 | Expression EncoderUtil.writeBufferedImage(image,ImageFormat.JPEG,out) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression EncoderUtil.writeBufferedImage(image,ImageFormat.JPEG,out,quality) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression EncoderUtil.writeBufferedImage(image,ImageFormat.JPEG,out) is a void method call, and thus it cannot be parameterized |
4 | Expression EncoderUtil.writeBufferedImage(image,ImageFormat.JPEG,out,quality) is a void method call, and thus it cannot be parameterized |