Program: 122805
Project: 122805
Buggy source:
private boolean createComponentOnLink(Node node,Point originalPoint){
  boolean executed=false;
  RootEditPart rep=editor.getViewer().getRootEditPart().getRoot();
  Point viewOriginalPosition=new Point();
  if (rep instanceof ScalableFreeformRootEditPart) {
    ScalableFreeformRootEditPart root=(ScalableFreeformRootEditPart)rep;
    Viewport viewport=(Viewport)root.getFigure();
    viewOriginalPosition=viewport.getViewLocation();
  }
  Point point=new Point(originalPoint.x + viewOriginalPosition.x,originalPoint.y + viewOriginalPosition.y);
  org.talend.designer.core.ui.editor.connections.Connection targetConnection=CreateComponentOnLinkHelper.getSelectedConnection();
  for (  Object child : editor.getProcessPart().getChildren()) {
    if (child instanceof SubjobContainerPart) {
      CreateComponentOnLinkHelper.unselectAllConnections((SubjobContainerPart)child);
    }
  }
  if (targetConnection != null) {
    NodeContainer nodeContainer=new NodeContainer(node);
    IProcess2 p=editor.getProcess();
    if (p instanceof Process) {
      CreateNodeContainerCommand createCmd=new CreateNodeContainerCommand((Process)p,nodeContainer,point);
      execCommandStack(createCmd);
      Node originalTarget=(Node)targetConnection.getTarget();
      INodeConnector targetConnector=node.getConnectorFromType(EConnectionType.FLOW_MAIN);
      for (      INodeConnector connector : node.getConnectorsFromType(EConnectionType.FLOW_MAIN)) {
        if (connector.getMaxLinkOutput() != 0) {
          targetConnector=connector;
          break;
        }
      }
      ConnectionCreateCommand.setCreatingConnection(true);
      if (PluginChecker.isJobLetPluginLoaded()) {
        IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
        if (service != null && service.isJobletComponent(targetConnection.getTarget())) {
          if (targetConnection.getTarget() instanceof Node) {
            NodeContainer jobletContainer=((Node)targetConnection.getTarget()).getNodeContainer();
            jobletContainer.getInputs().remove(targetConnection);
          }
        }
      }
      ConnectionReconnectCommand cmd2=new ConnectionReconnectCommand(targetConnection);
      cmd2.setNewTarget(node);
      execCommandStack(cmd2);
      List<Object> nodeArgs=CreateComponentOnLinkHelper.getTargetArgs(targetConnection,node);
      ConnectionCreateCommand nodeCmd=new ConnectionCreateCommand(node,targetConnector.getName(),nodeArgs,false);
      nodeCmd.setTarget(originalTarget);
      execCommandStack(nodeCmd);
      if (node.getComponent().getName().equals("String_Node_Str")) {
        CreateComponentOnLinkHelper.setupTMap(node);
      }
      if (originalTarget.getComponent().getName().equals("String_Node_Str")) {
        CreateComponentOnLinkHelper.updateTMap(originalTarget,targetConnection,node.getOutgoingConnections().get(0));
      }
      originalTarget.renameData(targetConnection.getName(),node.getOutgoingConnections().get(0).getName());
      executed=true;
    }
  }
  return executed;
}

Fixed version (ground truth):
private boolean createComponentOnLink(Node node,Point originalPoint){
  boolean executed=false;
  RootEditPart rep=editor.getViewer().getRootEditPart().getRoot();
  Point viewOriginalPosition=new Point();
  if (rep instanceof ScalableFreeformRootEditPart) {
    ScalableFreeformRootEditPart root=(ScalableFreeformRootEditPart)rep;
    Viewport viewport=(Viewport)root.getFigure();
    viewOriginalPosition=viewport.getViewLocation();
  }
  Point point=new Point(originalPoint.x + viewOriginalPosition.x,originalPoint.y + viewOriginalPosition.y);
  org.talend.designer.core.ui.editor.connections.Connection targetConnection=CreateComponentOnLinkHelper.getSelectedConnection();
  for (  Object child : editor.getProcessPart().getChildren()) {
    if (child instanceof SubjobContainerPart) {
      CreateComponentOnLinkHelper.unselectAllConnections((SubjobContainerPart)child);
    }
  }
  if (targetConnection != null) {
    NodeContainer nodeContainer=new NodeContainer(node);
    IProcess2 p=editor.getProcess();
    if (p instanceof Process) {
      CreateNodeContainerCommand createCmd=new CreateNodeContainerCommand((Process)p,nodeContainer,point);
      execCommandStack(createCmd);
      Node originalTarget=(Node)targetConnection.getTarget();
      INodeConnector targetConnector=node.getConnectorFromType(EConnectionType.FLOW_MAIN);
      for (      INodeConnector connector : node.getConnectorsFromType(EConnectionType.FLOW_MAIN)) {
        if (connector.getMaxLinkOutput() != 0) {
          targetConnector=connector;
          break;
        }
      }
      ConnectionCreateCommand.setCreatingConnection(true);
      if (PluginChecker.isJobLetPluginLoaded()) {
        IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
        if (service != null && service.isJobletComponent(targetConnection.getTarget())) {
          if (targetConnection.getTarget() instanceof Node) {
            NodeContainer jobletContainer=((Node)targetConnection.getTarget()).getNodeContainer();
            jobletContainer.getInputs().remove(targetConnection);
          }
        }
      }
      ConnectionReconnectCommand cmd2=new ConnectionReconnectCommand(targetConnection);
      cmd2.setNewTarget(node);
      execCommandStack(cmd2);
      List<Object> nodeArgs=CreateComponentOnLinkHelper.getTargetArgs(targetConnection,node);
      ConnectionCreateCommand nodeCmd=new ConnectionCreateCommand(node,targetConnector.getName(),nodeArgs,false);
      nodeCmd.setTarget(originalTarget);
      execCommandStack(nodeCmd);
      if (!ConnectionCreateCommand.isCreatingConnection()) {
        return true;
      }
      if (node.getComponent().getName().equals("String_Node_Str")) {
        CreateComponentOnLinkHelper.setupTMap(node);
      }
      if (originalTarget.getComponent().getName().equals("String_Node_Str")) {
        CreateComponentOnLinkHelper.updateTMap(originalTarget,targetConnection,node.getOutgoingConnections().get(0));
      }
      originalTarget.renameData(targetConnection.getName(),node.getOutgoingConnections().get(0).getName());
      executed=true;
    }
  }
  return executed;
}