Program: 119489
Project: 119489
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="String_Node_Str";
      int totalWork=loopTableItems.length + fieldsTableItems.length;
      monitorWrap.beginTask(taskName,totalWork);
      List<JSONXPathLoopDescriptor> xpathLoopDescriptorList=loopTableEditorView.getModel().getBeansList();
      for (int i=0; i < loopTableItems.length; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TableItem tableItem=loopTableItems[i];
        JSONXPathLoopDescriptor xpathLoopDescriptor=xpathLoopDescriptorList.get(i);
        String originalValue=xpathLoopDescriptor.getAbsoluteXPathQuery();
        if (xpathLoopDescriptor.getConnection() != null) {
          ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(xpathLoopDescriptor.getConnection(),xpathLoopDescriptor.getConnection().getContextName());
          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="String_Node_Str";
      int totalWork=loopTableItems.length + fieldsTableItems.length;
      monitorWrap.beginTask(taskName,totalWork);
      List<JSONXPathLoopDescriptor> xpathLoopDescriptorList=loopTableEditorView.getModel().getBeansList();
      for (int i=0; i < loopTableItems.length; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TableItem tableItem=loopTableItems[i];
        JSONXPathLoopDescriptor xpathLoopDescriptor=xpathLoopDescriptorList.get(i);
        String originalValue=xpathLoopDescriptor.getAbsoluteXPathQuery();
        if (xpathLoopDescriptor.getConnection() != null) {
          ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(xpathLoopDescriptor.getConnection(),xpathLoopDescriptor.getConnection().getContextName());
          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) {
  }
}