nus-yam/ex-repair huggingface dataset:
Program: 137758
Project: 137758
Buggy source:
public void fillCoolBar(ICoolBarManager coolBar){
  if (helper != null) {
    helper.fillCoolBar(coolBar);
  }
}

Fixed version (ground truth):
@Override public void fillCoolBar(ICoolBarManager coolBar){
  if (helper != null) {
    helper.fillCoolBar(coolBar);
  }
}
Program: 137759
Project: 137759
Buggy source:
public void setUseProductRegistration(boolean useProductRegistration){
  this.useProductRegistration=useProductRegistration;
}

Fixed version (ground truth):
@Override public void setUseProductRegistration(boolean useProductRegistration){
  this.useProductRegistration=useProductRegistration;
}
Program: 137760
Project: 137760
Buggy source:
public void setUseMailLoginCheck(boolean useMainLoginCheck){
  this.useMainLoginCheck=useMainLoginCheck;
}

Fixed version (ground truth):
@Override public void setUseMailLoginCheck(boolean useMainLoginCheck){
  this.useMainLoginCheck=useMainLoginCheck;
}
Program: 137761
Project: 137761
Buggy source:
public IActionBarHelper getHelper(){
  return this.helper;
}

Fixed version (ground truth):
@Override public IActionBarHelper getHelper(){
  return this.helper;
}
Program: 137762
Project: 137762
Buggy source:
public boolean isUseDemoProjects(){
  return true;
}

Fixed version (ground truth):
@Override public boolean isUseDemoProjects(){
  return true;
}
Program: 137763
Project: 137763
Buggy source:
public void setHelper(IActionBarHelper helper){
  this.helper=helper;
}

Fixed version (ground truth):
@Override public void setHelper(IActionBarHelper helper){
  this.helper=helper;
}
Program: 137764
Project: 137764
Buggy source:
public String[] getAvailableLanguages(){
  String[] languages;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICorePerlService.class)) {
    languages=new String[]{ECodeLanguage.JAVA.getName(),ECodeLanguage.PERL.getName()};
  }
 else {
    languages=new String[]{ECodeLanguage.JAVA.getName()};
  }
  return languages;
}

Fixed version (ground truth):
@Override public String[] getAvailableLanguages(){
  return new String[]{ECodeLanguage.JAVA.getName()};
}
Program: 137766
Project: 137766
Buggy source:
public Map<String,Object> getJobEditorSettings(){
  return new HashMap<String,Object>();
}

Fixed version (ground truth):
@Override public Map<String,Object> getJobEditorSettings(){
  return new HashMap<String,Object>();
}
Program: 137767
Project: 137767
Buggy source:
public boolean isOnlyRemoteConnection(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isOnlyRemoteConnection(){
  return false;
}
Program: 137768
Project: 137768
Buggy source:
public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent,String type){
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>();
  return nodes;
}

Fixed version (ground truth):
@Override public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent,String type){
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>();
  return nodes;
}
Program: 137769
Project: 137769
Buggy source:
public boolean isUseProductRegistration(){
  return useProductRegistration;
}

Fixed version (ground truth):
@Override public boolean isUseProductRegistration(){
  return useProductRegistration;
}
Program: 137770
Project: 137770
Buggy source:
public void setAdditionalTitle(String title){
  this.title=title;
}

Fixed version (ground truth):
@Override public void setAdditionalTitle(String title){
  this.title=title;
}
Program: 137771
Project: 137771
Buggy source:
@Override public void run(){
  if (jrxmlNode != null) {
    if (WorkspaceResourceHelper.sourceFileHasBeenOpened(jrxmlNode)) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str",jrxmlNode.getLabel()));
      return;
    }
  }
  RenameDialog dialog=new RenameDialog(Display.getDefault().getActiveShell());
  existNames=new ArrayList<String>();
  getExistNames(parentNode,existNames);
  if (dialog.open() == RenameDialog.OK) {
    CorePlugin.getDefault().closeEditorIfOpened(jrxmlItem);
    try {
      String filenameBeforeRename="String_Node_Str" + RepositoryNodeHelper.getFileNameOfTheNode(jrxmlNode);
      IPath path=RepositoryNodeHelper.getPath(jrxmlNode);
      renameJrxmlFile();
      String filenameAfterRename="String_Node_Str" + RepositoryNodeHelper.getFileNameOfTheNode(jrxmlNode);
      ReturnCode returnCode=RepNodeUtils.updateJrxmlRelatedReport(path.append(filenameBeforeRename),path.append(filenameAfterRename));
      if (!returnCode.isOk()) {
        MessageUI.openWarning(returnCode.getMessage());
      }
      CorePlugin.getDefault().refreshDQView(parentNode);
    }
 catch (    PersistenceException e) {
      log.error(e,e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (jrxmlNode != null) {
    if (WorkspaceResourceHelper.sourceFileHasBeenOpened(jrxmlNode)) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str",jrxmlNode.getLabel()));
      return;
    }
  }
  RenameDialog dialog=new RenameDialog(Display.getDefault().getActiveShell());
  existNames=new ArrayList<String>();
  getExistNames(parentNode,existNames);
  if (dialog.open() == RenameDialog.OK) {
    CorePlugin.getDefault().closeEditorIfOpened(jrxmlItem);
    try {
      String filenameBeforeRename=File.separator + RepositoryNodeHelper.getFileNameOfTheNode(jrxmlNode);
      IPath path=RepositoryNodeHelper.getPath(jrxmlNode);
      renameJrxmlFile();
      String filenameAfterRename=File.separator + RepositoryNodeHelper.getFileNameOfTheNode(jrxmlNode);
      ReturnCode returnCode=RepNodeUtils.updateJrxmlRelatedReport(path.append(filenameBeforeRename),path.append(filenameAfterRename));
      if (!returnCode.isOk()) {
        MessageUI.openWarning(returnCode.getMessage());
      }
      CorePlugin.getDefault().refreshDQView(parentNode);
    }
 catch (    PersistenceException e) {
      log.error(e,e);
    }
  }
}
Program: 137773
Project: 137773
Buggy source:
/** 
 * check if the anaMap comtains the Jrxml or not, by compare the jrxml's path with anaMap's jrxml source(when user mode)
 * @param path contain the file name like:/TDQ_Libraries/JRXMLTemplate/column/column_basic_0.1.jrxml
 * @param anaMap
 * @return true :if the anaMap contains the path.
 */
private static boolean isUsedByJrxml(IPath path,AnalysisMap anaMap){
  ReportType reportType=ReportHelper.ReportType.getReportType(anaMap.getAnalysis(),anaMap.getReportType());
  if (ReportHelper.ReportType.USER_MADE.equals(reportType)) {
    String jrxmlPath=anaMap.getJrxmlSource();
    String oldPath=path.removeFirstSegments(2).toString();
    if (jrxmlPath.contains(oldPath)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * check if the anaMap comtains the Jrxml or not, by compare the jrxml's path with anaMap's jrxml source(when user mode)
 * @param path contain the file name like:/TDQ_Libraries/JRXMLTemplate/column/column_basic_0.1.jrxml
 * @param anaMap
 * @return true :if the anaMap contains the path.
 */
private static boolean isUsedByJrxml(IPath path,AnalysisMap anaMap){
  ReportType reportType=ReportHelper.ReportType.getReportType(anaMap.getAnalysis(),anaMap.getReportType());
  if (ReportHelper.ReportType.USER_MADE.equals(reportType)) {
    String jrxmlPath=anaMap.getJrxmlSource();
    if (jrxmlPath.contains(path.toString())) {
      return true;
    }
  }
  return false;
}
Program: 137774
Project: 137774
Buggy source:
/** 
 * get the full jrxml name with path before move/rename its parent folder.
 * @param oldPath: the path before rename
 * @param jrxmlFileRepNodes the related reports list with name
 * @return the full jrxml new names with path
 */
public static List<String> getListOfJrxmlNameWithPath(IPath path,List<JrxmlTempleteRepNode> jrxmlFileRepNodes){
  List<String> jrxmlFileNames=new ArrayList<String>();
  IPath basePath=ResourceManager.getRootProject().getLocation().removeFirstSegments(1);
  for (  JrxmlTempleteRepNode jrxml : jrxmlFileRepNodes) {
    IPath parentPath=RepositoryNodeHelper.getPath(jrxml.getParent());
    IPath makeRelativeTo=null;
    if (path.equals(parentPath)) {
      makeRelativeTo=path.append("String_Node_Str").append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml));
      makeRelativeTo=makeRelativeTo.makeRelativeTo(basePath);
    }
 else {
      parentPath=parentPath.append("String_Node_Str").append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml));
      makeRelativeTo=parentPath.makeRelativeTo(basePath);
    }
    jrxmlFileNames.add(makeRelativeTo.toOSString());
  }
  return jrxmlFileNames;
}

Fixed version (ground truth):
/** 
 * get the full jrxml name with path before move/rename its parent folder.
 * @param oldPath: the path before rename
 * @param jrxmlFileRepNodes the related reports list with name
 * @return the full jrxml new names with path
 */
public static List<String> getListOfJrxmlNameWithPath(IPath path,List<JrxmlTempleteRepNode> jrxmlFileRepNodes){
  List<String> jrxmlFileNames=new ArrayList<String>();
  IPath basePath=ResourceManager.getRootProject().getLocation().removeFirstSegments(1);
  for (  JrxmlTempleteRepNode jrxml : jrxmlFileRepNodes) {
    IPath parentPath=RepositoryNodeHelper.getPath(jrxml.getParent());
    IPath makeRelativeTo=null;
    if (path.equals(parentPath)) {
      makeRelativeTo=path.append(File.separator).append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml));
    }
 else {
      makeRelativeTo=parentPath.append(File.separator).append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml));
    }
    jrxmlFileNames.add(makeRelativeTo.toOSString());
  }
  return jrxmlFileNames;
}
Program: 137775
Project: 137775
Buggy source:
/** 
 * Used for replace only the renamed folder name, the path of the parent& the path of the sub folder should remain.
 * @param oldPath: the path before rename
 * @param newPath: the new foler name
 * @param jrxmlFileRepNodes the related reports list with name
 * @return the full jrxml new names after folder renamed
 */
public static List<String> getListOfJrxmlNewNameWithPath(IPath oldPath,IPath newPath,List<JrxmlTempleteRepNode> jrxmlFileRepNodes){
  IPath basePath=ResourceManager.getRootProject().getLocation().removeFirstSegments(1);
  List<String> jrxmlFileNames=new ArrayList<String>();
  for (  JrxmlTempleteRepNode jrxml : jrxmlFileRepNodes) {
    IPath parentPath=RepositoryNodeHelper.getPath(jrxml.getParent());
    if (oldPath.equals(parentPath)) {
      jrxmlFileNames.add(newPath.append("String_Node_Str").append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml)).makeRelativeTo(basePath).toOSString());
    }
 else {
      IPath replacedPath=new Path("String_Node_Str");
      for (int i=0; i < parentPath.segmentCount(); i++) {
        if (i < newPath.segmentCount() && !newPath.segment(i).equals(parentPath.segment(i))) {
          replacedPath=replacedPath.append(newPath.segment(i)).append("String_Node_Str");
        }
 else {
          replacedPath=replacedPath.append(parentPath.segment(i)).append("String_Node_Str");
        }
      }
      jrxmlFileNames.add(replacedPath.append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml)).makeRelativeTo(basePath).toOSString());
    }
  }
  return jrxmlFileNames;
}

Fixed version (ground truth):
/** 
 * Used for replace only the renamed folder name, the path of the parent& the path of the sub folder should remain.
 * @param oldPath: the path before rename
 * @param newPath: the new foler name
 * @param jrxmlFileRepNodes the related reports list with name
 * @return the full jrxml new names after folder renamed
 */
public static List<String> getListOfJrxmlNewNameWithPath(IPath oldPath,IPath newPath,List<JrxmlTempleteRepNode> jrxmlFileRepNodes){
  IPath basePath=ResourceManager.getRootProject().getLocation().removeFirstSegments(1);
  List<String> jrxmlFileNames=new ArrayList<String>();
  for (  JrxmlTempleteRepNode jrxml : jrxmlFileRepNodes) {
    IPath parentPath=RepositoryNodeHelper.getPath(jrxml.getParent());
    if (oldPath.equals(parentPath)) {
      jrxmlFileNames.add(newPath.append(File.separator).append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml)).toOSString());
    }
 else {
      IPath replacedPath=new Path("String_Node_Str");
      for (int i=0; i < parentPath.segmentCount(); i++) {
        if (i < newPath.segmentCount() && !newPath.segment(i).equals(parentPath.segment(i))) {
          replacedPath=replacedPath.append(newPath.segment(i)).append(File.separator);
        }
 else {
          replacedPath=replacedPath.append(parentPath.segment(i)).append(File.separator);
        }
      }
      jrxmlFileNames.add(replacedPath.append(RepositoryNodeHelper.getFileNameOfTheNode(jrxml)).toOSString());
    }
  }
  return jrxmlFileNames;
}
Program: 137777
Project: 137777
Buggy source:
/** 
 * move Jrxml File. MOD yyin 20130123 TDQ-5392
 * @param sourceNode
 * @param targetNode
 * @param makeRelativeTo
 * @throws PersistenceException
 */
private void moveJrxmlFileRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath makeRelativeTo) throws PersistenceException {
  String filename="String_Node_Str" + RepositoryNodeHelper.getFileNameOfTheNode(sourceNode);
  IPath oldPath=RepositoryNodeHelper.getPath(sourceNode).append(filename);
  this.moveObject(sourceNode,targetNode,makeRelativeTo);
  ReturnCode returnCode=RepNodeUtils.updateJrxmlRelatedReport(oldPath,RepositoryNodeHelper.getPath(targetNode).append("String_Node_Str").append(filename));
  if (!returnCode.isOk()) {
    MessageUI.openWarning(returnCode.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * move Jrxml File. MOD yyin 20130123 TDQ-5392
 * @param sourceNode
 * @param targetNode
 * @param makeRelativeTo
 * @throws PersistenceException
 */
private void moveJrxmlFileRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath makeRelativeTo) throws PersistenceException {
  String filename=File.separator + RepositoryNodeHelper.getFileNameOfTheNode(sourceNode);
  IPath oldPath=RepositoryNodeHelper.getPath(sourceNode).append(filename);
  this.moveObject(sourceNode,targetNode,makeRelativeTo);
  ReturnCode returnCode=RepNodeUtils.updateJrxmlRelatedReport(oldPath,RepositoryNodeHelper.getPath(targetNode).append(File.separator).append(filename));
  if (!returnCode.isOk()) {
    MessageUI.openWarning(returnCode.getMessage());
  }
}
Program: 137778
Project: 137778
Buggy source:
/** 
 * ADDED scorreia Method "computeDistinctValues" updates the distinctValues field and set distinctComputed field to true.
 */
private void computeDistinctValues(){
  if (valueToFreq == null) {
    log.error(Messages.getString("String_Node_Str",this.name));
    return;
  }
  this.setDistinctValueCount(Long.valueOf(distinctValues.size()));
  distinctComputed=true;
}

Fixed version (ground truth):
/** 
 * ADDED scorreia Method "computeDistinctValues" updates the distinctValues field and set distinctComputed field to true.
 */
private void computeDistinctValues(){
  if (valueToFreq == null) {
    log.error(Messages.getString("String_Node_Str",this.name));
    return;
  }
  this.distinctValues=this.valueToFreq.keySet();
  this.setDistinctValueCount(Long.valueOf(distinctValues.size()));
  distinctComputed=true;
}
Program: 137779
Project: 137779
Buggy source:
/** 
 * Get i18n label in resource bundle. 2010-03-16 yyi 11739
 * @param key
 * @return
 */
public static String getLabel(String categoryLabel){
  String messageKey=Messages.getString("String_Node_Str" + categoryLabel.replaceAll("String_Node_Str",PluginConstant.EMPTY_STRING));
  if (messageKey.startsWith(MessagesCore.KEY_NOT_FOUND_PREFIX) && messageKey.endsWith(MessagesCore.KEY_NOT_FOUND_SUFFIX)) {
    return categoryLabel;
  }
  return messageKey;
}

Fixed version (ground truth):
/** 
 * Get i18n label in resource bundle. 2010-03-16 yyi 11739
 * @param key
 * @return
 */
public static String getLabel(String categoryLabel){
  String messageKey=Messages.getString("String_Node_Str" + categoryLabel.replaceAll("String_Node_Str",PluginConstant.EMPTY_STRING));
  if (messageKey.startsWith(Messages.KEY_NOT_FOUND_PREFIX) && messageKey.endsWith(Messages.KEY_NOT_FOUND_SUFFIX)) {
    return categoryLabel;
  }
  return messageKey;
}
Program: 137780
Project: 137780
Buggy source:
public static String getString(String key){
  String message=key;
  String messageKey=MESSAGEMAP.get(key);
  if (null != messageKey && !DefaultMessagesImpl.getString(messageKey).startsWith(MessagesCore.KEY_NOT_FOUND_PREFIX) && !DefaultMessagesImpl.getString(messageKey).endsWith(MessagesCore.KEY_NOT_FOUND_SUFFIX)) {
    message=DefaultMessagesImpl.getString(messageKey);
  }
  return message;
}

Fixed version (ground truth):
public static String getString(String key){
  String message=key;
  String messageKey=MESSAGEMAP.get(key);
  if (null != messageKey && !DefaultMessagesImpl.getString(messageKey).startsWith(DefaultMessagesImpl.KEY_NOT_FOUND_PREFIX) && !DefaultMessagesImpl.getString(messageKey).endsWith(DefaultMessagesImpl.KEY_NOT_FOUND_SUFFIX)) {
    message=DefaultMessagesImpl.getString(messageKey);
  }
  return message;
}
Program: 137781
Project: 137781
Buggy source:
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
  return conn;
}

Fixed version (ground truth):
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
 else   if (selectedObject instanceof Connection) {
    conn=(Connection)selectedObject;
  }
  return conn;
}
Program: 137782
Project: 137782
Buggy source:
public void run(){
  try {
    DataProvider oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Connection oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    Property property=PropertyHelper.getProperty(oldDataProvider);
    if (property != null) {
      Item newItem=property.getItem();
      if (newItem != null) {
        CWMPlugin.getDefault().updateConnetionAliasByName(oldDataProvider,oldDataProvider.getLabel());
      }
    }
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}
Program: 137783
Project: 137783
Buggy source:
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
  return conn;
}

Fixed version (ground truth):
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
 else   if (selectedObject instanceof Connection) {
    conn=(Connection)selectedObject;
  }
  return conn;
}
Program: 137784
Project: 137784
Buggy source:
public void run(){
  try {
    Connection oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Connection oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    Property property=PropertyHelper.getProperty(oldDataProvider);
    if (property != null) {
      Item newItem=property.getItem();
      if (newItem != null) {
        CWMPlugin.getDefault().updateConnetionAliasByName(oldDataProvider,oldDataProvider.getLabel());
      }
    }
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}
Program: 137785
Project: 137785
Buggy source:
/** 
 * Comment method "reloadDatabase".
 * @param connectionItem
 */
public ReturnCode reloadDatabase(ConnectionItem connectionItem){
  ReturnCode retCode=new ReturnCode(Boolean.TRUE);
  Connection conn=connectionItem.getConnection();
  if (conn instanceof DatabaseConnection) {
    List<ModelElement> dependencyClients=EObjectHelper.getDependencyClients(conn);
    if (!(dependencyClients == null || dependencyClients.isEmpty())) {
      int isOk=DeleteModelElementConfirmDialog.showElementImpactConfirmDialog(null,new ModelElement[]{conn},DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str",conn.getLabel()));
      if (isOk != Dialog.OK) {
        retCode.setOk(Boolean.FALSE);
        retCode.setMessage("String_Node_Str");
        return retCode;
      }
    }
    RepositoryNode recursiveFind=RepositoryNodeHelper.recursiveFind(conn);
    ReloadDatabaseAction reloadDatabaseAction=new ReloadDatabaseAction(recursiveFind,ReloadDatabaseProvider.RELOADDATABASE_MENUTEXT);
    reloadDatabaseAction.run();
    retCode=reloadDatabaseAction.getReturnCode();
  }
  return retCode;
}

Fixed version (ground truth):
/** 
 * Comment method "reloadDatabase".
 * @param connectionItem
 */
public ReturnCode reloadDatabase(ConnectionItem connectionItem){
  ReturnCode retCode=new ReturnCode(Boolean.TRUE);
  Connection conn=connectionItem.getConnection();
  if (conn instanceof DatabaseConnection) {
    List<ModelElement> dependencyClients=EObjectHelper.getDependencyClients(conn);
    if (!(dependencyClients == null || dependencyClients.isEmpty())) {
      int isOk=DeleteModelElementConfirmDialog.showElementImpactConfirmDialog(null,new ModelElement[]{conn},DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str",conn.getLabel()));
      if (isOk != Dialog.OK) {
        retCode.setOk(Boolean.FALSE);
        retCode.setMessage("String_Node_Str");
        return retCode;
      }
    }
    ReloadDatabaseAction reloadDatabaseAction=new ReloadDatabaseAction(conn,ReloadDatabaseProvider.RELOADDATABASE_MENUTEXT);
    reloadDatabaseAction.run();
    retCode=reloadDatabaseAction.getReturnCode();
  }
  return retCode;
}
Program: 137786
Project: 137786
Buggy source:
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
  return conn;
}

Fixed version (ground truth):
private Connection getConnection(){
  Connection conn=null;
  IRepositoryViewObject object=null;
  if (selectedObject == null) {
    return conn;
  }
  if (selectedObject instanceof RepositoryNode) {
    object=((RepositoryNode)selectedObject).getObject();
  }
  if (object != null) {
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      conn=((ConnectionItem)item).getConnection();
    }
  }
 else   if (selectedObject instanceof IConnectionElementSubFolder) {
    conn=((IConnectionElementSubFolder)selectedObject).getConnection();
  }
 else   if (selectedObject instanceof Connection) {
    conn=(Connection)selectedObject;
  }
  return conn;
}
Program: 137787
Project: 137787
Buggy source:
public void run(){
  try {
    DataProvider oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Connection oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    Property property=PropertyHelper.getProperty(oldDataProvider);
    if (property != null) {
      Item newItem=property.getItem();
      if (newItem != null) {
        CWMPlugin.getDefault().updateConnetionAliasByName(oldDataProvider,oldDataProvider.getLabel());
      }
    }
    WorkbenchUtils.impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
catch (  PartInitException e) {
    log.error(e,e);
    returnCode.setReturnCode(e.getMessage(),false);
  }
}
Program: 137792
Project: 137792
Buggy source:
public void saveAnalysis() throws DataprofilerCoreException {
  if (isConnectionAnalysis()) {
    AnalysisHelper.setReloadDatabases(analysis,reloadDatabasesBtn.getSelection());
  }
  EList<Domain> dataFilters=analysis.getParameters().getDataFilter();
  if (!this.tableFilterText.getText().equals(DomainHelper.getTablePattern(dataFilters))) {
    DomainHelper.setDataFilterTablePattern(dataFilters,tableFilterText.getText());
    latestTableFilterValue=this.tableFilterText.getText();
  }
  if (!this.viewFilterText.getText().equals(DomainHelper.getViewPattern(dataFilters))) {
    DomainHelper.setDataFilterViewPattern(dataFilters,viewFilterText.getText());
    latestViewFilterValue=this.viewFilterText.getText();
  }
  this.updateAnalysisClientDependency();
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  IEditorInput editorInput=this.getEditorInput();
  if (editorInput instanceof AnalysisItemEditorInput) {
    AnalysisItemEditorInput analysisInput=(AnalysisItemEditorInput)editorInput;
    TDQAnalysisItem tdqAnalysisItem=analysisInput.getTDQAnalysisItem();
    tdqAnalysisItem.getProperty().setDisplayName(analysis.getName());
    tdqAnalysisItem.getProperty().setLabel(analysis.getName());
    this.nameText.setText(analysis.getName());
    saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem,true);
  }
  logSaved(saved);
}

Fixed version (ground truth):
@Override public void saveAnalysis() throws DataprofilerCoreException {
  if (isConnectionAnalysis()) {
    AnalysisHelper.setReloadDatabases(analysis,reloadDatabasesBtn.getSelection());
  }
  EList<Domain> dataFilters=analysis.getParameters().getDataFilter();
  if (!this.tableFilterText.getText().equals(DomainHelper.getTablePattern(dataFilters))) {
    DomainHelper.setDataFilterTablePattern(dataFilters,tableFilterText.getText());
    latestTableFilterValue=this.tableFilterText.getText();
  }
  if (!this.viewFilterText.getText().equals(DomainHelper.getViewPattern(dataFilters))) {
    DomainHelper.setDataFilterViewPattern(dataFilters,viewFilterText.getText());
    latestViewFilterValue=this.viewFilterText.getText();
  }
  this.updateAnalysisClientDependency();
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  IEditorInput editorInput=this.getEditorInput();
  if (editorInput instanceof AnalysisItemEditorInput) {
    AnalysisItemEditorInput analysisInput=(AnalysisItemEditorInput)editorInput;
    TDQAnalysisItem tdqAnalysisItem=analysisInput.getTDQAnalysisItem();
    tdqAnalysisItem.getProperty().setDisplayName(analysis.getName());
    tdqAnalysisItem.getProperty().setLabel(analysis.getName());
    this.nameText.setText(analysis.getName());
    saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem,true);
  }
  logSaved(saved);
}
Program: 137793
Project: 137793
Buggy source:
public void widgetSelected(SelectionEvent e){
  TableItem tableItem=cursor.getRow();
  OverviewIndUIElement data=(OverviewIndUIElement)tableItem.getData();
  runTableAnalysis(data);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  TableItem tableItem=cursor.getRow();
  OverviewIndUIElement data=(OverviewIndUIElement)tableItem.getData();
  runTableAnalysis(data);
}
Program: 137794
Project: 137794
Buggy source:
public void fireRuningItemChanged(boolean status){
  currentEditor.setRunActionButtonState(status);
  if (status) {
    refresh();
  }
  statisticalSection.setExpanded(status);
}

Fixed version (ground truth):
@Override public void fireRuningItemChanged(boolean status){
  currentEditor.setRunActionButtonState(status);
  if (status) {
    refresh();
  }
  statisticalSection.setExpanded(status);
}
Program: 137795
Project: 137795
Buggy source:
public void linkActivated(HyperlinkEvent e){
  for (  Control control : chartComposite.getChildren()) {
    control.dispose();
  }
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction().run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}

Fixed version (ground truth):
@Override public void linkActivated(HyperlinkEvent e){
  for (  Control control : chartComposite.getChildren()) {
    control.dispose();
  }
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction().run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}
Program: 137796
Project: 137796
Buggy source:
public Composite[] getPreviewChartCompsites(){
  return previewChartCompsites;
}

Fixed version (ground truth):
public Composite[] getPreviewChartCompsites(){
  if (previewChartCompsites != null && previewChartCompsites.length > 0) {
    List<Composite> withOutDisposed=new ArrayList<Composite>();
    for (    Composite com : previewChartCompsites) {
      if (!com.isDisposed()) {
        withOutDisposed.add(com);
      }
    }
    this.previewChartCompsites=withOutDisposed.toArray(new ExpandableComposite[withOutDisposed.size()]);
  }
  return previewChartCompsites;
}
Program: 137797
Project: 137797
Buggy source:
public void controlResized(ControlEvent e){
  super.controlResized(e);
  sForm.redraw();
  form.reflow(true);
}

Fixed version (ground truth):
@Override public void controlResized(ControlEvent e){
  super.controlResized(e);
  sForm.redraw();
  form.reflow(true);
}
Program: 137799
Project: 137799
Buggy source:
/** 
 * Getter for treeViewer.
 * @return the treeViewer
 */
public AnalysisColumnNominalIntervalTreeViewer getTreeViewer(){
  return this.treeViewer;
}

Fixed version (ground truth):
/** 
 * Getter for treeViewer.
 * @return the treeViewer
 */
@Override public AnalysisColumnNominalIntervalTreeViewer getTreeViewer(){
  return this.treeViewer;
}
Program: 137800
Project: 137800
Buggy source:
@Override public void refresh(){
  if (EditorPreferencePage.isHideGraphics()) {
    if (sForm.getChildren().length > 1) {
      if (null != sForm.getChildren()[1] && !sForm.getChildren()[1].isDisposed())       sForm.getChildren()[1].dispose();
      topComp.getParent().layout();
      topComp.layout();
    }
  }
 else {
    if (chartComposite != null && !chartComposite.isDisposed()) {
      try {
        for (        Control control : chartComposite.getChildren()) {
          control.dispose();
        }
        createPreviewCharts(form,chartComposite,true);
        chartComposite.getParent().layout();
        chartComposite.layout();
      }
 catch (      Exception ex) {
        log.error(ex,ex);
      }
    }
 else {
      previewComp=toolkit.createComposite(sForm);
      previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
      previewComp.setLayout(new GridLayout());
      previewComp.addControlListener(new ControlAdapter(){
        public void controlResized(        ControlEvent e){
          super.controlResized(e);
          sForm.redraw();
          form.reflow(true);
        }
      }
);
      createPreviewSection(form,previewComp);
      createPreviewCharts(form,chartComposite,true);
    }
  }
}

Fixed version (ground truth):
@Override public void refresh(){
  if (EditorPreferencePage.isHideGraphics()) {
    if (sForm.getChildren().length > 1) {
      if (null != sForm.getChildren()[1] && !sForm.getChildren()[1].isDisposed()) {
        sForm.getChildren()[1].dispose();
      }
      topComp.getParent().layout();
      topComp.layout();
    }
  }
 else {
    if (chartComposite != null && !chartComposite.isDisposed()) {
      try {
        for (        Control control : chartComposite.getChildren()) {
          control.dispose();
        }
        createPreviewCharts(form,chartComposite,true);
        chartComposite.getParent().layout();
        chartComposite.layout();
      }
 catch (      Exception ex) {
        log.error(ex,ex);
      }
    }
 else {
      previewComp=toolkit.createComposite(sForm);
      previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
      previewComp.setLayout(new GridLayout());
      previewComp.addControlListener(new ControlAdapter(){
        @Override public void controlResized(        ControlEvent e){
          super.controlResized(e);
          sForm.redraw();
          form.reflow(true);
        }
      }
);
      createPreviewSection(form,previewComp);
      createPreviewCharts(form,chartComposite,true);
    }
  }
}
Program: 137801
Project: 137801
Buggy source:
public Composite getChartComposite(){
  return chartComposite;
}

Fixed version (ground truth):
@Override public Composite getChartComposite(){
  return chartComposite;
}
Program: 137802
Project: 137802
Buggy source:
void createAnalysisColumnsSection(final ScrolledForm form,Composite anasisDataComp){
  analysisColSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite topComp=toolkit.createComposite(analysisColSection);
  topComp.setLayout(new GridLayout());
  createConnBindWidget(topComp);
  Hyperlink clmnBtn=toolkit.createHyperlink(topComp,DefaultMessagesImpl.getString("String_Node_Str"),SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(clmnBtn);
  clmnBtn.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      openColumnsSelectionDialog();
    }
  }
);
  Composite tree=toolkit.createComposite(topComp,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(tree);
  tree.setLayout(new GridLayout());
  ((GridData)tree.getLayoutData()).heightHint=TREE_MAX_LENGTH;
  treeViewer=new AnalysisColumnNominalIntervalTreeViewer(tree,this);
  treeViewer.addPropertyChangeListener(this);
  treeViewer.setInput(analyzedColumns.toArray());
  treeViewer.setDirty(false);
  analysisColSection.setClient(topComp);
}

Fixed version (ground truth):
void createAnalysisColumnsSection(final ScrolledForm form,Composite anasisDataComp){
  analysisColSection=createSection(form,anasisDataComp,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite topComp=toolkit.createComposite(analysisColSection);
  topComp.setLayout(new GridLayout());
  createConnBindWidget(topComp);
  Hyperlink clmnBtn=toolkit.createHyperlink(topComp,DefaultMessagesImpl.getString("String_Node_Str"),SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.TOP).applyTo(clmnBtn);
  clmnBtn.addHyperlinkListener(new HyperlinkAdapter(){
    @Override public void linkActivated(    HyperlinkEvent e){
      openColumnsSelectionDialog();
    }
  }
);
  Composite tree=toolkit.createComposite(topComp,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(tree);
  tree.setLayout(new GridLayout());
  ((GridData)tree.getLayoutData()).heightHint=TREE_MAX_LENGTH;
  treeViewer=new AnalysisColumnNominalIntervalTreeViewer(tree,this);
  treeViewer.addPropertyChangeListener(this);
  treeViewer.setInput(analyzedColumns.toArray());
  treeViewer.setDirty(false);
  analysisColSection.setClient(topComp);
}
Program: 137803
Project: 137803
Buggy source:
public void initialize(FormEditor editor){
  super.initialize(editor);
  recomputeIndicators();
}

Fixed version (ground truth):
@Override public void initialize(FormEditor editor){
  super.initialize(editor);
  recomputeIndicators();
}
Program: 137806
Project: 137806
Buggy source:
public Composite[] getPreviewChartCompsites(){
  return previewChartCompsites;
}

Fixed version (ground truth):
public Composite[] getPreviewChartCompsites(){
  if (previewChartCompsites != null && previewChartCompsites.length > 0) {
    List<Composite> withOutDisposed=new ArrayList<Composite>();
    for (    Composite com : previewChartCompsites) {
      if (!com.isDisposed()) {
        withOutDisposed.add(com);
      }
    }
    this.previewChartCompsites=withOutDisposed.toArray(new ExpandableComposite[withOutDisposed.size()]);
  }
  return previewChartCompsites;
}
Program: 137807
Project: 137807
Buggy source:
public Composite getChartComposite(){
  return chartComposite;
}

Fixed version (ground truth):
@Override public Composite getChartComposite(){
  return chartComposite;
}
Program: 137809
Project: 137809
Buggy source:
public Composite[] getPreviewChartCompsites(){
  if (previewChartList != null && !previewChartList.isEmpty()) {
    this.previewChartCompsites=previewChartList.toArray(new Composite[previewChartList.size()]);
  }
  return previewChartCompsites;
}

Fixed version (ground truth):
public ExpandableComposite[] getPreviewChartCompsites(){
  if (previewChartList != null && !previewChartList.isEmpty()) {
    List<ExpandableComposite> withOutDisposed=new ArrayList<ExpandableComposite>();
    for (    ExpandableComposite com : previewChartList) {
      if (!com.isDisposed()) {
        withOutDisposed.add(com);
      }
    }
  }
  return previewChartCompsites;
}
Program: 137811
Project: 137811
Buggy source:
/** 
 * DOC yyi 2011-06-02 16929:expand the selected column in the graphical chart.
 * @param indicator
 */
protected void expandChart(ModelElementIndicator indicator){
  if (uiPagination == null) {
    return;
  }
  if (previewChartList != null && !previewChartList.isEmpty()) {
    for (    ExpandableComposite comp : previewChartList) {
      if (comp.getData() != indicator) {
        comp.setExpanded(false);
        comp.getParent().pack();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2011-06-02 16929:expand the selected column in the graphical chart.
 * @param indicator
 */
protected void expandChart(ModelElementIndicator indicator){
  if (uiPagination == null) {
    return;
  }
  ExpandableComposite[] previewChartCompsitesa=getPreviewChartCompsites();
  if (previewChartList != null && !previewChartList.isEmpty()) {
    for (    ExpandableComposite comp : previewChartList) {
      if (comp.getData() != indicator) {
        comp.setExpanded(false);
        comp.getParent().pack();
      }
    }
  }
}
Program: 137813
Project: 137813
Buggy source:
@Override public void linkActivated(HyperlinkEvent e){
  for (  Control control : chartComposite.getChildren()) {
    control.dispose();
  }
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction().run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}

Fixed version (ground truth):
@Override public void linkActivated(HyperlinkEvent e){
  disposeChartComposite();
  boolean analysisStatue=analysis.getResults().getResultMetadata() != null && analysis.getResults().getResultMetadata().getExecutionDate() != null;
  if (!analysisStatue) {
    boolean returnCode=MessageDialog.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    if (returnCode) {
      new RunAnalysisAction().run();
      message.setVisible(false);
    }
 else {
      createPreviewCharts(form,chartComposite,false);
      message.setText(DefaultMessagesImpl.getString("String_Node_Str"));
      message.setVisible(true);
    }
  }
 else {
    createPreviewCharts(form,chartComposite,true);
  }
  chartComposite.layout();
  form.reflow(true);
}
Program: 137814
Project: 137814
Buggy source:
@Override public void refresh(){
  if (EditorPreferencePage.isHideGraphics()) {
    if (sForm.getChildren().length > 1) {
      if (null != sForm.getChildren()[1] && !sForm.getChildren()[1].isDisposed()) {
        sForm.getChildren()[1].dispose();
      }
      topComp.getParent().layout();
      topComp.layout();
    }
  }
 else {
    if (chartComposite != null && !chartComposite.isDisposed()) {
      try {
        for (        Control control : chartComposite.getChildren()) {
          control.dispose();
        }
        createPreviewCharts(form,chartComposite,true);
        chartComposite.getParent().layout();
        chartComposite.layout();
      }
 catch (      Exception ex) {
        log.error(ex,ex);
      }
    }
 else {
      previewComp=toolkit.createComposite(sForm);
      previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
      previewComp.setLayout(new GridLayout());
      previewComp.addControlListener(new ControlAdapter(){
        @Override public void controlResized(        ControlEvent e){
          super.controlResized(e);
          sForm.redraw();
          form.reflow(true);
        }
      }
);
      createPreviewSection(form,previewComp);
      createPreviewCharts(form,chartComposite,false);
    }
  }
}

Fixed version (ground truth):
@Override public void refresh(){
  if (EditorPreferencePage.isHideGraphics()) {
    if (sForm.getChildren().length > 1) {
      if (null != sForm.getChildren()[1] && !sForm.getChildren()[1].isDisposed()) {
        sForm.getChildren()[1].dispose();
      }
      topComp.getParent().layout();
      topComp.layout();
    }
  }
 else {
    if (chartComposite != null && !chartComposite.isDisposed()) {
      disposeChartComposite();
      createPreviewCharts(form,chartComposite,true);
      chartComposite.getParent().layout();
      chartComposite.layout();
    }
 else {
      previewComp=toolkit.createComposite(sForm);
      previewComp.setLayoutData(new GridData(GridData.FILL_BOTH));
      previewComp.setLayout(new GridLayout());
      previewComp.addControlListener(new ControlAdapter(){
        @Override public void controlResized(        ControlEvent e){
          super.controlResized(e);
          sForm.redraw();
          form.reflow(true);
        }
      }
);
      createPreviewSection(form,previewComp);
      createPreviewCharts(form,chartComposite,false);
    }
  }
}
Program: 137815
Project: 137815
Buggy source:
public Composite[] getPreviewChartCompsites(){
  return previewChartCompsites;
}

Fixed version (ground truth):
public Composite[] getPreviewChartCompsites(){
  if (previewChartCompsites != null && previewChartCompsites.length > 0) {
    List<Composite> withOutDisposed=new ArrayList<Composite>();
    for (    Composite com : previewChartCompsites) {
      if (!com.isDisposed()) {
        withOutDisposed.add(com);
      }
    }
    this.previewChartCompsites=withOutDisposed.toArray(new ExpandableComposite[withOutDisposed.size()]);
  }
  return previewChartCompsites;
}