Program: 140009
Project: 140009
Buggy source:
public void run(String[] params,ICheatSheetManager manager){
  if (params == null || params.length == 0) {
    return;
  }
  Integer analysisCatigory=null;
  if (NumberUtils.isNumber(params[0])) {
    analysisCatigory=NumberUtils.toInt(params[0]);
  }
  AnalysisType analysisType=null;
  if (analysisCatigory != null) {
switch (analysisCatigory) {
case AnalysisType.MULTIPLE_COLUMN_VALUE:
      analysisType=AnalysisType.MULTIPLE_COLUMN;
    break;
case AnalysisType.CATALOG_VALUE:
  analysisType=AnalysisType.CATALOG;
break;
case AnalysisType.SCHEMA_VALUE:
analysisType=AnalysisType.SCHEMA;
break;
case AnalysisType.COLUMNS_COMPARISON_VALUE:
analysisType=AnalysisType.COLUMNS_COMPARISON;
break;
case AnalysisType.COLUMN_CORRELATION_VALUE:
analysisType=AnalysisType.COLUMN_CORRELATION;
if (params[1] != null) {
if (NumberUtils.isNumber(params[1])) {
AnalysisParameter parameter=new AnalysisParameter();
parameter.setAnalysisTypeName(analysisType.getLiteral());
Wizard wizard=null;
int correAnaType=NumberUtils.toInt(params[1]);
if (correAnaType == 0) {
wizard=new ColumnWizard(parameter);
}
 else {
wizard=new ColumnTimeWizard(parameter);
}
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog=new WizardDialog(null,wizard);
dialog.setPageSize(500,340);
dialog.open();
}
}
return;
default :
break;
}
}
if (analysisType == null) {
return;
}
Wizard wizard=WizardFactory.createAnalysisWizard(analysisType);
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog=new WizardDialog(null,wizard);
dialog.setPageSize(500,340);
dialog.open();
}

Fixed version (ground truth):
public void run(String[] params,ICheatSheetManager manager){
  if (params == null || params.length == 0) {
    return;
  }
  Integer analysisCatigory=null;
  if (NumberUtils.isNumber(params[0])) {
    analysisCatigory=NumberUtils.toInt(params[0]);
  }
  AnalysisType analysisType=null;
  Wizard wizard=null;
  if (analysisCatigory != null) {
switch (analysisCatigory) {
case AnalysisType.MULTIPLE_COLUMN_VALUE:
      analysisType=AnalysisType.MULTIPLE_COLUMN;
    wizard=WizardFactory.createAnalysisWizard(analysisType);
  break;
case AnalysisType.CATALOG_VALUE:
analysisType=AnalysisType.CATALOG;
wizard=WizardFactory.createAnalysisWizard(analysisType);
break;
case AnalysisType.SCHEMA_VALUE:
analysisType=AnalysisType.SCHEMA;
wizard=WizardFactory.createAnalysisWizard(analysisType);
break;
case AnalysisType.COLUMNS_COMPARISON_VALUE:
analysisType=AnalysisType.COLUMNS_COMPARISON;
wizard=WizardFactory.createAnalysisWizard(analysisType);
break;
case AnalysisType.COLUMN_CORRELATION_VALUE:
analysisType=AnalysisType.COLUMN_CORRELATION;
if (params[1] != null) {
if (NumberUtils.isNumber(params[1])) {
AnalysisLabelParameter parameter=new AnalysisLabelParameter();
parameter.setAnalysisTypeName(analysisType.getLiteral());
int correAnaType=NumberUtils.toInt(params[1]);
if (correAnaType == 0) {
parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION);
}
 else {
parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION);
}
wizard=WizardFactory.createAnalysisWizard(analysisType,parameter);
}
}
break;
default :
break;
}
}
if (analysisType == null || wizard == null) {
return;
}
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog=new WizardDialog(null,wizard);
dialog.setPageSize(500,340);
dialog.open();
}