Program: 122919
Project: 122919
Buggy source:
public void handleCreateDefaultConnection(Point currentLocation){
  if (getActiveTool() instanceof TalendConnectionCreationTool) {
    return;
  }
  if (getViewer().getSelectedEditParts().size() != 1) {
    return;
  }
  EditPart part=(EditPart)getViewer().getSelectedEditParts().get(0);
  if (!(part instanceof NodePart)) {
    return;
  }
  IFigure figure=((NodePart)part).getFigure();
  ZoomManager zoomManager=(ZoomManager)AbstractTalendEditor.this.getAdapter(ZoomManager.class);
  double zoom=zoomManager.getZoom();
  if (zoom > 1e-7) {
    startPoint.scale(1 / zoom);
  }
  if (!figure.getBounds().contains(startPoint)) {
    return;
  }
  if (startPoint.getDistance2(currentLocation) < 30) {
    return;
  }
  Node node=(Node)part.getModel();
  final INodeConnector mainConnector;
  if (node.isELTComponent()) {
    mainConnector=node.getConnectorFromType(EConnectionType.TABLE);
  }
 else {
    mainConnector=node.getConnectorFromType(EConnectionType.FLOW_MAIN);
  }
  if (mainConnector == null) {
    return;
  }
  if (mainConnector.getMaxLinkOutput() != -1) {
    if (mainConnector.getCurLinkNbOutput() >= mainConnector.getMaxLinkOutput()) {
      return;
    }
  }
  if (mainConnector.getMaxLinkOutput() == 0) {
    return;
  }
  figure.translateToAbsolute(startPoint);
  Canvas canvas=(Canvas)getViewer().getControl();
  Event event=new Event();
  event.button=3;
  event.count=0;
  event.detail=0;
  event.end=0;
  event.height=0;
  event.keyCode=0;
  event.start=0;
  event.stateMask=0;
  event.time=9516624;
  event.type=3;
  event.widget=canvas;
  event.width=0;
  event.x=startPoint.x + 3;
  event.y=startPoint.y + 3;
  final List<Object> listArgs=new ArrayList<Object>();
  listArgs.add(null);
  listArgs.add(null);
  listArgs.add(null);
  TalendConnectionCreationTool myConnectTool=new TalendConnectionCreationTool(new CreationFactory(){
    public Object getNewObject(){
      return listArgs;
    }
    public Object getObjectType(){
      return mainConnector.getName();
    }
  }
,false);
  myConnectTool.performConnectionStartWith(part);
  getViewer().getEditDomain().setActiveTool(myConnectTool);
  canvas.notifyListeners(3,event);
  TalendEditorContextMenuProvider.setEnableContextMenu(false);
}

Fixed version (ground truth):
public void handleCreateDefaultConnection(Point currentLocation){
  if (getActiveTool() instanceof TalendConnectionCreationTool) {
    return;
  }
  if (getViewer().getSelectedEditParts().size() != 1) {
    return;
  }
  EditPart part=(EditPart)getViewer().getSelectedEditParts().get(0);
  if (!(part instanceof NodePart)) {
    return;
  }
  IFigure figure=((NodePart)part).getFigure();
  ZoomManager zoomManager=(ZoomManager)AbstractTalendEditor.this.getAdapter(ZoomManager.class);
  double zoom=zoomManager.getZoom();
  if (zoom > 1e-7) {
    startPoint.scale(1 / zoom);
  }
  if (!figure.getBounds().contains(startPoint)) {
    return;
  }
  if (startPoint.getDistance2(currentLocation) < 30) {
    return;
  }
  Node node=(Node)part.getModel();
  final INodeConnector mainConnector;
  if (node.isELTComponent()) {
    mainConnector=node.getConnectorFromType(EConnectionType.TABLE);
  }
 else {
    mainConnector=node.getConnectorFromType(EConnectionType.FLOW_MAIN);
  }
  if (mainConnector == null) {
    return;
  }
  if (mainConnector.getMaxLinkOutput() != -1) {
    if (mainConnector.getCurLinkNbOutput() >= mainConnector.getMaxLinkOutput()) {
      return;
    }
  }
  if (mainConnector.getMaxLinkOutput() == 0) {
    return;
  }
  figure.translateToAbsolute(startPoint);
  Canvas canvas=(Canvas)getViewer().getControl();
  Event event=new Event();
  event.button=3;
  event.count=0;
  event.detail=0;
  event.end=0;
  event.height=0;
  event.keyCode=0;
  event.start=0;
  event.stateMask=0;
  event.time=9516624;
  event.type=3;
  event.widget=canvas;
  event.width=0;
  event.x=startPoint.x + 3;
  event.y=startPoint.y + 3;
  final List<Object> listArgs=new ArrayList<Object>();
  listArgs.add(null);
  listArgs.add(null);
  listArgs.add(null);
  TalendConnectionCreationTool myConnectTool=new TalendConnectionCreationTool(new CreationFactory(){
    @Override public Object getNewObject(){
      return listArgs;
    }
    @Override public Object getObjectType(){
      return mainConnector.getName();
    }
  }
,false);
  myConnectTool.performConnectionStartWith(part);
  getViewer().getEditDomain().setActiveTool(myConnectTool);
  canvas.notifyListeners(3,event);
  TalendEditorContextMenuProvider.setEnableContextMenu(false);
}