Program: 30248
Project: 30248
Buggy source:
@Override protected void inputsToModel(boolean create){
  String type=typePanel.getText();
  boolean typeChanged=false;
  BaseActor oldElement=e;
  boolean isPlayer=false;
  if (!create) {
    typeChanged=(type.equals(CHARACTER_TYPE_STR) && !(e instanceof CharacterActor)) || (type.equals(SPRITE_TYPE_STR) && (!(e instanceof SpriteActor) || e instanceof CharacterActor)) || (type.equals(BACKGROUND_TYPE_STR) && (!(e instanceof InteractiveActor) || e instanceof SpriteActor))|| (type.equals(OBSTACLE_TYPE_STR) && !(e instanceof ObstacleActor))|| (type.equals(ANCHOR_TYPE_STR) && !(e instanceof AnchorActor));
    isPlayer=parent.getPlayer() == e;
    parent.removeActor(e);
  }
  if (create || typeChanged) {
    if (type.equals(BACKGROUND_TYPE_STR)) {
      e=new InteractiveActor();
    }
 else     if (type.equals(SPRITE_TYPE_STR)) {
      e=new SpriteActor();
    }
 else     if (type.equals(CHARACTER_TYPE_STR)) {
      e=new CharacterActor();
    }
 else     if (type.equals(OBSTACLE_TYPE_STR)) {
      e=new ObstacleActor();
    }
 else     if (type.equals(ANCHOR_TYPE_STR)) {
      e=new AnchorActor();
    }
    if (!(e instanceof SpriteActor) && !(e instanceof AnchorActor)) {
      Polygon bbox=e.getBBox();
      bbox.setVertices(new float[8]);
      float[] verts=bbox.getVertices();
      verts[0]=-DEFAULT_DIM / 2;
      verts[1]=0f;
      verts[2]=-DEFAULT_DIM / 2;
      verts[3]=DEFAULT_DIM;
      verts[4]=DEFAULT_DIM / 2;
      verts[5]=DEFAULT_DIM;
      verts[6]=DEFAULT_DIM / 2;
      verts[7]=0f;
      bbox.dirty();
    }
  }
  if (typeChanged) {
    if (oldElement instanceof InteractiveActor && e instanceof InteractiveActor) {
      HashMap<String,Verb> verbs=((InteractiveActor)e).getVerbManager().getVerbs();
      HashMap<String,Verb> oldVerbs=((InteractiveActor)oldElement).getVerbManager().getVerbs();
      for (      String k : oldVerbs.keySet()) {
        Verb v=oldVerbs.get(k);
        verbs.put(k,v);
      }
      HashMap<String,SoundFX> oldSounds=((InteractiveActor)oldElement).getSounds();
      if (oldSounds != null) {
        for (        String k : oldSounds.keySet()) {
          ((InteractiveActor)e).addSound(oldSounds.get(k));
        }
      }
    }
    if (oldElement instanceof SpriteActor && e instanceof SpriteActor) {
      ((SpriteActor)e).setRenderer(((SpriteActor)oldElement).getRenderer());
    }
  }
  e.setId(ElementUtils.getCheckedId(id.getText(),parent.getActors().keySet().toArray(new String[0])));
  e.setVisible(Boolean.parseBoolean(visible.getText()));
  if (e instanceof InteractiveActor) {
    InteractiveActor ia=(InteractiveActor)e;
    ia.setLayer(layer.getText());
    ia.setInteraction(Boolean.parseBoolean(interaction.getText()));
    String key=desc.getText();
    if (key == null || key.isEmpty() || key.charAt(0) != I18N.PREFIX)     key=Ctx.project.getI18N().genKey(parent.getId(),e.getId(),"String_Node_Str");
    Ctx.project.getI18N().setTranslation(key,desc.getText());
    if (desc.getText() != null)     ia.setDesc(key);
 else     ia.setDesc(null);
    ia.setState(state.getText());
    if (e instanceof SpriteActor) {
      SpriteActor sa=(SpriteActor)e;
      String rendererType=renderer.getText();
      if (Project.ATLAS_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof AtlasRenderer))         sa.setRenderer(new AtlasRenderer());
      }
 else       if (Project.IMAGE_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof ImageRenderer))         sa.setRenderer(new ImageRenderer());
      }
 else       if (Project.S3D_RENDERER_STRING.equals(rendererType)) {
        Sprite3DRenderer r;
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof Sprite3DRenderer)) {
          r=new Sprite3DRenderer();
          sa.setRenderer(r);
        }
 else {
          r=(Sprite3DRenderer)sa.getRenderer();
        }
        r.setCameraFOV(Float.parseFloat(fov.getText()));
        r.setCameraName(cameraName.getText());
        r.setSpriteSize(Param.parseVector2(spriteSize.getText()));
      }
 else       if (Project.SPINE_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof SpineRenderer))         sa.setRenderer(new SpineRenderer());
      }
      sa.setBboxFromRenderer(true);
      sa.setDepthType(DepthType.valueOf(depthType.getText()));
      sa.setScale(Float.parseFloat(scale.getText()));
      sa.setZIndex(Float.parseFloat(zIndex.getText()));
      if (e instanceof CharacterActor) {
        CharacterActor ca=(CharacterActor)e;
        ca.setWalkingSpeed(Float.parseFloat(walkingSpeed.getText()));
        ca.setTextColor(Param.parseColor(textColor.getText()));
      }
    }
  }
  parent.addActor(e);
  if (isPlayer && !typeChanged)   parent.setPlayer((CharacterActor)e);
  if (e instanceof InteractiveActor) {
    SceneLayer l=parent.getLayer(((InteractiveActor)e).getLayer());
    l.orderByZIndex();
  }
  if (e instanceof SpriteActor)   ((SpriteActor)e).retrieveAssets();
  Ctx.project.setModified();
}

Fixed version (ground truth):
@Override protected void inputsToModel(boolean create){
  String type=typePanel.getText();
  boolean typeChanged=false;
  BaseActor oldElement=e;
  boolean isPlayer=false;
  if (!create) {
    typeChanged=(type.equals(CHARACTER_TYPE_STR) && !(e instanceof CharacterActor)) || (type.equals(SPRITE_TYPE_STR) && (!(e instanceof SpriteActor) || e instanceof CharacterActor)) || (type.equals(BACKGROUND_TYPE_STR) && (!(e instanceof InteractiveActor) || e instanceof SpriteActor))|| (type.equals(OBSTACLE_TYPE_STR) && !(e instanceof ObstacleActor))|| (type.equals(ANCHOR_TYPE_STR) && !(e instanceof AnchorActor));
    isPlayer=parent.getPlayer() == e;
    parent.removeActor(e);
  }
  if (create || typeChanged) {
    if (type.equals(BACKGROUND_TYPE_STR)) {
      e=new InteractiveActor();
    }
 else     if (type.equals(SPRITE_TYPE_STR)) {
      e=new SpriteActor();
    }
 else     if (type.equals(CHARACTER_TYPE_STR)) {
      e=new CharacterActor();
    }
 else     if (type.equals(OBSTACLE_TYPE_STR)) {
      e=new ObstacleActor();
    }
 else     if (type.equals(ANCHOR_TYPE_STR)) {
      e=new AnchorActor();
    }
    if (!(e instanceof SpriteActor) && !(e instanceof AnchorActor)) {
      Polygon bbox=e.getBBox();
      bbox.setVertices(new float[8]);
      float[] verts=bbox.getVertices();
      verts[0]=-DEFAULT_DIM / 2;
      verts[1]=0f;
      verts[2]=-DEFAULT_DIM / 2;
      verts[3]=DEFAULT_DIM;
      verts[4]=DEFAULT_DIM / 2;
      verts[5]=DEFAULT_DIM;
      verts[6]=DEFAULT_DIM / 2;
      verts[7]=0f;
      bbox.dirty();
    }
  }
  if (typeChanged) {
    if (oldElement instanceof InteractiveActor && e instanceof InteractiveActor) {
      HashMap<String,Verb> verbs=((InteractiveActor)e).getVerbManager().getVerbs();
      HashMap<String,Verb> oldVerbs=((InteractiveActor)oldElement).getVerbManager().getVerbs();
      for (      String k : oldVerbs.keySet()) {
        Verb v=oldVerbs.get(k);
        verbs.put(k,v);
      }
      HashMap<String,SoundFX> oldSounds=((InteractiveActor)oldElement).getSounds();
      if (oldSounds != null) {
        for (        String k : oldSounds.keySet()) {
          ((InteractiveActor)e).addSound(oldSounds.get(k));
        }
      }
    }
    if (oldElement instanceof SpriteActor && e instanceof SpriteActor) {
      ((SpriteActor)e).setRenderer(((SpriteActor)oldElement).getRenderer());
    }
  }
  e.setId(ElementUtils.getCheckedId(id.getText(),parent.getActors().keySet().toArray(new String[0])));
  e.setVisible(Boolean.parseBoolean(visible.getText()));
  if (e instanceof InteractiveActor) {
    InteractiveActor ia=(InteractiveActor)e;
    ia.setLayer(layer.getText());
    ia.setInteraction(Boolean.parseBoolean(interaction.getText()));
    String key=desc.getText();
    if (key == null || key.isEmpty() || key.charAt(0) != I18N.PREFIX)     key=Ctx.project.getI18N().genKey(parent.getId(),e.getId(),"String_Node_Str");
    Ctx.project.getI18N().setTranslation(key,desc.getText());
    if (desc.getText() != null)     ia.setDesc(key);
 else     ia.setDesc(null);
    ia.setState(state.getText());
    ia.setZIndex(Float.parseFloat(zIndex.getText()));
    if (e instanceof SpriteActor) {
      SpriteActor sa=(SpriteActor)e;
      String rendererType=renderer.getText();
      if (Project.ATLAS_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof AtlasRenderer))         sa.setRenderer(new AtlasRenderer());
      }
 else       if (Project.IMAGE_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof ImageRenderer))         sa.setRenderer(new ImageRenderer());
      }
 else       if (Project.S3D_RENDERER_STRING.equals(rendererType)) {
        Sprite3DRenderer r;
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof Sprite3DRenderer)) {
          r=new Sprite3DRenderer();
          sa.setRenderer(r);
        }
 else {
          r=(Sprite3DRenderer)sa.getRenderer();
        }
        r.setCameraFOV(Float.parseFloat(fov.getText()));
        r.setCameraName(cameraName.getText());
        r.setSpriteSize(Param.parseVector2(spriteSize.getText()));
      }
 else       if (Project.SPINE_RENDERER_STRING.equals(rendererType)) {
        if (sa.getRenderer() == null || !(sa.getRenderer() instanceof SpineRenderer))         sa.setRenderer(new SpineRenderer());
      }
      sa.setBboxFromRenderer(true);
      sa.setDepthType(DepthType.valueOf(depthType.getText()));
      sa.setScale(Float.parseFloat(scale.getText()));
      if (e instanceof CharacterActor) {
        CharacterActor ca=(CharacterActor)e;
        ca.setWalkingSpeed(Float.parseFloat(walkingSpeed.getText()));
        ca.setTextColor(Param.parseColor(textColor.getText()));
      }
    }
  }
  parent.addActor(e);
  if (isPlayer && !typeChanged)   parent.setPlayer((CharacterActor)e);
  if (e instanceof InteractiveActor) {
    SceneLayer l=parent.getLayer(((InteractiveActor)e).getLayer());
    l.orderByZIndex();
  }
  if (e instanceof SpriteActor)   ((SpriteActor)e).retrieveAssets();
  Ctx.project.setModified();
}