Program: 138505
Project: 138505
Buggy source:
/** 
 * DOC qiongli Comment method "createAnalysisParamSection".
 * @param form
 * @param anasisDataComp
 */
void createAnalysisParamSection(final ScrolledForm form,Composite anasisDataComp){
  analysisParamSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite sectionClient=toolkit.createComposite(analysisParamSection);
  sectionClient.setLayout(new GridLayout(2,false));
  toolkit.createLabel(sectionClient,DefaultMessagesImpl.getString("String_Node_Str"));
  execCombo=new CCombo(sectionClient,SWT.BORDER);
  execCombo.setEditable(false);
  for (  ExecutionLanguage language : ExecutionLanguage.VALUES) {
    String temp=language.getLiteral();
    execCombo.add(temp);
  }
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  final Composite javaEnginSection=createjavaEnginSection(sectionClient);
  if (ExecutionLanguage.SQL.equals(executionLanguage)) {
    javaEnginSection.setVisible(false);
  }
  execCombo.setText(executionLanguage.getLiteral());
  execLang=executionLanguage.getLiteral();
  treeViewer.setLanguage(ExecutionLanguage.get(executionLanguage.getLiteral()));
  execCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      execLang=execCombo.getText();
      if (ExecutionLanguage.SQL.equals(ExecutionLanguage.get(execLang)) && includeDatePatternFreqIndicator()) {
        MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
        execCombo.setText(ExecutionLanguage.JAVA.getLiteral());
        execLang=execCombo.getText();
        return;
      }
      if (ExecutionLanguage.SQL.equals(ExecutionLanguage.get(execLang))) {
        javaEnginSection.setVisible(false);
      }
 else {
        javaEnginSection.setVisible(true);
      }
      setDirty(true);
      treeViewer.setLanguage(ExecutionLanguage.get(execLang));
    }
  }
);
  analysisParamSection.setClient(sectionClient);
}

Fixed version (ground truth):
/** 
 * DOC qiongli Comment method "createAnalysisParamSection".
 * @param form
 * @param anasisDataComp
 */
void createAnalysisParamSection(final ScrolledForm form,Composite anasisDataComp){
  analysisParamSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite sectionClient=toolkit.createComposite(analysisParamSection);
  sectionClient.setLayout(new GridLayout(2,false));
  toolkit.createLabel(sectionClient,DefaultMessagesImpl.getString("String_Node_Str"));
  execCombo=new CCombo(sectionClient,SWT.BORDER);
  execCombo.setEditable(false);
  for (  ExecutionLanguage language : ExecutionLanguage.VALUES) {
    String temp=language.getLiteral();
    execCombo.add(temp);
  }
  ExecutionLanguage executionLanguage=analysis.getParameters().getExecutionLanguage();
  final Composite javaEnginSection=createjavaEnginSection(sectionClient);
  if (ExecutionLanguage.SQL.equals(executionLanguage)) {
    javaEnginSection.setVisible(false);
    GridData data=(GridData)javaEnginSection.getLayoutData();
    data.heightHint=10;
    javaEnginSection.setLayoutData(data);
    analysisParamSection.setExpanded(true);
  }
  execCombo.setText(executionLanguage.getLiteral());
  execLang=executionLanguage.getLiteral();
  treeViewer.setLanguage(ExecutionLanguage.get(executionLanguage.getLiteral()));
  execCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      execLang=execCombo.getText();
      if (ExecutionLanguage.SQL.equals(ExecutionLanguage.get(execLang)) && includeDatePatternFreqIndicator()) {
        MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str"));
        execCombo.setText(ExecutionLanguage.JAVA.getLiteral());
        execLang=execCombo.getText();
        return;
      }
      if (ExecutionLanguage.SQL.equals(ExecutionLanguage.get(execLang))) {
        javaEnginSection.setVisible(false);
        GridData data=(GridData)javaEnginSection.getLayoutData();
        data.heightHint=10;
        javaEnginSection.setLayoutData(data);
        analysisParamSection.setExpanded(true);
      }
 else {
        javaEnginSection.setVisible(true);
        GridData data=(GridData)javaEnginSection.getLayoutData();
        data.heightHint=100;
        javaEnginSection.setLayoutData(data);
        analysisParamSection.setExpanded(true);
      }
      setDirty(true);
      treeViewer.setLanguage(ExecutionLanguage.get(execLang));
    }
  }
);
  toolkit.createLabel(sectionClient,"String_Node_Str").setToolTipText("String_Node_Str");
  storeDataCheck=new Button(sectionClient,SWT.CHECK | SWT.RIGHT_TO_LEFT);
  storeDataCheck.setSelection(simpleStatIndicator.isStoreData());
  storeDataCheck.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      simpleStatIndicator.setStoreData(storeDataCheck.getSelection());
      setDirty(true);
    }
  }
);
  analysisParamSection.setClient(sectionClient);
}