feedback-to-code/mozzarella huggingface dataset:
Repository: pinpoint-apm/pinpoint
Issue: Allow main class detection for valid war/zip java executables
Labels: enhancement

Valid java executables may be packaged as war/zip files.
Currently however, main class detection only works for valid executable jars.

Extend main class detection to valid executable war/zip files (such as Spring Boot application packaged as an executable war).


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/resolver/condition/MainClassCondition.java b/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/resolver/condition/MainClassCondition.java
index 3343a6486066..ac9c8b4a3410 100644
--- a/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/resolver/condition/MainClassCondition.java
+++ b/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/resolver/condition/MainClassCondition.java
@@ -16,6 +16,7 @@
 
 package com.navercorp.pinpoint.bootstrap.resolver.condition;
 
+import java.io.IOException;
 import java.util.jar.JarFile;
 
 import com.navercorp.pinpoint.bootstrap.logging.PLogger;
@@ -88,21 +89,28 @@ private String getMainClassName(SimpleProperty property) {
         if (javaCommand.isEmpty()) {
             logger.warn("Error retrieving main class from [{}]", property.getClass().getName());
             return NOT_FOUND;
-        } else if (javaCommand.endsWith(".jar")) {
-            return extractMainClassFromJar(javaCommand);
         } else {
-            return javaCommand;
+            try {
+                JarFile executableArchive = new JarFile(javaCommand);
+                return extractMainClassFromArchive(executableArchive);
+            } catch (IOException e) {
+                // If it's not a valid java archive, VM shouldn't start in the first place.
+                // Thus this would simply be a main class
+                return javaCommand;
+            } catch (Exception e) {
+                // fail-safe, application shouldn't not start because of this
+                logger.warn("Error retrieving main class from java command : [{}]", javaCommand, e);
+                return NOT_FOUND;
+            }
         }
     }
 
-    private String extractMainClassFromJar(String jarName) {
-        try {
-            JarFile bootstrapJar = new JarFile(jarName);
-            return bootstrapJar.getManifest().getMainAttributes().getValue(MANIFEST_MAIN_CLASS_KEY);
-        } catch (Throwable t) {
-            logger.warn("Error retrieveing main class from jar file : [{}]", jarName, t);
+    private String extractMainClassFromArchive(JarFile bootstrapJar) throws IOException {
+        String mainClassFromManifest = bootstrapJar.getManifest().getMainAttributes().getValue(MANIFEST_MAIN_CLASS_KEY);
+        if (mainClassFromManifest == null) {
             return NOT_FOUND;
         }
+        return mainClassFromManifest;
     }
 
 }


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: [PinpiontWeb] fix a ActiveThread concurrency problem 
Labels: bug

TreeMap of ActiveThreadCountResponseAggregator is not thread safe
- local variable : activeThreadCountWorkerRepository


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java b/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
index 749a8cc15438..2b114950fd78 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
@@ -40,6 +40,7 @@
 import org.springframework.web.socket.handler.TextWebSocketHandler;
 
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -59,7 +60,7 @@ public class ActiveThreadCountHandler extends TextWebSocketHandler implements Pi
     private final Object lock = new Object();
     private final AgentService agentSerivce;
     private final List<WebSocketSession> sessionRepository = new CopyOnWriteArrayList<>();
-    private final Map<String, PinpointWebSocketResponseAggregator> aggregatorRepository = new HashMap<>();
+    private final Map<String, PinpointWebSocketResponseAggregator> aggregatorRepository = new ConcurrentHashMap<>();
     private PinpointWebSocketMessageConverter messageConverter = new PinpointWebSocketMessageConverter();
 
     private static final String DEFAULT_REQUEST_MAPPING = "/agent/activeThread";


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Unsampled Continuation is not collected for transaction metric.
Labels: bug

Metric Gauge for TRANSACTION_UNSAMPLED_CONTINUATION is missing.
Unsampled continuation gauge instead uses TRANSACTION_UNSAMPLED_NEW, which is wrong.


Issue comments:
fixed via #1272 


Pull request review comments:

Patch that resolved the issue:
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/tps/TransactionMetricCollector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/tps/TransactionMetricCollector.java
index d505a228f80d..f52520d70384 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/tps/TransactionMetricCollector.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/tps/TransactionMetricCollector.java
@@ -49,7 +49,7 @@ public TransactionMetricCollector(TransactionMetricSet transactionMetricSet) {
         this.sampledNewGauge = (Gauge<Long>)MetricMonitorValues.getMetric(metrics, TRANSACTION_SAMPLED_NEW, UNSUPPORTED_GAUGE);
         this.sampledContinuationGauge = (Gauge<Long>)MetricMonitorValues.getMetric(metrics, TRANSACTION_SAMPLED_CONTINUATION, UNSUPPORTED_GAUGE);
         this.unsampledNewGauge = (Gauge<Long>)MetricMonitorValues.getMetric(metrics, TRANSACTION_UNSAMPLED_NEW, UNSUPPORTED_GAUGE);
-        this.unsampledContinuationGuage = (Gauge<Long>)MetricMonitorValues.getMetric(metrics, TRANSACTION_UNSAMPLED_NEW, UNSUPPORTED_GAUGE);
+        this.unsampledContinuationGuage = (Gauge<Long>)MetricMonitorValues.getMetric(metrics, TRANSACTION_UNSAMPLED_CONTINUATION, UNSUPPORTED_GAUGE);
     }
 
     @Override


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Implement parallel result scanner for scanning rows distributed with RowKeyDistributor
Labels: enhancement

Allow distributed scanners to run in parallel that would theoretically allow for better performance when scanning rows that are well distributed using `RowKeyDistributor`


Issue comments:
Reopening as scanner creations may be done in parallel as well, and this may cut some time during scanner creation.

Reopening to apply parallel scan for finding accept applications for nodes when drawing the server map.


Pull request review comments:

Patch that resolved the issue:
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseHostApplicationMapDao.java b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseHostApplicationMapDao.java
index c577b5fa3482..ff47ecdf7fc3 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseHostApplicationMapDao.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseHostApplicationMapDao.java
@@ -53,6 +53,8 @@
 @Repository
 public class HbaseHostApplicationMapDao implements HostApplicationMapDao {
 
+    private static final int HOST_APPLICATION_MAP_VER2_NUM_PARTITIONS = 4;
+
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
     private int scanCacheSize = 10;
 
@@ -127,7 +129,7 @@ public Set<AcceptApplication> findAcceptApplicationName(Application fromApplicat
             throw new NullPointerException("fromApplication must not be null");
         }
         final Scan scan = createScan(fromApplication, range);
-        final List<List<AcceptApplication>> result = hbaseOperations2.find(HBaseTables.HOST_APPLICATION_MAP_VER2, scan, acceptApplicationRowKeyDistributor, hostApplicationMapperVer2);
+        final List<List<AcceptApplication>> result = hbaseOperations2.findParallel(HBaseTables.HOST_APPLICATION_MAP_VER2, scan, acceptApplicationRowKeyDistributor, hostApplicationMapperVer2, HOST_APPLICATION_MAP_VER2_NUM_PARTITIONS);
         if (CollectionUtils.isNotEmpty(result)) {
             final Set<AcceptApplication> resultSet = new HashSet<>();
             for (List<AcceptApplication> resultList : result) {


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Buffer API enhancement
Labels: enhancement

[Buffer](https://github.com/naver/pinpoint/blob/master/commons/src/main/java/com/navercorp/pinpoint/common/buffer/Buffer.java) API enhancement
- add remaining()
- add hasRemaining()
- add wrapByteBuffer()
- deprecated limit()
- change put($Type) -> put$Type()
- change putVar($Type) -> putV$Type()
- change readVar$Type() -> readV$Type();
- fixed incorrect buffer expend multiplier : multiplier 4 -> multiplier 2


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/commons/src/main/java/com/navercorp/pinpoint/common/buffer/FixedBuffer.java b/commons/src/main/java/com/navercorp/pinpoint/common/buffer/FixedBuffer.java
index dbcd0a20371e..f1e699ef61df 100644
--- a/commons/src/main/java/com/navercorp/pinpoint/common/buffer/FixedBuffer.java
+++ b/commons/src/main/java/com/navercorp/pinpoint/common/buffer/FixedBuffer.java
@@ -300,7 +300,7 @@ public void putBytes(final byte[] v) {
     @Deprecated
     @Override
     public void put(final byte[] v) {
-        put(v);
+        putBytes(v);
     }
 
     @Override


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Jdk's HttpUrlConnection's target nodes are not rendered in the server map
Labels: bug

Http calls made using `HttpUrlConnection` is currently being traced, but the server map does not seem to be rendering the target nodes,

Related google groups post - https://groups.google.com/forum/#!topic/pinpoint_user/OgwAB9sPnak


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/plugins/jdk-http/src/main/java/com/navercorp/pinpoint/plugin/jdk/http/JdkHttpConstants.java b/plugins/jdk-http/src/main/java/com/navercorp/pinpoint/plugin/jdk/http/JdkHttpConstants.java
index 184baf89b519..3a6bfa4ea7a0 100644
--- a/plugins/jdk-http/src/main/java/com/navercorp/pinpoint/plugin/jdk/http/JdkHttpConstants.java
+++ b/plugins/jdk-http/src/main/java/com/navercorp/pinpoint/plugin/jdk/http/JdkHttpConstants.java
@@ -17,6 +17,8 @@
 import com.navercorp.pinpoint.common.trace.ServiceType;
 import com.navercorp.pinpoint.common.trace.ServiceTypeFactory;
 
+import static com.navercorp.pinpoint.common.trace.ServiceTypeProperty.RECORD_STATISTICS;
+
 /**
  * @author Jongho Moon
  *
@@ -25,5 +27,5 @@ public final class JdkHttpConstants {
     private JdkHttpConstants() {
     }
 
-    public static final ServiceType SERVICE_TYPE = ServiceTypeFactory.of(9055, "JDK_HTTPURLCONNECTOR", "JDK_HTTPCONNECTOR");
+    public static final ServiceType SERVICE_TYPE = ServiceTypeFactory.of(9055, "JDK_HTTPURLCONNECTOR", "JDK_HTTPCONNECTOR", RECORD_STATISTICS);
 }


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: MariaDB4j moved to maven central
Labels: bug

MariaDB4j is now published to maven central, instead of the previous jcenter.bintray.
Dependency should be fixed accordingly.

Reported - https://groups.google.com/forum/#!topic/pinpoint_user/sasP_WVAOZM


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/agent/pom.xml b/agent/pom.xml
index 2eec80ad79b7..0a345c5563c2 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -85,7 +85,7 @@
         <dependency>
             <groupId>ch.vorburger.mariaDB4j</groupId>
             <artifactId>mariaDB4j</artifactId>
-            <version>2.1.3</version>
+            <version>2.2.2</version>
             <scope>test</scope>
         </dependency>
 


Test patch:
diff --git a/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_3_x_IT.java b/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_3_x_IT.java
index 8ceeee24d745..c1a855fc2491 100644
--- a/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_3_x_IT.java
+++ b/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_3_x_IT.java
@@ -13,12 +13,10 @@
 import com.navercorp.pinpoint.test.plugin.Dependency;
 import com.navercorp.pinpoint.test.plugin.JvmVersion;
 import com.navercorp.pinpoint.test.plugin.PinpointPluginTestSuite;
-import com.navercorp.pinpoint.test.plugin.Repository;
 
 @RunWith(PinpointPluginTestSuite.class)
 @JvmVersion(7)
-@Repository("http://jcenter.bintray.com")
-@Dependency({"org.mariadb.jdbc:mariadb-java-client:[1.3.0,1.3.max]", "ch.vorburger.mariaDB4j:mariaDB4j:2.1.3"})
+@Dependency({"org.mariadb.jdbc:mariadb-java-client:[1.3.0,1.3.max]", "ch.vorburger.mariaDB4j:mariaDB4j:2.2.2"})
 public class MariaDB_1_3_x_IT extends MariaDB_IT_Base {
 
     // see CallableParameterMetaData#queryMetaInfos
diff --git a/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_4_x_IT.java b/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_4_x_IT.java
index 76fd14be8c25..44f96058386b 100644
--- a/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_4_x_IT.java
+++ b/agent/src/test/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDB_1_4_x_IT.java
@@ -21,7 +21,6 @@
 import com.navercorp.pinpoint.test.plugin.Dependency;
 import com.navercorp.pinpoint.test.plugin.JvmVersion;
 import com.navercorp.pinpoint.test.plugin.PinpointPluginTestSuite;
-import com.navercorp.pinpoint.test.plugin.Repository;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -36,8 +35,7 @@
 
 @RunWith(PinpointPluginTestSuite.class)
 @JvmVersion(7)
-@Repository("http://jcenter.bintray.com")
-@Dependency({ "org.mariadb.jdbc:mariadb-java-client:[1.4.min,1.4.max]", "ch.vorburger.mariaDB4j:mariaDB4j:2.1.3" })
+@Dependency({ "org.mariadb.jdbc:mariadb-java-client:[1.4.min,1.4.max]", "ch.vorburger.mariaDB4j:mariaDB4j:2.2.2" })
 public class MariaDB_1_4_x_IT extends MariaDB_IT_Base {
 
     // see CallableParameterMetaData#queryMetaInfos
Repository: pinpoint-apm/pinpoint
Issue: Tomcat plugin fails to trace when profiler.tomcat.excludeurl is empty
Labels: bug

Tomcat plugin fails to inject interceptor to `StandardHostValve.invoke(...)` when _pinpoint.config_'s `profiler.tomcat.excludeurl` option is empty.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/plugins/tomcat/src/main/java/com/navercorp/pinpoint/plugin/tomcat/TomcatConfiguration.java b/plugins/tomcat/src/main/java/com/navercorp/pinpoint/plugin/tomcat/TomcatConfiguration.java
index 0c0ba3bfcf18..3f7e8089f61f 100644
--- a/plugins/tomcat/src/main/java/com/navercorp/pinpoint/plugin/tomcat/TomcatConfiguration.java
+++ b/plugins/tomcat/src/main/java/com/navercorp/pinpoint/plugin/tomcat/TomcatConfiguration.java
@@ -14,9 +14,9 @@
  */
 package com.navercorp.pinpoint.plugin.tomcat;
 
-import com.navercorp.pinpoint.bootstrap.config.ExcludePathFilter;
 import com.navercorp.pinpoint.bootstrap.config.Filter;
 import com.navercorp.pinpoint.bootstrap.config.ProfilerConfig;
+import com.navercorp.pinpoint.bootstrap.config.SkipFilter;
 
 /**
  * @author Jongho Moon
@@ -24,14 +24,14 @@
  */
 public class TomcatConfiguration {
     private final boolean tomcatHidePinpointHeader;
-    private Filter<String> tomcatExcludeUrlFilter;
+    private final Filter<String> tomcatExcludeUrlFilter;
 
     public TomcatConfiguration(ProfilerConfig config) {
         this.tomcatHidePinpointHeader = config.readBoolean("profiler.tomcat.hidepinpointheader", true);
-        final String tomcatExcludeURL = config.readString("profiler.tomcat.excludeurl", "");
-        
-        if (!tomcatExcludeURL.isEmpty()) {
-            this.tomcatExcludeUrlFilter = new ExcludePathFilter(tomcatExcludeURL);
+        if (config.getTomcatExcludeProfileMethodFilter() == null) {
+            this.tomcatExcludeUrlFilter = new SkipFilter<String>();
+        } else {
+            this.tomcatExcludeUrlFilter = config.getTomcatExcludeUrlFilter();
         }
     }
 


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: [PinpiontWeb] fix a ActiveThread concurrency problem
Labels: bug

If multiple threads invokes WebSocketSession's sendMessage method at the same time, ; 
then it is possible to makes IllegalStateException.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java b/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
index 2b865789c33f..8da38eea614e 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/websocket/ActiveThreadCountHandler.java
@@ -214,7 +214,11 @@ private void handleRequestMessage0(WebSocketSession webSocketSession, RequestMes
                     }
 
                     unbindingResponseAggregator(webSocketSession);
-                    bindingResponseAggregator(webSocketSession, applicationName);
+                    if (webSocketSession.isOpen()) {
+                        bindingResponseAggregator(webSocketSession, applicationName);
+                    } else {
+                        logger.warn("WebSocketSession is not opened. skip binding.");
+                    }
                 }
             }
         }


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Fixed send retry policy in TCPDataSender
Labels: bug

Retry policy in TCPDataSender is not working properly, so Fixed it. 


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/sender/RetryMessage.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/sender/RetryMessage.java
index 13ef7c3ac506..09c98d0a3067 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/sender/RetryMessage.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/sender/RetryMessage.java
@@ -16,6 +16,7 @@
 
 package com.navercorp.pinpoint.profiler.sender;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 
 /**
@@ -80,12 +81,12 @@ public int fail() {
 
     @Override
     public String toString() {
-        StringBuffer toString = new StringBuffer();
+        StringBuilder toString = new StringBuilder();
         toString.append("RetryMessage{");
         if (!StringUtils.isEmpty(messageDescription)) {
             toString.append("message:" + messageDescription + ", ");
         }
-        toString.append("size=" + bytes.length + ", ");
+        toString.append("size=" + ArrayUtils.getLength(bytes) + ", ");
         toString.append("retry=" + retryCount + "/" + maxRetryCount);
         toString.append("}");
 


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: LinkKey hash function always returns 0
Labels: bug

#### Description
The `hashCode()` method in [LinkKey](https://github.com/naver/pinpoint/blob/master/web/src/main/java/com/navercorp/pinpoint/web/vo/LinkKey.java#L106) class always returns 0. resulting in N * N equals comparisons for caller/callee pairs when querying server map.

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/vo/LinkKey.java b/web/src/main/java/com/navercorp/pinpoint/web/vo/LinkKey.java
index 58bffa661265..eb92600afcfe 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/vo/LinkKey.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/vo/LinkKey.java
@@ -103,7 +103,7 @@ public boolean equals(Object o) {
     @Override
     public int hashCode() {
         final int hash = this.hash;
-        if (hash == 0) {
+        if (hash != 0) {
             return hash;
         }
         int result = fromApplication.hashCode();


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Add support for MariaDB java client 1.5.6
Labels: enhancement

#### Description
SQL bind values are not traced in MariaDB java client 1.5.6 due to a change in class name : `org.mariadb.jdbc.AbstractMariaDbPrepareStatement` -> `org.mariadb.jdbc.AbstractPrepareStatement`.

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/plugins/mariadb-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDBPlugin.java b/plugins/mariadb-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDBPlugin.java
index 840a465006e3..03074c785110 100644
--- a/plugins/mariadb-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDBPlugin.java
+++ b/plugins/mariadb-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/mariadb/MariaDBPlugin.java
@@ -185,6 +185,8 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin
         };
 
         transformTemplate.transform("org.mariadb.jdbc.AbstractMariaDbPrepareStatement", transformer);
+        // Class renamed in 1.5.6 - https://github.com/MariaDB/mariadb-connector-j/commit/16c8313960cf4fbc6b2b83136504d1ba9e662919
+        transformTemplate.transform("org.mariadb.jdbc.AbstractPrepareStatement", transformer);
 
     }
 


Test patch:
Repository: pinpoint-apm/pinpoint
Issue: Agents running on OpenJDK does not collect CPU stats
Labels: bug

#### Description
`CpuLoadMetricSetSelector` currently returns `EmptyCpuLoadMetricSet` when running on open jdk. Since open jdk can use the same cpu load collector as the one used on oracle jvm, adding a simple check should fix this problem - related to #2330

#### Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Pinpoint version: 1.6.0
* OS, WAS, affected library, etc: Affects agents running on OpenJDK vm
* Additional details (e.g. how your collector/web is set up): not applicable


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/cpu/CpuLoadMetricSetSelector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/cpu/CpuLoadMetricSetSelector.java
index c3f841fde9c0..8111cb620b40 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/cpu/CpuLoadMetricSetSelector.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/cpu/CpuLoadMetricSetSelector.java
@@ -52,7 +52,7 @@ public static CpuLoadMetricSet getCpuLoadMetricSet(String vendorName) {
             vmType = JvmUtils.getType();
         }
         JvmVersion vmVersion = JvmUtils.getVersion();
-        if (vmType == JvmType.ORACLE) {
+        if (vmType == JvmType.ORACLE || vmType == JvmType.OPENJDK) {
             if (vmVersion.onOrAfter(JvmVersion.JAVA_7)) {
                 classToLoad = ORACLE_CPU_LOAD_METRIC_SET_FQCN;
             } else if (vmVersion.onOrAfter(JvmVersion.JAVA_5)) {


Test patch: