nus-yam/ex-repair huggingface dataset:
Program: 143001
Project: 143001
Buggy source:
public RankingModelImpl(){
  final ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  final AttributeController ac=Lookup.getDefault().lookup(AttributeController.class);
  pc.addWorkspaceListener(new WorkspaceListener(){
    public void initialize(    Workspace workspace){
    }
    public void select(    Workspace workspace){
      nodeColumnsResult=ac.getModel().getNodeTable().getLookup().lookupResult(AttributeColumn.class);
      edgeColumnsResult=ac.getModel().getEdgeTable().getLookup().lookupResult(AttributeColumn.class);
      nodeColumnsResult.addLookupListener(RankingModelImpl.this);
      edgeColumnsResult.addLookupListener(RankingModelImpl.this);
    }
    public void unselect(    Workspace workspace){
      nodeColumnsResult.removeLookupListener(RankingModelImpl.this);
      edgeColumnsResult.removeLookupListener(RankingModelImpl.this);
      nodeColumnsResult=null;
      edgeColumnsResult=null;
    }
    public void close(    Workspace workspace){
    }
    public void disable(){
    }
  }
);
}

Fixed version (ground truth):
public RankingModelImpl(){
  final ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  final AttributeController ac=Lookup.getDefault().lookup(AttributeController.class);
  pc.addWorkspaceListener(new WorkspaceListener(){
    public void initialize(    Workspace workspace){
    }
    public void select(    Workspace workspace){
      nodeColumnsResult=ac.getModel().getNodeTable().getLookup().lookupResult(AttributeColumn.class);
      edgeColumnsResult=ac.getModel().getEdgeTable().getLookup().lookupResult(AttributeColumn.class);
      nodeColumnsResult.addLookupListener(RankingModelImpl.this);
      edgeColumnsResult.addLookupListener(RankingModelImpl.this);
    }
    public void unselect(    Workspace workspace){
      nodeColumnsResult.removeLookupListener(RankingModelImpl.this);
      edgeColumnsResult.removeLookupListener(RankingModelImpl.this);
      nodeColumnsResult=null;
      edgeColumnsResult=null;
    }
    public void close(    Workspace workspace){
    }
    public void disable(){
    }
  }
);
  if (pc.getCurrentWorkspace() != null) {
    nodeColumnsResult=ac.getModel().getNodeTable().getLookup().lookupResult(AttributeColumn.class);
    edgeColumnsResult=ac.getModel().getEdgeTable().getLookup().lookupResult(AttributeColumn.class);
    nodeColumnsResult.addLookupListener(RankingModelImpl.this);
    edgeColumnsResult.addLookupListener(RankingModelImpl.this);
  }
}
Program: 143002
Project: 143002
Buggy source:
public ProjectControllerImpl(){
  longTaskExecutor=new LongTaskExecutor(true,"String_Node_Str");
  longTaskExecutor.setDefaultErrorHandler(new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      unlockProjectActions();
      Logger.getLogger("String_Node_Str").log(Level.WARNING,"String_Node_Str",t.getCause());
    }
  }
);
  longTaskExecutor.setLongTaskListener(new LongTaskListener(){
    public void taskFinished(    LongTask task){
      unlockProjectActions();
    }
  }
);
  listeners=new ArrayList<WorkspaceListener>();
  listeners.addAll(Lookup.getDefault().lookupAll(WorkspaceListener.class));
  saveProject=false;
  saveAsProject=false;
  projectProperties=false;
  closeProject=false;
  newWorkspace=false;
  deleteWorkspace=false;
  cleanWorkspace=false;
  duplicateWorkspace=false;
}

Fixed version (ground truth):
public ProjectControllerImpl(){
  longTaskExecutor=new LongTaskExecutor(true,"String_Node_Str");
  longTaskExecutor.setDefaultErrorHandler(new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      unlockProjectActions();
      if (t instanceof GephiFormatException && t.getCause() == null) {
        NotifyDescriptor.Message msg=new NotifyDescriptor.Message(t.getMessage(),NotifyDescriptor.WARNING_MESSAGE);
        DialogDisplayer.getDefault().notify(msg);
      }
      Logger.getLogger("String_Node_Str").log(Level.WARNING,"String_Node_Str",t.getCause());
    }
  }
);
  longTaskExecutor.setLongTaskListener(new LongTaskListener(){
    public void taskFinished(    LongTask task){
      unlockProjectActions();
    }
  }
);
  listeners=new ArrayList<WorkspaceListener>();
  listeners.addAll(Lookup.getDefault().lookupAll(WorkspaceListener.class));
  saveProject=false;
  saveAsProject=false;
  projectProperties=false;
  closeProject=false;
  newWorkspace=false;
  deleteWorkspace=false;
  cleanWorkspace=false;
  duplicateWorkspace=false;
}
Program: 143003
Project: 143003
Buggy source:
public void fatalError(Throwable t){
  unlockProjectActions();
  Logger.getLogger("String_Node_Str").log(Level.WARNING,"String_Node_Str",t.getCause());
}

Fixed version (ground truth):
public void fatalError(Throwable t){
  unlockProjectActions();
  if (t instanceof GephiFormatException && t.getCause() == null) {
    NotifyDescriptor.Message msg=new NotifyDescriptor.Message(t.getMessage(),NotifyDescriptor.WARNING_MESSAGE);
    DialogDisplayer.getDefault().notify(msg);
  }
  Logger.getLogger("String_Node_Str").log(Level.WARNING,"String_Node_Str",t.getCause());
}
Program: 143006
Project: 143006
Buggy source:
/** 
 * Set the default error handler. Use error handlers to get errors and exceptions thrown during tasks execution.
 * @param errorHandler the default error handler
 */
public void setDefaultErrorHandler(LongTaskErrorHandler errorHandler){
  if (errorHandler != null) {
    this.errorHandler=errorHandler;
  }
}

Fixed version (ground truth):
/** 
 * Set the default error handler. Use error handlers to get errors and exceptions thrown during tasks execution.
 * @param errorHandler the default error handler
 */
public void setDefaultErrorHandler(LongTaskErrorHandler errorHandler){
  if (errorHandler != null) {
    this.defaultErrorHandler=errorHandler;
  }
}
Program: 143007
Project: 143007
Buggy source:
public boolean canFree(){
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    if (nodeData.isFixed()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean canFree(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    if (nodeData.isFixed()) {
      return true;
    }
  }
  return false;
}
Program: 143008
Project: 143008
Buggy source:
public boolean canSettle(){
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    if (!nodeData.isFixed()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean canSettle(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    if (!nodeData.isFixed()) {
      return true;
    }
  }
  return false;
}
Program: 143009
Project: 143009
Buggy source:
public boolean canUngroup(){
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}

Fixed version (ground truth):
public boolean canUngroup(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}
Program: 143010
Project: 143010
Buggy source:
public boolean canGroup(){
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}

Fixed version (ground truth):
public boolean canGroup(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}
Program: 143011
Project: 143011
Buggy source:
public boolean canExpand(){
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    Node node=nodeData.getNode(graph.getView().getViewId());
    if (graph.getDescendantCount(node) > 0) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean canExpand(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    Node node=nodeData.getNode(graph.getView().getViewId());
    if (graph.getDescendantCount(node) > 0) {
      return true;
    }
  }
  return false;
}
Program: 143012
Project: 143012
Buggy source:
public boolean canDelete(){
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}

Fixed version (ground truth):
public boolean canDelete(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  return selectedNodeModels.length >= 1;
}
Program: 143013
Project: 143013
Buggy source:
public boolean canContract(){
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    Node node=nodeData.getNode(graph.getView().getViewId());
    if (graph.getParent(node) != null) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean canContract(){
  GraphModel graphModel=graphController.getModel();
  if (graphModel == null) {
    return false;
  }
  this.graph=graphController.getModel().getHierarchicalGraphVisible();
  ModelImpl[] selectedNodeModels=engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
  for (  ModelImpl metaModelImpl : selectedNodeModels) {
    NodeData nodeData=(NodeData)metaModelImpl.getObj();
    Node node=nodeData.getNode(graph.getView().getViewId());
    if (graph.getParent(node) != null) {
      return true;
    }
  }
  return false;
}
Program: 143014
Project: 143014
Buggy source:
public void actionPerformed(ActionEvent e){
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  pc.closeCurrentProject();
  DialogFileFilter filter=new DialogFileFilter(NbBundle.getMessage(OpenProject.class,"String_Node_Str"));
  filter.addExtension("String_Node_Str");
  String lastPathDefault=NbPreferences.forModule(OpenProject.class).get(LAST_PATH_DEFAULT,null);
  String lastPath=NbPreferences.forModule(OpenProject.class).get(LAST_PATH,lastPathDefault);
  final JFileChooser chooser=new JFileChooser(lastPath);
  chooser.addChoosableFileFilter(filter);
  int returnFile=chooser.showOpenDialog(null);
  if (returnFile == JFileChooser.APPROVE_OPTION) {
    File file=chooser.getSelectedFile();
    file=FileUtil.normalizeFile(file);
    FileObject fileObject=FileUtil.toFileObject(file);
    NbPreferences.forModule(OpenProject.class).put(LAST_PATH,file.getAbsolutePath());
    try {
      DataObject doe=DataObject.find(fileObject);
      pc.loadProject(doe);
    }
 catch (    Exception ew) {
      Exceptions.printStackTrace(ew);
    }
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  if (!pc.closeCurrentProject()) {
    return;
  }
  DialogFileFilter filter=new DialogFileFilter(NbBundle.getMessage(OpenProject.class,"String_Node_Str"));
  filter.addExtension("String_Node_Str");
  String lastPathDefault=NbPreferences.forModule(OpenProject.class).get(LAST_PATH_DEFAULT,null);
  String lastPath=NbPreferences.forModule(OpenProject.class).get(LAST_PATH,lastPathDefault);
  final JFileChooser chooser=new JFileChooser(lastPath);
  chooser.addChoosableFileFilter(filter);
  int returnFile=chooser.showOpenDialog(null);
  if (returnFile == JFileChooser.APPROVE_OPTION) {
    File file=chooser.getSelectedFile();
    file=FileUtil.normalizeFile(file);
    FileObject fileObject=FileUtil.toFileObject(file);
    NbPreferences.forModule(OpenProject.class).put(LAST_PATH,file.getAbsolutePath());
    try {
      DataObject doe=DataObject.find(fileObject);
      pc.loadProject(doe);
    }
 catch (    Exception ew) {
      Exceptions.printStackTrace(ew);
    }
  }
}
Program: 143015
Project: 143015
Buggy source:
public void closeCurrentProject();

Fixed version (ground truth):
public boolean closeCurrentProject();
Program: 143016
Project: 143016
Buggy source:
public void newProject(){
  closeCurrentProject();
  ProjectImpl project=new ProjectImpl();
  projects.addProject(project);
  openProject(project);
}

Fixed version (ground truth):
public void newProject(){
  if (closeCurrentProject()) {
    ProjectImpl project=new ProjectImpl();
    projects.addProject(project);
    openProject(project);
  }
}
Program: 143017
Project: 143017
Buggy source:
public void removeProject(Project project){
  if (projects.getCurrentProject() == project) {
    closeCurrentProject();
  }
  projects.removeProject(project);
}

Fixed version (ground truth):
public void removeProject(Project project){
  if (projects.getCurrentProject() == project) {
    if (!closeCurrentProject()) {
      return;
    }
  }
  projects.removeProject(project);
}
Program: 143020
Project: 143020
Buggy source:
public void actionPerformed(ActionEvent e){
  if (!topComponent.isOpened()) {
    topComponent.open();
    topComponent.requestActive();
    button.setText("String_Node_Str");
  }
 else {
    topComponent.close();
    button.setText("String_Node_Str");
  }
  dynamicRangeFilter.refreshRange();
  TimelineController timelineController=Lookup.getDefault().lookup(TimelineController.class);
  timelineController.getModel().setFilterProperty(dynamicRangeFilter.getRangeProperty());
  timelineController.setMin(dynamicRangeFilter.getMinimum());
  timelineController.setMax(dynamicRangeFilter.getMaximum());
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if (!topComponent.isOpened()) {
    topComponent.open();
    topComponent.requestActive();
    button.setText("String_Node_Str");
    dynamicRangeFilter.refreshRange();
    TimelineController timelineController=Lookup.getDefault().lookup(TimelineController.class);
    timelineController.getModel().setFilterProperty(dynamicRangeFilter.getRangeProperty());
    timelineController.setMin(dynamicRangeFilter.getMinimum());
    timelineController.setMax(dynamicRangeFilter.getMaximum());
  }
 else {
    topComponent.close();
    button.setText("String_Node_Str");
  }
}
Program: 143021
Project: 143021
Buggy source:
public JPanel getPanel(Filter filter){
  final DynamicRangeFilter dynamicRangeFilter=(DynamicRangeFilter)filter;
  JPanel panel=new JPanel();
  final TopComponent topComponent=WindowManager.getDefault().findTopComponent("String_Node_Str");
  final JButton button=new JButton(topComponent.isOpened() ? "String_Node_Str" : "String_Node_Str");
  button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (!topComponent.isOpened()) {
        topComponent.open();
        topComponent.requestActive();
        button.setText("String_Node_Str");
      }
 else {
        topComponent.close();
        button.setText("String_Node_Str");
      }
      dynamicRangeFilter.refreshRange();
      TimelineController timelineController=Lookup.getDefault().lookup(TimelineController.class);
      timelineController.getModel().setFilterProperty(dynamicRangeFilter.getRangeProperty());
      timelineController.setMin(dynamicRangeFilter.getMinimum());
      timelineController.setMax(dynamicRangeFilter.getMaximum());
    }
  }
);
  panel.add(button);
  return panel;
}

Fixed version (ground truth):
public JPanel getPanel(Filter filter){
  final DynamicRangeFilter dynamicRangeFilter=(DynamicRangeFilter)filter;
  JPanel panel=new JPanel();
  final TopComponent topComponent=WindowManager.getDefault().findTopComponent("String_Node_Str");
  final JButton button=new JButton(topComponent.isOpened() ? "String_Node_Str" : "String_Node_Str");
  if (topComponent.isOpened()) {
    dynamicRangeFilter.refreshRange();
    TimelineController timelineController=Lookup.getDefault().lookup(TimelineController.class);
    timelineController.getModel().setFilterProperty(dynamicRangeFilter.getRangeProperty());
    timelineController.setMin(dynamicRangeFilter.getMinimum());
    timelineController.setMax(dynamicRangeFilter.getMaximum());
  }
  button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (!topComponent.isOpened()) {
        topComponent.open();
        topComponent.requestActive();
        button.setText("String_Node_Str");
        dynamicRangeFilter.refreshRange();
        TimelineController timelineController=Lookup.getDefault().lookup(TimelineController.class);
        timelineController.getModel().setFilterProperty(dynamicRangeFilter.getRangeProperty());
        timelineController.setMin(dynamicRangeFilter.getMinimum());
        timelineController.setMax(dynamicRangeFilter.getMaximum());
      }
 else {
        topComponent.close();
        button.setText("String_Node_Str");
      }
    }
  }
);
  panel.add(button);
  return panel;
}
Program: 143023
Project: 143023
Buggy source:
public void refreshModel(FilterModel filterModel,FilterUIModel uiModel){
  this.filterModel=filterModel;
  this.uiModel=uiModel;
  unsetup();
  filterPanelPanel.unsetup();
  queriesExplorer.unsetup();
  setup();
  ((FiltersExplorer)libraryTree).setup(manager,filterModel,uiModel);
  queriesExplorer.setup(queriesPanel.manager,filterModel,uiModel);
  filterPanelPanel.setup(uiModel);
  updateEnabled(filterModel != null);
}

Fixed version (ground truth):
public void refreshModel(FilterModel filterModel,FilterUIModel uiModel){
  this.filterModel=filterModel;
  this.uiModel=uiModel;
  unsetup();
  filterPanelPanel.unsetup();
  queriesExplorer.unsetup();
  setup();
  ((FiltersExplorer)libraryTree).setup(manager,filterModel,uiModel);
  queriesExplorer.setup(queriesPanel.manager,filterModel,uiModel);
  filterPanelPanel.setup(uiModel);
  updateEnabled(filterModel != null);
  updateControls();
}
Program: 143024
Project: 143024
Buggy source:
public void run(){
  filterButton.setSelected(filterModel.isFiltering());
  selectButton.setSelected(filterModel.isSelecting());
  updateEnabled(true);
}

Fixed version (ground truth):
public void run(){
  if (filterModel != null) {
    filterButton.setSelected(filterModel.isFiltering());
    selectButton.setSelected(filterModel.isSelecting());
  }
 else {
    filterButton.setSelected(false);
    selectButton.setSelected(false);
  }
}
Program: 143025
Project: 143025
Buggy source:
public void stateChanged(ChangeEvent e){
  if (e.getSource() instanceof FilterUIModel) {
    if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.filter(uiModel.getSelectedRoot());
    }
 else     if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.select(uiModel.getSelectedRoot());
    }
  }
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      filterButton.setSelected(filterModel.isFiltering());
      selectButton.setSelected(filterModel.isSelecting());
      updateEnabled(true);
    }
  }
);
}

Fixed version (ground truth):
public void stateChanged(ChangeEvent e){
  if (e.getSource() instanceof FilterUIModel) {
    if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.filter(uiModel.getSelectedRoot());
    }
 else     if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.select(uiModel.getSelectedRoot());
    }
  }
  updateControls();
  updateEnabled(true);
}
Program: 143026
Project: 143026
Buggy source:
public EqualBooleanFilter getFilter(){
  EqualBooleanFilter f=new EqualBooleanFilter();
  f.setColumn(column);
  return f;
}

Fixed version (ground truth):
public EqualBooleanFilter getFilter(){
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    NodeEqualBooleanFilter f=new NodeEqualBooleanFilter();
    f.setColumn(column);
    return f;
  }
 else {
    EdgeEqualBooleanFilter f=new EdgeEqualBooleanFilter();
    f.setColumn(column);
    return f;
  }
}
Program: 143027
Project: 143027
Buggy source:
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  AttributeColumn[] columns=am.getNodeTable().getColumns();
  for (  AttributeColumn c : columns) {
    if (AttributeUtils.getDefault().isStringColumn(c)) {
      EqualStringFilterBuilder b=new EqualStringFilterBuilder(c);
      builders.add(b);
    }
 else     if (AttributeUtils.getDefault().isNumberColumn(c)) {
      EqualNumberFilterBuilder b=new EqualNumberFilterBuilder(c);
      builders.add(b);
    }
 else     if (c.getType().equals(AttributeType.BOOLEAN)) {
      EqualBooleanFilterBuilder b=new EqualBooleanFilterBuilder(c);
      builders.add(b);
    }
  }
  return builders.toArray(new FilterBuilder[0]);
}

Fixed version (ground truth):
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  for (  AttributeColumn c : am.getNodeTable().getColumns()) {
    if (AttributeUtils.getDefault().isStringColumn(c)) {
      EqualStringFilterBuilder b=new EqualStringFilterBuilder(c);
      builders.add(b);
    }
 else     if (AttributeUtils.getDefault().isNumberColumn(c)) {
      EqualNumberFilterBuilder b=new EqualNumberFilterBuilder(c);
      builders.add(b);
    }
 else     if (c.getType().equals(AttributeType.BOOLEAN)) {
      EqualBooleanFilterBuilder b=new EqualBooleanFilterBuilder(c);
      builders.add(b);
    }
  }
  for (  AttributeColumn c : am.getEdgeTable().getColumns()) {
    if (AttributeUtils.getDefault().isStringColumn(c)) {
      EqualStringFilterBuilder b=new EqualStringFilterBuilder(c);
      builders.add(b);
    }
 else     if (AttributeUtils.getDefault().isNumberColumn(c)) {
      EqualNumberFilterBuilder b=new EqualNumberFilterBuilder(c);
      builders.add(b);
    }
 else     if (c.getType().equals(AttributeType.BOOLEAN)) {
      EqualBooleanFilterBuilder b=new EqualBooleanFilterBuilder(c);
      builders.add(b);
    }
  }
  return builders.toArray(new FilterBuilder[0]);
}
Program: 143028
Project: 143028
Buggy source:
public AttributeNonNullFilter getFilter(){
  AttributeNonNullFilter f=new AttributeNonNullFilter();
  f.setColumn(column);
  return f;
}

Fixed version (ground truth):
public AttributeNonNullFilter getFilter(){
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    NodeAttributeNonNullFilter f=new NodeAttributeNonNullFilter();
    f.setColumn(column);
    return f;
  }
 else {
    EdgeAttributeNonNullFilter f=new EdgeAttributeNonNullFilter();
    f.setColumn(column);
    return f;
  }
}
Program: 143029
Project: 143029
Buggy source:
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  AttributeColumn[] columns=am.getNodeTable().getColumns();
  for (  AttributeColumn c : columns) {
    AttributeNonNullFilterBuilder b=new AttributeNonNullFilterBuilder(c);
    builders.add(b);
  }
  return builders.toArray(new FilterBuilder[0]);
}

Fixed version (ground truth):
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  for (  AttributeColumn c : am.getNodeTable().getColumns()) {
    AttributeNonNullFilterBuilder b=new AttributeNonNullFilterBuilder(c);
    builders.add(b);
  }
  for (  AttributeColumn c : am.getEdgeTable().getColumns()) {
    AttributeNonNullFilterBuilder b=new AttributeNonNullFilterBuilder(c);
    builders.add(b);
  }
  return builders.toArray(new FilterBuilder[0]);
}
Program: 143030
Project: 143030
Buggy source:
public AttributeRangelFilter getFilter(){
  AttributeRangelFilter f=new AttributeRangelFilter(column);
  return f;
}

Fixed version (ground truth):
public AttributeRangeFilter getFilter(){
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    return new NodeAttributeRangeFilter(column);
  }
 else {
    return new EdgeAttributeRangeFilter(column);
  }
}
Program: 143031
Project: 143031
Buggy source:
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  AttributeColumn[] columns=am.getNodeTable().getColumns();
  for (  AttributeColumn c : columns) {
    if (AttributeUtils.getDefault().isNumberColumn(c)) {
      AttributeRangeFilterBuilder b=new AttributeRangeFilterBuilder(c);
      builders.add(b);
    }
  }
  return builders.toArray(new FilterBuilder[0]);
}

Fixed version (ground truth):
public FilterBuilder[] getBuilders(){
  List<FilterBuilder> builders=new ArrayList<FilterBuilder>();
  AttributeModel am=Lookup.getDefault().lookup(AttributeController.class).getModel();
  for (  AttributeColumn c : am.getNodeTable().getColumns()) {
    if (AttributeUtils.getDefault().isNumberColumn(c)) {
      AttributeRangeFilterBuilder b=new AttributeRangeFilterBuilder(c);
      builders.add(b);
    }
  }
  for (  AttributeColumn c : am.getEdgeTable().getColumns()) {
    if (AttributeUtils.getDefault().isNumberColumn(c)) {
      AttributeRangeFilterBuilder b=new AttributeRangeFilterBuilder(c);
      builders.add(b);
    }
  }
  return builders.toArray(new FilterBuilder[0]);
}
Program: 143032
Project: 143032
Buggy source:
public JPanel getPanel(Filter filter){
  RangeUI ui=Lookup.getDefault().lookup(RangeUI.class);
  if (ui != null) {
    return ui.getPanel((AttributeRangelFilter)filter);
  }
  return null;
}

Fixed version (ground truth):
public JPanel getPanel(Filter filter){
  RangeUI ui=Lookup.getDefault().lookup(RangeUI.class);
  if (ui != null) {
    return ui.getPanel((AttributeRangeFilter)filter);
  }
  return null;
}
Program: 143033
Project: 143033
Buggy source:
public PartitionFilter getFilter(){
  return new PartitionFilter(partition);
}

Fixed version (ground truth):
public PartitionFilter getFilter(){
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    return new NodePartitionFilter(partition);
  }
 else {
    return new EdgePartitionFilter(partition);
  }
}
Program: 143034
Project: 143034
Buggy source:
public PartitionCountFilter getFilter(){
  return new PartitionCountFilter(partition);
}

Fixed version (ground truth):
public PartitionCountFilter getFilter(){
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    return new NodePartitionCountFilter(partition);
  }
 else {
    return new EdgePartitionCountFilter(partition);
  }
}
Program: 143035
Project: 143035
Buggy source:
public FilterControllerImpl(){
  PropertyEditorManager.registerEditor(Range.class,RangePropertyEditor.class);
  PropertyEditorManager.registerEditor(AttributeColumn.class,AttributeColumnPropertyEditor.class);
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  pc.addWorkspaceListener(new WorkspaceListener(){
    public void initialize(    Workspace workspace){
      workspace.add(new FilterModelImpl());
    }
    public void select(    Workspace workspace){
      model=(FilterModelImpl)workspace.getLookup().lookup(FilterModel.class);
      if (model == null) {
        model=new FilterModelImpl();
        workspace.add(model);
      }
    }
    public void unselect(    Workspace workspace){
    }
    public void close(    Workspace workspace){
    }
    public void disable(){
      GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
      if (model.getCurrentResult() != null) {
        graphModel.destroyView(model.getCurrentResult());
        model.setCurrentResult(null);
      }
      model=null;
    }
  }
);
  if (pc.getCurrentWorkspace() != null) {
    Workspace workspace=pc.getCurrentWorkspace();
    model=(FilterModelImpl)workspace.getLookup().lookup(FilterModel.class);
    if (model == null) {
      model=new FilterModelImpl();
      workspace.add(model);
    }
  }
}

Fixed version (ground truth):
public FilterControllerImpl(){
  PropertyEditorManager.registerEditor(Range.class,RangePropertyEditor.class);
  PropertyEditorManager.registerEditor(AttributeColumn.class,AttributeColumnPropertyEditor.class);
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  pc.addWorkspaceListener(new WorkspaceListener(){
    public void initialize(    Workspace workspace){
      workspace.add(new FilterModelImpl());
    }
    public void select(    Workspace workspace){
      model=(FilterModelImpl)workspace.getLookup().lookup(FilterModel.class);
      if (model == null) {
        model=new FilterModelImpl();
        workspace.add(model);
      }
    }
    public void unselect(    Workspace workspace){
    }
    public void close(    Workspace workspace){
    }
    public void disable(){
      GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
      if (model.getCurrentResult() != null && graphModel != null) {
        graphModel.destroyView(model.getCurrentResult());
        model.setCurrentResult(null);
      }
      model=null;
    }
  }
);
  if (pc.getCurrentWorkspace() != null) {
    Workspace workspace=pc.getCurrentWorkspace();
    model=(FilterModelImpl)workspace.getLookup().lookup(FilterModel.class);
    if (model == null) {
      model=new FilterModelImpl();
      workspace.add(model);
    }
  }
}
Program: 143036
Project: 143036
Buggy source:
public void disable(){
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  if (model.getCurrentResult() != null) {
    graphModel.destroyView(model.getCurrentResult());
    model.setCurrentResult(null);
  }
  model=null;
}

Fixed version (ground truth):
public void disable(){
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  if (model.getCurrentResult() != null && graphModel != null) {
    graphModel.destroyView(model.getCurrentResult());
    model.setCurrentResult(null);
  }
  model=null;
}
Program: 143037
Project: 143037
Buggy source:
public void computeMetaEdges(AbstractNode node,AbstractNode enabledAncestor){
  if (!dhns.getSettingsManager().isAutoMetaEdgeCreation()) {
    return;
  }
  if (enabledAncestor == null) {
    enabledAncestor=node;
  }
  int clusterEnd=node.getPre() + node.size;
  for (int i=node.pre; i <= clusterEnd; i++) {
    AbstractNode desc=treeStructure.getNodeAt(i);
    if (desc.getEdgesOutTree().getCount() > 0) {
      edgeIterator.setNode(desc.getEdgesOutTree());
      while (edgeIterator.hasNext()) {
        AbstractEdge edge=edgeIterator.next();
        AbstractNode[] enabledAncestors=treeStructure.getEnabledAncestorsOrSelf(edge.getTarget(viewId));
        if (enabledAncestors != null) {
          for (int j=0; j < enabledAncestors.length; j++) {
            AbstractNode targetNode=enabledAncestors[j];
            if (!(targetNode == edge.getTarget(viewId) && enabledAncestor == edge.getSource(viewId))) {
              createMetaEdge(enabledAncestor,targetNode,edge);
            }
          }
        }
      }
    }
    if (desc.getEdgesInTree().getCount() > 0) {
      edgeIterator.setNode(desc.getEdgesInTree());
      while (edgeIterator.hasNext()) {
        AbstractEdge edge=edgeIterator.next();
        AbstractNode[] enabledAncestors=treeStructure.getEnabledAncestorsOrSelf(edge.getSource(viewId));
        if (enabledAncestors != null) {
          for (int j=0; j < enabledAncestors.length; j++) {
            AbstractNode sourceNode=enabledAncestors[j];
            if (!(sourceNode == edge.getSource(viewId) && enabledAncestor == edge.getTarget(viewId))) {
              createMetaEdge(sourceNode,enabledAncestor,edge);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void computeMetaEdges(){
  for (TreeIterator itr=new TreeIterator(treeStructure,true,Tautology.instance); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    computeMetaEdges(node,node);
  }
}
Program: 143038
Project: 143038
Buggy source:
public void readEdges(Element edgesE,GraphStructure graphStructure,GraphFactoryImpl factory){
  NodeList edgesListE=edgesE.getChildNodes();
  TreeStructure treeStructure=graphStructure.getMainView().getStructure();
  for (int i=0; i < edgesListE.getLength(); i++) {
    if (edgesListE.item(i).getNodeType() == Node.ELEMENT_NODE) {
      Element edgeE=(Element)edgesListE.item(i);
      Integer id=Integer.parseInt(edgeE.getAttribute("String_Node_Str"));
      AbstractNode source=treeStructure.getNodeAt(Integer.parseInt(edgeE.getAttribute("String_Node_Str")));
      AbstractNode target=treeStructure.getNodeAt(Integer.parseInt(edgeE.getAttribute("String_Node_Str")));
      AbstractEdge edge;
      if (edgeE.getTagName().equals(ELEMENT_EDGES_PROPER)) {
        edge=new ProperEdgeImpl(id,source,target);
      }
 else       if (edgeE.getTagName().equals(ELEMENT_EDGES_MIXED)) {
        edge=new MixedEdgeImpl(id,source,target,Boolean.parseBoolean(edgeE.getAttribute("String_Node_Str")));
      }
 else {
        edge=new SelfLoopImpl(id,source);
      }
      edge.setWeight(Float.parseFloat(edgeE.getAttribute("String_Node_Str")));
      edge.getEdgeData().setAttributes(factory.newEdgeAttributes());
      edge.getEdgeData().setTextData(factory.newTextData());
      source.getEdgesOutTree().add(edge);
      target.getEdgesInTree().add(edge);
      graphStructure.getEdgeDictionnary().add(edge);
    }
  }
}

Fixed version (ground truth):
public void readEdges(Element edgesE,GraphStructure graphStructure,GraphFactoryImpl factory){
  NodeList edgesListE=edgesE.getChildNodes();
  TreeStructure treeStructure=graphStructure.getMainView().getStructure();
  for (int i=0; i < edgesListE.getLength(); i++) {
    if (edgesListE.item(i).getNodeType() == Node.ELEMENT_NODE) {
      Element edgeE=(Element)edgesListE.item(i);
      Integer id=Integer.parseInt(edgeE.getAttribute("String_Node_Str"));
      AbstractNode source=treeStructure.getNodeAt(Integer.parseInt(edgeE.getAttribute("String_Node_Str")));
      AbstractNode target=treeStructure.getNodeAt(Integer.parseInt(edgeE.getAttribute("String_Node_Str")));
      AbstractEdge edge;
      if (edgeE.getTagName().equals(ELEMENT_EDGES_PROPER)) {
        edge=new ProperEdgeImpl(id,source,target);
      }
 else       if (edgeE.getTagName().equals(ELEMENT_EDGES_MIXED)) {
        edge=new MixedEdgeImpl(id,source,target,Boolean.parseBoolean(edgeE.getAttribute("String_Node_Str")));
      }
 else {
        edge=new SelfLoopImpl(id,source);
      }
      edge.setWeight(Float.parseFloat(edgeE.getAttribute("String_Node_Str")));
      edge.getEdgeData().setAttributes(factory.newEdgeAttributes());
      edge.getEdgeData().setTextData(factory.newTextData());
      source.getEdgesOutTree().add(edge);
      target.getEdgesInTree().add(edge);
      graphStructure.getEdgeDictionnary().add(edge);
    }
  }
  graphStructure.getMainView().getStructureModifier().getEdgeProcessor().computeMetaEdges();
}
Program: 143040
Project: 143040
Buggy source:
/** 
 * Refresh the preview applet.
 */
public void refreshPreview(){
  System.out.println("String_Node_Str" + sketch);
  sketch.refresh();
}

Fixed version (ground truth):
/** 
 * Refresh the preview applet.
 */
public void refreshPreview(){
  sketch.refresh();
}
Program: 143041
Project: 143041
Buggy source:
/** 
 * Retreives the workspace graph and builds a preview graph from it. For each build, the supervisors' lists of supervised elements are cleared because the previous preview graph is forgotten.
 * @see PreviewController#buildGraph()
 */
public void buildGraph(){
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  model.clearSupervisors();
  if (graphModel.isUndirected()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getUndirectedGraph());
  }
 else   if (graphModel.isDirected()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getDirectedGraph());
  }
 else   if (graphModel.isMixed()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getMixedGraph());
  }
  model.setUpdateFlag(true);
}

Fixed version (ground truth):
/** 
 * Retreives the workspace graph and builds a preview graph from it. For each build, the supervisors' lists of supervised elements are cleared because the previous preview graph is forgotten.
 * @see PreviewController#buildGraph()
 */
public void buildGraph(){
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  model.clearSupervisors();
  if (graphModel.isUndirected()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getUndirectedGraphVisible());
  }
 else   if (graphModel.isDirected()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getDirectedGraphVisible());
  }
 else   if (graphModel.isMixed()) {
    previewGraph=factory.createPreviewGraph(model,graphModel.getMixedGraphVisible());
  }
  model.setUpdateFlag(true);
}
Program: 143044
Project: 143044
Buggy source:
public void setMax(double max){
  if (model != null) {
    model.setMaxValue(max);
  }
}

Fixed version (ground truth):
public void setMax(double max){
  if (model != null && max > model.getMaxValue()) {
    model.setMaxValue(max);
  }
}
Program: 143045
Project: 143045
Buggy source:
public void setMin(double min){
  if (model != null) {
    model.setMinValue(min);
  }
}

Fixed version (ground truth):
public void setMin(double min){
  if (model != null && min < model.getMinValue()) {
    model.setMinValue(min);
  }
}
Program: 143046
Project: 143046
Buggy source:
public void pushSlice(Workspace workspace,String from,String to,Edge edge){
  AttributeModel am=workspace.getLookup().lookup(AttributeModel.class);
  AttributeColumn col=null;
  if (am.getEdgeTable().hasColumn(COLUMN_KEY)) {
    col=am.getEdgeTable().getColumn(COLUMN_KEY);
  }
 else {
    col=am.getEdgeTable().addColumn(COLUMN_KEY,COLUMN_TYPE);
  }
  DateFormat formatter=new SimpleDateFormat(DATE_FORMAT);
  double f=Double.NEGATIVE_INFINITY, t=Double.POSITIVE_INFINITY;
  try {
    if (from != null && !from.isEmpty())     f=((Date)formatter.parse(from)).getTime();
    if (to != null && !to.isEmpty())     t=((Date)formatter.parse(to)).getTime();
    if (model.getUnit() == null) {
      model.setUnit(DateTime.class);
    }
  }
 catch (  ParseException ex) {
    try {
      if (from != null)       f=Double.parseDouble(from);
      if (to != null)       t=Double.parseDouble(to);
      if (model.getUnit() == null) {
        model.setUnit(Double.class);
      }
    }
 catch (    NumberFormatException ex2) {
      Exceptions.printStackTrace(ex);
    }
  }
  edge.getEdgeData().getAttributes().setValue(col.getIndex(),new TimeInterval(f,t));
}

Fixed version (ground truth):
public void pushSlice(Workspace workspace,String from,String to,Edge edge){
  pushSlice(workspace,from,to,(Object)edge);
}
Program: 143047
Project: 143047
Buggy source:
public void mouseDragged(MouseEvent evt){
  if (model == null) {
    return;
  }
  currentMousePositionX=evt.getX();
  int x=currentMousePositionX;
  double w=getWidth();
  if (x > (int)w)   x=(int)w;
  if (x < 0)   x=0;
  int r=settings.selection.visibleHookWidth;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
  double delta=0;
  if (latestMousePositionX != null) {
    delta=x - latestMousePositionX;
  }
  latestMousePositionX=x;
switch (currentState) {
case RESIZE_FROM:
    if ((sf + delta <= 0)) {
      sf=0;
    }
 else     if (Math.abs(st - sf + delta) > settings.selection.minimalWidth) {
      sf+=delta;
    }
 else {
    }
  break;
case RESIZE_TO:
if ((st + delta >= w)) {
  st=w;
}
 else if (Math.abs((st + delta) - sf) > settings.selection.minimalWidth) {
  st+=delta;
}
break;
case MOVING:
if ((sf + delta <= 0)) {
sf=0;
}
 else if (st + delta >= w) {
st=w;
}
 else {
sf+=delta;
st+=delta;
}
break;
}
if (w != 0) {
newfrom=sf * (1.0 / w);
newto=st * (1.0 / w);
}
this.repaint();
}

Fixed version (ground truth):
public void mouseDragged(MouseEvent evt){
  if (model == null) {
    return;
  }
  double w=getWidth();
  currentMousePositionX=evt.getX();
  if (currentMousePositionX > (int)w) {
    currentMousePositionX=(int)w;
  }
  if (currentMousePositionX < 0) {
    currentMousePositionX=0;
  }
  int x=currentMousePositionX;
  int r=settings.selection.visibleHookWidth;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
  double delta=0;
  if (latestMousePositionX != null) {
    delta=x - latestMousePositionX;
  }
  latestMousePositionX=x;
switch (currentState) {
case RESIZE_FROM:
    if ((sf + delta <= 0)) {
      sf=0;
    }
 else     if (Math.abs(st - sf + delta) > settings.selection.minimalWidth) {
      sf+=delta;
    }
 else {
    }
  break;
case RESIZE_TO:
if ((st + delta >= w)) {
  st=w;
}
 else if (Math.abs((st + delta) - sf) > settings.selection.minimalWidth) {
  st+=delta;
}
break;
case MOVING:
if ((sf + delta <= 0)) {
sf=0;
}
 else if (st + delta >= w) {
st=w;
}
 else {
sf+=delta;
st+=delta;
}
break;
}
if (w != 0) {
newfrom=sf * (1.0 / w);
newto=st * (1.0 / w);
}
this.repaint();
}
Program: 143049
Project: 143049
Buggy source:
public void setModel(TimelineModel model){
  if (model == null) {
    return;
  }
  if (model != this.model) {
    if (this.model != null) {
    }
    this.model=model;
    sf=model.getFromFloat() * (double)getWidth();
    st=model.getToFloat() * (double)getWidth();
  }
}

Fixed version (ground truth):
public void setModel(TimelineModel model){
  if (model == null) {
    return;
  }
  if (model != this.model) {
    if (this.model != null) {
    }
    this.model=model;
    sf=model.getFromFloat() * (double)getWidth();
    st=model.getToFloat() * (double)getWidth();
    repaint();
  }
}
Program: 143051
Project: 143051
Buggy source:
private void clean(){
  this.container=null;
  this.progressTicket=null;
  this.report=null;
  this.nodePropertiesAttributes=null;
  this.edgePropertiesAttributes=null;
  this.optionsAttributes=null;
  this.cancel=false;
  this.isDynamicMode=false;
  this.isDateTypeInteger=false;
  this.unknownParents=null;
}

Fixed version (ground truth):
private void clean(){
  this.container=null;
  this.progressTicket=null;
  this.report=null;
  this.nodePropertiesAttributes=null;
  this.edgePropertiesAttributes=null;
  this.optionsAttributes=null;
  this.cancel=false;
  this.isDynamicMode=false;
  this.isDateTypeFloat=false;
  this.unknownParents=null;
}
Program: 143053
Project: 143053
Buggy source:
private void refreshModelData(){
  if (consumerThread.getQueue().remainingCapacity() > 0) {
    consumerThread.execute(new Runnable(){
      public void run(){
        Graph visibleGraph=model.getGraphVisible();
        Graph fullGraph=model.getGraph();
        visibleGraph.readLock();
        fullGraph.readLock();
        final int nodesFull=fullGraph.getNodeCount();
        final int nodesVisible=visibleGraph.getNodeCount();
        final int edgesFull=fullGraph.getEdgeCount();
        final int edgesVisible=visibleGraph.getEdgeCount();
        final GraphType graphType=visibleGraph instanceof DirectedGraph ? GraphType.DIRECTED : visibleGraph instanceof UndirectedGraph ? GraphType.UNDIRECTED : GraphType.MIXED;
        fullGraph.readUnlock();
        visibleGraph.readUnlock();
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            String nodePerc=nodesFull > 0 ? "String_Node_Str" + formatter.format(nodesVisible / (double)nodesFull) + "String_Node_Str" : "String_Node_Str";
            String edgePerc=edgesFull > 0 ? "String_Node_Str" + formatter.format(edgesVisible / (double)edgesFull) + "String_Node_Str" : "String_Node_Str";
            nodeLabel.setText(String.valueOf(nodesVisible) + nodePerc);
            edgeLabel.setText(String.valueOf(edgesVisible) + edgePerc);
            graphTypeLabel.setText(graphType.type);
            double percentage=0.5 * nodesVisible / (double)nodesFull + 0.5 * edgesVisible / (double)edgesFull;
            pieChart.refreshChart(percentage);
          }
        }
);
      }
    }
);
  }
}

Fixed version (ground truth):
private void refreshModelData(){
  if (consumerThread.getQueue().remainingCapacity() > 0) {
    consumerThread.execute(new Runnable(){
      public void run(){
        Graph visibleGraph=model.getGraphVisible();
        Graph fullGraph=model.getGraph();
        final int nodesFull=fullGraph.getNodeCount();
        final int nodesVisible=visibleGraph.getNodeCount();
        final int edgesFull=fullGraph.getEdgeCount();
        final int edgesVisible=visibleGraph.getEdgeCount();
        final GraphType graphType=visibleGraph instanceof DirectedGraph ? GraphType.DIRECTED : visibleGraph instanceof UndirectedGraph ? GraphType.UNDIRECTED : GraphType.MIXED;
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            String nodePerc=nodesFull > 0 ? "String_Node_Str" + formatter.format(nodesVisible / (double)nodesFull) + "String_Node_Str" : "String_Node_Str";
            String edgePerc=edgesFull > 0 ? "String_Node_Str" + formatter.format(edgesVisible / (double)edgesFull) + "String_Node_Str" : "String_Node_Str";
            nodeLabel.setText(String.valueOf(nodesVisible) + nodePerc);
            edgeLabel.setText(String.valueOf(edgesVisible) + edgePerc);
            graphTypeLabel.setText(graphType.type);
            double percentage=0.5 * nodesVisible / (double)nodesFull + 0.5 * edgesVisible / (double)edgesFull;
            pieChart.refreshChart(percentage);
          }
        }
);
      }
    }
);
  }
}