Program: 73633
Project: 73633
Buggy source:
public void createPartControl(Composite parent){
  Composite child=this.initEditorLayout(parent);
  cmbExprListViewer=new ComboViewer(cmbExpList);
  JSExpListProvider provider=new JSExpListProvider();
  cmbExprListViewer.setContentProvider(provider);
  cmbExprListViewer.setLabelProvider(provider);
  cmbExprListViewer.setData(VIEWER_CATEGORY_KEY,VIEWER_CATEGORY_CONTEXT);
  JSSubFunctionListProvider subProvider=new JSSubFunctionListProvider(this);
  cmbExprListViewer.addSelectionChangedListener(subProvider);
  cmbSubFunctionsViewer=new TextComboViewer(cmbSubFunctions);
  cmbSubFunctionsViewer.setContentProvider(subProvider);
  cmbSubFunctionsViewer.setLabelProvider(subProvider);
  cmbSubFunctionsViewer.addSelectionChangedListener(subProvider);
  Object model=getModel();
  if (model != null) {
    cmbExpList.setVisible(true);
    cmbSubFunctions.setVisible(true);
    setComboViewerInput(model);
  }
 else {
    setComboViewerInput(Messages.getString("String_Node_Str"));
  }
  cmbExprListViewer.addSelectionChangedListener(palettePage.getSupport());
  cmbExprListViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    /** 
 * selectionChanged( event) - This listener implementation is invoked when an item in the combo box is selected, - It saves the current editor contents. - Updates the editor content with the expression corresponding to the selected method name or expression. name.
 */
    public void selectionChanged(    SelectionChangedEvent event){
      ISelection selection=event.getSelection();
      if (selection != null) {
        Object[] sel=((IStructuredSelection)selection).toArray();
        if (sel.length == 1) {
          if (sel[0] instanceof IPropertyDefn) {
            DesignElementHandle desHandle=(DesignElementHandle)cmbExprListViewer.getInput();
            saveModel();
            IPropertyDefn elePropDefn=(IPropertyDefn)sel[0];
            cmbItemLastSelected=elePropDefn;
            setEditorText(desHandle.getStringProperty(elePropDefn.getName()));
            selectionMap.put(getModel(),selection);
            String method=cmbItemLastSelected.getName();
            updateScriptContext(desHandle,method);
          }
        }
      }
    }
  }
);
  scriptEditor.createPartControl(child);
  scriptValidator=new ScriptValidator(getViewer());
  SessionHandleAdapter.getInstance().getMediator().addColleague(this);
  disableEditor();
  SourceViewer viewer=getViewer();
  IDocument document=viewer == null ? null : viewer.getDocument();
  if (document != null) {
    IDocumentUndoManager undoManager=DocumentUndoManagerRegistry.getDocumentUndoManager(document);
    if (undoManager != null) {
      undoManager.addDocumentUndoListener(undoListener);
    }
    document.addDocumentListener(documentListener);
  }
}

Fixed version (ground truth):
public void createPartControl(Composite parent){
  Composite child=this.initEditorLayout(parent);
  cmbExprListViewer=new ComboViewer(cmbExpList);
  JSExpListProvider provider=new JSExpListProvider();
  cmbExprListViewer.setContentProvider(provider);
  cmbExprListViewer.setLabelProvider(provider);
  cmbExprListViewer.setData(VIEWER_CATEGORY_KEY,VIEWER_CATEGORY_CONTEXT);
  JSSubFunctionListProvider subProvider=new JSSubFunctionListProvider(this);
  cmbExprListViewer.addSelectionChangedListener(subProvider);
  cmbSubFunctions.addListener(CustomChooserComposite.DROPDOWN_EVENT,new Listener(){
    public void handleEvent(    Event event){
      cmbSubFunctions.deselectAll();
      ScriptParser parser=new ScriptParser(getEditorText());
      Collection coll=parser.getAllMethodInfo();
      for (Iterator itr=coll.iterator(); itr.hasNext(); ) {
        IScriptMethodInfo mtd=(IScriptMethodInfo)itr.next();
        cmbSubFunctions.markSelection(METHOD_DISPLAY_INDENT + mtd.getName());
      }
    }
  }
);
  cmbSubFunctionsViewer=new TextComboViewer(cmbSubFunctions);
  cmbSubFunctionsViewer.setContentProvider(subProvider);
  cmbSubFunctionsViewer.setLabelProvider(subProvider);
  cmbSubFunctionsViewer.addSelectionChangedListener(subProvider);
  Object model=getModel();
  if (model != null) {
    cmbExpList.setVisible(true);
    cmbSubFunctions.setVisible(true);
    setComboViewerInput(model);
  }
 else {
    setComboViewerInput(Messages.getString("String_Node_Str"));
  }
  cmbExprListViewer.addSelectionChangedListener(palettePage.getSupport());
  cmbExprListViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    /** 
 * selectionChanged( event) - This listener implementation is invoked when an item in the combo box is selected, - It saves the current editor contents. - Updates the editor content with the expression corresponding to the selected method name or expression. name.
 */
    public void selectionChanged(    SelectionChangedEvent event){
      ISelection selection=event.getSelection();
      if (selection != null) {
        Object[] sel=((IStructuredSelection)selection).toArray();
        if (sel.length == 1) {
          if (sel[0] instanceof IPropertyDefn) {
            DesignElementHandle desHandle=(DesignElementHandle)cmbExprListViewer.getInput();
            saveModel();
            IPropertyDefn elePropDefn=(IPropertyDefn)sel[0];
            cmbItemLastSelected=elePropDefn;
            setEditorText(desHandle.getStringProperty(elePropDefn.getName()));
            selectionMap.put(getModel(),selection);
            String method=cmbItemLastSelected.getName();
            updateScriptContext(desHandle,method);
          }
        }
      }
    }
  }
);
  scriptEditor.createPartControl(child);
  scriptValidator=new ScriptValidator(getViewer());
  SessionHandleAdapter.getInstance().getMediator().addColleague(this);
  disableEditor();
  SourceViewer viewer=getViewer();
  IDocument document=viewer == null ? null : viewer.getDocument();
  if (document != null) {
    IDocumentUndoManager undoManager=DocumentUndoManagerRegistry.getDocumentUndoManager(document);
    if (undoManager != null) {
      undoManager.addDocumentUndoListener(undoListener);
    }
    document.addDocumentListener(documentListener);
  }
}