Program: 126523
Project: 126523
Buggy source:
/** 
 * DOC amaumont Comment method "createLinks".
 */
public void createLinks(){
  removeAllLinks();
  getBackgroundRefresher().refreshBackground();
  ProgressDialog progressDialog=new ProgressDialog(getTree().getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor){
      TableItem[] loopTableItems=loopTableEditorView.getTable().getItems();
      TableItem[] fieldsTableItems=fieldsTableEditorView.getTable().getItems();
      monitorWrap=SubMonitor.convert(monitor);
      String taskName=Messages.getString("String_Node_Str");
      int totalWork=loopTableItems.length + fieldsTableItems.length;
      monitorWrap.beginTask(taskName,totalWork);
      List<XmlXPathLoopDescriptor> xpathLoopDescriptorList=loopTableEditorView.getModel().getBeansList();
      for (int i=0; i < loopTableItems.length; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TableItem tableItem=loopTableItems[i];
        XmlXPathLoopDescriptor xpathLoopDescriptor=xpathLoopDescriptorList.get(i);
        ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(xpathLoopDescriptor.getConnection(),xpathLoopDescriptor.getConnection().getContextName());
        String originalValue=xpathLoopDescriptor.getAbsoluteXPathQuery();
        if (contextType != null) {
          originalValue=ConnectionContextHelper.getOriginalValue(contextType,xpathLoopDescriptor.getAbsoluteXPathQuery());
          originalValue=TalendQuoteUtils.removeQuotes(originalValue);
        }
        if (originalValue != null) {
          createLoopLinks(originalValue,tableItem,monitorWrap);
        }
        monitorWrap.worked(1);
      }
      List<SchemaTarget> schemaTargetList=fieldsTableEditorView.getModel().getBeansList();
      createFieldsLinkWithProgressMonitor(monitorWrap,schemaTargetList.size() + loopTableItems.length,schemaTargetList,0,fieldsTableItems.length);
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
  }
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "createLinks".
 */
public void createLinks(){
  removeAllLinks();
  getBackgroundRefresher().refreshBackground();
  ProgressDialog progressDialog=new ProgressDialog(getTree().getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor){
      TableItem[] loopTableItems=loopTableEditorView.getTable().getItems();
      TableItem[] fieldsTableItems=fieldsTableEditorView.getTable().getItems();
      monitorWrap=new EventLoopProgressMonitor(monitor);
      String taskName=Messages.getString("String_Node_Str");
      int totalWork=loopTableItems.length + fieldsTableItems.length;
      monitorWrap.beginTask(taskName,totalWork);
      List<XmlXPathLoopDescriptor> xpathLoopDescriptorList=loopTableEditorView.getModel().getBeansList();
      for (int i=0; i < loopTableItems.length; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TableItem tableItem=loopTableItems[i];
        XmlXPathLoopDescriptor xpathLoopDescriptor=xpathLoopDescriptorList.get(i);
        ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(xpathLoopDescriptor.getConnection(),xpathLoopDescriptor.getConnection().getContextName());
        String originalValue=xpathLoopDescriptor.getAbsoluteXPathQuery();
        if (contextType != null) {
          originalValue=ConnectionContextHelper.getOriginalValue(contextType,xpathLoopDescriptor.getAbsoluteXPathQuery());
          originalValue=TalendQuoteUtils.removeQuotes(originalValue);
        }
        if (originalValue != null) {
          createLoopLinks(originalValue,tableItem,monitorWrap);
        }
        monitorWrap.worked(1);
      }
      List<SchemaTarget> schemaTargetList=fieldsTableEditorView.getModel().getBeansList();
      createFieldsLinkWithProgressMonitor(monitorWrap,schemaTargetList.size() + loopTableItems.length,schemaTargetList,0,fieldsTableItems.length);
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
  }
}