Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/RenameInputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**newMangledName** | **String** | New mangled function name | [optional] |
|**newName** | **String** | New function name | |
|**preserveAiDecompilation** | **Boolean** | Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated. | [optional] |



32 changes: 29 additions & 3 deletions src/main/java/ai/reveng/model/RenameInputBody.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public class RenameInputBody {
@javax.annotation.Nonnull
private String newName;

public static final String SERIALIZED_NAME_PRESERVE_AI_DECOMPILATION = "preserve_ai_decompilation";
@SerializedName(SERIALIZED_NAME_PRESERVE_AI_DECOMPILATION)
@javax.annotation.Nullable
private Boolean preserveAiDecompilation;

public RenameInputBody() {
}

Expand Down Expand Up @@ -100,6 +105,25 @@ public void setNewName(@javax.annotation.Nonnull String newName) {
}


public RenameInputBody preserveAiDecompilation(@javax.annotation.Nullable Boolean preserveAiDecompilation) {
this.preserveAiDecompilation = preserveAiDecompilation;
return this;
}

/**
* Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated.
* @return preserveAiDecompilation
*/
@javax.annotation.Nullable
public Boolean getPreserveAiDecompilation() {
return preserveAiDecompilation;
}

public void setPreserveAiDecompilation(@javax.annotation.Nullable Boolean preserveAiDecompilation) {
this.preserveAiDecompilation = preserveAiDecompilation;
}



@Override
public boolean equals(Object o) {
Expand All @@ -111,12 +135,13 @@ public boolean equals(Object o) {
}
RenameInputBody renameInputBody = (RenameInputBody) o;
return Objects.equals(this.newMangledName, renameInputBody.newMangledName) &&
Objects.equals(this.newName, renameInputBody.newName);
Objects.equals(this.newName, renameInputBody.newName) &&
Objects.equals(this.preserveAiDecompilation, renameInputBody.preserveAiDecompilation);
}

@Override
public int hashCode() {
return Objects.hash(newMangledName, newName);
return Objects.hash(newMangledName, newName, preserveAiDecompilation);
}

@Override
Expand All @@ -125,6 +150,7 @@ public String toString() {
sb.append("class RenameInputBody {\n");
sb.append(" newMangledName: ").append(toIndentedString(newMangledName)).append("\n");
sb.append(" newName: ").append(toIndentedString(newName)).append("\n");
sb.append(" preserveAiDecompilation: ").append(toIndentedString(preserveAiDecompilation)).append("\n");
sb.append("}");
return sb.toString();
}
Expand All @@ -143,7 +169,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("new_mangled_name", "new_name"));
openapiFields = new HashSet<String>(Arrays.asList("new_mangled_name", "new_name", "preserve_ai_decompilation"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("new_name"));
Expand Down