Program: 122031
Project: 122031
Buggy source:
@Override public void mouseMove(MouseEvent mouseEvent,EditPartViewer viewer){
  boolean flag=false;
  if (viewer.getSelectionManager() instanceof TalendSelectionManager) {
    flag=true;
  }
  if (flag && getActiveTool() instanceof CreationTool) {
    CreationTool tool=(CreationTool)getActiveTool();
    Class toolClass=TargetingTool.class;
    Field targetRequestField;
    Request request=null;
    try {
      targetRequestField=toolClass.getDeclaredField("String_Node_Str");
      targetRequestField.setAccessible(true);
      request=(Request)targetRequestField.get(tool);
    }
 catch (    SecurityException e) {
      ExceptionHandler.process(e);
    }
catch (    NoSuchFieldException e) {
      ExceptionHandler.process(e);
    }
catch (    IllegalArgumentException e) {
      ExceptionHandler.process(e);
    }
catch (    IllegalAccessException e) {
      ExceptionHandler.process(e);
    }
    if (request instanceof CreateRequest) {
      Object node=((CreateRequest)request).getNewObject();
      RootEditPart rep=getViewer().getRootEditPart().getRoot();
      Point viewOriginalPosition=new Point();
      if (rep instanceof ScalableFreeformRootEditPart) {
        ScalableFreeformRootEditPart root=(ScalableFreeformRootEditPart)rep;
        Viewport viewport=(Viewport)root.getFigure();
        viewOriginalPosition=viewport.getViewLocation();
      }
      org.eclipse.draw2d.geometry.Point draw2dPosition=new org.eclipse.draw2d.geometry.Point(mouseEvent.x + viewOriginalPosition.x,mouseEvent.y + viewOriginalPosition.y);
      SubjobContainerPart containerPart=null;
      for (      Object child : getProcessPart().getChildren()) {
        if (child instanceof SubjobContainerPart) {
          SubjobContainer container=(SubjobContainer)((SubjobContainerPart)child).getModel();
          if (container.getSubjobContainerRectangle().contains(draw2dPosition)) {
            containerPart=(SubjobContainerPart)child;
          }
        }
      }
      if (containerPart != null && node instanceof Node) {
        List<org.talend.designer.core.ui.editor.connections.Connection> connections=CreateComponentOnLinkHelper.getConnection(containerPart,draw2dPosition,(Node)node);
        for (        org.talend.designer.core.ui.editor.connections.Connection connection : connections) {
          CreateComponentOnLinkHelper.selectConnection(connection,containerPart);
        }
        if (connections.isEmpty()) {
          CreateComponentOnLinkHelper.unselectAllConnections(containerPart);
        }
      }
 else {
        for (        Object child : getProcessPart().getChildren()) {
          if (child instanceof SubjobContainerPart) {
            CreateComponentOnLinkHelper.unselectAllConnections((SubjobContainerPart)child);
          }
        }
      }
    }
  }
  super.mouseMove(mouseEvent,viewer);
}

Fixed version (ground truth):
@Override public void mouseMove(MouseEvent mouseEvent,EditPartViewer viewer){
  boolean flag=false;
  if (viewer.getSelectionManager() instanceof TalendSelectionManager) {
    flag=true;
  }
  if (flag && getActiveTool() instanceof CreationTool) {
    CreationTool tool=(CreationTool)getActiveTool();
    Class toolClass=TargetingTool.class;
    Field targetRequestField;
    Request request=null;
    try {
      targetRequestField=toolClass.getDeclaredField("String_Node_Str");
      targetRequestField.setAccessible(true);
      request=(Request)targetRequestField.get(tool);
    }
 catch (    SecurityException e) {
      ExceptionHandler.process(e);
    }
catch (    NoSuchFieldException e) {
      ExceptionHandler.process(e);
    }
catch (    IllegalArgumentException e) {
      ExceptionHandler.process(e);
    }
catch (    IllegalAccessException e) {
      ExceptionHandler.process(e);
    }
    if (request instanceof CreateRequest && ((CreateRequest)request).getNewObject() instanceof Node) {
      Node node=(Node)((CreateRequest)request).getNewObject();
      RootEditPart rep=getViewer().getRootEditPart().getRoot();
      Point viewOriginalPosition=new Point();
      if (rep instanceof ScalableFreeformRootEditPart) {
        ScalableFreeformRootEditPart root=(ScalableFreeformRootEditPart)rep;
        Viewport viewport=(Viewport)root.getFigure();
        viewOriginalPosition=viewport.getViewLocation();
      }
      org.eclipse.draw2d.geometry.Point draw2dPosition=new org.eclipse.draw2d.geometry.Point(mouseEvent.x + viewOriginalPosition.x,mouseEvent.y + viewOriginalPosition.y);
      double zoom=1.0;
      if (viewer.getRootEditPart() instanceof TalendScalableFreeformRootEditPart) {
        ZoomManager zoomManager=((TalendScalableFreeformRootEditPart)viewer.getRootEditPart()).getZoomManager();
        zoom=zoomManager.getZoom();
      }
      List<ConnectionPart> connectionParts=CreateComponentOnLinkHelper.getConnectionParts(getProcessPart(),draw2dPosition,node);
      double minDistance=1000000000;
      for (      ConnectionPart part : connectionParts) {
        if (part.getFigure() instanceof PolylineConnection) {
          PolylineConnection connection=(PolylineConnection)part.getFigure();
          Point pt1=connection.getStart();
          Point pt2=connection.getEnd();
          double distance=CreateComponentOnLinkHelper.getDistanceOrthogonal(draw2dPosition.x,draw2dPosition.y,pt1,pt2,zoom);
          if (distance < minDistance) {
            selectedConnectionPart=part;
            minDistance=Math.min(distance,minDistance);
          }
        }
      }
      if (selectedConnectionPart != null && minDistance < 15) {
        for (        Object child : getProcessPart().getChildren()) {
          if (child instanceof SubjobContainerPart) {
            CreateComponentOnLinkHelper.unselectAllConnections((SubjobContainerPart)child);
          }
        }
        CreateComponentOnLinkHelper.selectConnection(selectedConnectionPart);
      }
 else {
        if (selectedConnectionPart != null) {
          CreateComponentOnLinkHelper.unselectConnection(selectedConnectionPart);
        }
        selectedConnectionPart=null;
      }
    }
  }
  super.mouseMove(mouseEvent,viewer);
}