anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: opencb/opencga
Issue: OpenCGA main command line sets too many Storage arguments

The following opencga-storage arguments should not be set by the main OpenCGA command line:
- include-genotypes
- compress-genotypes
- include-stats


Changed files:
opencga-analysis/src/main/java/org/opencb/opencga/analysis/storage/AnalysisFileIndexer.java

diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/storage/AnalysisFileIndexer.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/storage/AnalysisFileIndexer.java
index e0ab3801c3..f90a1bd147 100644
--- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/storage/AnalysisFileIndexer.java
+++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/storage/AnalysisFileIndexer.java
@@ -285,9 +285,6 @@ public class AnalysisFileIndexer {
                     .append(" --database ").append(dbName)
                     .append(" --input ").append(catalogManager.getFileUri(file))
                     .append(" --outdir ").append(outDirUri)
-                    .append(" --include-genotypes ")
-                    .append(" --compress-genotypes ")
-                    .append(" --include-stats ")
 //                    .append(" --sample-ids ").append(sampleIdsString)
 //                    .append(" --credentials ")
                     ;
Repository: opencb/opencga
Issue: Ensure that indices are created in mongo

It's not clear if we are creating indices consistently in all branches and in all the collections that need them.

For example, in 0.5 currently there are no indices in `variants` collection.


Changed files:
opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/VariantMongoDBWriter.java

diff --git a/opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/VariantMongoDBWriter.java b/opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/VariantMongoDBWriter.java
index 2d99b9223d..5504f07c64 100644
--- a/opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/VariantMongoDBWriter.java
+++ b/opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/VariantMongoDBWriter.java
@@ -460,6 +460,24 @@ public class VariantMongoDBWriter extends VariantDBWriter {
         }
         logger.info("POST");
         writeSourceSummary(source);
+
+        DBObject empty = new BasicDBObject();   // are we sure a null won't raise nullptrException? it doesn't seem to be checks anywhere
+        variantMongoCollection.createIndex(new BasicDBObject("_at.chunkIds", 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject("annot.xrefs.id", 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject("annot.ct.so", 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject(DBObjectToVariantConverter.IDS_FIELD, 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject(DBObjectToVariantConverter.CHROMOSOME_FIELD, 1), empty);
+        variantMongoCollection.createIndex(
+                new BasicDBObject(DBObjectToVariantConverter.FILES_FIELD + "." + DBObjectToVariantSourceEntryConverter.STUDYID_FIELD, 1)
+                        .append(DBObjectToVariantConverter.FILES_FIELD + "." + DBObjectToVariantSourceEntryConverter.FILEID_FIELD, 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject("st.maf", 1), empty);
+        variantMongoCollection.createIndex(new BasicDBObject("st.mgf", 1), empty);
+        variantMongoCollection.createIndex(
+                new BasicDBObject(DBObjectToVariantConverter.CHROMOSOME_FIELD, 1)
+                        .append(DBObjectToVariantConverter.START_FIELD, 1)
+                        .append(DBObjectToVariantConverter.END_FIELD, 1), empty);
+        logger.debug("sent order to create indices");
+
         logger.debug("checkExistsTime " + checkExistsTime / 1000000.0 + "ms ");
         logger.debug("checkExistsDBTime " + checkExistsDBTime / 1000000.0 + "ms ");
         logger.debug("bulkTime " + bulkTime / 1000000.0 + "ms ");
Repository: wso2/micro-integrator
Issue: Message Processors are scheduled in paused stated when hot deployed.

**Description:**
$subject.

**Steps**

- Deploy a MP in MI.
- Delete the file and add it again.
- It will be scheduled and be in paused state.

Changed files:
components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/core/impl/FileBasedTaskRepository.java

diff --git a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/core/impl/FileBasedTaskRepository.java b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/core/impl/FileBasedTaskRepository.java
index b07a858b3..506bded48 100644
--- a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/core/impl/FileBasedTaskRepository.java
+++ b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/core/impl/FileBasedTaskRepository.java
@@ -258,6 +258,7 @@ public class FileBasedTaskRepository implements TaskRepository {
             if (metaFile.exists()) {
                 if (metaFile.delete()) {
                     deleteSuccess = true;
+                    taskMetaPropMap.remove(getSystemDependentPath(resourcePath + taskName));
                 } else {
                     log.error("Error occurred while deleting task. Unable to delete: " + getSystemDependentPath(
                             resourcePath + tasksPath + "/_meta_" + taskName));
Repository: wso2/micro-integrator
Issue: When the Message Processor gets deactivated due to an issue, it keeps deactivated state even after restarting the server. 

**Description:**
After redeploying a carbon application / restarted the server, the Message Processor goes to a Paused state. 

If the Message Processor gets deactivated due to some issue (as an example, the endpoint not existing), even if the car file is redeployed and the server is restarted, the message processor is in the PAUSED state. 

```
[2020-06-17 17:22:23,953]  INFO {ScheduledMessageProcessor} - Started message processor. [Processor1].
[2020-06-17 17:22:23,953]  INFO {AbstractQuartzTaskManager} - Task paused: [ESB_TASK][MSMP_Processor1_0]
[2020-06-17 17:22:23,954]  INFO {ScheduledMessageProcessor} - Successfully deactivated the message processor [Processor1]
```
In /mi-home/registry/governance/repository/components/org.apache.synapse.message.processor/Processor1.properties file, 
**MESSAGE_PROCESSOR_STATE=PAUSED**

Tested pack: https://wso2.org/jenkins/job/products/job/micro-integrator/lastSuccessfulBuild/artifact/distribution/target/wso2mi-1.2.0-SNAPSHOT.zip

[JMSMessageStoreCompositeApplication_1.0.0.car.zip](https://github.com/wso2/micro-integrator/files/4792291/JMSMessageStoreCompositeApplication_1.0.0.car.zip)


Changed files:
components/mediation/registry/org.wso2.micro.integrator.registry/src/main/java/org/wso2/micro/integrator/registry/MicroIntegratorRegistry.java

diff --git a/components/mediation/registry/org.wso2.micro.integrator.registry/src/main/java/org/wso2/micro/integrator/registry/MicroIntegratorRegistry.java b/components/mediation/registry/org.wso2.micro.integrator.registry/src/main/java/org/wso2/micro/integrator/registry/MicroIntegratorRegistry.java
index 5b85cfa69..14b843a0a 100644
--- a/components/mediation/registry/org.wso2.micro.integrator.registry/src/main/java/org/wso2/micro/integrator/registry/MicroIntegratorRegistry.java
+++ b/components/mediation/registry/org.wso2.micro.integrator.registry/src/main/java/org/wso2/micro/integrator/registry/MicroIntegratorRegistry.java
@@ -618,14 +618,19 @@ public class MicroIntegratorRegistry extends AbstractRegistry {
      */
     private void removeResource(String key) {
         try {
-            File resource = new File(new URI(resolveRegistryURI(key)));
+            String resourcePath = resolveRegistryURI(key);
+            File resource = new File(new URI(resourcePath));
             if (resource.exists()) {
                 if (resource.isFile()) {
                     deleteFile(resource);
+                    // the properties also need to be removed when removing the resource
+                    File resourceProperties = new File(new URI(resourcePath + PROPERTY_EXTENTION));
+                    if (resourceProperties.exists()) {
+                        deleteFile(resourceProperties);
+                    }
                 } else if (resource.isDirectory()) {
                     deleteDirectory(resource);
                 }
-
             } else {
                 handleException("Parent folder: " + key + " does not exists.");
             }
Repository: wso2/micro-integrator
Issue: Error thrown when securevault.sh is run

**Description:**
The following exception is thrown when securevault.sh is run as described in https://ei.docs.wso2.com/en/latest/micro-integrator/develop/creating-artifacts/encrypting-synapse-passwords/#encrypting-passwords-for-synapse-configurations
```
writing to: /home/user/temp/wso2mi-1.1.0/registry/config/repository/components/secure-vault/secure-vault.properties
org.wso2.micro.integrator.security.vault.SecureVaultException: Error loading properties from a file at : /home/user/temp/wso2mi-1.1.0/registry/config/repository/components/secure-vault/secure-vault.properties Error : /home/user/temp/wso2mi-1.1.0/registry/config/repository/components/secure-vault/secure-vault.properties (No such file or directory)
	at org.wso2.micro.integrator.security.vault.utils.Utils.writeKeyToFile(Utils.java:83)
	at org.wso2.micro.integrator.security.vault.VaultTool.main(VaultTool.java:69)
Caused by: java.io.FileNotFoundException: /home/user/temp/wso2mi-1.1.0/registry/config/repository/components/secure-vault/secure-vault.properties (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at org.wso2.micro.integrator.security.vault.utils.Utils.writeKeyToFile(Utils.java:68)
	... 1 more
```

Changed files:
components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/vault/utils/Utils.java

diff --git a/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/vault/utils/Utils.java b/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/vault/utils/Utils.java
index 6136ed394..15a2ac781 100644
--- a/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/vault/utils/Utils.java
+++ b/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/vault/utils/Utils.java
@@ -65,6 +65,13 @@ public class Utils {
                 throw new SecureVaultException(msg);
             }
         } else {
+            if (!file.exists()) {
+                try {
+                    file.createNewFile();
+                } catch (IOException e) {
+                    throw new SecureVaultException("Error while creating " + filePath);
+                }
+            }
             try (FileInputStream fileInputStream = new FileInputStream(file)) {
                 keys.load(fileInputStream);
                 if (keys.containsKey(alias)) {
Repository: wso2/micro-integrator
Issue: Nodes with duplicate Ids are allowed to join cluster.

**Description:**
When two nodes have same node-id , they are still allowed to join the cluster with a warn log.

Changed files:
components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCoordinationStrategy.java

diff --git a/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCoordinationStrategy.java b/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCoordinationStrategy.java
index 6119670e3..0c3e54ede 100644
--- a/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCoordinationStrategy.java
+++ b/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCoordinationStrategy.java
@@ -230,10 +230,8 @@ public class RDBMSCoordinationStrategy implements CoordinationStrategy {
                     }
 
                     if (isNodeExist) {
-                        log.warn("Node with ID " + localNodeId + " in group " + localGroupId +
-                                 " already exists.");
-                        stillCoordinator = communicationBusContext.
-                                   updateCoordinatorHeartbeat(localNodeId, localGroupId, System.currentTimeMillis());
+                        throw new ClusterCoordinationException(
+                                "Node with ID " + localNodeId + " in group " + localGroupId + " already exists.");
 
                     }
                     isCoordinatorTasksRunning = true;
Repository: wso2/micro-integrator
Issue: Cannot create a new super admin user

**Description:**
When we use a JDBC user store and try to add a superuser using the following config, the newly created user will be a non-admin user if there is a super admin user already present in the user store. But if we try the same in EI 660, it will create a new super admin user.

```toml
[super_admin]
username = "admin2"
password = "admin2"
admin_role = "admin"
create_admin_account = true
```

**Steps to reproduce:**
1. Configure a [JDBC user store](https://apim.docs.wso2.com/en/latest/install-and-setup/setup/mi-setup/user_stores/setting_up_a_userstore/)
2. Start the MI pack without adding the `super_admin` element to the toml. This will create a super admin user as `admin`.
3. Add the above `super_admin` element to the toml and restart the server.
4. If you login to the dashboard and check, the newly created super admin user `admin2` will be a non admin user.
5. If we check the user store database, it doesn't have the admin role assigned to the new user `admin2`.

Changed files:
components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/user/core/common/AbstractUserStoreManager.java

diff --git a/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/user/core/common/AbstractUserStoreManager.java b/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/user/core/common/AbstractUserStoreManager.java
index 6e56da6d1..d581b18e4 100644
--- a/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/user/core/common/AbstractUserStoreManager.java
+++ b/components/org.wso2.micro.integrator.security/src/main/java/org/wso2/micro/integrator/security/user/core/common/AbstractUserStoreManager.java
@@ -5921,7 +5921,7 @@ public abstract class AbstractUserStoreManager implements UserStoreManager, Pagi
             } else if (addAdmin) {
                 try {
                     this.doAddUser(adminUserName, realmConfig.getAdminPassword(),
-                            null, null, null, false);
+                            new String[]{adminRoleName}, null, null, false);
                 } catch (Exception e) {
                     String message = "Admin user has not been created. " +
                             "Error occurs while creating Admin user in primary user store.";
Repository: wso2/micro-integrator
Issue: [Management API] NPE when calling CApp resource without Accept header

**Description:**

When we try to retrieve information about a capp, MI will throw an NPE if we haven't defined the `Accept` header in the request. To fix this we need to have a null check at [[1](https://github.com/wso2/micro-integrator/blob/master/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java#L116)].

**Steps to reproduce:**
1. Deploy some capp
2. Call the Management API without Accept header
```
curl -X GET "https://localhost:9164/management/applications?carbonAppName=HelloCApp" -H "Authorization: Bearer TOKEN" -k
```


Changed files:
components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java

diff --git a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java
index a17f6e934..f8de287d6 100644
--- a/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java
+++ b/components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/main/java/org/wso2/micro/integrator/management/apis/CarbonAppResource.java
@@ -113,7 +113,7 @@ public class CarbonAppResource extends APIResource {
                 if (Objects.nonNull(param)) {
                     String acceptHeader = (String) SecurityUtils.getHeaders(axis2MessageContext)
                                                                 .get(HTTPConstants.HEADER_ACCEPT);
-                    if (acceptHeader.equalsIgnoreCase(Constants.MEDIA_TYPE_APPLICATION_OCTET_STREAM)) {
+                    if (Constants.MEDIA_TYPE_APPLICATION_OCTET_STREAM.equals(acceptHeader)) {
                         populateFileContent(messageContext, param);
                     } else {
                         populateCarbonAppData(messageContext, param);
Repository: finos/waltz
Issue: Survey export from run view doesn't export NOT_STARTED instances

### Description

Works for the IN_PROGRESS and COMPLETED/APPROVED exports

### Waltz Version

1.39.1

### Steps to Reproduce

1.
2.
3.
...


### Expected Result

Should export a list of not started survey instances (number indicated in the progress bar)

### Actual Result

Produces an export with no data

Changed files:
waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/SurveyInstanceExtractor.java

diff --git a/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/SurveyInstanceExtractor.java b/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/SurveyInstanceExtractor.java
index 222114d0d..464692fc6 100644
--- a/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/SurveyInstanceExtractor.java
+++ b/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/SurveyInstanceExtractor.java
@@ -380,13 +380,13 @@ public class SurveyInstanceExtractor implements DataExtractor {
                         sqr.LIST_RESPONSE_CONCAT)
                 .select(responseNameField,
                         responseExtIdField)
-                .select(DSL.when(si.ORIGINAL_INSTANCE_ID.isNull(), "Yes").else_("No").as("Latest"))  //Could always just return latest instance
+                .select(DSL.when(si.ORIGINAL_INSTANCE_ID.isNull(), "Yes").otherwise("No").as("Latest"))
                 .select(st.EXTERNAL_ID)
-                .from(sqr)
-                .innerJoin(sq).on(sqr.QUESTION_ID.eq(sq.ID))
-                .innerJoin(si).on(sqr.SURVEY_INSTANCE_ID.eq(si.ID))
-                .innerJoin(sr).on(sr.ID.eq(si.SURVEY_RUN_ID))
-                .innerJoin(st).on(st.ID.eq(sr.SURVEY_TEMPLATE_ID))
+                .from(st)
+                .innerJoin(sr).on(sr.SURVEY_TEMPLATE_ID.eq(st.ID))
+                .innerJoin(si).on(si.SURVEY_RUN_ID.eq(sr.ID))
+                .innerJoin(sq).on(sq.SURVEY_TEMPLATE_ID.eq(st.ID))
+                .leftJoin(sqr).on(sqr.SURVEY_INSTANCE_ID.eq(si.ID).and(sqr.QUESTION_ID.eq(sq.ID)))
                 .where(dsl.renderInlined(condition));
 
         Result<Record> results = extractAnswersQuery.fetch();
Repository: snowflakedb/snowflake-jdbc
Issue: SNOW-752403: Enabling Illegal Reflective Access Warnings

<!--
If you need urgent assistance then file the issue using the support process: 
https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge 
otherwise continue here. 
-->


Please answer these questions before submitting your issue. 
In order to accurately debug the issue this information is required. Thanks!

### 1. What version of JDBC driver are you using?
`v3.13.11`
   
### 2. What operating system and processor architecture are you using?
`Ubuntu 20.04.5 LTS x86_64`
   
### 3. What version of Java are you using?
`Java 16`
   
### 4. What did you do?

Currently, the `SnowflakeDriver.disableIllegalReflectiveAccessWarning()` suppresses the `IllegalAccessLogger` . This results in no warnings shown (`WARNING: Illegal reflective access by...` ). Up till JDK 16, there is an option in jvm `illegal-access=permit`. 
[Reference](https://docs.oracle.com/javase/9/tools/java.htm#JSWOR624). This option will issue a warning log in the first illegal reflective access, but won't issue a statement after the first occurrence. Adding `snowflake-jdbc` as a dependency would suppress these logs. Now, since JDK 17 has removed the `illegal-access` option, the only way to suppress the exceptions is to use the `add-opens` option ([Reference](https://docs.oracle.com/en/java/javase/18/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7744EF96-5899-4FB2-B34E-86D49B2E89B6)). In order to upgade to JDK 17, one should know all the packages which should be granted access to internal reflective APIs, so that they can be included in the `add-opens` option. This logger suppression results in no visibility of the application since there will be no warnings.  

### 5. What did you expect to see?

This suppression should be removed and instead the jvm option `illegal-access=permit` should be used.



Changed files:
src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java

diff --git a/src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java b/src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java
index 45d4f5ad..66c60666 100644
--- a/src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java
+++ b/src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java
@@ -61,6 +61,10 @@ public class SnowflakeDriver implements Driver {
       disableArrowResultFormat = true;
       disableArrowResultFormatMessage = t.getLocalizedMessage();
     }
+    if ("true"
+        .equals(SnowflakeUtil.systemGetProperty("snowflake.jdbc.enable.illegalAccessWarning"))) {
+      return;
+    }
     disableIllegalReflectiveAccessWarning();
   }
Repository: zrips/jobs
Issue: MELON not recognized as block for Break or Place

Doesn't look like MELON is being recognized as a proper block type on 1.13.

[Jobs] Job Farmer has an invalid Break type property: MELON! Material must be a block!
[Jobs] Job Farmer has an invalid Place type property: MELON! Material must be a block!

On 1.12 and earlier versions, MELON referred to the melon slice, and MELON_BLOCK was the block.  This is no longer the case for 1.13, as it is MELON for the block, and MELON_SLICE for the slice. 


Changed files:
src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java

diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java
index 9073accc..60b4a211 100644
--- a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java
+++ b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java
@@ -1089,7 +1089,7 @@ public class ItemManager {
 	MAP(395, 0, 21655, "Empty Map", "EMPTY_MAP"),
 	MELON(103, 0, 25172, "Melon", "Melon_Block"),
 	MELON_SEEDS(362, 0, 18340, "Melon Seeds", ""),
-	MELON_SLICE(360, 0, 5347, "Melon", "Melon Slice"),
+	MELON_SLICE(360, 0, 5347, "Melon Slice", ""),
 	MELON_STEM(105, 0, 8247, "Melon Stem", "MELON_STEM"),
 	MILK_BUCKET(335, 0, 9680, "Milk Bucket", ""),
 	MINECART(328, 0, 14352, "Minecart", ""),
Repository: zrips/jobs
Issue: Jobs db not 'transferring' data to game, and/or retaining all jobs info

After updating to 1.9.4 from 1.8.8, I am getting complaints that 'my jobs are losing levels'. I have updated the plugin to vs. 3.5.1. I have tried using MySQL instead of SQLite, and have tried manually adding levels/xp/points either in-game, or through the MySQL itself. The issue appears to be this: the data is saved correctly in the database (sqlite was what we started with) but it fails to 'remember' ALL of the jobs' data when /jobs stats is run. It only lists up to three (limit is 3 jobs, default) jobs and their levels, and 99% the level is incorrect. I haven't seen any errors print to the console, so I'm not sure where to begin looking to get this resolved. It had been going on since the update to 1.9.4. 

Thanks!


Changed files:
src/main/java/com/gamingmesh/jobs/economy/PointsData.java

diff --git a/src/main/java/com/gamingmesh/jobs/economy/PointsData.java b/src/main/java/com/gamingmesh/jobs/economy/PointsData.java
index c6c8de12..cc871d39 100644
--- a/src/main/java/com/gamingmesh/jobs/economy/PointsData.java
+++ b/src/main/java/com/gamingmesh/jobs/economy/PointsData.java
@@ -3,6 +3,7 @@ package com.gamingmesh.jobs.economy;
 import java.util.HashMap;
 import java.util.UUID;
 
+import com.gamingmesh.jobs.Jobs;
 import com.gamingmesh.jobs.container.PlayerPoints;
 
 public class PointsData {
@@ -25,11 +26,11 @@ public class PointsData {
     }
 
     public void addPlayer(UUID uuid, double points, double total) {
-	if (!Pointbase.containsKey(uuid))
-	    Pointbase.put(uuid, new PlayerPoints(points, total));
+    addPlayer(uuid, new PlayerPoints(points,total));
     }
 
     public void addPlayer(UUID uuid, PlayerPoints points) {
+    if (Jobs.getGCManager().MultiServerCompatability()&&Pointbase.containsKey(uuid)) Pointbase.remove(uuid);
 	if (!Pointbase.containsKey(uuid))
 	    Pointbase.put(uuid, points);
     }
Repository: zrips/jobs
Issue: The "jobsr_description_" does not work!

***Detailed description of the issue:***

`%jobsr_description_(jname/number)% - Returns jobs description` **Does not work!**


---


**Jobs version:** Dev (commit 52547b94a566574cad1e318c2df985b38fc6a8e7)

**Server Type (Spigot/Paper/etc):** Spigot

**Server Version (using `/ver`):** 1.12.2

Changed files:
src/main/java/com/gamingmesh/jobs/container/Job.java

diff --git a/src/main/java/com/gamingmesh/jobs/container/Job.java b/src/main/java/com/gamingmesh/jobs/container/Job.java
index 2510203e..da47738f 100644
--- a/src/main/java/com/gamingmesh/jobs/container/Job.java
+++ b/src/main/java/com/gamingmesh/jobs/container/Job.java
@@ -566,7 +566,8 @@ public class Job {
 
 	if (fDescription != null) {
 	    this.fDescription.addAll(fDescription);
-	}
+        this.description = String.join("\\n",this.fDescription);
+    }
     }
 
     public void setMaxLevelCommands(List<String> commands) {
Repository: zrips/jobs
Issue: stripping logs are respected as stripped_*_log block place

***Description of issue:***
---
When stripping logs by right clicking on it with an axe, Jobs respects it as if it has been placed which results in unwanted payments.

**CONFIG SECTION:**
```
*Extracted from jobConfig.yml*
Jobs:
  Gaertner:
    Place:
      STRIPPED_ACACIA_LOG:
        income: -2.49
        experience: -2.49
```
-2.49 will be charged if a player right clicks with an axe on acacia log to strip it. (should only happen when *placing* acacia log)

---

**Server Type (Spigot/Paperspigot/etc):** 
paperspigot

**Server Version (using `/ver`):** 
git-Paper-204 (MC: 1.16.3)

**Relevant plugins (Delete if this isn't needed):**
Jobs version 4.16.2


Changed files:
src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java

diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java
index 0c9f5ddc..522291ab 100644
--- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java
+++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java
@@ -423,6 +423,10 @@ public class JobsPaymentListener implements Listener {
 
     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
     public void onBlockPlace(BlockPlaceEvent event) {
+	// A tool should not trigger a BlockPlaceEvent (fixes stripping logs bug #940)
+	if (CMIMaterial.get(event.getItemInHand().getType()).isTool())
+		return;
+
 	Block block = event.getBlock();
 
 	//disabling plugin in world
Repository: kruize/autotune
Issue: Typo with percentile for cpu requests recommendations

The cpu requests generated by algorithm is using 0.9 percentile instead of 90th percentile.

https://github.com/kruize/autotune/blob/0c7043d8cd8dd369265e1c9f0517863c7830815b/src/main/java/com/autotune/analyzer/recommendations/GenerateRecommendation.java#L141

Changed files:
src/main/java/com/autotune/analyzer/recommendations/engine/DurationBasedRecommendationEngine.java

diff --git a/src/main/java/com/autotune/analyzer/recommendations/engine/DurationBasedRecommendationEngine.java b/src/main/java/com/autotune/analyzer/recommendations/engine/DurationBasedRecommendationEngine.java
index b9d492df..ecf1be0f 100644
--- a/src/main/java/com/autotune/analyzer/recommendations/engine/DurationBasedRecommendationEngine.java
+++ b/src/main/java/com/autotune/analyzer/recommendations/engine/DurationBasedRecommendationEngine.java
@@ -123,7 +123,7 @@ public class DurationBasedRecommendationEngine implements KruizeRecommendationEn
                 if (null != format && !format.isEmpty())
                     break;
             }
-            recommendationConfigItem = new RecommendationConfigItem(CommonUtils.percentile(0.9, doubleList), format);
+            recommendationConfigItem = new RecommendationConfigItem(CommonUtils.percentile(98, doubleList), format);
 
         } catch (Exception e) {
             LOGGER.error("Not able to get getCPUCapacityRecommendation: " + e.getMessage());
@@ -173,7 +173,7 @@ public class DurationBasedRecommendationEngine implements KruizeRecommendationEn
                 if (null != format && !format.isEmpty())
                     break;
             }
-            recommendationConfigItem = new RecommendationConfigItem(CommonUtils.percentile(0.9, doubleList), format);
+            recommendationConfigItem = new RecommendationConfigItem(CommonUtils.percentile(100, doubleList), format);
         } catch (Exception e) {
             LOGGER.error("Not able to get getMemoryCapacityRecommendation: " + e.getMessage());
             recommendationConfigItem = new RecommendationConfigItem(e.getMessage());
Repository: smallrye/smallrye-graphql
Issue: NPE: some validation errors don't provide a query path

Some validation errors don't provide a query path, e.g. `LoneAnonymousOperation`. This results in a NPE in the call to `toJsonArray` in line 75 of the `ExecutionErrorsService`.

Would it be better to provide an empty path or null?

Changed files:
server/implementation/src/main/java/io/smallrye/graphql/execution/error/ExecutionErrorsService.java

diff --git a/server/implementation/src/main/java/io/smallrye/graphql/execution/error/ExecutionErrorsService.java b/server/implementation/src/main/java/io/smallrye/graphql/execution/error/ExecutionErrorsService.java
index a0df1b7f..372a08cf 100644
--- a/server/implementation/src/main/java/io/smallrye/graphql/execution/error/ExecutionErrorsService.java
+++ b/server/implementation/src/main/java/io/smallrye/graphql/execution/error/ExecutionErrorsService.java
@@ -117,9 +117,11 @@ public class ExecutionErrorsService {
 
     private JsonArray toJsonArray(List<?> list) {
         JsonArrayBuilder arrayBuilder = jsonBuilderFactory.createArrayBuilder();
-        for (Object o : list) {
-            if (o != null)
-                arrayBuilder.add(o.toString());
+        if (list != null && !list.isEmpty()) {
+            for (Object o : list) {
+                if (o != null)
+                    arrayBuilder.add(o.toString());
+            }
         }
         return arrayBuilder.build();
     }
Repository: smallrye/smallrye-graphql
Issue: Servlet module does not scan WEB-INF/lib JARs for MP GraphQL components

If annotated POJOs are located in a WAR's WEB-INF/classes directory, then everything works fine. But when running in Open Liberty with a WAR file that contains query/mutation/entity classes, etc in a JAR file in the WEB-INF/lib directory, those classes are not processed.  Since these JARs are part of the classpath of the web application, they should also be scanned for MP GraphQL components.

Changed files:
server/implementation-servlet/src/main/java/io/smallrye/graphql/servlet/IndexInitializer.java

diff --git a/server/implementation-servlet/src/main/java/io/smallrye/graphql/servlet/IndexInitializer.java b/server/implementation-servlet/src/main/java/io/smallrye/graphql/servlet/IndexInitializer.java
index fe13a935..272751c4 100644
--- a/server/implementation-servlet/src/main/java/io/smallrye/graphql/servlet/IndexInitializer.java
+++ b/server/implementation-servlet/src/main/java/io/smallrye/graphql/servlet/IndexInitializer.java
@@ -133,7 +133,7 @@ public class IndexInitializer {
         if (fileName.endsWith(DOT_CLASS)) {
             SmallRyeGraphQLServletLogging.log.processingFile(fileName);
             indexer.index(is);
-        } else if (fileName.endsWith(DOT_WAR)) {
+        } else if (fileName.endsWith(DOT_WAR) || fileName.endsWith(DOT_JAR)) {
             // necessary because of the thorntail arquillian adapter
             processJar(is, indexer);
         }