You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2019/10/02 10:52:50 UTC

[jmeter] 01/02: Formatting/whitespace for readability.

This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 53cd3cedf34108227691ac0e88368c1ee831e57b
Author: Graham Russell <gr...@ham1.co.uk>
AuthorDate: Mon Aug 26 17:56:36 2019 +0100

    Formatting/whitespace for readability.
---
 .../jmeter/gui/action/HtmlReportGenerator.java     |  32 +++---
 .../jmeter/report/dashboard/ReportGenerator.java   | 108 +++++++++------------
 .../report/processor/CsvFileSampleSource.java      |  22 ++---
 .../graph/impl/CodesPerSecondGraphConsumer.java    |   5 +-
 .../impl/ConnectTimeOverTimeGraphConsumer.java     |   2 +-
 .../processor/graph/impl/CustomGraphConsumer.java  |  20 ++--
 .../ResponseTimeDistributionGraphConsumer.java     |   3 +-
 .../impl/ResponseTimePerSampleGraphConsumer.java   |  12 +--
 ...sponseTimePercentilesOverTimeGraphConsumer.java |   4 -
 .../impl/ResponseTimeVSRequestGraphConsumer.java   |   1 +
 ...heticResponseTimeDistributionGraphConsumer.java |  23 ++---
 .../graph/impl/TotalTPSGraphConsumer.java          |   3 +-
 .../impl/TransactionsPerSecondGraphConsumer.java   |   3 +-
 .../gui/action/HtmlReportGeneratorSpec.groovy      |  14 +--
 14 files changed, 114 insertions(+), 138 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java b/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
index 37ae88f..b781270 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
@@ -40,7 +40,7 @@ public class HtmlReportGenerator {
     public static final String CANNOT_CREATE_DIRECTORY = "generate_report_ui.cannot_create_directory";
 
     private static final Logger LOGGER = LoggerFactory.getLogger(HtmlReportGenerator.class);
-    private static final long COMMAND_TIMEOUT = JMeterUtils.getPropDefault("generate_report_ui.generation_timeout", 120000L);
+    private static final long COMMAND_TIMEOUT = JMeterUtils.getPropDefault("generate_report_ui.generation_timeout", 120_000L);
 
     private String csvFilePath;
     private String userPropertiesFilePath;
@@ -56,8 +56,10 @@ public class HtmlReportGenerator {
         }
     }
 
-    /*
-     * Prepare and Run the HTML report generation command
+    /**
+     * Prepare and Run the HTML report generation command.
+     *
+     * @return a list of error messages
      */
     public List<String> run() {
         List<String> errorMessageList = new ArrayList<>();
@@ -70,8 +72,14 @@ public class HtmlReportGenerator {
         int resultCode = -1;
         List<String> generationCommand = createGenerationCommand();
         try {
-            SystemCommand sc = new SystemCommand(new File(JMeterUtils.getJMeterBinDir()), COMMAND_TIMEOUT, 100, null, null,
-                    commandExecutionOutput, null);
+            SystemCommand sc = new SystemCommand(
+                    new File(JMeterUtils.getJMeterBinDir()),
+                    COMMAND_TIMEOUT,
+                    100,
+                    null,
+                    null,
+                    commandExecutionOutput,
+                    null);
             LOGGER.debug("Running report generation");
             resultCode = sc.run(generationCommand);
             if (resultCode != 0) {
@@ -81,9 +89,7 @@ public class HtmlReportGenerator {
             }
         } catch (InterruptedException | IOException e) {
             errorMessageList.add(commandExecutionOutput.toString());
-            if (LOGGER.isErrorEnabled()) {
-                LOGGER.error("Error during HTML report generation: {}", e.getMessage(), e);
-            }
+            LOGGER.error("Error during HTML report generation:", e);
         }
         LOGGER.debug("SystemCommand ran: {}  returned: {}", generationCommand, resultCode);
         return errorMessageList;
@@ -143,8 +149,7 @@ public class HtmlReportGenerator {
     /**
      * Check if a file is correct for report generation
      *
-     * @param fileToCheck
-     *            the directory to check
+     * @param fileToCheck the directory to check
      * @return the error message or null if the file is ok
      */
     private String checkFile(File fileToCheck) {
@@ -158,8 +163,7 @@ public class HtmlReportGenerator {
     /**
      * Check if a directory is fine for report generation
      *
-     * @param directoryToCheck
-     *            the directory to check
+     * @param directoryToCheck the directory to check
      * @return the error message or an empty string if the directory is fine
      */
     private String checkDirectory(File directoryToCheck) {
@@ -172,8 +176,8 @@ public class HtmlReportGenerator {
             }
         } else {
             File parentDirectory = directoryToCheck.getParentFile();
-            if(parentDirectory != null && parentDirectory.exists() && parentDirectory.canWrite()) {
-                if(directoryToCheck.mkdir()) {
+            if (parentDirectory != null && parentDirectory.exists() && parentDirectory.canWrite()) {
+                if (directoryToCheck.mkdir()) {
                     return null;
                 } else {
                     return MessageFormat.format(JMeterUtils.getResString(CANNOT_CREATE_DIRECTORY), directoryToCheck);
diff --git a/src/core/src/main/java/org/apache/jmeter/report/dashboard/ReportGenerator.java b/src/core/src/main/java/org/apache/jmeter/report/dashboard/ReportGenerator.java
index 650762a..a7986e8 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/dashboard/ReportGenerator.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/dashboard/ReportGenerator.java
@@ -114,10 +114,8 @@ public class ReportGenerator {
     /**
      * Instantiates a new report generator.
      *
-     * @param resultsFile
-     *            the test results file
-     * @param resultCollector
-     *            Can be null, used if generation occurs at end of test
+     * @param resultsFile     the test results file
+     * @param resultCollector Can be null, used if generation occurs at end of test
      * @throws ConfigurationException when loading configuration from file fails
      */
     public ReportGenerator(String resultsFile, ResultCollector resultCollector)
@@ -138,8 +136,8 @@ public class ReportGenerator {
             log.info("Will only generate report from results file: {}", resultsFile);
         } else {
             if (file.exists() && file.length() > 0) {
-                throw new IllegalArgumentException("Results file:"
-                        + resultsFile + " is not empty");
+                throw new IllegalArgumentException(
+                        "Results file:" + resultsFile + " is not empty");
             }
             log.info("Will generate report at end of test from  results file: {}", resultsFile);
         }
@@ -147,7 +145,7 @@ public class ReportGenerator {
         this.testFile = file;
         final Properties merged = new Properties();
         File rgp = new File(JMeterUtils.getJMeterBinDir(), REPORTGENERATOR_PROPERTIES);
-        if(log.isInfoEnabled()) {
+        if (log.isInfoEnabled()) {
             log.info("Reading report generator properties from: {}", rgp.getAbsolutePath());
         }
         merged.putAll(loadProps(rgp));
@@ -175,8 +173,7 @@ public class ReportGenerator {
      * E.g : with key set_granularity, returns setGranularity (camel case)
      * </p>
      *
-     * @param propertyKey
-     *            the property key
+     * @param propertyKey the property key
      * @return the name of the property setter
      */
     private static String getSetterName(String propertyKey) {
@@ -192,8 +189,7 @@ public class ReportGenerator {
     /**
      * Generate dashboard reports using the data from the specified CSV File.
      *
-     * @throws GenerationException
-     *             when the generation failed
+     * @throws GenerationException when the generation failed
      */
     public void generate() throws GenerationException {
 
@@ -268,7 +264,6 @@ public class ReportGenerator {
         removeTempDir(tmpDir, tmpDirCreated);
 
         log.debug("End of report generation");
-
     }
 
     /**
@@ -278,24 +273,24 @@ public class ReportGenerator {
         FilterConsumer dateRangeFilter = new FilterConsumer();
         dateRangeFilter.setName(DATE_RANGE_FILTER_CONSUMER_NAME);
         dateRangeFilter.setSamplePredicate(sample -> {
-                long sampleStartTime = sample.getStartTime();
-                if(configuration.getStartDate() != null) {
-                    if(sampleStartTime >= configuration.getStartDate().getTime()) {
-                        if(configuration.getEndDate() != null) {
-                            return sampleStartTime <= configuration.getEndDate().getTime();
-                        } else {
-                            return true;
-                        }
-                    }
-                    return false;
-                } else {
-                    if(configuration.getEndDate() != null) {
+            long sampleStartTime = sample.getStartTime();
+            if (configuration.getStartDate() != null) {
+                if (sampleStartTime >= configuration.getStartDate().getTime()) {
+                    if (configuration.getEndDate() != null) {
                         return sampleStartTime <= configuration.getEndDate().getTime();
                     } else {
                         return true;
                     }
                 }
-            });
+                return false;
+            } else {
+                if (configuration.getEndDate() != null) {
+                    return sampleStartTime <= configuration.getEndDate().getTime();
+                } else {
+                    return true;
+                }
+            }
+        });
         return dateRangeFilter;
     }
 
@@ -310,16 +305,17 @@ public class ReportGenerator {
     }
 
     private boolean createTempDir(File tmpDir) throws GenerationException {
-        boolean tmpDirCreated = false;
-        if (!tmpDir.exists()) {
-            tmpDirCreated = tmpDir.mkdir();
-            if (!tmpDirCreated) {
-                String message = String.format(
-                        "Cannot create temporary directory \"%s\", check property \"%s\"", tmpDir.getAbsolutePath(),
-                        ReportGeneratorConfiguration.REPORT_GENERATOR_KEY_TEMP_DIR);
-                log.error(message);
-                throw new GenerationException(message);
-            }
+        if (tmpDir.exists()) {
+            return false;
+        }
+
+        boolean tmpDirCreated = tmpDir.mkdir();
+        if (!tmpDirCreated) {
+            String message = String.format(
+                    "Cannot create temporary directory \"%s\", check property \"%s\"", tmpDir.getAbsolutePath(),
+                    ReportGeneratorConfiguration.REPORT_GENERATOR_KEY_TEMP_DIR);
+            log.error(message);
+            throw new GenerationException(message);
         }
         return tmpDirCreated;
     }
@@ -505,25 +501,16 @@ public class ReportGenerator {
     /**
      * Try to set a property on an object by reflection.
      *
-     * @param className
-     *            name of the objects class
-     * @param obj
-     *            the object on which the property should be set
-     * @param methods
-     *            methods of the object which will be search for the property
-     *            setter
-     * @param propertyName
-     *            name of the property to be set
-     * @param propertyValue
-     *            value to be set
-     * @param setterName
-     *            name of the property setter that should be used to set the
-     *            property
-     * @throws IllegalAccessException
-     *             if reflection throws an IllegalAccessException
-     * @throws GenerationException
-     *             if conversion of the property value fails or reflection
-     *             throws an InvocationTargetException
+     * @param className     name of the objects class
+     * @param obj           the object on which the property should be set
+     * @param methods       methods of the object to be searched for the property setter
+     * @param propertyName  name of the property to be set
+     * @param propertyValue value to be set
+     * @param setterName    name of the property setter that should be used to set the
+     *                      property
+     * @throws IllegalAccessException if reflection throws an IllegalAccessException
+     * @throws GenerationException    if conversion of the property value fails or reflection
+     *                                throws an InvocationTargetException
      */
     private void setProperty(String className, Object obj, Method[] methods,
             String propertyName, String propertyValue, String setterName)
@@ -533,22 +520,19 @@ public class ReportGenerator {
             while (i < methods.length) {
                 Method method = methods[i];
                 if (method.getName().equals(setterName)) {
-                    Class<?>[] parameterTypes = method
-                            .getParameterTypes();
+                    Class<?>[] parameterTypes = method.getParameterTypes();
                     if (parameterTypes.length == 1) {
                         Class<?> parameterType = parameterTypes[0];
-                        if (parameterType
-                                .isAssignableFrom(String.class)) {
+                        if (parameterType.isAssignableFrom(String.class)) {
                             method.invoke(obj, propertyValue);
                         } else {
-                            StringConverter<?> converter = Converters
-                                    .getConverter(parameterType);
+                            StringConverter<?> converter =
+                                    Converters.getConverter(parameterType);
                             if (converter == null) {
                                 throw new GenerationException(
                                         String.format(
                                                 NOT_SUPPORTED_CONVERSION_FMT,
-                                                parameterType
-                                                        .getName()));
+                                                parameterType.getName()));
                             }
                             method.invoke(obj, converter.convert(propertyValue));
                         }
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/CsvFileSampleSource.java b/src/core/src/main/java/org/apache/jmeter/report/processor/CsvFileSampleSource.java
index 4643c51..05b99d0 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/CsvFileSampleSource.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/CsvFileSampleSource.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <code>SampleConsumer</code>s.<br>
  * If there is several other source files with the same root name then those
  * files are produced on their corresponding channels.<br>
- *
+ * <p>
  * The root name of the files is determined by the source file name and is made
  * of its name without the file extension :<br>
  * <b>Example:</b> If <code>results.csv</code> is the source file name then
@@ -82,11 +82,9 @@ public class CsvFileSampleSource extends AbstractSampleSource {
      * Build a sample source from the specified input file and character
      * separator.
      *
-     * @param inputFile
-     *            The input sample file (CSV file) (must not be {@code null})
-     * @param separator
-     *            The character separator to be used for delimiting samples
-     *            columns
+     * @param inputFile The input sample file (CSV file) (must not be {@code null})
+     * @param separator The character separator to be used for delimiting samples
+     *                  columns
      */
     public CsvFileSampleSource(final File inputFile, final char separator) {
         final String inputRootName = getFileRootName(inputFile.getName());
@@ -152,8 +150,7 @@ public class CsvFileSampleSource extends AbstractSampleSource {
      * Get a readable time as hours, minutes and seconds from the specified time
      * in milliseconds
      *
-     * @return A readable string that displays the time provided as
-     *          milliseconds
+     * @return A readable string that displays the time provided as milliseconds
      */
     private String time(long t) {
         return TimeHelper.time(t);
@@ -187,8 +184,8 @@ public class CsvFileSampleSource extends AbstractSampleSource {
                 csvReader.close();
             }
             if (LOG.isInfoEnabled()) {
-                LOG.info("produce(): " + sampleCount + " samples produced in "
-                        + time(now() - start) + " on channel " + i);
+                LOG.info("produce(): {} samples produced in {} on channel {}",
+                        sampleCount, time(now() - start), i);
             }
         }
     }
@@ -247,9 +244,8 @@ public class CsvFileSampleSource extends AbstractSampleSource {
         /**
          * Set the consumers for the samples that are to be consumed
          *
-         * @param consumers
-         *            list of consumers for the samples (must not be
-         *            {@code null})
+         * @param consumers list of consumers for the samples (must not be
+         *                  {@code null})
          */
         public void setSampleConsumers(List<SampleConsumer> consumers) {
             Validate.notNull(consumers, "consumers must not be null");
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java
index 197988a..26cbc83 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java
@@ -71,8 +71,9 @@ public class CodesPerSecondGraphConsumer extends AbstractOverTimeGraphConsumer {
     public void initialize() {
         super.initialize();
         // Override the granularity of the aggregators factory
-        ((TimeRateAggregatorFactory) getGroupInfos().get(
-                AbstractGraphConsumer.DEFAULT_GROUP).getAggregatorFactory())
+        ((TimeRateAggregatorFactory) getGroupInfos()
+                .get(AbstractGraphConsumer.DEFAULT_GROUP)
+                .getAggregatorFactory())
                 .setGranularity(getGranularity());
     }
 
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ConnectTimeOverTimeGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ConnectTimeOverTimeGraphConsumer.java
index 9de5767..ea47f64 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ConnectTimeOverTimeGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ConnectTimeOverTimeGraphConsumer.java
@@ -63,7 +63,7 @@ public class ConnectTimeOverTimeGraphConsumer extends AbstractOverTimeGraphConsu
      */
     @Override
     protected Map<String, GroupInfo> createGroupInfos() {
-        if(!CONNECT_TIME_SAVED) {
+        if (!CONNECT_TIME_SAVED) {
             return Collections.emptyMap();
         }
         HashMap<String, GroupInfo> groupInfos = new HashMap<>();
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
index 1ed8993..3204969 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
@@ -47,7 +47,7 @@ import org.apache.jmeter.save.CSVSaveService;
  * @since 5.0
  */
 
-public class CustomGraphConsumer extends AbstractOverTimeGraphConsumer implements SampleConsumer{
+public class CustomGraphConsumer extends AbstractOverTimeGraphConsumer implements SampleConsumer {
 
     public static final String RESULT_Y_AXIS = "Y_Axis"; //$NON-NLS-1$
     public static final String RESULT_X_AXIS = "X_Axis"; //$NON-NLS-1$
@@ -107,31 +107,28 @@ public class CustomGraphConsumer extends AbstractOverTimeGraphConsumer implement
     /**
      * Sets the yAxis.
      *
-     * @param axis
-     * the yAxis to set
+     * @param axis the yAxis to set
      */
     public void setYAxis(String axis) {
-        yAxis=axis;
+        yAxis = axis;
     }
 
     /**
      * Sets the xAxis.
      *
-     * @param axis
-     * the xAxis to set
+     * @param axis the xAxis to set
      */
     public void setXAxis(String axis) {
-        xAxis=axis;
+        xAxis = axis;
     }
 
     /**
      * Sets the contentMessage.
      *
-     * @param message
-     * the message to set
+     * @param message the message to set
      */
     public void setContentMessage(String message) {
-        contentMessage=message;
+        contentMessage = message;
     }
 
     /**
@@ -156,8 +153,7 @@ public class CustomGraphConsumer extends AbstractOverTimeGraphConsumer implement
      * Sets the sampleVariableName.
      * Sets the boolean isNativesSampleVariableName
      *
-     * @param sampleVarName
-     * the sampleVariableName to set
+     * @param sampleVarName the sampleVariableName to set
      */
     public void setSampleVariableName(String sampleVarName) {
         sampleVariableName = sampleVarName;
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeDistributionGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeDistributionGraphConsumer.java
index 82a8931..a45e00b 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeDistributionGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeDistributionGraphConsumer.java
@@ -53,8 +53,7 @@ public class ResponseTimeDistributionGraphConsumer extends
     }
 
     /**
-     * @param granularity
-     *            the granularity to set
+     * @param granularity the granularity to set
      */
     public final void setGranularity(long granularity) {
         this.granularity = granularity;
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java
index 1e01023..ac973d5 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java
@@ -37,8 +37,8 @@ import org.apache.jmeter.util.JMeterUtils;
  * The class ResponseTimePerSampleGraphConsumer provides a graph to visualize
  * percentiles of response time for each sample name.
  * NOT USED FOR NOW as of 3.0
- * @since 3.0
  *
+ * @since 3.0
  */
 public class ResponseTimePerSampleGraphConsumer extends AbstractGraphConsumer {
 
@@ -71,10 +71,8 @@ public class ResponseTimePerSampleGraphConsumer extends AbstractGraphConsumer {
      * Creates the group info for elapsed time percentile depending on jmeter
      * properties.
      *
-     * @param propertyKey
-     *            the property key
-     * @param defaultValue
-     *            the default value
+     * @param propertyKey  the property key
+     * @param defaultValue the default value
      * @return the group info
      */
     private GroupInfo createGroupInfo(String propertyKey, int defaultValue) {
@@ -124,8 +122,8 @@ public class ResponseTimePerSampleGraphConsumer extends AbstractGraphConsumer {
         IndexedNameSelector indexedNameSelector = (IndexedNameSelector) getKeysSelector();
         int size = indexedNameSelector.getNames().size();
         for (int i = 0; i < size; i++) {
-            samples.addResult(new ValueResultData(indexedNameSelector
-                    .getNames().get(i)));
+            samples.addResult(
+                    new ValueResultData(indexedNameSelector.getNames().get(i)));
         }
         parentResult.setResult("sampleNames", samples);
     }
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesOverTimeGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesOverTimeGraphConsumer.java
index 5d1ab4a..aa9f1a1 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesOverTimeGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesOverTimeGraphConsumer.java
@@ -56,15 +56,11 @@ public class ResponseTimePercentilesOverTimeGraphConsumer
         HashMap<String, GroupInfo> groupInfos = new HashMap<>(8);
 
         groupInfos.put("aggregate_report_min", createMinGroupInfo());
-
         groupInfos.put("aggregate_report_max", createMaxGroupInfo());
-
         groupInfos.put("aggregate_rpt_pct1",
                 createPercentileGroupInfo("aggregate_rpt_pct1", 90));
-
         groupInfos.put("aggregate_rpt_pct2",
                 createPercentileGroupInfo("aggregate_rpt_pct2", 95));
-
         groupInfos.put("aggregate_rpt_pct3",
                 createPercentileGroupInfo("aggregate_rpt_pct3", 99));
 
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeVSRequestGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeVSRequestGraphConsumer.java
index 2db35d0..528aba6 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeVSRequestGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/ResponseTimeVSRequestGraphConsumer.java
@@ -33,6 +33,7 @@ import org.apache.jmeter.report.processor.graph.StatusSeriesSelector;
 /**
  * The class ResponseTimeVSRequestGraphConsumer provides a graph to visualize
  * response time vs requests
+ *
  * @since 3.0
  */
 public class ResponseTimeVSRequestGraphConsumer extends
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/SyntheticResponseTimeDistributionGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/SyntheticResponseTimeDistributionGraphConsumer.java
index 28d7ea7..30b1179 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/SyntheticResponseTimeDistributionGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/SyntheticResponseTimeDistributionGraphConsumer.java
@@ -72,9 +72,9 @@ public class SyntheticResponseTimeDistributionGraphConsumer extends
                 return Arrays.asList(FAILED_LABEL);
             } else {
                 long elapsedTime = sample.getElapsedTime();
-                if(elapsedTime<=getSatisfiedThreshold()) {
+                if (elapsedTime <= getSatisfiedThreshold()) {
                     return satisfiedLabels;
-                } else if(elapsedTime <= getToleratedThreshold()) {
+                } else if (elapsedTime <= getToleratedThreshold()) {
                     return toleratedLabels;
                 } else {
                     return untoleratedLabels;
@@ -82,6 +82,7 @@ public class SyntheticResponseTimeDistributionGraphConsumer extends
             }
         }
     }
+
     /*
      * (non-Javadoc)
      *
@@ -132,9 +133,9 @@ public class SyntheticResponseTimeDistributionGraphConsumer extends
     protected void initializeExtraResults(MapResultData parentResult) {
         ListResultData listResultData = new ListResultData();
         String[] seriesLabels = new String[]{
-                SATISFIED_LABEL.format(new Object[] {Long.valueOf(getSatisfiedThreshold())}),
-                TOLERATED_LABEL.format(new Object[] {Long.valueOf(getSatisfiedThreshold()), Long.valueOf(getToleratedThreshold())}),
-                UNTOLERATED_LABEL.format(new Object[] {Long.valueOf(getToleratedThreshold())}),
+                SATISFIED_LABEL.format(new Object[]{Long.valueOf(getSatisfiedThreshold())}),
+                TOLERATED_LABEL.format(new Object[]{Long.valueOf(getSatisfiedThreshold()), Long.valueOf(getToleratedThreshold())}),
+                UNTOLERATED_LABEL.format(new Object[]{Long.valueOf(getToleratedThreshold())}),
                 FAILED_LABEL
         };
         String[] colors = new String[]{
@@ -198,11 +199,11 @@ public class SyntheticResponseTimeDistributionGraphConsumer extends
     }
 
     private void formatLabels() {
-        this.satisfiedLabels = Collections
-                .singletonList(SATISFIED_LABEL.format(new Object[] { Long.valueOf(this.satisfiedThreshold) }));
-        this.toleratedLabels = Collections.singletonList(TOLERATED_LABEL
-                .format(new Object[] { Long.valueOf(this.satisfiedThreshold), Long.valueOf(this.toleratedThreshold) }));
-        this.untoleratedLabels = Collections
-                .singletonList(UNTOLERATED_LABEL.format(new Object[] { Long.valueOf(this.toleratedThreshold) }));
+        this.satisfiedLabels = Collections.singletonList(
+                SATISFIED_LABEL.format(new Object[]{Long.valueOf(this.satisfiedThreshold)}));
+        this.toleratedLabels = Collections.singletonList(
+                TOLERATED_LABEL.format(new Object[]{Long.valueOf(this.satisfiedThreshold), Long.valueOf(this.toleratedThreshold)}));
+        this.untoleratedLabels = Collections.singletonList(
+                UNTOLERATED_LABEL.format(new Object[]{Long.valueOf(this.toleratedThreshold)}));
     }
 }
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TotalTPSGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TotalTPSGraphConsumer.java
index e1f7d5a..6725561 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TotalTPSGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TotalTPSGraphConsumer.java
@@ -47,6 +47,7 @@ public class TotalTPSGraphConsumer extends AbstractOverTimeGraphConsumer {
     private static final String FAILURE_SERIES_SUFFIX = "failure";
     private static final String TRANSACTION_SUCCESS_LABEL = String.format(STATUS_SERIES_FORMAT, "Transaction", SUCCESS_SERIES_SUFFIX);
     private static final String TRANSACTION_FAILURE_LABEL = String.format(STATUS_SERIES_FORMAT, "Transaction", FAILURE_SERIES_SUFFIX);
+
     /*
      * (non-Javadoc)
      *
@@ -108,7 +109,7 @@ public class TotalTPSGraphConsumer extends AbstractOverTimeGraphConsumer {
         super.initialize();
         // Override the granularity of the aggregators factory
         ((TimeRateAggregatorFactory) getGroupInfos().get(AbstractGraphConsumer.DEFAULT_GROUP).getAggregatorFactory())
-        .setGranularity(getGranularity());
+                .setGranularity(getGranularity());
     }
 
 
diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java
index 1187e0b..6885f38 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java
@@ -37,8 +37,7 @@ import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
  *
  * @since 3.0
  */
-public class TransactionsPerSecondGraphConsumer extends
-        AbstractOverTimeGraphConsumer {
+public class TransactionsPerSecondGraphConsumer extends AbstractOverTimeGraphConsumer {
 
     private static final String SUCCESS_SERIES_SUFFIX = "success";
     private static final String FAILURE_SERIES_SUFFIX = "failure";
diff --git a/src/dist-check/src/test/groovy/org/apache/jmeter/gui/action/HtmlReportGeneratorSpec.groovy b/src/dist-check/src/test/groovy/org/apache/jmeter/gui/action/HtmlReportGeneratorSpec.groovy
index 74dd62c..07015e5 100644
--- a/src/dist-check/src/test/groovy/org/apache/jmeter/gui/action/HtmlReportGeneratorSpec.groovy
+++ b/src/dist-check/src/test/groovy/org/apache/jmeter/gui/action/HtmlReportGeneratorSpec.groovy
@@ -29,7 +29,7 @@ import org.apache.jmeter.util.JMeterUtils
 import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.ObjectMapper
 
-class HtmlReportGeneratorSpec extends JMeterSpec{
+class HtmlReportGeneratorSpec extends JMeterSpec {
 
     /**
      * Combine the given path parts to one path with the correct path separator of the current platform.
@@ -39,10 +39,10 @@ class HtmlReportGeneratorSpec extends JMeterSpec{
      * @return combined path as string
      */
     def combine(String... paths) {
-       Paths.get(JMeterUtils.getJMeterBinDir(), paths).toString()
+        Paths.get(JMeterUtils.getJMeterBinDir(), paths).toString()
     }
 
-    def "check if generation from csv: '#csvPath' with properties: '#userPropertiesPath' in folder: '#outputDirectoryPath' contains the expected error"(){
+    def "check if generation from csv: '#csvPath' with properties: '#userPropertiesPath' in folder: '#outputDirectoryPath' contains the expected error"() {
         when:
             HtmlReportGenerator htmlReportGenerator = new HtmlReportGenerator(csvPath, userPropertiesPath, outputDirectoryPath)
             List<String> resultList = htmlReportGenerator.checkArguments()
@@ -109,7 +109,7 @@ class HtmlReportGeneratorSpec extends JMeterSpec{
             }
     }
 
-    def "check that report generation fails when format does not match and error is reported"(){
+    def "report generation fails when format does not match and error is reported"() {
         setup:
             File testDirectory = new File(combine("testfiles", "testReportThatShouldBeEmpty"))
             if(testDirectory.exists()) {
@@ -121,9 +121,9 @@ class HtmlReportGeneratorSpec extends JMeterSpec{
             }
         when:
             HtmlReportGenerator htmlReportGenerator = new HtmlReportGenerator(
-                combine("testfiles", "HTMLReportFalseTestFile.csv"),
-                combine("user.properties"),
-                testDirectory.toString())
+                    combine("testfiles", "HTMLReportFalseTestFile.csv"),
+                    combine("user.properties"),
+                    testDirectory.toString())
             List<String> resultList = htmlReportGenerator.run()
         then:
             testDirectory.list().length == 0