Program: 139600
Project: 139600
Buggy source:
protected void addPages(){
  TdEditorToolBar toolbar=getToolBar();
  if (toolbar != null) {
    saveAction=new DefaultSaveAction(this);
    runAction=new RunAnalysisAction();
    refreshAction=new RefreshChartAction();
    toolbar.addActions(saveAction,runAction,refreshAction);
  }
switch (analysisType) {
case COLUMN_CORRELATION:
    masterPage=new ColumnCorrelationNominalAndIntervalMasterPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
  resultPage=new ColumnCorrelationNominalIntervalResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
  addPage(masterPage);
  addPage(resultPage);
}
 catch (PartInitException e) {
  ExceptionHandler.process(e,Level.ERROR);
}
break;
case MULTIPLE_COLUMN:
masterPage=new ColumnMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new ColumnAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case CONNECTION:
masterPage=new ConnectionMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case CATALOG:
masterPage=new CatalogMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case SCHEMA:
masterPage=new SchemaAnalysisMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case COLUMNS_COMPARISON:
masterPage=new ColumnsComparisonMasterDetailsPage(this,MASTER_PAGE,DefaultMessagesImpl.getString("String_Node_Str"));
resultPage=new ColumnsComparisonAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case TABLE:
masterPage=new TableMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new TableAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case TABLE_FUNCTIONAL_DEPENDENCY:
masterPage=new ColumnDependencyMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new ColumnDependencyResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
default :
}
if (masterPage.getAnalysis() != null) {
setPartName(masterPage.getIntactElemenetName());
}
 else {
setPartName(getEditorInput().getName());
}
}

Fixed version (ground truth):
protected void addPages(){
  TdEditorToolBar toolbar=getToolBar();
  if (toolbar != null) {
    saveAction=new DefaultSaveAction(this);
    runAction=new RunAnalysisAction();
    refreshAction=new RefreshChartAction();
    toolbar.addActions(saveAction,runAction,refreshAction);
  }
switch (analysisType) {
case COLUMN_CORRELATION:
    masterPage=new ColumnCorrelationNominalAndIntervalMasterPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
  resultPage=new ColumnCorrelationNominalIntervalResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
  addPage(masterPage);
  addPage(resultPage);
}
 catch (PartInitException e) {
  ExceptionHandler.process(e,Level.ERROR);
}
break;
case MULTIPLE_COLUMN:
masterPage=new ColumnMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new ColumnAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case CONNECTION:
masterPage=new ConnectionMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case CATALOG:
masterPage=new CatalogMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case SCHEMA:
masterPage=new SchemaAnalysisMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
try {
addPage(masterPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case COLUMNS_COMPARISON:
masterPage=new ColumnsComparisonMasterDetailsPage(this,MASTER_PAGE,DefaultMessagesImpl.getString("String_Node_Str"));
resultPage=new ColumnsComparisonAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case TABLE:
masterPage=new TableMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new TableAnalysisResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
case TABLE_FUNCTIONAL_DEPENDENCY:
masterPage=new ColumnDependencyMasterDetailsPage(this,MASTER_PAGE,ANALYSIS_SETTINGS);
resultPage=new ColumnDependencyResultPage(this,SECOND_PAGE,ANALYSIS_RESULTS);
try {
addPage(masterPage);
addPage(resultPage);
setRefreshActionButtonState(false);
}
 catch (PartInitException e) {
ExceptionHandler.process(e,Level.ERROR);
}
break;
default :
}
if (masterPage.getAnalysis() != null) {
setPartName(masterPage.getIntactElemenetName());
}
 else {
setPartName(getEditorInput().getName());
}
}