Program: 147984
Project: 147984
Buggy source:
protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=5;
  exportsBtn=new Button(composite,SWT.RADIO);
  exportsBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  exportsBtn.setText("String_Node_Str");
  exportsBtn.setEnabled(export ? true : false);
  exportsBtn.setSelection(false);
  dataModelBtn=new Button(composite,SWT.RADIO);
  dataModelBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  dataModelBtn.setText("String_Node_Str");
  dataModelBtn.setEnabled(!export ? true : false);
  dataModelBtn.setSelection(false);
  Label label=new Label(composite,SWT.BORDER);
  label.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
  label.setText("String_Node_Str");
  revisionCombo=new CCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN | SWT.FLAT);
  GridData gd=new GridData(SWT.LEFT,SWT.CENTER,true,false,1,1);
  revisionCombo.setLayoutData(gd);
  gd.widthHint=100;
  Set<String> revisions=new HashSet<String>();
  Map<String,String> rMap=getRevisionMap();
  revisions.addAll(rMap.values());
  revisionCombo.setItems(revisions.toArray(new String[0]));
  String bundleVersion=MDMWorbenchPlugin.getDefault().getBundle().getHeaders().get(Constants.BUNDLE_VERSION).toString();
  String version=bundleVersion.split("String_Node_Str")[0];
  revision=rMap.get(version);
  if (revision == null) {
    revision="String_Node_Str";
  }
  revisionCombo.setText(revision);
  revisionCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      revision=revisionCombo.getText();
      fillInTable();
    }
  }
);
  executeBtn=new Button(composite,SWT.PUSH);
  executeBtn.setLayoutData(new GridData(SWT.RIGHT,SWT.FILL,true,true,1,1));
  executeBtn.addSelectionListener(this);
  executeBtn.setImage(ImageCache.getCreatedImage(EImage.REFRESH.getPath()));
  if (export)   exchangeDwnTable=new Table(composite,SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.BORDER| SWT.V_SCROLL| SWT.H_SCROLL);
 else   exchangeDwnTable=new Table(composite,SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.BORDER| SWT.V_SCROLL| SWT.H_SCROLL| SWT.MULTI);
  exchangeDwnTable.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,5,1));
  ((GridData)exchangeDwnTable.getLayoutData()).heightHint=300;
  exchangeDwnTable.setHeaderVisible(true);
  exchangeDwnTable.setLinesVisible(true);
  final TableColumn column1=new TableColumn(exchangeDwnTable,SWT.NONE);
  column1.setText("String_Node_Str");
  final TableColumn column2=new TableColumn(exchangeDwnTable,SWT.NONE);
  column2.setText("String_Node_Str");
  final TableColumn column3=new TableColumn(exchangeDwnTable,SWT.NONE);
  column3.setText("String_Node_Str");
  column1.setWidth(100);
  column2.setWidth(100);
  column3.setWidth(400);
  exchangeDwnTable.addListener(SWT.SetData,new Listener(){
    public void handleEvent(    Event e){
      TableItem item=(TableItem)e.item;
      int index=exchangeDwnTable.indexOf(item);
      try {
        JSONObject datum=dataContent[index];
        item.setText(new String[]{datum.get(COLUMN_EXTENSION_NAME).toString(),datum.get(COLUMN_REVISION_NAME).toString(),datum.get(COLUMN_URL_NAME).toString()});
      }
 catch (      JSONException je) {
        log.error(je.getMessage(),je);
      }
    }
  }
);
  exchangeDwnTable.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      getButton(IDialogConstants.OK_ID).setEnabled(exchangeDwnTable.getSelection().length >= 1 ? true : false);
    }
  }
);
  Listener sortListener=new Listener(){
    @SuppressWarnings("String_Node_Str") public void handleEvent(    Event e){
      TableColumn sortColumn=exchangeDwnTable.getSortColumn();
      final TableColumn currentColumn=(TableColumn)e.widget;
      int dir=exchangeDwnTable.getSortDirection();
      if (sortColumn == currentColumn) {
        dir=dir == SWT.UP ? SWT.DOWN : SWT.UP;
      }
 else {
        exchangeDwnTable.setSortColumn(currentColumn);
        dir=SWT.UP;
      }
      final int direction=dir;
      Arrays.sort(dataContent,new Comparator(){
        public int compare(        Object arg0,        Object arg1){
          JSONObject jsonA=(JSONObject)arg0;
          JSONObject jsonB=(JSONObject)arg1;
          String valueA=null, valueB=null;
          try {
            if (currentColumn == column1) {
              valueA=jsonA.get(COLUMN_EXTENSION_NAME).toString();
              valueB=jsonB.get(COLUMN_EXTENSION_NAME).toString();
            }
 else             if (currentColumn == column2) {
              valueA=jsonA.get(COLUMN_REVISION_NAME).toString();
              valueB=jsonB.get(COLUMN_REVISION_NAME).toString();
            }
 else {
              valueA=jsonA.get(COLUMN_URL_NAME).toString();
              valueB=jsonB.get(COLUMN_URL_NAME).toString();
            }
            if (valueA.equals(valueB))             return 0;
            if (direction == SWT.UP) {
              return valueA.compareTo(valueB) < 0 ? -1 : 1;
            }
            return valueA.compareTo(valueB) < 0 ? 1 : -1;
          }
 catch (          JSONException je) {
            log.error(je.getMessage(),je);
            return -1;
          }
        }
      }
);
      exchangeDwnTable.setSortDirection(dir);
      exchangeDwnTable.clearAll();
    }
  }
;
  column1.addListener(SWT.Selection,sortListener);
  column2.addListener(SWT.Selection,sortListener);
  column3.addListener(SWT.Selection,sortListener);
  exchangeDwnTable.setSortColumn(column1);
  exchangeDwnTable.setSortDirection(SWT.UP);
  fillInTable();
  return composite;
}

Fixed version (ground truth):
protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=5;
  exportsBtn=new Button(composite,SWT.RADIO);
  exportsBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  exportsBtn.setText("String_Node_Str");
  exportsBtn.setEnabled(export ? true : false);
  exportsBtn.setSelection(false);
  dataModelBtn=new Button(composite,SWT.RADIO);
  dataModelBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  dataModelBtn.setText("String_Node_Str");
  dataModelBtn.setEnabled(!export ? true : false);
  dataModelBtn.setSelection(false);
  Label label=new Label(composite,SWT.BORDER);
  label.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
  label.setText("String_Node_Str");
  revisionCombo=new CCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN | SWT.FLAT);
  GridData gd=new GridData(SWT.LEFT,SWT.CENTER,true,false,1,1);
  revisionCombo.setLayoutData(gd);
  gd.widthHint=100;
  Set<String> revisions=new HashSet<String>();
  Map<String,String> rMap=getRevisionMap();
  revisions.addAll(rMap.values());
  revisionCombo.setItems(revisions.toArray(new String[0]));
  String bundleVersion=MDMWorbenchPlugin.getDefault().getVersion();
  String version=bundleVersion.split("String_Node_Str")[0];
  revision=rMap.get(version);
  if (revision == null) {
    revision="String_Node_Str";
  }
  revisionCombo.setText(revision);
  revisionCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      revision=revisionCombo.getText();
      fillInTable();
    }
  }
);
  executeBtn=new Button(composite,SWT.PUSH);
  executeBtn.setLayoutData(new GridData(SWT.RIGHT,SWT.FILL,true,true,1,1));
  executeBtn.addSelectionListener(this);
  executeBtn.setImage(ImageCache.getCreatedImage(EImage.REFRESH.getPath()));
  if (export)   exchangeDwnTable=new Table(composite,SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.BORDER| SWT.V_SCROLL| SWT.H_SCROLL);
 else   exchangeDwnTable=new Table(composite,SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.BORDER| SWT.V_SCROLL| SWT.H_SCROLL| SWT.MULTI);
  exchangeDwnTable.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,5,1));
  ((GridData)exchangeDwnTable.getLayoutData()).heightHint=300;
  exchangeDwnTable.setHeaderVisible(true);
  exchangeDwnTable.setLinesVisible(true);
  final TableColumn column1=new TableColumn(exchangeDwnTable,SWT.NONE);
  column1.setText("String_Node_Str");
  final TableColumn column2=new TableColumn(exchangeDwnTable,SWT.NONE);
  column2.setText("String_Node_Str");
  final TableColumn column3=new TableColumn(exchangeDwnTable,SWT.NONE);
  column3.setText("String_Node_Str");
  column1.setWidth(100);
  column2.setWidth(100);
  column3.setWidth(400);
  exchangeDwnTable.addListener(SWT.SetData,new Listener(){
    public void handleEvent(    Event e){
      TableItem item=(TableItem)e.item;
      int index=exchangeDwnTable.indexOf(item);
      try {
        JSONObject datum=dataContent[index];
        item.setText(new String[]{datum.get(COLUMN_EXTENSION_NAME).toString(),datum.get(COLUMN_REVISION_NAME).toString(),datum.get(COLUMN_URL_NAME).toString()});
      }
 catch (      JSONException je) {
        log.error(je.getMessage(),je);
      }
    }
  }
);
  exchangeDwnTable.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      getButton(IDialogConstants.OK_ID).setEnabled(exchangeDwnTable.getSelection().length >= 1 ? true : false);
    }
  }
);
  Listener sortListener=new Listener(){
    @SuppressWarnings("String_Node_Str") public void handleEvent(    Event e){
      TableColumn sortColumn=exchangeDwnTable.getSortColumn();
      final TableColumn currentColumn=(TableColumn)e.widget;
      int dir=exchangeDwnTable.getSortDirection();
      if (sortColumn == currentColumn) {
        dir=dir == SWT.UP ? SWT.DOWN : SWT.UP;
      }
 else {
        exchangeDwnTable.setSortColumn(currentColumn);
        dir=SWT.UP;
      }
      final int direction=dir;
      Arrays.sort(dataContent,new Comparator(){
        public int compare(        Object arg0,        Object arg1){
          JSONObject jsonA=(JSONObject)arg0;
          JSONObject jsonB=(JSONObject)arg1;
          String valueA=null, valueB=null;
          try {
            if (currentColumn == column1) {
              valueA=jsonA.get(COLUMN_EXTENSION_NAME).toString();
              valueB=jsonB.get(COLUMN_EXTENSION_NAME).toString();
            }
 else             if (currentColumn == column2) {
              valueA=jsonA.get(COLUMN_REVISION_NAME).toString();
              valueB=jsonB.get(COLUMN_REVISION_NAME).toString();
            }
 else {
              valueA=jsonA.get(COLUMN_URL_NAME).toString();
              valueB=jsonB.get(COLUMN_URL_NAME).toString();
            }
            if (valueA.equals(valueB))             return 0;
            if (direction == SWT.UP) {
              return valueA.compareTo(valueB) < 0 ? -1 : 1;
            }
            return valueA.compareTo(valueB) < 0 ? 1 : -1;
          }
 catch (          JSONException je) {
            log.error(je.getMessage(),je);
            return -1;
          }
        }
      }
);
      exchangeDwnTable.setSortDirection(dir);
      exchangeDwnTable.clearAll();
    }
  }
;
  column1.addListener(SWT.Selection,sortListener);
  column2.addListener(SWT.Selection,sortListener);
  column3.addListener(SWT.Selection,sortListener);
  exchangeDwnTable.setSortColumn(column1);
  exchangeDwnTable.setSortDirection(SWT.UP);
  fillInTable();
  return composite;
}