nus-yam/ex-repair huggingface dataset:
Program: 125896
Project: 125896
Buggy source:
/** 
 * Added by Marvin Wang on Oct 17, 2012.
 */
protected void doHiveVersionModify(){
  IHDistribution hiveDistribution=getCurrentHiveDistribution(true);
  IHDistributionVersion newVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
  String originalVersion=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  IHDistributionVersion hdVersion=hiveDistribution.getHDVersion(originalVersion,true);
  if (newVersion != null && !newVersion.equals(hdVersion)) {
    setHideVersionInfoWidgets(false);
    updateHiveServerAndMakeSelection(hiveDistribution,hdVersion);
    updateYarnInfo(hiveDistribution,hdVersion);
    updateHiveModeAndMakeSelection(null);
    doHiveModeModify();
    fillDefaultsWhenHiveVersionChanged();
  }
}

Fixed version (ground truth):
/** 
 * Added by Marvin Wang on Oct 17, 2012.
 */
protected void doHiveVersionModify(){
  IHDistribution hiveDistribution=getCurrentHiveDistribution(true);
  IHDistributionVersion newVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
  String originalVersion=getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  IHDistributionVersion hdVersion=hiveDistribution.getHDVersion(originalVersion,true);
  if (newVersion != null && !newVersion.equals(hdVersion)) {
    setHideVersionInfoWidgets(false);
    updateHiveModeAndMakeSelection(null);
    updateHiveServerAndMakeSelection(hiveDistribution,newVersion);
    updateYarnInfo(hiveDistribution,newVersion);
    doHiveModeModify();
    fillDefaultsWhenHiveVersionChanged();
  }
}
Program: 125897
Project: 125897
Buggy source:
protected void swap(Object[] children,int first,int second){
  if (first != second && first > -1 && second > -1 && first < children.length && second < children.length) {
    Object t=children[first];
    children[first]=children[second];
    children[second]=t;
  }
}

Fixed version (ground truth):
protected void swap(Object[] children,int source,int target){
  if (source != target && source > -1 && target > -1 && source < children.length && target < children.length) {
    if (source > target) {
      Object sourceObject=children[source];
      for (int i=source; i > target; i--) {
        children[i]=children[i - 1];
      }
      children[target]=sourceObject;
    }
 else     if (source < target) {
      Object sourceObject=children[source];
      for (int i=source; i > target; i++) {
        children[i]=children[i + 1];
      }
      children[target]=sourceObject;
    }
  }
}
Program: 125898
Project: 125898
Buggy source:
/** 
 * Check the boolean methods for sub class of   {@link org.talend.hadoop.distribution.component.HadoopComponent)If no the method in the HadoopComponent object, won't contain in the result map.}
 */
Map<String,Boolean> doSupportMethods(IHDistributionVersion distributionVersion,String... methods);

Fixed version (ground truth):
/** 
 * Check the boolean methods for sub class of   {@link org.talend.hadoop.distribution.component.HadoopComponent)If no the method in the HadoopComponent object, won't contain in the result map.}
 */
Map<String,Boolean> doSupportMethods(IHDistributionVersion distributionVersion,String... methods) throws Exception ;
Program: 125899
Project: 125899
Buggy source:
public static String[] getDistributionVersionsDisplay(String hiveDistribution,boolean byDisplay){
  List<String> versionsItems=new ArrayList<String>();
  IHDistribution distribution=getDistribution(hiveDistribution,byDisplay);
  if (distribution != null) {
    IHDistributionVersion[] hdVersions=distribution.getHDVersions();
    for (    IHDistributionVersion v : hdVersions) {
      String[] hiveModesDisplay=getHiveModesDisplay(distribution.getName(),v.getVersion(),false);
      if (hiveModesDisplay == null || hiveModesDisplay.length == 0) {
        continue;
      }
      versionsItems.add(v.getDisplayVersion());
    }
  }
  return versionsItems.toArray(new String[versionsItems.size()]);
}

Fixed version (ground truth):
public static String[] getDistributionVersionsDisplay(String hiveDistribution,boolean byDisplay){
  List<String> versionsItems=new ArrayList<String>();
  IHDistribution distribution=getDistribution(hiveDistribution,byDisplay);
  if (distribution != null) {
    IHDistributionVersion[] hdVersions=distribution.getHDVersions();
    for (    IHDistributionVersion v : hdVersions) {
      versionsItems.add(v.getDisplayVersion());
    }
  }
  return versionsItems.toArray(new String[versionsItems.size()]);
}
Program: 125900
Project: 125900
Buggy source:
public static String[] getHiveServersDisplay(String hiveDistribution,String hiveVersion,String hiveMode,boolean byDisplay){
  List<String> hiveServerItems=new ArrayList<String>();
  if (doSupportHive1(hiveDistribution,hiveVersion,byDisplay)) {
    hiveServerItems.add(HiveServerVersionInfo.HIVE_SERVER_1.getDisplayName());
  }
  if (doSupportHive2(hiveDistribution,hiveVersion,byDisplay)) {
    hiveServerItems.add(HiveServerVersionInfo.HIVE_SERVER_2.getDisplayName());
  }
  return hiveServerItems.toArray(new String[0]);
}

Fixed version (ground truth):
public static String[] getHiveServersDisplay(String hiveDistribution,String hiveVersion,boolean byDisplay){
  List<String> hiveServerItems=new ArrayList<String>();
  if (doSupportHive1(hiveDistribution,hiveVersion,byDisplay)) {
    hiveServerItems.add(HiveServerVersionInfo.HIVE_SERVER_1.getDisplayName());
  }
  if (doSupportHive2(hiveDistribution,hiveVersion,byDisplay)) {
    hiveServerItems.add(HiveServerVersionInfo.HIVE_SERVER_2.getDisplayName());
  }
  return hiveServerItems.toArray(new String[0]);
}
Program: 125901
Project: 125901
Buggy source:
public static String[] getHiveModesDisplay(String hiveDistribution,String hiveVersion,boolean byDisplay){
  List<String> hiveModeItems=new ArrayList<String>();
  if (doSupportEmbeddedMode(hiveDistribution,hiveVersion,byDisplay)) {
    hiveModeItems.add(HiveModeInfo.EMBEDDED.getDisplayName());
  }
  if (doSupportStandaloneMode(hiveDistribution,hiveVersion,byDisplay)) {
    hiveModeItems.add(HiveModeInfo.STANDALONE.getDisplayName());
  }
  return hiveModeItems.toArray(new String[0]);
}

Fixed version (ground truth):
public static String[] getHiveModesDisplay(String hiveDistribution,String hiveVersion,String hiveServer,boolean byDisplay){
  List<String> hiveModeItems=new ArrayList<String>();
  if (doSupportEmbeddedMode(hiveDistribution,hiveVersion,byDisplay)) {
    hiveModeItems.add(HiveModeInfo.EMBEDDED.getDisplayName());
  }
  if (doSupportStandaloneMode(hiveDistribution,hiveVersion,byDisplay)) {
    HiveServerVersionInfo mode=byDisplay ? HiveServerVersionInfo.getByDisplay(hiveServer) : HiveServerVersionInfo.getByKey(hiveServer);
    if (mode == null) {
      String[] hiveServersDisplay=getHiveServersDisplay(hiveDistribution,hiveVersion,byDisplay);
      if (hiveServersDisplay != null && hiveServersDisplay.length > 0) {
        mode=HiveServerVersionInfo.getByDisplay(hiveServersDisplay[0]);
      }
    }
    if (mode == null || mode == HiveServerVersionInfo.HIVE_SERVER_2 || (HiveServerVersionInfo.HIVE_SERVER_1 == mode && doSupportMethod(hiveDistribution,hiveVersion,byDisplay,"String_Node_Str"))) {
      hiveModeItems.add(HiveModeInfo.STANDALONE.getDisplayName());
    }
  }
  return hiveModeItems.toArray(new String[0]);
}
Program: 125902
Project: 125902
Buggy source:
public static boolean doSupportMethod(String hiveDistribution,String hiveVersion,boolean byDisplay,String supportMethodName){
  IHDistribution distribution=getDistribution(hiveDistribution,byDisplay);
  if (distribution != null) {
    IHDistributionVersion version=distribution.getHDVersion(hiveVersion,byDisplay);
    IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
    if (version != null && hadoopDistributionService != null) {
      Map<String,Boolean> doSupportMethods=hadoopDistributionService.doSupportMethods(version,supportMethodName);
      Boolean support=doSupportMethods.get(supportMethodName);
      return support != null && support;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean doSupportMethod(String hiveDistribution,String hiveVersion,boolean byDisplay,String supportMethodName){
  IHDistribution distribution=getDistribution(hiveDistribution,byDisplay);
  if (distribution != null) {
    IHDistributionVersion version=distribution.getHDVersion(hiveVersion,byDisplay);
    IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
    if (version != null && hadoopDistributionService != null) {
      try {
        return hadoopDistributionService.doSupportMethod(version,supportMethodName);
      }
 catch (      Exception e) {
      }
    }
  }
  return false;
}
Program: 125905
Project: 125905
Buggy source:
private void updateYarnInfo(IHDistribution hiveDistribution,IHDistributionVersion hiveVersion){
  if (hiveDistribution == null) {
    hiveDistribution=getCurrentHiveDistribution(true);
  }
  IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
  if (hiveDistribution == null || hadoopDistributionService == null) {
    return;
  }
  IHDistributionVersion[] hdVersions=hiveDistribution.getHDVersions();
  if (hiveVersion == null && hdVersions.length > 0) {
    hiveVersion=hdVersions[0];
  }
  String supportYarnMethodName="String_Node_Str";
  Map<String,Boolean> doSupportMethods=hadoopDistributionService.doSupportMethods(hiveVersion,supportYarnMethodName);
  Boolean support=doSupportMethods.get(supportYarnMethodName);
  if (support != null && support) {
    getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_USE_YARN,String.valueOf(Boolean.TRUE));
  }
  updateJobtrackerContent();
}

Fixed version (ground truth):
private void updateYarnInfo(IHDistribution hiveDistribution,IHDistributionVersion hiveVersion){
  if (hiveDistribution == null) {
    hiveDistribution=getCurrentHiveDistribution(true);
  }
  IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
  if (hiveDistribution == null || hadoopDistributionService == null) {
    return;
  }
  IHDistributionVersion[] hdVersions=hiveDistribution.getHDVersions();
  if (hiveVersion == null && hdVersions.length > 0) {
    hiveVersion=hdVersions[0];
  }
  boolean support=false;
  try {
    support=hadoopDistributionService.doSupportMethod(hiveVersion,"String_Node_Str");
  }
 catch (  Exception e) {
  }
  if (support) {
    getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_USE_YARN,String.valueOf(Boolean.TRUE));
  }
  updateJobtrackerContent();
}
Program: 125907
Project: 125907
Buggy source:
protected void updateHiveModeAndMakeSelection(HiveModeInfo hiveMode){
  IHDistribution hiveDistribution=getCurrentHiveDistribution(true);
  IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
  if (hiveDistribution == null || hadoopDistributionService == null) {
    return;
  }
  IHDistributionVersion hiveVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
  IHDistributionVersion[] hdVersions=hiveDistribution.getHDVersions();
  if (hiveVersion == null && hdVersions.length > 0) {
    hiveVersion=hdVersions[0];
  }
  String[] hiveModesDisplay=HiveMetadataHelper.getHiveModesDisplay(hiveDistribution.getName(),hiveVersion.getVersion(),false);
  hiveModeCombo.getCombo().setItems(hiveModesDisplay);
  if (hiveMode != null) {
    hiveModeCombo.setText(hiveMode.getDisplayName());
  }
 else {
    hiveModeCombo.select(0);
  }
}

Fixed version (ground truth):
protected void updateHiveModeAndMakeSelection(HiveModeInfo hiveMode){
  IHDistribution hiveDistribution=getCurrentHiveDistribution(true);
  IHadoopDistributionService hadoopDistributionService=getHadoopDistributionService();
  if (hiveDistribution == null || hadoopDistributionService == null) {
    return;
  }
  IHDistributionVersion hiveVersion=hiveDistribution.getHDVersion(hiveVersionCombo.getText(),true);
  IHDistributionVersion[] hdVersions=hiveDistribution.getHDVersions();
  if (hiveVersion == null && hdVersions.length > 0) {
    hiveVersion=hdVersions[0];
  }
  HiveServerVersionInfo hiveServer=null;
  if (doSupportHive2()) {
    hiveServer=HiveServerVersionInfo.getByDisplay(hiveServerVersionCombo.getText());
  }
 else {
    hiveServer=HiveServerVersionInfo.HIVE_SERVER_1;
  }
  String[] hiveModesDisplay=HiveMetadataHelper.getHiveModesDisplay(hiveDistribution.getName(),hiveVersion.getVersion(),hiveServer.getKey(),false);
  hiveModeCombo.getCombo().setItems(hiveModesDisplay);
  if (hiveMode != null) {
    hiveModeCombo.setText(hiveMode.getDisplayName());
  }
 else {
    hiveModeCombo.select(0);
  }
}
Program: 125912
Project: 125912
Buggy source:
private void createValidationRules(RepositoryNode node,final IRepositoryViewObject repObj,org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable,ERepositoryObjectType repositoryObjectType,List<IRepositoryViewObject> validationRules){
  if (validationRules.isEmpty()) {
    return;
  }
  IRepositoryViewObject vo=node.getObject();
  if (vo instanceof MetadataTableRepositoryObject) {
    vo=((MetadataTableRepositoryObject)vo).getViewObject();
  }
  if (vo != null) {
    String schema=vo.getId();
    schema=schema + "String_Node_Str" + metadataTable.getLabel();
    List<IRepositoryViewObject> objs=getValidationRuleObjsFromSchema(validationRules,schema);
    if (objs.size() > 0) {
      int num=objs.size();
      StringBuffer floderName=new StringBuffer();
      floderName.append(Messages.getString("String_Node_Str"));
      floderName.append("String_Node_Str");
      floderName.append(num);
      floderName.append("String_Node_Str");
      RepositoryNode validationRulesNode=new StableRepositoryNode(node,floderName.toString(),ECoreImage.FOLDER_CLOSE_ICON);
      validationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATIONS_RULES_FOLDER);
      node.getChildren().add(validationRulesNode);
      for (      IRepositoryViewObject obj : objs) {
        addNode(validationRulesNode,ERepositoryObjectType.METADATA_VALIDATION_RULES,obj,validationRules);
      }
    }
  }
}

Fixed version (ground truth):
private void createValidationRules(RepositoryNode node,final IRepositoryViewObject repObj,org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable,ERepositoryObjectType repositoryObjectType,List<IRepositoryViewObject> validationRules){
  if (validationRules.isEmpty()) {
    return;
  }
  IRepositoryViewObject vo=node.getObject();
  if (vo instanceof MetadataTableRepositoryObject) {
    vo=((MetadataTableRepositoryObject)vo).getViewObject();
  }
  if (vo != null) {
    String schema=vo.getId();
    schema=schema + "String_Node_Str" + metadataTable.getLabel();
    if (metadataTable instanceof SAPBWTable) {
      String innerIOType=((SAPBWTable)metadataTable).getInnerIOType();
      if (innerIOType != null) {
        schema=schema + "String_Node_Str" + innerIOType;
      }
    }
    List<IRepositoryViewObject> objs=getValidationRuleObjsFromSchema(validationRules,schema);
    if (objs.size() > 0) {
      int num=objs.size();
      StringBuffer floderName=new StringBuffer();
      floderName.append(Messages.getString("String_Node_Str"));
      floderName.append("String_Node_Str");
      floderName.append(num);
      floderName.append("String_Node_Str");
      RepositoryNode validationRulesNode=new StableRepositoryNode(node,floderName.toString(),ECoreImage.FOLDER_CLOSE_ICON);
      validationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATIONS_RULES_FOLDER);
      node.getChildren().add(validationRulesNode);
      for (      IRepositoryViewObject obj : objs) {
        addNode(validationRulesNode,ERepositoryObjectType.METADATA_VALIDATION_RULES,obj,validationRules);
      }
    }
  }
}
Program: 125914
Project: 125914
Buggy source:
private void createValidationRules(RepositoryNode node,final IRepositoryViewObject repObj,org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable,ERepositoryObjectType repositoryObjectType,List<IRepositoryViewObject> validationRules){
  if (validationRules.isEmpty()) {
    return;
  }
  IRepositoryViewObject vo=node.getObject();
  if (vo instanceof MetadataTableRepositoryObject) {
    vo=((MetadataTableRepositoryObject)vo).getViewObject();
  }
  if (vo != null) {
    String schema=vo.getId();
    schema=schema + "String_Node_Str" + metadataTable.getLabel();
    List<IRepositoryViewObject> objs=getValidationRuleObjsFromSchema(validationRules,schema);
    if (objs.size() > 0) {
      int num=objs.size();
      StringBuffer floderName=new StringBuffer();
      floderName.append(Messages.getString("String_Node_Str"));
      floderName.append("String_Node_Str");
      floderName.append(num);
      floderName.append("String_Node_Str");
      RepositoryNode validationRulesNode=new StableRepositoryNode(node,floderName.toString(),ECoreImage.FOLDER_CLOSE_ICON);
      validationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATIONS_RULES_FOLDER);
      node.getChildren().add(validationRulesNode);
      for (      IRepositoryViewObject obj : objs) {
        addNode(validationRulesNode,ERepositoryObjectType.METADATA_VALIDATION_RULES,obj,validationRules);
      }
    }
  }
}

Fixed version (ground truth):
private void createValidationRules(RepositoryNode node,final IRepositoryViewObject repObj,org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable,ERepositoryObjectType repositoryObjectType,List<IRepositoryViewObject> validationRules){
  if (validationRules.isEmpty()) {
    return;
  }
  IRepositoryViewObject vo=node.getObject();
  if (vo instanceof MetadataTableRepositoryObject) {
    vo=((MetadataTableRepositoryObject)vo).getViewObject();
  }
  if (vo != null) {
    String schema=vo.getId();
    schema=schema + "String_Node_Str" + metadataTable.getLabel();
    if (metadataTable instanceof SAPBWTable) {
      String innerIOType=((SAPBWTable)metadataTable).getInnerIOType();
      if (innerIOType != null) {
        schema=schema + "String_Node_Str" + innerIOType;
      }
    }
    List<IRepositoryViewObject> objs=getValidationRuleObjsFromSchema(validationRules,schema);
    if (objs.size() > 0) {
      int num=objs.size();
      StringBuffer floderName=new StringBuffer();
      floderName.append(Messages.getString("String_Node_Str"));
      floderName.append("String_Node_Str");
      floderName.append(num);
      floderName.append("String_Node_Str");
      RepositoryNode validationRulesNode=new StableRepositoryNode(node,floderName.toString(),ECoreImage.FOLDER_CLOSE_ICON);
      validationRulesNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.METADATA_VALIDATIONS_RULES_FOLDER);
      node.getChildren().add(validationRulesNode);
      for (      IRepositoryViewObject obj : objs) {
        addNode(validationRulesNode,ERepositoryObjectType.METADATA_VALIDATION_RULES,obj,validationRules);
      }
    }
  }
}
Program: 125915
Project: 125915
Buggy source:
public static void updatePalette(final boolean isFavorite){
  faState=isFavorite;
  if (skipUpdatePalette) {
    return;
  }
  IComponentsFactory components=ComponentsFactoryProvider.getInstance();
  Display display=DisplayUtils.getDisplay();
  final IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
  if (paletteRoot != null) {
    display.syncExec(new Runnable(){
      @Override public void run(){
        final List oldRoots=new ArrayList(paletteRoot.getChildren());
        for (Iterator it=oldRoots.iterator(); it.hasNext(); ) {
          Object obj=it.next();
          if (obj instanceof TalendPaletteGroup) {
            continue;
          }
          it.remove();
        }
        paletteRoot.setChildren(oldRoots);
      }
    }
);
    paletteRoot=designerCoreUIService.createPalette(components,paletteRoot,isFavorite);
  }
 else {
    paletteRoot=designerCoreUIService.createPalette(components,isFavorite);
  }
  if (extraPaletteEntry == null || extraPaletteEntry.size() == 0) {
    display.syncExec(new Runnable(){
      @Override public void run(){
        extraPaletteEntry=designerCoreUIService.createJobletEtnry();
      }
    }
);
  }
}

Fixed version (ground truth):
public static void updatePalette(final boolean isFavorite){
  faState=isFavorite;
  if (skipUpdatePalette) {
    return;
  }
  IComponentsFactory components=ComponentsFactoryProvider.getInstance();
  Display display=DisplayUtils.getDisplay();
  final IDesignerCoreUIService designerCoreUIService=CoreUIPlugin.getDefault().getDesignerCoreUIService();
  if (paletteRoot != null) {
    display.syncExec(new Runnable(){
      @Override public void run(){
        final List oldRoots=new ArrayList(paletteRoot.getChildren());
        for (Iterator it=oldRoots.iterator(); it.hasNext(); ) {
          Object obj=it.next();
          if (obj instanceof TalendPaletteGroup) {
            continue;
          }
          it.remove();
        }
        paletteRoot.setChildren(oldRoots);
      }
    }
);
    paletteRoot=designerCoreUIService.createPalette(components,paletteRoot,isFavorite);
  }
 else {
    paletteRoot=designerCoreUIService.createPalette(components,isFavorite);
  }
  if (extraPaletteEntry == null || extraPaletteEntry.size() == 0) {
    display.syncExec(new Runnable(){
      @Override public void run(){
        extraPaletteEntry=designerCoreUIService.createPaletteEtnry();
      }
    }
);
  }
}
Program: 125916
Project: 125916
Buggy source:
public static boolean isGenericRepositoryValue(Connection connection,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(connection,paramName);
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isGenericRepositoryValue(Connection connection,List<ComponentProperties> componentProperties,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(componentProperties,paramName);
    }
  }
  return false;
}
Program: 125917
Project: 125917
Buggy source:
@Override public boolean isGenericRepositoryValue(Connection connection,String paramName){
  return false;
}

Fixed version (ground truth):
@Override public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName){
  return false;
}
Program: 125918
Project: 125918
Buggy source:
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(Connection connection,String paramName);

Fixed version (ground truth):
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName);
Program: 125922
Project: 125922
Buggy source:
public static void removeBWTable(Connection connection,String bwTableType,SAPBWTable table){
  Set<MetadataTable> bwTables=getBWTables(connection,bwTableType);
  if (bwTables.contains(table)) {
    bwTables.remove(table);
  }
}

Fixed version (ground truth):
public static void removeBWTable(Connection connection,String bwTableType,SAPBWTable table){
  List<SAPBWTable> bwTables=getBWTableList(connection,bwTableType);
  if (bwTables.contains(table)) {
    bwTables.remove(table);
  }
}
Program: 125923
Project: 125923
Buggy source:
@Override public InputStream getStream(IPath path) throws IOException {
  return new BufferedInputStream(new FileInputStream((File)path2Object.get(path)));
}

Fixed version (ground truth):
@Override public InputStream getStream(IPath path,ImportItem importItem) throws IOException {
  return new BufferedInputStream(new FileInputStream((File)path2Object.get(path)));
}
Program: 125924
Project: 125924
Buggy source:
@Override public InputStream getStream(IPath path){
  return provider.getContents(path2Object.get(path));
}

Fixed version (ground truth):
@Override public InputStream getStream(IPath path,ImportItem importItem){
  return provider.getContents(path2Object.get(path));
}
Program: 125925
Project: 125925
Buggy source:
@Override public InputStream getStream(IPath path) throws IOException {
  return zipFile.getInputStream((ZipEntry)path2Object.get(path));
}

Fixed version (ground truth):
@Override public InputStream getStream(IPath path,ImportItem importItem) throws IOException {
  return zipFile.getInputStream((ZipEntry)path2Object.get(path));
}
Program: 125926
Project: 125926
Buggy source:
public InputStream getStream(IPath path,ImportItem importItem) throws IOException {
  return getStream(path,null);
}

Fixed version (ground truth):
public abstract InputStream getStream(IPath path,ImportItem importItem) throws IOException ;
Program: 125929
Project: 125929
Buggy source:
public static boolean isGenericRepositoryValue(Connection connection,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(connection,paramName);
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isGenericRepositoryValue(Connection connection,List<ComponentProperties> componentProperties,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(componentProperties,paramName);
    }
  }
  return false;
}
Program: 125930
Project: 125930
Buggy source:
@Override public boolean isGenericRepositoryValue(Connection connection,String paramName){
  return false;
}

Fixed version (ground truth):
@Override public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName){
  return false;
}
Program: 125931
Project: 125931
Buggy source:
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(Connection connection,String paramName);

Fixed version (ground truth):
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName);
Program: 125932
Project: 125932
Buggy source:
public static boolean isGenericRepositoryValue(Connection connection,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(connection,paramName);
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isGenericRepositoryValue(Connection connection,List<ComponentProperties> componentProperties,String paramName){
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    if (handler.canHandle(connection)) {
      return handler.isGenericRepositoryValue(componentProperties,paramName);
    }
  }
  return false;
}
Program: 125933
Project: 125933
Buggy source:
@Override public boolean isGenericRepositoryValue(Connection connection,String paramName){
  return false;
}

Fixed version (ground truth):
@Override public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName){
  return false;
}
Program: 125934
Project: 125934
Buggy source:
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(Connection connection,String paramName);

Fixed version (ground truth):
/** 
 * DOC hcyi Comment method "isGenericRepositoryValue".
 * @param connection
 * @param paramName
 * @return
 */
public boolean isGenericRepositoryValue(List<ComponentProperties> componentProperties,String paramName);
Program: 125937
Project: 125937
Buggy source:
public static boolean isDeleteOrReselectMap(ConnectionItem connItem,List<IMetadataTable> newTables,List<IMetadataTable> oldTables,Map<String,EUpdateResult> deletedOrReselectTables){
  for (  IMetadataTable oldTable : oldTables) {
    String prefix;
    boolean isDeleted=true;
    String oldtableLabel=oldTable.getLabel();
    String oldtableId=oldTable.getId();
    for (    IMetadataTable newTable : newTables) {
      String tableLabel=newTable.getLabel();
      String tableId=newTable.getId();
      if (tableLabel.equals(oldtableLabel)) {
        isDeleted=false;
        if (!tableId.equals(oldtableId)) {
          prefix=connItem.getProperty().getId() + UpdatesConstants.SEGMENT_LINE;
          deletedOrReselectTables.put(prefix + tableLabel,EUpdateResult.RELOAD);
        }
      }
    }
    if (isDeleted) {
      prefix=connItem.getProperty().getId() + UpdatesConstants.SEGMENT_LINE;
      deletedOrReselectTables.put(prefix + oldtableLabel,EUpdateResult.DELETE);
    }
  }
  return !deletedOrReselectTables.isEmpty();
}

Fixed version (ground truth):
public static boolean isDeleteOrReselectMap(ConnectionItem connItem,List<IMetadataTable> newTables,List<IMetadataTable> oldTables,Map<String,EUpdateResult> deletedOrReselectTables){
  for (  IMetadataTable oldTable : oldTables) {
    String prefix;
    boolean isDeleted=true;
    String oldtableLabel=oldTable.getLabel();
    String oldtableId=oldTable.getId();
    for (    IMetadataTable newTable : newTables) {
      String tableLabel=newTable.getLabel();
      String tableId=newTable.getId();
      if (tableLabel.equals(oldtableLabel)) {
        isDeleted=false;
        String newInnerIOType=newTable.getAdditionalProperties().get(SAPBWTableHelper.SAP_INFOOBJECT_INNER_TYPE);
        String oldInnerIOType=oldTable.getAdditionalProperties().get(SAPBWTableHelper.SAP_INFOOBJECT_INNER_TYPE);
        if (newInnerIOType != null) {
          if (newInnerIOType.equals(oldInnerIOType) && !tableId.equals(oldtableId)) {
            prefix=connItem.getProperty().getId() + UpdatesConstants.SEGMENT_LINE;
            deletedOrReselectTables.put(prefix + tableLabel,EUpdateResult.RELOAD);
          }
          continue;
        }
        if (!tableId.equals(oldtableId)) {
          prefix=connItem.getProperty().getId() + UpdatesConstants.SEGMENT_LINE;
          deletedOrReselectTables.put(prefix + tableLabel,EUpdateResult.RELOAD);
        }
      }
    }
    if (isDeleted) {
      prefix=connItem.getProperty().getId() + UpdatesConstants.SEGMENT_LINE;
      deletedOrReselectTables.put(prefix + oldtableLabel,EUpdateResult.DELETE);
    }
  }
  return !deletedOrReselectTables.isEmpty();
}
Program: 125938
Project: 125938
Buggy source:
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version) throws Exception {
  HttpURLConnection urlConnection=null;
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (userName != null && !"String_Node_Str".equals(userName)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName,password.toCharArray());
      }
    }
);
  }
  try {
    String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version;
    urlConnection=getHttpURLConnection(nexusUrl,service,userName,password);
    SAXReader saxReader=new SAXReader();
    InputStream inputStream=urlConnection.getInputStream();
    Document document=saxReader.read(inputStream);
    Node sha1Node=document.selectSingleNode("String_Node_Str");
    String sha1=null;
    if (sha1Node != null) {
      sha1=sha1Node.getText();
    }
    return sha1;
  }
  finally {
    Authenticator.setDefault(defaultAuthenticator);
    if (null != urlConnection) {
      urlConnection.disconnect();
    }
  }
}

Fixed version (ground truth):
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version) throws Exception {
  HttpURLConnection urlConnection=null;
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (userName != null && !"String_Node_Str".equals(userName)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName,password.toCharArray());
      }
    }
);
  }
  try {
    String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version;
    urlConnection=getHttpURLConnection(nexusUrl,service,userName,password);
    SAXReader saxReader=new SAXReader();
    InputStream inputStream=urlConnection.getInputStream();
    Document document=saxReader.read(inputStream);
    Node sha1Node=document.selectSingleNode("String_Node_Str");
    String sha1=null;
    if (sha1Node != null) {
      sha1=sha1Node.getText();
    }
    return sha1;
  }
 catch (  FileNotFoundException e) {
    return null;
  }
 finally {
    Authenticator.setDefault(defaultAuthenticator);
    if (null != urlConnection) {
      urlConnection.disconnect();
    }
  }
}
Program: 125941
Project: 125941
Buggy source:
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version) throws Exception {
  HttpURLConnection urlConnection=null;
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (userName != null && !"String_Node_Str".equals(userName)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName,password.toCharArray());
      }
    }
);
  }
  try {
    String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version;
    urlConnection=getHttpURLConnection(nexusUrl,service,userName,password);
    SAXReader saxReader=new SAXReader();
    InputStream inputStream=urlConnection.getInputStream();
    Document document=saxReader.read(inputStream);
    Node sha1Node=document.selectSingleNode("String_Node_Str");
    String sha1=null;
    if (sha1Node != null) {
      sha1=sha1Node.getText();
    }
    return sha1;
  }
  finally {
    Authenticator.setDefault(defaultAuthenticator);
    if (null != urlConnection) {
      urlConnection.disconnect();
    }
  }
}

Fixed version (ground truth):
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version) throws Exception {
  HttpURLConnection urlConnection=null;
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (userName != null && !"String_Node_Str".equals(userName)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName,password.toCharArray());
      }
    }
);
  }
  try {
    String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version;
    urlConnection=getHttpURLConnection(nexusUrl,service,userName,password);
    SAXReader saxReader=new SAXReader();
    InputStream inputStream=urlConnection.getInputStream();
    Document document=saxReader.read(inputStream);
    Node sha1Node=document.selectSingleNode("String_Node_Str");
    String sha1=null;
    if (sha1Node != null) {
      sha1=sha1Node.getText();
    }
    return sha1;
  }
 catch (  FileNotFoundException e) {
    return null;
  }
 finally {
    Authenticator.setDefault(defaultAuthenticator);
    if (null != urlConnection) {
      urlConnection.disconnect();
    }
  }
}
Program: 125942
Project: 125942
Buggy source:
public static boolean isGeneratedFolder(String label){
  if (label == null) {
    return false;
  }
  return label.equalsIgnoreCase(new Path(ERepositoryObjectType.GENERATED.getFolder()).lastSegment());
}

Fixed version (ground truth):
public static boolean isGeneratedFolder(String label){
  if (label == null) {
    return false;
  }
  return ERepositoryObjectType.GENERATED != null && label.equalsIgnoreCase(new Path(ERepositoryObjectType.GENERATED.getFolder()).lastSegment());
}
Program: 125943
Project: 125943
Buggy source:
/** 
 * DOC tang Comment method "isJobletsFolder".
 * @param label
 * @return
 */
public static boolean isJobletsFolder(String label){
  if (label == null) {
    return false;
  }
  return label.equalsIgnoreCase(new Path(ERepositoryObjectType.JOBLET_DOC.getFolder()).lastSegment());
}

Fixed version (ground truth):
/** 
 * DOC tang Comment method "isJobletsFolder".
 * @param label
 * @return
 */
public static boolean isJobletsFolder(String label){
  if (label == null) {
    return false;
  }
  return ERepositoryObjectType.JOBLET_DOC != null && label.equalsIgnoreCase(new Path(ERepositoryObjectType.JOBLET_DOC.getFolder()).lastSegment());
}
Program: 125944
Project: 125944
Buggy source:
public static boolean isJobsFolder(String label){
  if (label == null) {
    return false;
  }
  return label.equalsIgnoreCase(new Path(ERepositoryObjectType.JOB_DOC.getFolder()).lastSegment());
}

Fixed version (ground truth):
public static boolean isJobsFolder(String label){
  if (label == null) {
    return false;
  }
  return ERepositoryObjectType.JOB_DOC != null && label.equalsIgnoreCase(new Path(ERepositoryObjectType.JOB_DOC.getFolder()).lastSegment());
}
Program: 125947
Project: 125947
Buggy source:
private boolean checkJarInstalledInMaven(String mvnUri){
  if (mavenJarInstalled.containsKey(mvnUri)) {
    return mavenJarInstalled.get(mvnUri) != null;
  }
  String artifactPath=PomUtil.getAbsArtifactPath(MavenUrlHelper.parseMvnUrl(mvnUri));
  if (artifactPath != null) {
    mavenJarInstalled.put(mvnUri,artifactPath);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean checkJarInstalledInMaven(String mvnUri){
  if (mavenJarInstalled.containsKey(mvnUri)) {
    if (!new File(mavenJarInstalled.get(mvnUri)).exists()) {
      mavenJarInstalled.remove(mvnUri);
      return false;
    }
    return mavenJarInstalled.get(mvnUri) != null;
  }
  String artifactPath=PomUtil.getAbsArtifactPath(MavenUrlHelper.parseMvnUrl(mvnUri));
  if (artifactPath != null) {
    mavenJarInstalled.put(mvnUri,artifactPath);
    return true;
  }
  return false;
}
Program: 125948
Project: 125948
Buggy source:
/** 
 * DOC nrousseau LocalLibraryManager constructor comment.
 */
public LocalLibraryManager(){
  super();
}

Fixed version (ground truth):
/** 
 * DOC nrousseau LocalLibraryManager constructor comment.
 */
public LocalLibraryManager(){
  super();
  deployer=new ArtifactsDeployer();
}
Program: 125951
Project: 125951
Buggy source:
/** 
 * looks for an adapter on the input that adapts to INavigatorDescriptor and then changes the view descritor string
 */
public void refreshContentDescription(){
  INavigatorDescriptor navDesc=getNavDesc();
  final String descriptor=navDesc.getDescriptor();
  if (navDesc == null) {
    setContentDescription("String_Node_Str");
  }
 else   if (service.isGIT()) {
    service.configureCombo(descriptor);
  }
 else {
    setContentDescription(descriptor);
  }
}

Fixed version (ground truth):
/** 
 * looks for an adapter on the input that adapts to INavigatorDescriptor and then changes the view descritor string
 */
public void refreshContentDescription(){
  INavigatorDescriptor navDesc=getNavDesc();
  final String descriptor=navDesc.getDescriptor();
  if (navDesc == null) {
    setContentDescription("String_Node_Str");
  }
 else   if (service != null && service.isGIT()) {
    service.configureCombo(descriptor);
  }
 else {
    setContentDescription(descriptor);
  }
}
Program: 125952
Project: 125952
Buggy source:
/** 
 * looks for an adapter on the input that adapts to INavigatorDescriptor and then changes the view descritor string
 */
public void refreshContentDescription(){
  INavigatorDescriptor navDesc=getNavDesc();
  final String descriptor=navDesc.getDescriptor();
  if (navDesc == null) {
    setContentDescription("String_Node_Str");
  }
 else   if (service.isGIT()) {
    service.configureCombo(descriptor);
  }
 else {
    setContentDescription(descriptor);
  }
}

Fixed version (ground truth):
/** 
 * looks for an adapter on the input that adapts to INavigatorDescriptor and then changes the view descritor string
 */
public void refreshContentDescription(){
  INavigatorDescriptor navDesc=getNavDesc();
  final String descriptor=navDesc.getDescriptor();
  if (navDesc == null) {
    setContentDescription("String_Node_Str");
  }
 else   if (service != null && service.isGIT()) {
    service.configureCombo(descriptor);
  }
 else {
    setContentDescription(descriptor);
  }
}
Program: 125954
Project: 125954
Buggy source:
/** 
 * DOC bqian Comment method "getJobletCustomIcon".
 * @param property
 * @return
 */
public static Image getJobletCustomIcon(Property property){
  JobletProcessItem item=(JobletProcessItem)property.getItem();
  Image image=null;
  if (item.getIcon() == null || item.getIcon().getInnerContent() == null || item.getIcon().getInnerContent().length == 0) {
    image=getDefaultJobletImage();
  }
 else {
    ImageDescriptor imageDesc=ImageUtils.createImageFromData(item.getIcon().getInnerContent());
    imageDesc=ImageUtils.scale(imageDesc,ICON_SIZE.ICON_32);
    image=cachedImages.get(item.getIcon().getInnerContent());
    if (image == null || image.isDisposed()) {
      image=imageDesc.createImage();
      cachedImages.put(item.getIcon().getInnerContent(),image);
    }
 else {
    }
  }
  return image;
}

Fixed version (ground truth):
/** 
 * DOC bqian Comment method "getJobletCustomIcon".
 * @param property
 * @return
 */
public static Image getJobletCustomIcon(Property property){
  JobletProcessItem item=(JobletProcessItem)property.getItem();
  Image image=null;
  if (item.getIcon() == null || item.getIcon().getInnerContent() == null || item.getIcon().getInnerContent().length == 0) {
    image=getDefaultJobletImage();
  }
 else {
    ImageDescriptor imageDesc=ImageUtils.createImageFromData(item.getIcon().getInnerContent());
    imageDesc=ImageUtils.scale(imageDesc,ICON_SIZE.ICON_32);
    String md5Desc=MD5.getMD5(item.getIcon().getInnerContent());
    image=cachedImages.get(md5Desc);
    if (image == null || image.isDisposed()) {
      image=imageDesc.createImage();
      cachedImages.put(md5Desc,image);
    }
 else {
    }
  }
  return image;
}
Program: 125955
Project: 125955
Buggy source:
private static HttpURLConnection getHttpURLConnection(String nexusUrl,String restService,String userName,String password) throws Exception {
  if (!nexusUrl.endsWith(NexusConstants.SLASH)) {
    nexusUrl=nexusUrl + NexusConstants.SLASH;
  }
  URL url=new URL(nexusUrl + restService);
  HttpURLConnection urlConnection=(HttpURLConnection)url.openConnection();
  if (urlConnection instanceof HttpsURLConnection) {
    String userDir=Platform.getInstallLocation().getURL().getPath();
    final SSLSocketFactory socketFactory=SSLUtils.getSSLContext(userDir).getSocketFactory();
    HttpsURLConnection httpsConnection=(HttpsURLConnection)urlConnection;
    httpsConnection.setSSLSocketFactory(socketFactory);
    httpsConnection.setHostnameVerifier(new HostnameVerifier(){
      @Override public boolean verify(      String arg0,      SSLSession arg1){
        return true;
      }
    }
);
  }
  urlConnection.setConnectTimeout(10000);
  return urlConnection;
}

Fixed version (ground truth):
private static HttpURLConnection getHttpURLConnection(String nexusUrl,String restService,String userName,String password) throws Exception {
  if (!nexusUrl.endsWith(NexusConstants.SLASH)) {
    nexusUrl=nexusUrl + NexusConstants.SLASH;
  }
  URL url=new URL(nexusUrl + restService);
  HttpURLConnection urlConnection=(HttpURLConnection)url.openConnection();
  if (urlConnection instanceof HttpsURLConnection) {
    String userDir=Platform.getInstallLocation().getURL().getPath();
    final SSLSocketFactory socketFactory=SSLUtils.getSSLContext(userDir).getSocketFactory();
    HttpsURLConnection httpsConnection=(HttpsURLConnection)urlConnection;
    httpsConnection.setSSLSocketFactory(socketFactory);
    httpsConnection.setHostnameVerifier(new HostnameVerifier(){
      @Override public boolean verify(      String arg0,      SSLSession arg1){
        return true;
      }
    }
);
  }
  IEclipsePreferences node=InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
  int timeout=node.getInt(ITalendCorePrefConstants.NEXUS_TIMEOUT,10000);
  urlConnection.setConnectTimeout(timeout);
  return urlConnection;
}
Program: 125957
Project: 125957
Buggy source:
public void updateLibraries(Set<ModuleNeeded> jobModuleList,IProcess process);

Fixed version (ground truth):
public void updateLibraries(Set<ModuleNeeded> jobModuleList,IProcess process,Set<ModuleNeeded> alreadyRetrievedModules);
Program: 125958
Project: 125958
Buggy source:
public static void removeComponentImage(String name){
  if (name != null && !name.equals("String_Node_Str")) {
    for (    IComponent component : ComponentsFactoryProvider.getInstance().getComponents()) {
      if (name.equals(component.getName())) {
        Image image=componentCachedImages.get(component.getIcon16());
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(component.getIcon16());
        image=componentCachedImages.get(component.getIcon24());
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(component.getIcon24());
        image=componentCachedImages.get(component.getIcon32());
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(component.getIcon32());
      }
    }
  }
}

Fixed version (ground truth):
public static void removeComponentImage(String name){
  if (name != null && !name.equals("String_Node_Str")) {
    for (    IComponent component : ComponentsFactoryProvider.getInstance().getComponents()) {
      if (name.equals(component.getName())) {
        String md5Desc16=MD5.getMD5(component.getIcon16().getImageData().data);
        Image image=componentCachedImages.get(md5Desc16);
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(md5Desc16);
        String md5Desc24=MD5.getMD5(component.getIcon24().getImageData().data);
        image=componentCachedImages.get(md5Desc24);
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(md5Desc24);
        String md5Desc32=MD5.getMD5(component.getIcon32().getImageData().data);
        image=componentCachedImages.get(md5Desc32);
        if (image != null && !image.isDisposed()) {
          image.dispose();
        }
        componentCachedImages.remove(md5Desc32);
      }
    }
  }
}
Program: 125959
Project: 125959
Buggy source:
public static Image getComponentImageFromDesc(ImageDescriptor imageDescriptor){
  Image image=null;
  image=componentCachedImages.get(imageDescriptor);
  if (image == null || image.isDisposed()) {
    image=imageDescriptor.createImage();
    componentCachedImages.put(imageDescriptor,image);
  }
  return image;
}

Fixed version (ground truth):
public static Image getComponentImageFromDesc(ImageDescriptor imageDescriptor){
  String md5Desc=MD5.getMD5(imageDescriptor.getImageData().data);
  Image image=componentCachedImages.get(md5Desc);
  if (image == null || image.isDisposed()) {
    image=imageDescriptor.createImage();
    componentCachedImages.put(md5Desc,image);
  }
  return image;
}