anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: avaje/avaje-http
Issue: Support List/Array Types in client generation

The following fails to compile.
```
@Client
public interface ApiClient {

  @Post("/post")
  HttpResponse<byte[]> call(Holder[] body);

  @Post("/post2")
  HttpResponse<byte[]> call2(List<Holder> body);

  public static record Holder(int s) {}
}
```
It seems that imports are not being added correctly to the generated client.
```
import com.jojo.javalin.api.client.ApiClient;
import com.jojo.javalin.api.client.ApiClient.Holder[];
import io.avaje.http.api.*;
import io.avaje.http.client.HttpApiProvider;
import io.avaje.http.client.HttpClientContext;
import java.net.http.HttpResponse;
import java.util.List;

@Generated("avaje-http-client-generator")
public class ApiClientHttpClient implements ApiClient {

  private final HttpClientContext clientContext;

  public ApiClientHttpClient(HttpClientContext ctx) {
    this.clientContext = ctx;
  }

  // POST /post
  @Override
  public HttpResponse<byte[]> call(Holder[] body) {
    return clientContext.request()
      .path("post")
      .body(body)
      .POST()
      .asByteArray();
  }

  // POST /post2
  @Override
  public HttpResponse<byte[]> call2(List<Holder> body) {
    return clientContext.request()
      .path("post2")
      .body(body)
      .POST()
      .asByteArray();
  }
... rest of the generation is fine
```

Changed files:
http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java

diff --git a/http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java b/http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java
index ff0c4f3b..5c0abe1d 100644
--- a/http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java
+++ b/http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java
@@ -33,8 +33,13 @@ class ClientMethodWriter {
 
   void addImportTypes(ControllerReader reader) {
     reader.addImportTypes(returnType.importTypes());
-    for (MethodParam param : method.params()) {
-      param.addImports(reader);
+    for (final MethodParam param : method.params()) {
+      final var type = param.utype();
+      final var type0 = type.param0();
+      final var type1 = type.param1();
+      reader.addImportType(type.mainType().replace("[]", ""));
+      if (type0 != null) reader.addImportType(type0.replace("[]", ""));
+      if (type1 != null) reader.addImportType(type1.replace("[]", ""));
     }
   }
 
@@ -263,4 +268,4 @@ class ClientMethodWriter {
     return type0.equals("java.net.http.HttpResponse");
   }
 
-}
+}
\\ No newline at end of file
Repository: karamelchef/karamel
Issue: chmod id_rsa to 600

The generated keys have too open permissions on apple/linux. Apple won't let you run 
"ssh -i .karamel/.ssh/id_rsa ubuntu@...."
unless you change the permissions.
It's a one-line fix, i guess.


Changed files:
karamel-core/src/main/java/se/kth/karamel/common/SshKeyService.java

diff --git a/karamel-core/src/main/java/se/kth/karamel/common/SshKeyService.java b/karamel-core/src/main/java/se/kth/karamel/common/SshKeyService.java
index a669166b..1b071f18 100644
--- a/karamel-core/src/main/java/se/kth/karamel/common/SshKeyService.java
+++ b/karamel-core/src/main/java/se/kth/karamel/common/SshKeyService.java
@@ -12,12 +12,17 @@ import java.io.FileReader;
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
+import java.nio.file.attribute.PosixFilePermission;
+import java.nio.file.Files;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Scanner;
+import java.util.Set;
 import org.apache.log4j.Logger;
 import org.jclouds.ssh.SshKeys;
 import se.kth.karamel.common.exception.SshKeysNotfoundException;
 
+
 /**
  *
  * @author kamal
@@ -42,6 +47,14 @@ public class SshKeyService {
     }
     File pubFile = new File(folder, Settings.SSH_PUBKEY_FILENAME);
     File priFile = new File(folder, Settings.SSH_PRIKEY_FILENAME);
+    Set<PosixFilePermission> perms = new HashSet<PosixFilePermission>();
+    perms.add(PosixFilePermission.OWNER_READ);
+    perms.add(PosixFilePermission.OWNER_WRITE);
+    try {
+       Files.setPosixFilePermissions(priFile.toPath(), perms);
+    } catch (IOException ex) {
+	logger.error("If you are running Windows, this is not an error. Failed to set posix permissions on generated private ssh-key. ", ex);
+    }
     Map<String, String> keys = SshKeys.generate();
     String pub = keys.get("public");
     String pri = keys.get("private");
Repository: gwtmaterialdesign/gwt-material-addins
Issue: MaterialAutoComplete.setFocus(true) does nothing

It appears that the call to **uiObject.getElement().focus()** in **FocusableMixin.java** results in **focus()** getting called on the underlying **DIV**, rather than on the **INPUT**, which is nested 3 levels deeper.
The issue is related to **AutocompleteType.CHIP**
GMD 1.5.1, GMA 1.5.1


Changed files:
src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java

diff --git a/src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java b/src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java
index dc7258f4..ee63a4d2 100644
--- a/src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java
+++ b/src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java
@@ -33,6 +33,7 @@ import gwt.material.design.client.MaterialDesignBase;
 import gwt.material.design.client.base.*;
 import gwt.material.design.client.base.mixin.CssTypeMixin;
 import gwt.material.design.client.base.mixin.ErrorMixin;
+import gwt.material.design.client.base.mixin.FocusableMixin;
 import gwt.material.design.client.base.mixin.ProgressMixin;
 import gwt.material.design.client.constants.IconType;
 import gwt.material.design.client.constants.ProgressType;
@@ -185,6 +186,9 @@ public class MaterialAutoComplete extends MaterialWidget implements HasError, Ha
 
     private final ErrorMixin<MaterialAutoComplete, MaterialLabel> errorMixin = new ErrorMixin<>(this,
             lblError, list);
+
+    private FocusableMixin<MaterialWidget> focusableMixin;
+
     public final CssTypeMixin<AutocompleteType, MaterialAutoComplete> typeMixin = new CssTypeMixin<>(this);
 
     /**
@@ -431,6 +435,12 @@ public class MaterialAutoComplete extends MaterialWidget implements HasError, Ha
         clearErrorOrSuccess();
     }
 
+    @Override
+    protected FocusableMixin<MaterialWidget> getFocusableMixin() {
+        if(focusableMixin == null) { focusableMixin = new FocusableMixin<>(new MaterialWidget(itemBox.getElement())); }
+        return focusableMixin;
+    }
+
     /**
      * @return the item values on autocomplete
      * @see #getValue()
Repository: alfasoftware/morf
Issue: Upgrade step with description longer than 200 characters fails when run

The `UpgradeAudit` table has a 200-character `description` field.  This is populated with the `.getDescription()` from the `UpgradeStep` when it is applied.  If the description is over 200 characters, this isn't detected until the upgrade step is run and the insert fails.

`UpgradeTestHelper` is supposed to check this sort of thing.

Changed files:
morf-testsupport/src/main/java/org/alfasoftware/morf/testing/UpgradeTestHelper.java

diff --git a/morf-testsupport/src/main/java/org/alfasoftware/morf/testing/UpgradeTestHelper.java b/morf-testsupport/src/main/java/org/alfasoftware/morf/testing/UpgradeTestHelper.java
index 09c73f79..45af5dd8 100755
--- a/morf-testsupport/src/main/java/org/alfasoftware/morf/testing/UpgradeTestHelper.java
+++ b/morf-testsupport/src/main/java/org/alfasoftware/morf/testing/UpgradeTestHelper.java
@@ -189,6 +189,7 @@ public class UpgradeTestHelper {
     // Check the upgrade step has a description
     final String description = upgradeStep.getDescription();
     assertTrue("Should have a description", StringUtils.isNotEmpty(description));
+    assertTrue("Description must not be more than 200 characters", description.length() <= 200);
 
     // Descriptions should not end with full-stops
     if (description.endsWith(".")) {
Repository: ballerina-platform/openapi-tools
Issue: Invalid access of record field when the field name `key`

**Description:**

Generated Code
```bal
map<anydata> queryParam = {"id": id, "details": details, "key": self.apiKeyConfig.''key};
```

Expected Code
```bal
map<anydata> queryParam = {"id": id, "details": details, "key": self.apiKeyConfig.'key};
```

Found in several connectors
Ex: [BrowShot](https://github.com/ballerina-platform/openapi-connectors/blob/main/openapi/browshot/openapi.yaml)

**Steps to reproduce:**

**Affected Versions:**

**OS, DB, other environment details and versions:**

**Related Issues (optional):**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

**Suggested Labels (optional):**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees (optional):**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->


Changed files:
openapi-cli/src/main/java/io/ballerina/openapi/generators/client/FunctionBodyGenerator.java

diff --git a/openapi-cli/src/main/java/io/ballerina/openapi/generators/client/FunctionBodyGenerator.java b/openapi-cli/src/main/java/io/ballerina/openapi/generators/client/FunctionBodyGenerator.java
index 676c46d6..37efda31 100644
--- a/openapi-cli/src/main/java/io/ballerina/openapi/generators/client/FunctionBodyGenerator.java
+++ b/openapi-cli/src/main/java/io/ballerina/openapi/generators/client/FunctionBodyGenerator.java
@@ -728,7 +728,7 @@ public class FunctionBodyGenerator {
                         createSimpleNameReferenceNode(createIdentifierToken(SELF)), createToken(DOT_TOKEN),
                         apiKeyConfigParamNode);
                 SimpleNameReferenceNode valueExpr = createSimpleNameReferenceNode(createIdentifierToken(
-                        getValidName(getValidName(apiKey, false), false)));
+                        getValidName(apiKey, false)));
                 SpecificFieldNode specificFieldNode;
                 ExpressionNode apiKeyExpr = createFieldAccessExpressionNode(
                         fieldExpr, createToken(DOT_TOKEN), valueExpr);
Repository: ballerina-platform/openapi-tools
Issue: The Ballerina to OpenAPI command return type casting error for listeners

**Description:**
Related issue https://github.com/wso2-enterprise/choreo/issues/7447
Since the Ballerina to OpenAPI command implement base on the HTTP protocol , it won't support for listener and other parameters from other packages

Changed files:
openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIEndpointMapper.java

diff --git a/openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIEndpointMapper.java b/openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIEndpointMapper.java
index a7f8a624..7e20d736 100644
--- a/openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIEndpointMapper.java
+++ b/openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIEndpointMapper.java
@@ -158,7 +158,7 @@ public class OpenAPIEndpointMapper {
         if (list.isPresent()) {
             SeparatedNodeList<FunctionArgumentNode> arg = (list.get()).arguments();
             port = arg.get(0).toString();
-            if (arg.size() > 1) {
+            if (arg.size() > 1 && (arg.get(1) instanceof NamedArgumentNode)) {
                 ExpressionNode bLangRecordLiteral = ((NamedArgumentNode) arg.get(1)).expression();
                 if (bLangRecordLiteral instanceof MappingConstructorExpressionNode) {
                     host = extractHost((MappingConstructorExpressionNode) bLangRecordLiteral);
Repository: ballerina-platform/openapi-tools
Issue: Json open-api definition files are not supported in the tool

**Description:**
> When executing `bal openapi -i openapi.json --mode client` on a json type open-api definition file following error is returned
```
Invalid file type. Provide either a .yaml or .json file.
```
**Suggested Labels:**
* Bug

Changed files:
openapi-cli/src/main/java/io/ballerina/generators/GeneratorUtils.java

diff --git a/openapi-cli/src/main/java/io/ballerina/generators/GeneratorUtils.java b/openapi-cli/src/main/java/io/ballerina/generators/GeneratorUtils.java
index 00c1f58c..e25c6c81 100644
--- a/openapi-cli/src/main/java/io/ballerina/generators/GeneratorUtils.java
+++ b/openapi-cli/src/main/java/io/ballerina/generators/GeneratorUtils.java
@@ -414,9 +414,8 @@ public class GeneratorUtils {
         if (!Files.exists(contractPath)) {
             throw new BallerinaOpenApiException(ErrorMessages.invalidFilePath(definitionPath.toString()));
         }
-        if (!(definitionPath.toString().endsWith(".yaml") || definitionPath.endsWith(".json") ||
-                definitionPath.toString().endsWith(
-                ".yml"))) {
+        if (!(definitionPath.toString().endsWith(".yaml") || definitionPath.toString().endsWith(".json") ||
+                definitionPath.toString().endsWith(".yml"))) {
             throw new BallerinaOpenApiException(ErrorMessages.invalidFileType());
         }
         String openAPIFileContent = Files.readString(definitionPath);