nus-yam/ex-repair huggingface dataset:
Program: 139568
Project: 139568
Buggy source:
/** 
 * DOC scorreia Comment method "createSubfolder".
 * @param newPatternFolder
 * @return
 * @throws CoreException
 */
private IFolder createSubfolder(IFolder newPatternFolder,final String folderName,String folderProp) throws CoreException {
  TdqPropertieManager.getInstance().addFolderProperties(newPatternFolder,DQStructureManager.FOLDER_CLASSIFY_KEY,folderProp);
  return DQStructureManager.getInstance().createNewFoler(newPatternFolder,folderName);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "createSubfolder".
 * @param newPatternFolder
 * @return
 * @throws CoreException
 */
private IFolder createSubfolder(IFolder newPatternFolder,final String folderName,String folderProp) throws CoreException {
  TdqPropertieManager.getInstance().addFolderProperties(newPatternFolder,DQStructureManager.FOLDER_CLASSIFY_KEY,folderProp);
  return DQStructureManager.getInstance().createNewFolder(newPatternFolder,folderName);
}
Program: 139571
Project: 139571
Buggy source:
/** 
 * DOC scorreia Comment method "updateDependencies".
 * @param analysesSubFolder
 * @throws CoreException
 */
private void updateDependencies(IFolder analysesSubFolder) throws CoreException {
  for (  IResource resource : analysesSubFolder.members()) {
    if (resource instanceof IFolder) {
      IFolder folder=(IFolder)resource;
      updateDependencies(folder);
    }
    if (resource instanceof IFile) {
      IFile file=(IFile)resource;
      final Analysis analysis=AnaResourceFileHelper.getInstance().findAnalysis(file);
      final List<Pattern> patterns=AnalysisHelper.getPatterns(analysis);
      for (      Pattern pattern : patterns) {
        DependenciesHandler.getInstance().setDependencyOn(analysis,pattern);
        AnaResourceFileHelper.getInstance().save(analysis);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Method "updateDependencies" updates dependencies between elements in TOP.
 * @param analysesSubFolder
 * @throws CoreException
 */
private void updateDependencies(IFolder analysesSubFolder) throws CoreException {
  for (  IResource resource : analysesSubFolder.members()) {
    if (resource instanceof IFolder) {
      IFolder folder=(IFolder)resource;
      updateDependencies(folder);
    }
    if (resource instanceof IFile) {
      IFile file=(IFile)resource;
      final Analysis analysis=AnaResourceFileHelper.getInstance().findAnalysis(file);
      final List<Pattern> patterns=AnalysisHelper.getPatterns(analysis);
      for (      Pattern pattern : patterns) {
        DependenciesHandler.getInstance().setDependencyOn(analysis,pattern);
        AnaResourceFileHelper.getInstance().save(analysis);
      }
      final List<IndicatorDefinition> userDefinedIndicators=AnalysisHelper.getUserDefinedIndicators(analysis);
      for (      IndicatorDefinition indicatorDefinition : userDefinedIndicators) {
        DependenciesHandler.getInstance().setDependencyOn(analysis,indicatorDefinition);
        AnaResourceFileHelper.getInstance().save(analysis);
      }
    }
  }
}
Program: 139572
Project: 139572
Buggy source:
public boolean execute(){
  log.info(this.getName() + "String_Node_Str");
  try {
    IProject rootProject=ResourceManager.getRootProject();
    IFolder dataprofilingFolder=rootProject.getFolder(ResourceManager.DATA_PROFILING_FOLDER_NAME);
    IFolder analysesFolder=dataprofilingFolder.getFolder(DQStructureManager.ANALYSIS);
    updateDependencies(analysesFolder);
    return true;
  }
 catch (  CoreException e) {
    ExceptionHandler.process(e);
    return false;
  }
}

Fixed version (ground truth):
public boolean execute(){
  try {
    IProject rootProject=ResourceManager.getRootProject();
    IFolder dataprofilingFolder=rootProject.getFolder(ResourceManager.DATA_PROFILING_FOLDER_NAME);
    IFolder analysesFolder=dataprofilingFolder.getFolder(DQStructureManager.ANALYSIS);
    updateDependencies(analysesFolder);
    return true;
  }
 catch (  CoreException e) {
    ExceptionHandler.process(e);
    return false;
  }
}
Program: 139574
Project: 139574
Buggy source:
@Override protected void createToolItems(ToolBarManager tbm){
  final Action nextDiff=new AbstractCompareAction(ResourceBundle.getBundle(BUNDLE_NAME),"String_Node_Str"){
    @Override public void run(){
      navigate(true);
    }
  }
;
  final ActionContributionItem nextDiffContribution=new ActionContributionItem(nextDiff);
  nextDiffContribution.setVisible(true);
  tbm.appendToGroup("String_Node_Str",nextDiffContribution);
  final Action previousDiff=new AbstractCompareAction(ResourceBundle.getBundle(BUNDLE_NAME),"String_Node_Str"){
    @Override public void run(){
      navigate(false);
    }
  }
;
  final ActionContributionItem previousDiffContribution=new ActionContributionItem(previousDiff);
  previousDiffContribution.setVisible(true);
  tbm.appendToGroup("String_Node_Str",previousDiffContribution);
  IContributionItem[] icItems=tbm.getItems();
  for (  IContributionItem conbItem : icItems) {
    if (conbItem instanceof ActionContributionItem) {
      IAction a=((ActionContributionItem)conbItem).getAction();
      if (a != null && a instanceof ChangePropertyAction) {
        tbm.remove(conbItem);
        conbItem.dispose();
        continue;
      }
      if (((ActionContributionItem)conbItem).getAction() != null && ((ActionContributionItem)conbItem).getAction().getActionDefinitionId() != null) {
        if (((ActionContributionItem)conbItem).getAction().getActionDefinitionId().equals(COPY_LEFT_TO_RIGHT_ID)) {
          tbm.remove(conbItem);
          conbItem.dispose();
        }
      }
    }
  }
  tbm.update(true);
}

Fixed version (ground truth):
@Override protected void createToolItems(ToolBarManager tbm){
  final Action nextDiff=new AbstractCompareAction(ResourceBundle.getBundle(BUNDLE_NAME),"String_Node_Str"){
    @Override public void run(){
      navigate(true);
    }
  }
;
  final ActionContributionItem nextDiffContribution=new ActionContributionItem(nextDiff);
  nextDiffContribution.setVisible(true);
  tbm.appendToGroup("String_Node_Str",nextDiffContribution);
  final Action previousDiff=new AbstractCompareAction(ResourceBundle.getBundle(BUNDLE_NAME),"String_Node_Str"){
    @Override public void run(){
      navigate(false);
    }
  }
;
  final ActionContributionItem previousDiffContribution=new ActionContributionItem(previousDiff);
  previousDiffContribution.setVisible(true);
  tbm.appendToGroup("String_Node_Str",previousDiffContribution);
  IContributionItem[] icItems=tbm.getItems();
  for (  IContributionItem conbItem : icItems) {
    if (conbItem instanceof ActionContributionItem) {
      IAction action=((ActionContributionItem)conbItem).getAction();
      if (action != null && action instanceof ChangePropertyAction) {
        tbm.remove(conbItem);
        conbItem.dispose();
        continue;
      }
      String actionId=action.getActionDefinitionId();
      if (action != null) {
        if (COPY_LEFT_TO_RIGHT_ID.equals(actionId) || COPY_RIGHT_TO_LEFT_ID.equals(actionId)) {
          tbm.remove(conbItem);
          conbItem.dispose();
        }
      }
    }
  }
  tbm.update(true);
}
Program: 139575
Project: 139575
Buggy source:
public static List<Pattern> getPatterns(Analysis analysis){
  List<Pattern> rets=new ArrayList<Pattern>();
  EList<Indicator> indicators=analysis.getResults().getIndicators();
  for (  Indicator indicator : indicators) {
    if (indicator instanceof PatternMatchingIndicator) {
      rets.addAll(((PatternMatchingIndicator)indicator).getParameters().getDataValidDomain().getPatterns());
    }
 else     if (indicator instanceof UserDefIndicator) {
      if (IndicatorCategoryHelper.isUserDefMatching(getIndicatorCategory(indicator.getIndicatorDefinition()))) {
        rets.addAll(((UserDefIndicator)indicator).getParameters().getDataValidDomain().getPatterns());
      }
    }
  }
  return rets;
}

Fixed version (ground truth):
public static List<Pattern> getPatterns(Analysis analysis){
  List<Pattern> rets=new ArrayList<Pattern>();
  EList<Indicator> indicators=analysis.getResults().getIndicators();
  for (  Indicator indicator : indicators) {
    if (indicator instanceof PatternMatchingIndicator) {
      rets.addAll(((PatternMatchingIndicator)indicator).getParameters().getDataValidDomain().getPatterns());
    }
  }
  return rets;
}
Program: 139576
Project: 139576
Buggy source:
public static Map<IndicatorCategory,List<IndicatorDefinition>> getCategoriesIDMaps(){
  if (categoriesIDMaps == null) {
    categoriesIDMaps=buildCategories();
  }
  return categoriesIDMaps;
}

Fixed version (ground truth):
private static Map<IndicatorCategory,List<IndicatorDefinition>> getCategoriesIDMaps(){
  if (categoriesIDMaps == null) {
    categoriesIDMaps=buildCategories();
  }
  return categoriesIDMaps;
}
Program: 139577
Project: 139577
Buggy source:
public static List<IndicatorDefinition> getShowIndicatorsDefinitions(){
  if (showIndicatorDefinitions == null) {
    showIndicatorDefinitions=new ArrayList<IndicatorDefinition>();
    EList<IndicatorDefinition> indicatorDefinitions=DefinitionHandler.getInstance().getIndicatorsDefinitions().getIndicatorDefinitions();
    for (    IndicatorDefinition indicatorDefinition : indicatorDefinitions) {
      if (!indicatorDefinition.getSqlGenericExpression().isEmpty() && !getShouldNotIncludeIndicatorDefinitionUuidList().contains(ResourceHelper.getUUID(indicatorDefinition))) {
        showIndicatorDefinitions.add(indicatorDefinition);
      }
    }
  }
  return showIndicatorDefinitions;
}

Fixed version (ground truth):
private static List<IndicatorDefinition> getShowIndicatorsDefinitions(){
  ArrayList<IndicatorDefinition> showIndicatorDefinitions=new ArrayList<IndicatorDefinition>();
  EList<IndicatorDefinition> indicatorDefinitions=DefinitionHandler.getInstance().getIndicatorsDefinitions().getIndicatorDefinitions();
  for (  IndicatorDefinition indicatorDefinition : indicatorDefinitions) {
    if (!indicatorDefinition.getSqlGenericExpression().isEmpty() && !getShouldNotIncludeIndicatorDefinitionUuidList().contains(ResourceHelper.getUUID(indicatorDefinition))) {
      showIndicatorDefinitions.add(indicatorDefinition);
    }
  }
  return showIndicatorDefinitions;
}
Program: 139580
Project: 139580
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public String getRange(){
  if (upperValue != null && lowerValue != null) {
    if (Java2SqlType.isNumbericInSQL(upperValue.getDatatype())) {
      Double upper=upperValue.getRealValue();
      Double lower=lowerValue.getRealValue();
      if (upper != null && lower != null) {
        double range=upper - lower;
        return String.valueOf(range);
      }
    }
 else     if (Java2SqlType.isDateInSQL(upperValue.getDatatype())) {
      Date upper=null;
      Date lower=null;
      try {
        upper=DateUtils.parse(DateUtils.PATTERN_3,upperValue.getValue());
        lower=DateUtils.parse(DateUtils.PATTERN_3,lowerValue.getValue());
      }
 catch (      ParseException e) {
        throw new RuntimeException(e);
      }
      if (upper != null && lower != null) {
        return String.valueOf(ElapsedTime.getNbDays(upper,lower));
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public String getRange(){
  if (upperValue != null && lowerValue != null) {
    if (Java2SqlType.isNumbericInSQL(upperValue.getDatatype())) {
      Double upper=upperValue.getRealValue();
      Double lower=lowerValue.getRealValue();
      if (upper != null && lower != null) {
        double range=upper - lower;
        return String.valueOf(range);
      }
    }
 else     if (Java2SqlType.isDateInSQL(upperValue.getDatatype())) {
      Date upper=null;
      Date lower=null;
      try {
        upper=DateUtils.parse(DateUtils.PATTERN_3,upperValue.getValue());
        lower=DateUtils.parse(DateUtils.PATTERN_3,lowerValue.getValue());
      }
 catch (      ParseException e) {
        throw new RuntimeException(e);
      }
      if (upper != null && lower != null) {
        return String.valueOf(ElapsedTime.getNbDays(lower,upper));
      }
    }
  }
  return null;
}
Program: 139581
Project: 139581
Buggy source:
private void write(List<TdqProperties> properties) throws IOException, SAXException, IntrospectionException {
  File file=getPropertiesFile(PROPERTIES_FILE);
  FileWriter outputWriter=new FileWriter(file);
  outputWriter.write("String_Node_Str");
  BeanWriter beanWriter=new BeanWriter(outputWriter);
  beanWriter.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
  beanWriter.getBindingConfiguration().setMapIDs(false);
  beanWriter.enablePrettyPrint();
  beanWriter.write("String_Node_Str",properties);
  outputWriter.close();
}

Fixed version (ground truth):
private void write(List<TdqProperties> properties) throws IOException, SAXException, IntrospectionException {
  File file=getPropertiesFile(PROPERTIES_FILE);
  FileWriter outputWriter=new FileWriter(file);
  outputWriter.write("String_Node_Str");
  BeanWriter beanWriter=new BeanWriter(outputWriter);
  beanWriter.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
  beanWriter.getBindingConfiguration().setMapIDs(false);
  beanWriter.enablePrettyPrint();
  beanWriter.write("String_Node_Str",properties);
  outputWriter.close();
  refreshFile(PROPERTIES_FILE);
  refreshFile(PROPERTIES_RULE_FILE);
}
Program: 139582
Project: 139582
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        labelPurpose.setText("String_Node_Str" + value.getValue());
      }
 else       if ("String_Node_Str".equals(value.getTag())) {
        labelDescription.setText("String_Node_Str" + value.getValue() + value.getValue());
      }
    }
    labelPurpose.getParent().layout();
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        labelPurpose.setText("String_Node_Str" + value.getValue());
      }
 else       if ("String_Node_Str".equals(value.getTag())) {
        labelDescription.setText("String_Node_Str" + value.getValue());
      }
    }
    labelPurpose.getParent().layout();
  }
}
Program: 139584
Project: 139584
Buggy source:
/** 
 * DOC xqliu Comment method "runAnalysisIndicatorsParallel".
 * @param connection
 * @param elementToIndicator
 * @param indicators
 * @return
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators) throws SQLException {
  boolean ok=true;
  List<Thread> runners=new ArrayList<Thread>();
  try {
    for (    Indicator indicator : indicators) {
      ColumnAnalysisSqlParallelExecutor columnSqlParallel=ColumnAnalysisSqlParallelExecutor.createInstance(this,connection,elementToIndicator,indicator);
      Thread thread=new Thread(columnSqlParallel);
      runners.add(thread);
      thread.start();
    }
    while (true) {
      boolean stop=true;
      for (      Thread thread : runners) {
        if (thread.isAlive()) {
          stop=false;
          Thread.sleep(1000);
        }
      }
      if (stop) {
        break;
      }
    }
  }
 catch (  InterruptedException e) {
    log.error(e,e);
  }
  runners=null;
  return ok;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "runAnalysisIndicatorsParallel".
 * @param connection
 * @param elementToIndicator
 * @param indicators
 * @return
 * @throws SQLException
 */
private boolean runAnalysisIndicatorsParallel(Connection connection,Map<ModelElement,List<Indicator>> elementToIndicator,Collection<Indicator> indicators) throws SQLException {
  boolean ok=true;
  List<Thread> runners=new ArrayList<Thread>();
  List<ColumnAnalysisSqlParallelExecutor> columnSqlExecutor=new ArrayList<ColumnAnalysisSqlParallelExecutor>();
  try {
    for (    Indicator indicator : indicators) {
      ColumnAnalysisSqlParallelExecutor columnSqlParallel=ColumnAnalysisSqlParallelExecutor.createInstance(this,connection,elementToIndicator,indicator);
      columnSqlExecutor.add(columnSqlParallel);
      Thread thread=new Thread(columnSqlParallel);
      runners.add(thread);
      thread.start();
    }
    while (true) {
      boolean stop=true;
      for (      Thread thread : runners) {
        if (thread.isAlive()) {
          stop=false;
          Thread.sleep(1000);
        }
      }
      if (stop) {
        break;
      }
    }
  }
 catch (  InterruptedException e) {
    log.error(e,e);
  }
  runners=null;
  for (  ColumnAnalysisSqlParallelExecutor executor : columnSqlExecutor) {
    if (executor.getException() != null) {
      columnSqlExecutor=null;
      throw new SQLException(executor.getException().toString());
    }
  }
  columnSqlExecutor=null;
  return ok;
}
Program: 139585
Project: 139585
Buggy source:
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    if (indicator instanceof CompositeIndicator) {
      return;
    }
synchronized (schemata) {
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
    }
    Expression query=dbms().getInstantiatedExpression(indicator);
    if (query == null || !executeQuery(indicator,connection,query.getBody())) {
      ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
    }
 else {
      indicator.setComputed(true);
    }
synchronized (elementToIndicator) {
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
  }
 catch (  SQLException e) {
    this.setException(e);
  }
}
Program: 139586
Project: 139586
Buggy source:
@Override public void init(IViewSite site,IMemento memento) throws PartInitException {
  super.init(site,memento);
  if (memento == null) {
    setLinkingEnabled(false);
  }
  getViewSite().getActionBars().getToolBarManager().add(new RefreshDQReponsitoryViewAction());
}

Fixed version (ground truth):
@Override public void init(IViewSite site,IMemento memento) throws PartInitException {
  super.init(site,memento);
  if (memento == null) {
    setLinkingEnabled(false);
  }
  getViewSite().getActionBars().getToolBarManager().add(new RefreshDQReponsitoryViewAction(this));
}
Program: 139587
Project: 139587
Buggy source:
@Override public void run(){
  ProxyRepositoryManager.getInstance().refresh();
  super.run();
}

Fixed version (ground truth):
@Override public void run(){
  ProxyRepositoryManager.getInstance().refresh();
  dqRespositoryView.getCommonViewer().refresh();
  super.run();
}
Program: 139588
Project: 139588
Buggy source:
public RefreshDQReponsitoryViewAction(){
  super(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.REFRESH_SPACE));
}

Fixed version (ground truth):
public RefreshDQReponsitoryViewAction(DQRespositoryView dqRespositoryView){
  super(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
  setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.REFRESH_SPACE));
  this.dqRespositoryView=dqRespositoryView;
}
Program: 139589
Project: 139589
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  compoDetail.setLayout(new GridLayout(1,false));
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.heightHint=100;
  data.horizontalIndent=20;
  compoDetail.setLayoutData(data);
  Font font0=new Font(null,"String_Node_Str",9,SWT.BOLD);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  labelPurpose=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelPurpose.setLayoutData(data);
  labelPurpose.setFont(font0);
  labelDescription=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelDescription.setLayoutData(data);
  labelDescription.setFont(font0);
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  compoDetail.setLayout(new GridLayout(1,false));
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.heightHint=100;
  data.horizontalIndent=20;
  compoDetail.setLayoutData(data);
  Font font0=new Font(null,"String_Node_Str",9,SWT.None);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  labelPurpose=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelPurpose.setLayoutData(data);
  labelPurpose.setFont(font0);
  labelDescription=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelDescription.setLayoutData(data);
  labelDescription.setFont(font0);
}
Program: 139590
Project: 139590
Buggy source:
/** 
 * DOC yyi Comment method "editUDIndicator" 2009-09-04.
 * @param tree
 */
private void editUDIndicator(Tree tree){
  TreeItem[] selection=tree.getSelection();
  if (selection.length > 0) {
    TreeItem treeItem=selection[0];
    IndicatorUnit indicatorUnit=(IndicatorUnit)treeItem.getData(INDICATOR_UNIT_KEY);
    UserDefIndicator indicator=(UserDefIndicator)indicatorUnit.getIndicator();
    IFolder userFolder=ResourceManager.getLibrariesFolder().getFolder(DQStructureManager.USER_DEFINED_INDICATORS);
    IFile file=UDIResourceFileHelper.getInstance().getUDIFile(indicator.getIndicatorDefinition(),new IFolder[]{userFolder});
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    try {
      activePage.openEditor(new FileEditorInput(file),"String_Node_Str");
    }
 catch (    PartInitException e1) {
      log.error(e1,e1);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi Comment method "editUDIndicator" 2009-09-04.
 * @param tree
 */
private void editUDIndicator(Tree tree){
  TreeItem[] selection=tree.getSelection();
  if (selection.length > 0) {
    TreeItem treeItem=selection[0];
    IndicatorUnit indicatorUnit=(IndicatorUnit)treeItem.getData(INDICATOR_UNIT_KEY);
    UserDefIndicator indicator=(UserDefIndicator)indicatorUnit.getIndicator();
    IFolder userFolder=ResourceManager.getLibrariesFolder().getFolder(DQStructureManager.INDICATORS).getFolder(DQStructureManager.USER_DEFINED_INDICATORS);
    IFile file=UDIResourceFileHelper.getInstance().getUDIFile(indicator.getIndicatorDefinition(),new IFolder[]{userFolder});
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    try {
      activePage.openEditor(new FileEditorInput(file),"String_Node_Str");
    }
 catch (    PartInitException e1) {
      log.error(e1,e1);
    }
  }
}
Program: 139591
Project: 139591
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        labelPurpose.setText(value.getValue());
      }
 else       if ("String_Node_Str".equals(value.getTag())) {
        labelDescription.setText(value.getValue());
      }
    }
    labelPurpose.getParent().layout();
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
protected void updateDetailList(){
  if (!"String_Node_Str".equals(comboCategory.getText())) {
    IndicatorCategory ic=UDIHelper.getUDICategory(definition);
    for (    TaggedValue value : ic.getTaggedValue()) {
      if ("String_Node_Str".equals(value.getTag())) {
        labelPurpose.setText("String_Node_Str" + value.getValue());
      }
 else       if ("String_Node_Str".equals(value.getTag())) {
        labelDescription.setText("String_Node_Str" + value.getValue() + value.getValue());
      }
    }
    labelPurpose.getParent().layout();
  }
}
Program: 139592
Project: 139592
Buggy source:
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=100;
  data.horizontalIndent=20;
  compoDetail.setLayoutData(data);
  compoDetail.setLayout(new GridLayout(2,false));
  data=new GridData(GridData.FILL_HORIZONTAL);
  Label label0=new Label(compoDetail,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.BEGINNING).applyTo(label0);
  label0.setText("String_Node_Str");
  labelPurpose=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelPurpose.setLayoutData(data);
  Label label1=new Label(compoDetail,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.BEGINNING).applyTo(label1);
  label1.setText("String_Node_Str");
  labelDescription=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelDescription.setLayoutData(data);
}

Fixed version (ground truth):
/** 
 * DOC yyi 2009-09-23 Feature 9059
 * @param composite
 */
private void createDetailList(Composite composite){
  Composite compoDetail=new Composite(composite,SWT.NONE);
  compoDetail.setLayout(new GridLayout(1,false));
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.heightHint=100;
  data.horizontalIndent=20;
  compoDetail.setLayoutData(data);
  Font font0=new Font(null,"String_Node_Str",9,SWT.BOLD);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.grabExcessHorizontalSpace=true;
  labelPurpose=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelPurpose.setLayoutData(data);
  labelPurpose.setFont(font0);
  labelDescription=new Label(compoDetail,SWT.WRAP | SWT.HORIZONTAL);
  labelDescription.setLayoutData(data);
  labelDescription.setFont(font0);
}
Program: 139593
Project: 139593
Buggy source:
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override public boolean performFinish(){
  String folderName=mainPage.getName();
  if (defaultLabel == null) {
    IFolder folder=ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
    IFolder newFolder=folder.getFolder(folderName);
    try {
      newFolder.create(false,true,null);
      Object persistentProperty=TdqPropertieManager.getInstance().getFolderPropertyValue(newFolder,DQStructureManager.FOLDER_CLASSIFY_KEY);
      if (persistentProperty != null) {
        TdqPropertieManager.getInstance().addFolderProperties(newFolder,DQStructureManager.FOLDER_CLASSIFY_KEY,persistentProperty.toString());
      }
      folder.refreshLocal(IResource.DEPTH_INFINITE,null);
      DQRespositoryView findView=(DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID);
      findView.getCommonViewer().refresh();
      findView.getCommonViewer().setExpandedState(newFolder,true);
    }
 catch (    CoreException e) {
      MessageDialog.openError(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      ExceptionHandler.process(e);
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override public boolean performFinish(){
  String folderName=mainPage.getName();
  if (defaultLabel == null) {
    IFolder folder=ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
    IFolder newFolder=folder.getFolder(folderName);
    try {
      newFolder.create(false,true,null);
      Object persistentProperty=TdqPropertieManager.getInstance().getFolderPropertyValue(folder,DQStructureManager.FOLDER_CLASSIFY_KEY);
      if (persistentProperty != null) {
        TdqPropertieManager.getInstance().addFolderProperties(newFolder,DQStructureManager.FOLDER_CLASSIFY_KEY,persistentProperty.toString());
      }
      folder.refreshLocal(IResource.DEPTH_INFINITE,null);
      DQRespositoryView findView=(DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID);
      findView.getCommonViewer().refresh();
      findView.getCommonViewer().setExpandedState(newFolder,true);
    }
 catch (    CoreException e) {
      MessageDialog.openError(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      ExceptionHandler.process(e);
      return false;
    }
  }
  return true;
}
Program: 139594
Project: 139594
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  DataManager dataManager=analysis.getContext().getConnection();
  try {
    IDatabaseJobService service=(IDatabaseJobService)GlobalServiceRegister.getDefault().getService(IJobService.class);
    if (service != null) {
      DBConnectionParameter parameter=buildParameter(dataManager);
      service.setConnectionParameter(parameter);
      service.setSelectedColumn(column);
      service.executeJob();
    }
  }
 catch (  Exception e2) {
    e2.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  TdColumn column=(TdColumn)indicator.getAnalyzedElement();
  DataManager dataManager=analysis.getContext().getConnection();
  try {
    IDatabaseJobService service=(IDatabaseJobService)GlobalServiceRegister.getDefault().getService(IJobService.class);
    if (service != null) {
      DBConnectionParameter parameter=buildParameter(dataManager);
      service.setConnectionParameter(parameter);
      service.setSelectedColumn(column);
      service.setAnalysis(analysis);
      service.executeJob();
    }
  }
 catch (  Exception e2) {
    e2.printStackTrace();
  }
}
Program: 139597
Project: 139597
Buggy source:
public JFreeChart getChart(){
  return TopChartFactory.createBarChart(DefaultMessagesImpl.getString("String_Node_Str"),getDataset(),true);
}

Fixed version (ground truth):
public JFreeChart getChart(){
  return TopChartFactory.createBarChart(DefaultMessagesImpl.getString("String_Node_Str"),getDataset(),false);
}
Program: 139599
Project: 139599
Buggy source:
/** 
 * DOC scorreia Comment method "getValueFields".
 * @param value2freq
 * @return
 */
protected Object getValueFields(Object[] value2freq){
  int nbFields=value2freq.length;
  if (nbFields == 2) {
    return value2freq[0];
  }
  StringBuffer buf=new StringBuffer();
  if (nbFields == 3) {
    Object year=value2freq[0];
    buf.append(format4digit(year));
    Object quarter=value2freq[1];
    buf.append(String.valueOf(quarter));
    return buf.toString();
  }
  if (nbFields == 4) {
    buf.append(format4digit(value2freq[0]));
    buf.append(format2digit(value2freq[2]));
    return buf.toString();
  }
  if (nbFields == 5) {
    Object year=value2freq[0];
    buf.append(format4digit(year));
    Object month=String.valueOf(value2freq[2]);
    buf.append(format2digit(month));
    String week=String.valueOf(value2freq[3]);
    buf.append(format2digit(week));
    return buf.toString();
  }
  if (nbFields == 6) {
    Object year=value2freq[0];
    buf.append(format4digit(year));
    Object month=String.valueOf(value2freq[2]);
    buf.append(format2digit(month));
    String day=String.valueOf(value2freq[4]);
    buf.append(format2digit(day));
    return buf.toString();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getValueFields".
 * @param value2freq
 * @return
 */
protected Object getValueFields(Object[] value2freq){
  int nbFields=value2freq.length;
  if (nbFields == 2) {
    return value2freq[0];
  }
  StringBuffer buf=new StringBuffer();
  if (nbFields == 3) {
    Object year=value2freq[0];
    Object quarter=value2freq[1];
    if (year == null && quarter == null) {
      return null;
    }
    buf.append(format4digit(year));
    buf.append(String.valueOf(quarter));
    return buf.toString();
  }
  if (nbFields == 4) {
    Object year=value2freq[0];
    Object month=value2freq[2];
    if (year == null && month == null) {
      return null;
    }
    buf.append(format4digit(year));
    buf.append(format2digit(month));
    return buf.toString();
  }
  if (nbFields == 5) {
    Object year=value2freq[0];
    Object month=value2freq[2];
    Object week=value2freq[3];
    if (year == null && month == null && week == null) {
      return null;
    }
    buf.append(format4digit(year));
    buf.append(format2digit(month));
    buf.append(format2digit(week));
    return buf.toString();
  }
  if (nbFields == 6) {
    Object year=value2freq[0];
    Object month=value2freq[2];
    Object day=value2freq[4];
    if (year == null && month == null && day == null) {
      return null;
    }
    buf.append(format4digit(year));
    buf.append(format2digit(month));
    buf.append(format2digit(day));
    return buf.toString();
  }
  return null;
}
Program: 139601
Project: 139601
Buggy source:
@Override protected void addFieldsListeners(){
  for (  final Button button : allBtns) {
    button.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        String timeUnit=button.getText();
        DateGrain dateGrain=DateGrain.get(timeUnit);
        DateParameters dateParameters=parameters.getDateParameters();
        if (dateParameters == null) {
          dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
        }
        dateParameters.setDateAggregationType(dateGrain);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  for (  final Button button : allBtns) {
    button.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        String timeUnit=button.getText();
        DateGrain dateGrain=DateGrain.get(timeUnit);
        DateParameters dateParameters=parameters.getDateParameters();
        if (dateParameters == null) {
          dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
        }
        dateParameters.setDateAggregationType(dateGrain);
        updateStatus(IStatus.OK,MSG_OK);
      }
    }
);
  }
}
Program: 139602
Project: 139602
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  String timeUnit=button.getText();
  DateGrain dateGrain=DateGrain.get(timeUnit);
  DateParameters dateParameters=parameters.getDateParameters();
  if (dateParameters == null) {
    dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
  }
  dateParameters.setDateAggregationType(dateGrain);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  String timeUnit=button.getText();
  DateGrain dateGrain=DateGrain.get(timeUnit);
  DateParameters dateParameters=parameters.getDateParameters();
  if (dateParameters == null) {
    dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
  }
  dateParameters.setDateAggregationType(dateGrain);
  updateStatus(IStatus.OK,MSG_OK);
}
Program: 139603
Project: 139603
Buggy source:
private static Object getInstance(String propertyName){
  try {
    return getConfigurationElement().createExecutableExtension(propertyName);
  }
 catch (  CoreException e) {
    return new RepositoryManager();
  }
}

Fixed version (ground truth):
private static synchronized Object getInstance(String propertyName){
  try {
    IConfigurationElement configurationElement=getConfigurationElement();
    if (configurationElement != null)     return configurationElement.createExecutableExtension(propertyName);
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  return new RepositoryManager();
}
Program: 139604
Project: 139604
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  setFormTitle(DefaultMessagesImpl.getString("String_Node_Str"));
  setMetadataTitle(DefaultMessagesImpl.getString("String_Node_Str"));
  super.createFormContent(managedForm);
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createDefinitionSection(topComp);
  if (isSystemIndicator()) {
    if (IndicatorCategoryHelper.isCorrelation(category)) {
      createAdditionalFunctionsSection(topComp);
    }
    if (this.hasCharactersMapping) {
      createCharactersMappingSection(topComp);
    }
  }
 else {
    createCategorySection(topComp);
  }
  foldingSections(new Section[]{metadataSection,additionalFunctionsSection,definitionSection,charactersMappingSection,categorySection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  setFormTitle(DefaultMessagesImpl.getString("String_Node_Str"));
  setMetadataTitle(DefaultMessagesImpl.getString("String_Node_Str"));
  super.createFormContent(managedForm);
  metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  createDefinitionSection(topComp);
  if (isSystemIndicator()) {
    if (IndicatorCategoryHelper.isCorrelation(category)) {
      createAdditionalFunctionsSection(topComp);
    }
    if (this.hasCharactersMapping) {
      createCharactersMappingSection(topComp);
    }
  }
 else {
    createCategorySection(topComp);
  }
  foldingSections(new Section[]{metadataSection,additionalFunctionsSection,definitionSection,charactersMappingSection,categorySection});
  currentEditor.registerSections(new Section[]{metadataSection,additionalFunctionsSection,definitionSection,charactersMappingSection,categorySection});
}
Program: 139605
Project: 139605
Buggy source:
public void modifyText(ModifyEvent e){
  setDirty(true);
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  setDirty(true);
  saveTextChange();
}
Program: 139607
Project: 139607
Buggy source:
@Override public boolean performOk(){
  boolean ok=super.performOk();
  saveLanguageType();
  getPreferenceStore().setValue(header.getText(),execCombo.getText());
  return ok;
}

Fixed version (ground truth):
@Override public boolean performOk(){
  boolean ok=super.performOk();
  LocalToLanguageEnum language=LocalToLanguageEnum.findLocal(execCombo.getText());
  getPreferenceStore().setValue(PluginConstant.LANGUAGE_SELECTOR,language.getShortOfLocale());
  CorePlugin.getDefault().savePluginPreferences();
  saveLanguageType();
  return ok;
}
Program: 139608
Project: 139608
Buggy source:
@Override protected void performDefaults(){
  execCombo.deselectAll();
  getPreferenceStore().setValue(header.getText(),execCombo.getText());
  super.performDefaults();
}

Fixed version (ground truth):
@Override protected void performDefaults(){
  execCombo.deselectAll();
  getPreferenceStore().setValue(PluginConstant.LANGUAGE_SELECTOR,LocalToLanguageEnum.ENGLISH.getShortOfLocale());
  execCombo.setText(LocalToLanguageEnum.ENGLISH.getLocale());
  super.performDefaults();
}
Program: 139610
Project: 139610
Buggy source:
/** 
 * DOC hcheng Comment method "saveLanguageType".
 */
private void saveLanguageType(){
  FileInputStream fin=null;
  FileOutputStream fout=null;
  try {
    URL url=Platform.getConfigurationLocation().getURL();
    log(url.getFile());
    Properties p=new Properties();
    File iniFile=new File(url.getFile(),"String_Node_Str");
    fin=new FileInputStream(iniFile);
    p.load(fin);
    String languageType=PluginConstant.LANGUAGE_SELECTOR;
    if (languageType.equals(p.getProperty(EclipseStarter.PROP_NL))) {
      return;
    }
    p.setProperty(EclipseStarter.PROP_NL,languageType);
    fout=new FileOutputStream(iniFile);
    p.store(fout,"String_Node_Str");
    fout.flush();
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if (fin != null) {
      try {
        fin.close();
      }
 catch (      Exception e) {
      }
    }
    if (fout != null) {
      try {
        fout.close();
      }
 catch (      Exception e) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC hcheng Comment method "saveLanguageType".
 */
private void saveLanguageType(){
  FileInputStream fin=null;
  FileOutputStream fout=null;
  try {
    URL url=Platform.getConfigurationLocation().getURL();
    log(url.getFile());
    Properties p=new Properties();
    File iniFile=new File(url.getFile(),"String_Node_Str");
    fin=new FileInputStream(iniFile);
    p.load(fin);
    String languageType=CorePlugin.getDefault().getPluginPreferences().getString(PluginConstant.LANGUAGE_SELECTOR);
    if (languageType.equals(p.getProperty(EclipseStarter.PROP_NL))) {
      return;
    }
    p.setProperty(EclipseStarter.PROP_NL,languageType);
    fout=new FileOutputStream(iniFile);
    p.store(fout,"String_Node_Str");
    fout.flush();
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if (fin != null) {
      try {
        fin.close();
      }
 catch (      Exception e) {
      }
    }
    if (fout != null) {
      try {
        fout.close();
      }
 catch (      Exception e) {
      }
    }
  }
}
Program: 139611
Project: 139611
Buggy source:
/** 
 * DOC scorreia Comment method "getYearCharacters".
 * @param label
 * @return
 */
private String getYearCharacters(String label){
  if (label.equals("String_Node_Str")) {
    return null;
  }
 else {
    return label.substring(0,4);
  }
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "getYearCharacters".
 * @param label
 * @return
 */
private String getYearCharacters(String label){
  if (label != null && label.length() >= 4) {
    return label.substring(0,4);
  }
  return null;
}
Program: 139612
Project: 139612
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer((AbstractAnalysisMetadataPage)this,topComp,getColumnLeftSet(),getColumnRightSet(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),false);
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  columnListA=anaColumnCompareViewer.getColumnListA();
  columnListB=anaColumnCompareViewer.getColumnListB();
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  currentEditor.registerSections(new Section[]{columnsComparisonSection,dataFilterSection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer((AbstractAnalysisMetadataPage)this,topComp,getColumnLeftSet(),getColumnRightSet(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),false,true);
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  columnListA=anaColumnCompareViewer.getColumnListA();
  columnListB=anaColumnCompareViewer.getColumnListB();
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  currentEditor.registerSections(new Section[]{columnsComparisonSection,dataFilterSection});
}
Program: 139613
Project: 139613
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer(this,topComp,(Analysis)this.currentModelElement);
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.refreash();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  foldingSections(new Section[]{metadataSection,columnsComparisonSection,dataFilterSection});
  currentEditor.registerSections(new Section[]{columnsComparisonSection});
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm();
  form.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  this.metadataSection.setDescription(DefaultMessagesImpl.getString("String_Node_Str"));
  anaColumnCompareViewer=new AnalysisColumnCompareTreeViewer(this,topComp,(Analysis)this.currentModelElement,false);
  columnsComparisonSection=anaColumnCompareViewer.getColumnsComparisonSection();
  anaColumnCompareViewer.refreash();
  anaColumnCompareViewer.addPropertyChangeListener(this);
  createDataFilterSection(form,topComp);
  foldingSections(new Section[]{metadataSection,columnsComparisonSection,dataFilterSection});
  currentEditor.registerSections(new Section[]{columnsComparisonSection});
}
Program: 139614
Project: 139614
Buggy source:
public AnalysisColumnCompareTreeViewer(AbstractAnalysisMetadataPage masterPage,Composite topComp,Analysis analysis){
  this(masterPage,topComp,new ArrayList<Column>(),new ArrayList<Column>(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),true);
  if (analysis.getResults().getIndicators().size() > 0) {
    EList<Indicator> indicators=analysis.getResults().getIndicators();
    RowMatchingIndicator rowMatchingIndicatorA=(RowMatchingIndicator)indicators.get(0);
    columnListA.addAll(rowMatchingIndicatorA.getColumnSetA());
    RowMatchingIndicator rowMatchingIndicatorB=(RowMatchingIndicator)indicators.get(1);
    columnListB.addAll(rowMatchingIndicatorA.getColumnSetB());
  }
  this.analysis=analysis;
  checkComputButton=analysis.getParameters().getDeactivatedIndicators().size() != 0;
}

Fixed version (ground truth):
public AnalysisColumnCompareTreeViewer(AbstractAnalysisMetadataPage masterPage,Composite topComp,Analysis analysis,boolean allowColumnDupcation){
  this(masterPage,topComp,new ArrayList<Column>(),new ArrayList<Column>(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),true,allowColumnDupcation);
  if (analysis.getResults().getIndicators().size() > 0) {
    EList<Indicator> indicators=analysis.getResults().getIndicators();
    RowMatchingIndicator rowMatchingIndicatorA=(RowMatchingIndicator)indicators.get(0);
    columnListA.addAll(rowMatchingIndicatorA.getColumnSetA());
    RowMatchingIndicator rowMatchingIndicatorB=(RowMatchingIndicator)indicators.get(1);
    columnListB.addAll(rowMatchingIndicatorA.getColumnSetB());
  }
  this.analysis=analysis;
  checkComputButton=analysis.getParameters().getDeactivatedIndicators().size() != 0;
}