nus-yam/ex-repair huggingface dataset:
Program: 139725
Project: 139725
Buggy source:
/** 
 * Create a new database node with the given name
 * @param name
 * @param alias
 */
public DatabaseNode(String name,MetaDataSession session) throws SQLException {
  super(name,session);
  setImageKey("String_Node_Str");
  try {
    SQLDatabaseMetaData metadata=_session.getMetaData();
    if (metadata.supportsCatalogs()) {
      _supportsCatalogs=true;
    }
    if (metadata.supportsSchemas()) {
      _supportsSchemas=true;
    }
    _databaseProductName=metadata.getDatabaseProductName();
    try {
      _databaseVersion="String_Node_Str" + metadata.getJDBCMetaData().getDatabaseMajorVersion() + "String_Node_Str"+ metadata.getJDBCMetaData().getDatabaseMinorVersion()+ "String_Node_Str";
    }
 catch (    Exception e) {
      SQLExplorerPlugin.error("String_Node_Str",e);
      _databaseVersion="String_Node_Str";
    }
  }
 catch (  AbstractMethodError e) {
    SQLExplorerPlugin.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Create a new database node with the given name
 * @param name
 * @param alias
 */
public DatabaseNode(String name,MetaDataSession session) throws SQLException {
  super(name,session);
  setImageKey("String_Node_Str");
  try {
    SQLDatabaseMetaData metadata=_session.getMetaData();
    if (metadata.supportsCatalogs()) {
      _supportsCatalogs=true;
    }
    if (metadata.supportsSchemas()) {
      _supportsSchemas=true;
    }
    _databaseProductName=metadata.getDatabaseProductName();
    try {
      _databaseVersion="String_Node_Str" + metadata.getJDBCMetaData().getDatabaseMajorVersion() + "String_Node_Str"+ metadata.getJDBCMetaData().getDatabaseMinorVersion()+ "String_Node_Str";
    }
 catch (    Exception e) {
      if (e.getMessage().toLowerCase().indexOf("String_Node_Str") > -1) {
        log.warn(e.getMessage());
      }
 else {
        SQLExplorerPlugin.error("String_Node_Str",e);
      }
      _databaseVersion="String_Node_Str";
    }
  }
 catch (  AbstractMethodError e) {
    SQLExplorerPlugin.error("String_Node_Str",e);
  }
}
Program: 139726
Project: 139726
Buggy source:
public TypedReturnCode<Dependency> setDependencyOn(Indicator indicator,Pattern pattern){
  return setUsageDependencyOn(indicator,pattern);
}

Fixed version (ground truth):
public TypedReturnCode<Dependency> setDependencyOn(Analysis analysis,IndicatorDefinition indicatorDefinition){
  return setUsageDependencyOn(analysis,indicatorDefinition);
}
Program: 139727
Project: 139727
Buggy source:
@Override protected void addDependencies(ModelElement element){
}

Fixed version (ground truth):
@Override protected void addDependencies(ModelElement element){
  Analysis analysis=(Analysis)element;
  List<IndicatorDefinition> userDefinedIndicators=AnalysisHelper.getUserDefinedIndicators(analysis);
  for (  IndicatorDefinition udi : userDefinedIndicators) {
    TypedReturnCode<Dependency> dependencyReturn=DependenciesHandler.getInstance().setDependencyOn(analysis,udi);
    if (dependencyReturn.isOk()) {
      EMFUtil.saveSingleResource(udi.eResource());
    }
  }
  List<Pattern> patterns=AnalysisHelper.getPatterns(analysis);
  for (  Pattern pattern : patterns) {
    TypedReturnCode<Dependency> dependencyReturn=DependenciesHandler.getInstance().setDependencyOn(analysis,pattern);
    if (dependencyReturn.isOk()) {
      EMFUtil.saveSingleResource(pattern.eResource());
    }
  }
}
Program: 139728
Project: 139728
Buggy source:
/** 
 * DOC rli Comment method "deleteIndicatorItems".
 * @param treeItem
 * @param inidicatorUnit
 */
private void deleteIndicatorItems(ColumnIndicator columnIndicator,IndicatorUnit inidicatorUnit){
  columnIndicator.removeIndicatorUnit(inidicatorUnit);
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "deleteIndicatorItems".
 * @param treeItem
 * @param inidicatorUnit
 */
private void deleteIndicatorItems(ColumnIndicator columnIndicator,IndicatorUnit inidicatorUnit){
  columnIndicator.removeIndicatorUnit(inidicatorUnit);
  removeDependency(getAnalysis(),inidicatorUnit);
}
Program: 139729
Project: 139729
Buggy source:
public void deleteResource(){
  DriverManager driverManager=SQLExplorerPlugin.getDefault().getDriverModel();
  final IResource[] resources=selectedFiles;
  if (!checkDeleteContent(resources)) {
    return;
  }
  List<Map<String,String>> driverList=driverPreferCustInfo();
  for (  Map<String,String> driverInfoMap : driverList) {
    String connectionURI=driverInfoMap.get("String_Node_Str");
    for (    ModelElement tdDataProvider : modelElementList) {
      if (tdDataProvider.eResource().getURI().toString().trim().equals(connectionURI.trim())) {
        String customDriverId=driverInfoMap.get("String_Node_Str");
        if (driverManager.getDriver(customDriverId) != null) {
          driverManager.removeDriver(driverManager.getDriver(customDriverId));
        }
      }
    }
  }
  delRelatedResource(isDeleteContent,resources);
  EObjectHelper.removeDependencys(resources);
  for (  IResource res : resources) {
    try {
      res.delete(true,new NullProgressMonitor());
      res.getParent().refreshLocal(IResource.DEPTH_INFINITE,null);
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
  }
  CorePlugin.getDefault().refreshDQView();
}

Fixed version (ground truth):
public void deleteResource(){
  DriverManager driverManager=SQLExplorerPlugin.getDefault().getDriverModel();
  final IResource[] resources=selectedFiles;
  if (!checkDeleteContent(resources)) {
    return;
  }
  List<Map<String,String>> driverList=driverPreferCustInfo();
  for (  Map<String,String> driverInfoMap : driverList) {
    String connectionURI=driverInfoMap.get("String_Node_Str");
    for (    ModelElement tdDataProvider : modelElementList) {
      if (tdDataProvider.eResource().getURI().toString().trim().equals(connectionURI.trim())) {
        String customDriverId=driverInfoMap.get("String_Node_Str");
        if (driverManager.getDriver(customDriverId) != null) {
          driverManager.removeDriver(driverManager.getDriver(customDriverId));
        }
      }
    }
  }
  delRelatedResource(isDeleteContent,resources);
  EObjectHelper.removeDependencys(resources);
  for (  IResource res : resources) {
    try {
      if (res.isLinked()) {
        File file=new File(res.getRawLocation().toOSString());
        if (file.exists()) {
          file.delete();
        }
      }
      res.delete(true,new NullProgressMonitor());
      res.getParent().refreshLocal(IResource.DEPTH_INFINITE,null);
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
  }
  CorePlugin.getDefault().refreshDQView();
}
Program: 139732
Project: 139732
Buggy source:
@Override protected String createSqlStatement(Analysis analysis){
  CwmZQuery query=new CwmZQuery();
  EList<ModelElement> analysedElements=analysis.getContext().getAnalysedElements();
  if (analysedElements.isEmpty()) {
    this.errorMessage=Messages.getString("String_Node_Str",analysis.getName());
    return null;
  }
  Set<ColumnSet> fromPart=new HashSet<ColumnSet>();
  for (  ModelElement modelElement : analysedElements) {
    Table table=SwitchHelpers.TABLE_SWITCH.doSwitch(modelElement);
    if (table == null) {
      this.errorMessage=Messages.getString("String_Node_Str",modelElement.getName());
      return null;
    }
    if (!query.addSelect(table)) {
      this.errorMessage=Messages.getString("String_Node_Str");
      return null;
    }
    fromPart.add(table);
  }
  if (!query.addFrom(fromPart)) {
    this.errorMessage=Messages.getString("String_Node_Str");
    return null;
  }
  return query.generateStatement();
}

Fixed version (ground truth):
@Override protected String createSqlStatement(Analysis analysis){
  this.cachedAnalysis=analysis;
  CwmZQuery query=new CwmZQuery();
  EList<ModelElement> analysedElements=analysis.getContext().getAnalysedElements();
  if (analysedElements.isEmpty()) {
    this.errorMessage=Messages.getString("String_Node_Str",analysis.getName());
    return null;
  }
  Set<ColumnSet> fromPart=new HashSet<ColumnSet>();
  for (  ModelElement modelElement : analysedElements) {
    Table table=SwitchHelpers.TABLE_SWITCH.doSwitch(modelElement);
    if (table == null) {
      this.errorMessage=Messages.getString("String_Node_Str",modelElement.getName());
      return null;
    }
    if (!query.addSelect(table)) {
      this.errorMessage=Messages.getString("String_Node_Str");
      return null;
    }
    fromPart.add(table);
  }
  if (!query.addFrom(fromPart)) {
    this.errorMessage=Messages.getString("String_Node_Str");
    return null;
  }
  return query.generateStatement();
}
Program: 139735
Project: 139735
Buggy source:
private void doRemove(){
  StructuredSelection selection=(StructuredSelection)tableViewer.getSelection();
  if (selection.isEmpty()) {
    return;
  }
  FunctionEntity entity=(FunctionEntity)selection.getFirstElement();
  entityList.remove(entity);
  tableViewer.refresh();
  ResourcesPlugin.getPlugin().getPluginPreferences().setValue(entity.getLanguage(),"String_Node_Str");
}

Fixed version (ground truth):
private void doRemove(){
  StructuredSelection selection=(StructuredSelection)tableViewer.getSelection();
  if (selection.isEmpty()) {
    return;
  }
  FunctionEntity entity=(FunctionEntity)selection.getFirstElement();
  entityList.remove(entity);
  tableViewer.refresh();
  ResourcesPlugin.getPlugin().getPluginPreferences().setValue(entity.getLanguage(),"String_Node_Str");
  DefinitionHandler.getInstance().removeRegexFunction(entity.getLanguage());
}
Program: 139736
Project: 139736
Buggy source:
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setValue(String.valueOf(MedianIndicatorImpl.getRealValue(javaType,med)));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setValue(String.valueOf((r1 + r2) / 2));
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  this.setDatatype(javaType);
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setValue(String.valueOf(MedianIndicatorImpl.getRealValue(javaType,med)));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setValue(String.valueOf((r1 + r2) / 2));
    return true;
  }
  return false;
}
Program: 139737
Project: 139737
Buggy source:
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setValue(String.valueOf(MedianIndicatorImpl.getRealValue(javaType,med)));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setValue(String.valueOf((r1 + r2) / 2));
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean storeSqlResults(List<Object[]> objects){
  if (!checkResults(objects,1)) {
    return false;
  }
  int javaType=this.getColumnType();
  this.setDatatype(javaType);
  if (objects.size() == 1) {
    String med=String.valueOf(objects.get(0)[0]);
    if (med == null) {
      log.error("String_Node_Str");
      return false;
    }
    this.setValue(String.valueOf(MedianIndicatorImpl.getRealValue(javaType,med)));
    return true;
  }
 else   if (objects.size() == 2) {
    Double r1=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(0)[0]));
    Double r2=MedianIndicatorImpl.getRealValue(javaType,String.valueOf(objects.get(1)[0]));
    if (r1 == null || r2 == null) {
      log.error("String_Node_Str" + r1 + "String_Node_Str"+ r2);
      return false;
    }
    this.setValue(String.valueOf((r1 + r2) / 2));
    return true;
  }
  return false;
}
Program: 139738
Project: 139738
Buggy source:
@Override protected boolean runAnalysis(Analysis analysis,String sqlStatement){
  boolean ok=true;
  TypedReturnCode<Connection> trc=this.getConnection(analysis);
  if (!trc.isOk()) {
    return traceError("String_Node_Str" + analysis.getName() + "String_Node_Str"+ trc.getMessage());
  }
  Connection connection=trc.getObject();
  try {
    Map<ModelElement,List<Indicator>> elementToIndicator=new HashMap<ModelElement,List<Indicator>>();
    Collection<Indicator> indicators=IndicatorHelper.getIndicatorLeaves(analysis.getResults());
    for (    Indicator indicator : indicators) {
      if (indicator instanceof CompositeIndicator) {
        continue;
      }
      String catalogName=getCatalogOrSchemaName(indicator.getAnalyzedElement());
      if (catalogName != null) {
        changeCatalog(catalogName,connection);
      }
      Expression query=dbms().getInstantiatedExpression(indicator);
      if (query == null || !executeQuery(indicator,connection,query.getBody())) {
        ok=traceError("String_Node_Str" + indicator.getName() + "String_Node_Str"+ ((query == null) ? "String_Node_Str" : "String_Node_Str" + query.getBody()));
      }
 else {
        indicator.setComputed(true);
      }
      MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(),indicator,elementToIndicator);
    }
    connection.close();
    setRowCountAndNullCount(elementToIndicator);
  }
 catch (  SQLException e) {
    log.error(e,e);
    this.errorMessage=e.getMessage();
    ok=false;
  }
 finally {
    ConnectionUtils.closeConnection(connection);
  }
  return ok;
}

Fixed version (ground truth):
@Override protected boolean runAnalysis(Analysis analysis,String sqlStatement){
  boolean ok=true;
  TypedReturnCode<Connection> trc=this.getConnection(analysis);
  if (!trc.isOk()) {
    return traceError("String_Node_Str" + analysis.getName() + "String_Node_Str"+ trc.getMessage());
  }
  Connection connection=trc.getObject();
  try {
    Map<ModelElement,List<Indicator>> elementToIndicator=new HashMap<ModelElement,List<Indicator>>();
    Collection<Indicator> indicators=IndicatorHelper.getIndicatorLeaves(analysis.getResults());
    if (parallel) {
      ok=runAnalysisIndicatorsParallel(connection,elementToIndicator,indicators);
    }
 else {
      ok=runAnalysisIndicators(connection,elementToIndicator,indicators);
    }
    connection.close();
    setRowCountAndNullCount(elementToIndicator);
  }
 catch (  SQLException e) {
    log.error(e,e);
    this.errorMessage=e.getMessage();
    ok=false;
  }
 finally {
    ConnectionUtils.closeConnection(connection);
  }
  return ok;
}
Program: 139739
Project: 139739
Buggy source:
@Override public void loadChildren(){
  EList<IndicatorDefinition> indicatorDefinitions=DefinitionHandler.getInstance().getIndicatorsDefinitions().getIndicatorDefinitions();
  setChildren(indicatorDefinitions.toArray(new IndicatorDefinition[indicatorDefinitions.size()]));
}

Fixed version (ground truth):
@Override public void loadChildren(){
  EList<IndicatorDefinition> indicatorDefinitions=DefinitionHandler.getInstance().getIndicatorsDefinitions().getIndicatorDefinitions();
  List<IndicatorDefinition> tempList=new ArrayList<IndicatorDefinition>();
  for (  IndicatorDefinition definition : indicatorDefinitions) {
    if (!definition.getSqlGenericExpression().isEmpty()) {
      tempList.add(definition);
    }
  }
  setChildren(tempList.toArray(new IndicatorDefinition[tempList.size()]));
}
Program: 139741
Project: 139741
Buggy source:
public ModelElementCompareEditorLauncher(String connName,Object selObj){
  connectionName=connName;
  selectedObject=selObj;
}

Fixed version (ground truth):
public ModelElementCompareEditorLauncher(String connName,Object selObj,boolean ce){
  connectionName=connName;
  selectedObject=selObj;
  compareEachOther=ce;
}
Program: 139742
Project: 139742
Buggy source:
/** 
 * Open a compare editor UI, will clear the information which hasn't relationship with current selected level first(For example: if we compare the catalog level, will clear it's table(view) from every catalog), then will compare current level object.
 * @param rightResource
 * @param oldDataProviderFile
 * @return
 * @throws ReloadCompareException
 */
public static DiffModel openDiffCompareEditor(Resource leftResource,Resource rightResource,Map<String,Object> opt,IUIHandler guiHandler,IFile efmDiffResultFile,String dbName,Object selectedObject) throws ReloadCompareException {
  MatchModel match=null;
  try {
    match=MatchService.doResourceMatch(leftResource,rightResource,opt);
  }
 catch (  InterruptedException e) {
    throw new ReloadCompareException(e);
  }
  final DiffModel diff=DiffService.doDiff(match);
  final ModelInputSnapshot snapshot=DiffFactory.eINSTANCE.createModelInputSnapshot();
  snapshot.setDate(Calendar.getInstance().getTime());
  snapshot.setMatch(match);
  snapshot.setDiff(diff);
  IFile createDiffResourceFile=efmDiffResultFile;
  try {
    final String fullPath=createDiffResourceFile.getLocation().toOSString();
    ModelUtils.save(snapshot,fullPath);
  }
 catch (  IOException e) {
    throw new ReloadCompareException(e);
  }
  if (guiHandler != null) {
    guiHandler.popComparisonUI(createDiffResourceFile.getLocation(),dbName,selectedObject);
  }
  return diff;
}

Fixed version (ground truth):
/** 
 * Open a compare editor UI, will clear the information which hasn't relationship with current selected level first(For example: if we compare the catalog level, will clear it's table(view) from every catalog), then will compare current level object.
 * @param rightResource
 * @param oldDataProviderFile
 * @return
 * @throws ReloadCompareException
 */
public static DiffModel openDiffCompareEditor(Resource leftResource,Resource rightResource,Map<String,Object> opt,IUIHandler guiHandler,IFile efmDiffResultFile,String dbName,Object selectedObject,boolean compareEachOther) throws ReloadCompareException {
  MatchModel match=null;
  try {
    match=MatchService.doResourceMatch(leftResource,rightResource,opt);
  }
 catch (  InterruptedException e) {
    throw new ReloadCompareException(e);
  }
  final DiffModel diff=DiffService.doDiff(match);
  final ModelInputSnapshot snapshot=DiffFactory.eINSTANCE.createModelInputSnapshot();
  snapshot.setDate(Calendar.getInstance().getTime());
  snapshot.setMatch(match);
  snapshot.setDiff(diff);
  IFile createDiffResourceFile=efmDiffResultFile;
  try {
    final String fullPath=createDiffResourceFile.getLocation().toOSString();
    ModelUtils.save(snapshot,fullPath);
  }
 catch (  IOException e) {
    throw new ReloadCompareException(e);
  }
  if (guiHandler != null) {
    guiHandler.popComparisonUI(createDiffResourceFile.getLocation(),dbName,selectedObject,compareEachOther);
  }
  return diff;
}
Program: 139743
Project: 139743
Buggy source:
public void popComparisonUI(IUIHandler uiHandler) throws ReloadCompareException {
  this.guiHandler=uiHandler;
  if (!isValid()) {
    return;
  }
  oldDataProvider=findDataProvider();
  if (oldDataProvider == null) {
    return;
  }
  createTempConnectionFile();
  createCopyedProvider();
  Object needReloadObject=dbFolderNode == null ? selectedObj : dbFolderNode;
  DQStructureComparer.openDiffCompareEditor(getLeftResource(),getRightResource(),options,guiHandler,DQStructureComparer.getDiffResourceFile(),oldDataProvider.getName(),needReloadObject);
}

Fixed version (ground truth):
public void popComparisonUI(IUIHandler uiHandler) throws ReloadCompareException {
  this.guiHandler=uiHandler;
  if (!isValid()) {
    return;
  }
  oldDataProvider=findDataProvider();
  if (oldDataProvider == null) {
    return;
  }
  createTempConnectionFile();
  createCopyedProvider();
  Object needReloadObject=dbFolderNode == null ? selectedObj : dbFolderNode;
  DQStructureComparer.openDiffCompareEditor(getLeftResource(),getRightResource(),options,guiHandler,DQStructureComparer.getDiffResourceFile(),oldDataProvider.getName(),needReloadObject,false);
}
Program: 139744
Project: 139744
Buggy source:
@Override protected Resource getLeftResource() throws ReloadCompareException {
  DQStructureComparer.clearSubNode(copyedDataProvider);
  List<TdCatalog> tdCatalogs=DataProviderHelper.getTdCatalogs(copyedDataProvider);
  Resource leftResource=null;
  leftResource=copyedDataProvider.eResource();
  leftResource.getContents().clear();
  for (  TdCatalog catalog : tdCatalogs) {
    catalog.getDataManager().clear();
    leftResource.getContents().add(catalog);
  }
  EMFSharedResources.getInstance().saveResource(leftResource);
  return leftResource;
}

Fixed version (ground truth):
@Override protected Resource getLeftResource() throws ReloadCompareException {
  DQStructureComparer.clearSubNode(copyedDataProvider);
  List<Package> packages=new ArrayList<Package>();
  packages.addAll(DataProviderHelper.getTdCatalogs(copyedDataProvider));
  packages.addAll(DataProviderHelper.getTdSchema(copyedDataProvider));
  Resource leftResource=null;
  leftResource=copyedDataProvider.eResource();
  leftResource.getContents().clear();
  for (  Package catalog : packages) {
    catalog.getDataManager().clear();
    leftResource.getContents().add(catalog);
  }
  EMFSharedResources.getInstance().saveResource(leftResource);
  return leftResource;
}
Program: 139745
Project: 139745
Buggy source:
@Override protected Resource getRightResource() throws ReloadCompareException {
  List<TdCatalog> tdCatalogs=DataProviderHelper.getTdCatalogs(tempReloadProvider);
  Resource reloadResource=null;
  reloadResource=tempReloadProvider.eResource();
  reloadResource.getContents().clear();
  for (  TdCatalog catalog : tdCatalogs) {
    catalog.getDataManager().clear();
    reloadResource.getContents().add(catalog);
  }
  EMFSharedResources.getInstance().saveResource(reloadResource);
  return reloadResource;
}

Fixed version (ground truth):
@Override protected Resource getRightResource() throws ReloadCompareException {
  List<Package> packages=new ArrayList<Package>();
  packages.addAll(DataProviderHelper.getTdCatalogs(tempReloadProvider));
  packages.addAll(DataProviderHelper.getTdSchema(tempReloadProvider));
  Resource reloadResource=null;
  reloadResource=tempReloadProvider.eResource();
  reloadResource.getContents().clear();
  for (  Package catalog : packages) {
    catalog.getDataManager().clear();
    reloadResource.getContents().add(catalog);
  }
  EMFSharedResources.getInstance().saveResource(reloadResource);
  return reloadResource;
}
Program: 139746
Project: 139746
Buggy source:
public void widgetSelected(SelectionEvent e){
  tempJoinElements.remove(fje);
  expressComp.dispose();
  joinElementComp.layout();
  form.reflow(true);
  setDirty(true);
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  tempJoinElements.remove(fje);
  expressComp.dispose();
  joinConditionSection.setExpanded(true);
  setDirty(true);
}
Program: 139749
Project: 139749
Buggy source:
@Override public void fillContextMenu(IMenuManager menu){
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  TreePath[] treePath=currentSelection.getPaths();
  for (  TreePath paths : treePath) {
    Object path=paths.getSegment(1);
    if (path.toString().endsWith("String_Node_Str")) {
      return;
    }
 else {
      addTaskAction=new TdAddTaskAction(site.getViewSite().getShell(),currentSelection.getFirstElement());
      menu.add(addTaskAction);
    }
  }
}

Fixed version (ground truth):
@Override public void fillContextMenu(IMenuManager menu){
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  boolean showMenu=true;
  TreePath[] treePath=currentSelection.getPaths();
  for (  TreePath paths : treePath) {
    Object path=paths.getSegment(1);
    if (path.toString().endsWith("String_Node_Str")) {
      showMenu=false;
    }
  }
  if (showMenu) {
    addTaskAction=new TdAddTaskAction(site.getViewSite().getShell(),currentSelection.getFirstElement());
    menu.add(addTaskAction);
  }
}
Program: 139750
Project: 139750
Buggy source:
/** 
 * DOC xqliu Comment method "createAddButton".
 * @param parent top composite
 */
private void createAddButton(Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      JoinElement newJoinElement=RulesFactory.eINSTANCE.createJoinElement();
      newJoinElement.setOperator(DEFAULT_OPERATOR);
      creatNewJoinElementLine(newJoinElement);
      tempJoinElements.add(newJoinElement);
      form.reflow(true);
      setDirty(true);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "createAddButton".
 * @param parent top composite
 */
private void createAddButton(Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      JoinElement newJoinElement=RulesFactory.eINSTANCE.createJoinElement();
      newJoinElement.setOperator(DEFAULT_OPERATOR);
      creatNewJoinElementLine(newJoinElement);
      tempJoinElements.add(newJoinElement);
      joinConditionSection.setExpanded(true);
      setDirty(true);
    }
  }
);
}
Program: 139751
Project: 139751
Buggy source:
public void widgetSelected(SelectionEvent e){
  remainDBTypeList.clear();
  remainDBTypeList.addAll(allDBTypeList);
  for (  Expression expression : tempExpression) {
    String language=expression.getLanguage();
    String languageName=PatternLanguageType.findNameByLanguage(language);
    remainDBTypeList.remove(languageName);
  }
  if (remainDBTypeList.size() == 0) {
    MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    return;
  }
  String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
  Expression expression=BooleanExpressionHelper.createExpression(language,null);
  creatNewExpressLine(expression);
  tempExpression.add(expression);
  form.reflow(true);
  setDirty(true);
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  remainDBTypeList.clear();
  remainDBTypeList.addAll(allDBTypeList);
  for (  Expression expression : tempExpression) {
    String language=expression.getLanguage();
    String languageName=PatternLanguageType.findNameByLanguage(language);
    remainDBTypeList.remove(languageName);
  }
  if (remainDBTypeList.size() == 0) {
    MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
    return;
  }
  String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
  Expression expression=BooleanExpressionHelper.createExpression(language,null);
  creatNewExpressLine(expression);
  tempExpression.add(expression);
  definitionSection.setExpanded(true);
  setDirty(true);
}
Program: 139752
Project: 139752
Buggy source:
private void creatDefinitionSection(Composite topCmp){
  Section definitionSection=createSection(form,topCmp,DefaultMessagesImpl.getString("String_Node_Str"),false,null);
  Label label=new Label(definitionSection,SWT.WRAP);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  definitionSection.setDescriptionControl(label);
  definitionComp=createDefinitionComp(definitionSection);
  definitionSection.setClient(definitionComp);
}

Fixed version (ground truth):
private void creatDefinitionSection(Composite topCmp){
  definitionSection=createSection(form,topCmp,DefaultMessagesImpl.getString("String_Node_Str"),false,null);
  Label label=new Label(definitionSection,SWT.WRAP);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  definitionSection.setDescriptionControl(label);
  definitionComp=createDefinitionComp(definitionSection);
  definitionSection.setClient(definitionComp);
}
Program: 139753
Project: 139753
Buggy source:
private void createAddButton(final Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      remainDBTypeList.clear();
      remainDBTypeList.addAll(allDBTypeList);
      for (      Expression expression : tempExpression) {
        String language=expression.getLanguage();
        String languageName=PatternLanguageType.findNameByLanguage(language);
        remainDBTypeList.remove(languageName);
      }
      if (remainDBTypeList.size() == 0) {
        MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
        return;
      }
      String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
      Expression expression=BooleanExpressionHelper.createExpression(language,null);
      creatNewExpressLine(expression);
      tempExpression.add(expression);
      form.reflow(true);
      setDirty(true);
    }
  }
);
}

Fixed version (ground truth):
private void createAddButton(final Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      remainDBTypeList.clear();
      remainDBTypeList.addAll(allDBTypeList);
      for (      Expression expression : tempExpression) {
        String language=expression.getLanguage();
        String languageName=PatternLanguageType.findNameByLanguage(language);
        remainDBTypeList.remove(languageName);
      }
      if (remainDBTypeList.size() == 0) {
        MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
        return;
      }
      String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
      Expression expression=BooleanExpressionHelper.createExpression(language,null);
      creatNewExpressLine(expression);
      tempExpression.add(expression);
      definitionSection.setExpanded(true);
      setDirty(true);
    }
  }
);
}
Program: 139754
Project: 139754
Buggy source:
private void createAddButton(Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      remainDBTypeList.clear();
      remainDBTypeList.addAll(allDBTypeList);
      for (      PatternComponent patternComponent : tempPatternComponents) {
        String language=((RegularExpressionImpl)patternComponent).getExpression().getLanguage();
        String languageName=PatternLanguageType.findNameByLanguage(language);
        remainDBTypeList.remove(languageName);
      }
      if (remainDBTypeList.size() == 0) {
        MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
        return;
      }
      String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
      RegularExpression newRegularExpress=BooleanExpressionHelper.createRegularExpression(language,null);
      newRegularExpress.setExpressionType(expressionType);
      creatNewExpressLine(newRegularExpress);
      tempPatternComponents.add(newRegularExpress);
      form.reflow(true);
      setDirty(true);
    }
  }
);
}

Fixed version (ground truth):
private void createAddButton(Composite parent){
  final Button addButton=new Button(parent,SWT.NONE);
  addButton.setImage(ImageLib.getImage(ImageLib.ADD_ACTION));
  addButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData labelGd=new GridData();
  labelGd.horizontalAlignment=SWT.CENTER;
  labelGd.widthHint=65;
  addButton.setLayoutData(labelGd);
  addButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      remainDBTypeList.clear();
      remainDBTypeList.addAll(allDBTypeList);
      for (      PatternComponent patternComponent : tempPatternComponents) {
        String language=((RegularExpressionImpl)patternComponent).getExpression().getLanguage();
        String languageName=PatternLanguageType.findNameByLanguage(language);
        remainDBTypeList.remove(languageName);
      }
      if (remainDBTypeList.size() == 0) {
        MessageDialog.openWarning(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
        return;
      }
      String language=PatternLanguageType.findLanguageByName(remainDBTypeList.get(0));
      RegularExpression newRegularExpress=BooleanExpressionHelper.createRegularExpression(language,null);
      newRegularExpress.setExpressionType(expressionType);
      creatNewExpressLine(newRegularExpress);
      tempPatternComponents.add(newRegularExpress);
      patternDefinitionSection.setExpanded(true);
      setDirty(true);
    }
  }
);
}
Program: 139755
Project: 139755
Buggy source:
/** 
 * DOC rli Comment method "ceatePatternDefinitionComp".
 * @param form
 * @param section
 */
private Composite createPatternDefinitionComp(){
  Composite newComp=toolkit.createComposite(patternDefinitionSection);
  newComp.setLayout(new GridLayout());
  componentsComp=new Composite(newComp,SWT.NONE);
  componentsComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(componentsComp);
  EList<PatternComponent> components=this.pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpression regularExpress=(RegularExpression)components.get(i);
    tempPatternComponents.add(regularExpress);
    creatNewExpressLine(regularExpress);
  }
  createAddButton(newComp);
  patternDefinitionSection.setClient(newComp);
  return newComp;
}

Fixed version (ground truth):
/** 
 * DOC rli Comment method "ceatePatternDefinitionComp".
 * @param form
 * @param section
 */
private Composite createPatternDefinitionComp(){
  Composite newComp=toolkit.createComposite(patternDefinitionSection);
  newComp.setLayout(new GridLayout());
  componentsComp=new Composite(newComp,SWT.NONE);
  componentsComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(componentsComp);
  EList<PatternComponent> components=this.pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpression regularExpress=(RegularExpression)components.get(i);
    tempPatternComponents.add(regularExpress);
    creatNewExpressLine(regularExpress);
  }
  createAddButton(newComp);
  patternDefinitionSection.setClient(newComp);
  return newComp;
}
Program: 139757
Project: 139757
Buggy source:
public void setElements(final Object columns){
  this.tree.dispose();
  this.tree=createTree(this.parentComp);
  tree.setData(this);
  addItemElements((List<Column>)columns,0);
  updateBindConnection(masterPage,tree);
}

Fixed version (ground truth):
public void setElements(final Object columns){
  this.tree.dispose();
  this.tree=createTree(this.parentComp);
  tree.setData(this);
  columnSetMultiValueList.clear();
  addItemElements((List<Column>)columns,0);
  updateBindConnection(masterPage,tree);
}
Program: 139758
Project: 139758
Buggy source:
/** 
 * DOC jet according to current analysis generator chart dataset "initDataset".
 * @return
 */
private DefaultCategoryDataset initDataset(){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  Analysis analysis=this.getAnalysisHandler().getAnalysis();
  for (Iterator iterator=analysis.getResults().getIndicators().iterator(); iterator.hasNext(); ) {
    ColumnDependencyIndicator indicator=(ColumnDependencyIndicator)iterator.next();
    String label=getRowLabel(indicator);
    dataset.addValue(indicator.getACount() - indicator.getDistinctACount(),"String_Node_Str",label);
    dataset.addValue(indicator.getDistinctACount(),"String_Node_Str",label);
  }
  return dataset;
}

Fixed version (ground truth):
/** 
 * DOC jet according to current analysis generator chart dataset "initDataset".
 * @return
 */
private DefaultCategoryDataset initDataset(){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  Analysis analysis=this.getAnalysisHandler().getAnalysis();
  for (Iterator iterator=analysis.getResults().getIndicators().iterator(); iterator.hasNext(); ) {
    ColumnDependencyIndicator indicator=(ColumnDependencyIndicator)iterator.next();
    String label=getRowLabel(indicator);
    if (getAnalysisHandler().getResultMetadata().getExecutionNumber() > 0) {
      dataset.addValue(indicator.getACount() - indicator.getDistinctACount(),"String_Node_Str",label);
      dataset.addValue(indicator.getDistinctACount(),"String_Node_Str",label);
    }
  }
  return dataset;
}
Program: 139762
Project: 139762
Buggy source:
@Override protected void handleUpdateElement(UpdateAttribute updateAttribute){
}

Fixed version (ground truth):
@Override protected void handleUpdateElement(UpdateAttribute updateAttribute){
  EObject leftElement=updateAttribute.getLeftElement();
  ColumnSet columnSetSwitchLeft=SwitchHelpers.COLUMN_SET_SWITCH.doSwitch(leftElement);
  if (columnSetSwitchLeft == null) {
    columnSetSwitchLeft=(ColumnSet)leftElement.eContainer();
  }
  EObject rightElement=updateAttribute.getRightElement();
  ColumnSet columnSetSwitchRight=SwitchHelpers.COLUMN_SET_SWITCH.doSwitch(rightElement);
  if (columnSetSwitchRight == null) {
    columnSetSwitchRight=(ColumnSet)rightElement.eContainer();
  }
  if (columnSetSwitchLeft != null && columnSetSwitchRight != null) {
    Package pack=(Package)selectedObj;
    PackageHelper.removeColumnSet(columnSetSwitchLeft,pack);
    PackageHelper.addColumnSet(columnSetSwitchRight,pack);
  }
}
Program: 139763
Project: 139763
Buggy source:
public void run(){
  try {
    creatComparisonLevel.reloadCurrentLevelElement();
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    DataProvider oldDataProvider=creatComparisonLevel.reloadCurrentLevelElement();
    impactExistingAnalyses(oldDataProvider);
  }
 catch (  ReloadCompareException e) {
    log.error(e,e);
  }
catch (  PartInitException e) {
    log.error(e,e);
  }
}
Program: 139764
Project: 139764
Buggy source:
/** 
 * DOC bZhou Comment method "getReportingDBFolder".
 * @return
 */
public static IFolder getReportingDBFolder(){
  return getRootProject().getFolder(REPORTING_DB_FOLDER_NAME);
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getReportingDBFolder".
 * @return
 */
public static IFolder getReportingDBFolder(){
  return ResourcesPlugin.getWorkspace().getRoot().getFolder(new Path(REPORTING_DB_FOLDER_NAME));
}
Program: 139765
Project: 139765
Buggy source:
@Override public void fillContextMenu(IMenuManager menu){
  menu.add(new ImportIndicatorDefinitionAction());
  menu.add(new ExportIndicatorDefinitionAction());
}

Fixed version (ground truth):
@Override public void fillContextMenu(IMenuManager menu){
}
Program: 139766
Project: 139766
Buggy source:
private void createSimpleStatistics(final ScrolledForm form,final Composite composite,final ColumnSetMultiValueIndicator columnSetMultiValueIndicator){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  dataset.addValue(columnSetMultiValueIndicator.getCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getDistinctCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getUniqueCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getDuplicateCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  JFreeChart chart=TopChartFactory.createBarChart(DefaultMessagesImpl.getString("String_Node_Str"),dataset,true);
  ChartDecorator.decorate(chart);
  ChartComposite chartComp=new ChartComposite(composite,SWT.NONE,chart);
  chartComp.setLayoutData(new GridData(GridData.FILL_BOTH));
}

Fixed version (ground truth):
private void createSimpleStatistics(final ScrolledForm form,final Composite composite,final ColumnSetMultiValueIndicator columnSetMultiValueIndicator){
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  dataset.addValue(columnSetMultiValueIndicator.getCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getDistinctCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getUniqueCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  dataset.addValue(columnSetMultiValueIndicator.getDuplicateCount(),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str");
  JFreeChart chart=TopChartFactory.createBarChart(DefaultMessagesImpl.getString("String_Node_Str"),dataset,true);
  if (chart != null) {
    Plot plot=chart.getPlot();
    if (plot instanceof CategoryPlot) {
      ChartDecorator.decorateCategoryPlot(chart);
      ((CategoryPlot)plot).getRenderer().setSeriesPaint(0,ChartDecorator.IndiBindColor.INDICATOR_ROW_COUNT.getColor());
      ((CategoryPlot)plot).getRenderer().setSeriesPaint(1,ChartDecorator.IndiBindColor.INDICATOR_DISTINCT_COUNT.getColor());
      ((CategoryPlot)plot).getRenderer().setSeriesPaint(2,ChartDecorator.IndiBindColor.INDICATOR_UNIQUE_COUNT.getColor());
      ((CategoryPlot)plot).getRenderer().setSeriesPaint(3,ChartDecorator.IndiBindColor.INDICATOR_DUPLICATE_COUNT.getColor());
    }
  }
  ChartComposite chartComp=new ChartComposite(composite,SWT.NONE,chart);
  chartComp.setLayoutData(new GridData(GridData.FILL_BOTH));
}
Program: 139767
Project: 139767
Buggy source:
/** 
 * DOC bZhou Comment method "decorateCategoryPlot".
 * @param chart
 */
private static void decorateCategoryPlot(JFreeChart chart){
  Font font=null;
  CategoryPlot plot=chart.getCategoryPlot();
  CategoryItemRenderer render=plot.getRenderer();
  CategoryAxis domainAxis=plot.getDomainAxis();
  ValueAxis valueAxis=plot.getRangeAxis();
  font=new Font("String_Node_Str",Font.BOLD,BASE_ITEM_LABEL_SIZE);
  render.setBaseItemLabelFont(font);
  font=new Font("String_Node_Str",Font.BOLD,BASE_LABEL_SIZE);
  domainAxis.setLabelFont(font);
  valueAxis.setLabelFont(font);
  font=new Font("String_Node_Str",Font.PLAIN,BASE_TICK_LABEL_SIZE);
  domainAxis.setTickLabelFont(font);
  valueAxis.setTickLabelFont(font);
  font=new Font("String_Node_Str",Font.PLAIN,BASE_LEGEND_LABEL_SIZE);
  LegendTitle legend=chart.getLegend();
  if (legend != null) {
    legend.setItemFont(font);
  }
  font=new Font("String_Node_Str",Font.BOLD,BASE_TITLE_LABEL_SIZE);
  TextTitle title=chart.getTitle();
  if (title != null) {
    title.setFont(font);
  }
  font=null;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "decorateCategoryPlot".
 * @param chart
 */
public static void decorateCategoryPlot(JFreeChart chart){
  Font font=null;
  CategoryPlot plot=chart.getCategoryPlot();
  CategoryItemRenderer render=plot.getRenderer();
  CategoryAxis domainAxis=plot.getDomainAxis();
  ValueAxis valueAxis=plot.getRangeAxis();
  font=new Font("String_Node_Str",Font.BOLD,BASE_ITEM_LABEL_SIZE);
  render.setBaseItemLabelFont(font);
  font=new Font("String_Node_Str",Font.BOLD,BASE_LABEL_SIZE);
  domainAxis.setLabelFont(font);
  valueAxis.setLabelFont(font);
  font=new Font("String_Node_Str",Font.PLAIN,BASE_TICK_LABEL_SIZE);
  domainAxis.setTickLabelFont(font);
  valueAxis.setTickLabelFont(font);
  font=new Font("String_Node_Str",Font.PLAIN,BASE_LEGEND_LABEL_SIZE);
  LegendTitle legend=chart.getLegend();
  if (legend != null) {
    legend.setItemFont(font);
  }
  font=new Font("String_Node_Str",Font.BOLD,BASE_TITLE_LABEL_SIZE);
  TextTitle title=chart.getTitle();
  if (title != null) {
    title.setFont(font);
  }
  font=null;
}
Program: 139768
Project: 139768
Buggy source:
public static List<RevisionInfo> getRevisionList(String category,String version) throws Exception {
  StringBuffer url=new StringBuffer();
  url.append(REVISION_LIST_URL).append("String_Node_Str").append(category).append("String_Node_Str");
  String[] branch=getBranch(version);
  url.append(StringUtils.join(branch,"String_Node_Str"));
  String jsonContent=sendGetRequest(url.toString());
  System.out.println(url);
  return parseJsonObject(jsonContent,RevisionInfo.class);
}

Fixed version (ground truth):
public static List<RevisionInfo> getRevisionList(String category,String version) throws Exception {
  StringBuffer url=new StringBuffer();
  url.append(REVISION_LIST_URL).append("String_Node_Str").append(category).append("String_Node_Str");
  String[] branch=getBranch(version);
  if (branch != null) {
    url.append(StringUtils.join(branch,"String_Node_Str"));
    String jsonContent=sendGetRequest(url.toString());
    System.out.println(url);
    return parseJsonObject(jsonContent,RevisionInfo.class);
  }
  return Collections.EMPTY_LIST;
}
Program: 139769
Project: 139769
Buggy source:
@SuppressWarnings("String_Node_Str") public static String[] getBranch(String version){
  version=getMainVersion(version);
  if (versionMap.isEmpty()) {
    getVersionList();
  }
  Collection<String> branch=versionMap.getCollection(version);
  return branch.toArray(new String[branch.size()]);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static String[] getBranch(String version){
  version=getMainVersion(version);
  if (versionMap.isEmpty()) {
    getVersionList();
  }
  Collection<String> branch=versionMap.getCollection(version);
  return branch == null ? null : branch.toArray(new String[branch.size()]);
}