How to delete the word " Error! No sequence specified." from the image

I am removing the image caption from the shape. I got the below error message imported in the image. how to remove the below error.

Error Message: Error! No sequence specified.

Source code:

 Node resultImage = tmp.importNode(imageNode, true, ImportFormatMode.USE_DESTINATION_STYLES);
if(resultImage.getNodeType() == NodeType.TABLE)
    tmp.getFirstSection().getBody().prependChild(resultImage);
else
    tmp.getFirstSection().getBody().getFirstParagraph().appendChild(resultImage);
            
if(resultImage.isComposite())
    ((CompositeNode)resultImage).getChildNodes(NodeType.RUN, true).clear();

Input: Fig0002.pdf (90.7 KB)

@Mahesh39 This looks like Field result. You can fix this by unlinking fields (replacing with static text) before removeving caption text. See the following code:

if(resultImage.isComposite()) {
    resultImage.getRange().unlinkFields();
    ((CompositeNode) resultImage).getChildNodes(NodeType.RUN, true).clear();
}