nus-yam/ex-repair huggingface dataset:
Program: 190047
Project: 190047
Buggy source:
public static boolean isDynamicEdgePartitionColumn(AttributeColumn column,Graph graph,TimeInterval timeInterval,Estimator estimator){
  Set values=new HashSet();
  int nonNullvalues=0;
  for (  Edge n : graph.getEdges()) {
    Object value=n.getEdgeData().getAttributes().getValue(column.getIndex());
    value=getDynamicValue(value,timeInterval,estimator);
    if (value != null) {
      nonNullvalues++;
    }
    values.add(value);
  }
  if (values.size() < 9f / 10f * nonNullvalues) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isDynamicEdgePartitionColumn(AttributeColumn column,Graph graph,TimeInterval timeInterval,Estimator estimator){
  if (column.getType().isDynamicType() && !Number.class.isAssignableFrom(column.getType().getType())) {
    estimator=Estimator.FIRST;
  }
  Set values=new HashSet();
  int nonNullvalues=0;
  for (  Edge n : graph.getEdges()) {
    Object value=n.getEdgeData().getAttributes().getValue(column.getIndex());
    value=getDynamicValue(value,timeInterval,estimator);
    if (value != null) {
      nonNullvalues++;
    }
    values.add(value);
  }
  if (values.size() < 9f / 10f * nonNullvalues) {
    return true;
  }
  return false;
}
Program: 190048
Project: 190048
Buggy source:
private static Object getDynamicValue(Object object,TimeInterval timeInterval,Estimator estimator){
  if (object != null && object instanceof DynamicType) {
    DynamicType dynamicType=(DynamicType)object;
    return dynamicType.getValue(timeInterval == null ? Double.NEGATIVE_INFINITY : timeInterval.getLow(),timeInterval == null ? Double.POSITIVE_INFINITY : timeInterval.getHigh(),estimator);
  }
  return object;
}

Fixed version (ground truth):
private static Object getDynamicValue(Object object,TimeInterval timeInterval,Estimator estimator){
  if (object != null && object instanceof DynamicType) {
    DynamicType dynamicType=(DynamicType)object;
    if (!Number.class.isAssignableFrom(dynamicType.getUnderlyingType())) {
      estimator=Estimator.FIRST;
    }
    return dynamicType.getValue(timeInterval == null ? Double.NEGATIVE_INFINITY : timeInterval.getLow(),timeInterval == null ? Double.POSITIVE_INFINITY : timeInterval.getHigh(),estimator);
  }
  return object;
}
Program: 190049
Project: 190049
Buggy source:
public void deleteWorkspace(Workspace workspace){
  WorkspaceInformation wi=workspace.getLookup().lookup(WorkspaceInformation.class);
  WorkspaceProviderImpl workspaceProvider=wi.getProject().getLookup().lookup(WorkspaceProviderImpl.class);
  workspaceProvider.removeWorkspace(workspace);
  fireWorkspaceEvent(EventType.CLOSE,workspace);
  if (getCurrentWorkspace() == workspace) {
    Workspace toSelectWorkspace=workspaceProvider.getPrecedingWorkspace(workspace);
    if (toSelectWorkspace == null) {
      closeCurrentProject();
      return;
    }
 else {
      openWorkspace(toSelectWorkspace);
    }
  }
}

Fixed version (ground truth):
public void deleteWorkspace(Workspace workspace){
  WorkspaceInformation wi=workspace.getLookup().lookup(WorkspaceInformation.class);
  WorkspaceProviderImpl workspaceProvider=wi.getProject().getLookup().lookup(WorkspaceProviderImpl.class);
  Workspace toSelectWorkspace=null;
  if (getCurrentWorkspace() == workspace) {
    toSelectWorkspace=workspaceProvider.getPrecedingWorkspace(workspace);
  }
  workspaceProvider.removeWorkspace(workspace);
  fireWorkspaceEvent(EventType.CLOSE,workspace);
  if (getCurrentWorkspace() == workspace) {
    if (toSelectWorkspace == null) {
      closeCurrentProject();
    }
 else {
      openWorkspace(toSelectWorkspace);
    }
  }
}
Program: 190052
Project: 190052
Buggy source:
public void setTimeIntervalMax(String timeIntervalMax){
  try {
    this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
  }
 catch (  Exception ex) {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex2) {
    }
  }
  if (this.timeIntervalMax == null) {
    report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
  }
}

Fixed version (ground truth):
public void setTimeIntervalMax(String timeIntervalMax){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
}
Program: 190053
Project: 190053
Buggy source:
public void setTimeIntervalMin(String timeIntervalMin){
  try {
    this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
  }
 catch (  Exception ex) {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex2) {
    }
  }
  if (this.timeIntervalMin == null) {
    report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
  }
}

Fixed version (ground truth):
public void setTimeIntervalMin(String timeIntervalMin){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
}
Program: 190054
Project: 190054
Buggy source:
public void actionPerformed(ActionEvent e){
  for (  Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
    entry.setValue(Color.BLACK);
  }
  setup(partition,edgeColorTransformer);
  revalidate();
  repaint();
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  for (  Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
    entry.setValue(Color.BLACK);
  }
  setup(partition,edgeColorTransformer,false);
  revalidate();
  repaint();
}
Program: 190055
Project: 190055
Buggy source:
public void setup(Partition partition,Transformer transformer){
  removeAll();
  edgeColorTransformer=(EdgeColorTransformer)transformer;
  if (edgeColorTransformer.getMap().isEmpty()) {
    List<Color> colors=PaletteUtils.getSequenceColors(partition.getPartsCount());
    int i=0;
    for (    Part p : partition.getParts()) {
      edgeColorTransformer.getMap().put(p.getValue(),colors.get(i));
      i++;
    }
  }
  this.partition=partition;
  for (  final Part p : partition.getParts()) {
    JLabel partLabel=new JLabel(p.getDisplayName());
    add(partLabel);
    final ColorChooser colorChooser=new ColorChooser(edgeColorTransformer.getMap().get(p.getValue()));
    colorChooser.setPreferredSize(new Dimension(16,16));
    colorChooser.setMaximumSize(new Dimension(16,16));
    colorChooser.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        edgeColorTransformer.getMap().put(p.getValue(),colorChooser.getColor());
      }
    }
);
    add(colorChooser,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer,boolean color){
  removeAll();
  edgeColorTransformer=(EdgeColorTransformer)transformer;
  if (color) {
    List<Color> colors=PaletteUtils.getSequenceColors(partition.getPartsCount());
    int i=0;
    for (    Part p : partition.getParts()) {
      edgeColorTransformer.getMap().put(p.getValue(),colors.get(i));
      i++;
    }
  }
  this.partition=partition;
  for (  final Part p : partition.getParts()) {
    JLabel partLabel=new JLabel(p.getDisplayName());
    add(partLabel);
    final ColorChooser colorChooser=new ColorChooser(edgeColorTransformer.getMap().get(p.getValue()));
    colorChooser.setPreferredSize(new Dimension(16,16));
    colorChooser.setMaximumSize(new Dimension(16,16));
    colorChooser.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        edgeColorTransformer.getMap().put(p.getValue(),colorChooser.getColor());
      }
    }
);
    add(colorChooser,"String_Node_Str");
  }
}
Program: 190056
Project: 190056
Buggy source:
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(EdgeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      edgeColorTransformer.getMap().clear();
      setup(partition,edgeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,edgeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}

Fixed version (ground truth):
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(EdgeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.setIcon(ImageUtilities.loadImageIcon("String_Node_Str",false));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      edgeColorTransformer.getMap().clear();
      setup(partition,edgeColorTransformer,true);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,edgeColorTransformer,false);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}
Program: 190057
Project: 190057
Buggy source:
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer);
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer,true);
}
Program: 190058
Project: 190058
Buggy source:
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      nodeColorTransformer.getMap().clear();
      setup(partition,nodeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : nodeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,nodeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}

Fixed version (ground truth):
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.setIcon(ImageUtilities.loadImageIcon("String_Node_Str",false));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      nodeColorTransformer.getMap().clear();
      setup(partition,nodeColorTransformer,true);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : nodeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,nodeColorTransformer,false);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}
Program: 190060
Project: 190060
Buggy source:
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer);
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer,true);
}
Program: 190061
Project: 190061
Buggy source:
public void transform(Transformer transformer){
  AbstractTransformer abstractTransformer=(AbstractTransformer)transformer;
  Ranking ranking=abstractTransformer.getRanking();
  RankingResultImpl rankingResult=new RankingResultImpl();
  rankingResult.transformer=transformer;
  rankingResult.ranking=ranking;
  Graph graph=Lookup.getDefault().lookup(GraphController.class).getModel().getGraphVisible();
  if (ranking instanceof NodeRanking) {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Node node : graph.getNodes().toArray()) {
      Object rank=ranking.getValue(node);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(node,normalizedValue);
        }
      }
      rankingResult.addResult(node,rank,result);
    }
  }
 else {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Edge edge : graph.getEdges().toArray()) {
      Object rank=ranking.getValue(edge);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(edge,normalizedValue);
        }
      }
      rankingResult.addResult(edge,rank,result);
    }
  }
  rankingEventBus.publishResults(rankingResult);
}

Fixed version (ground truth):
public void transform(Transformer transformer){
  AbstractTransformer abstractTransformer=(AbstractTransformer)transformer;
  Ranking ranking=abstractTransformer.getRanking();
  RankingResultImpl rankingResult=new RankingResultImpl();
  rankingResult.transformer=transformer;
  rankingResult.ranking=ranking;
  Graph graph=Lookup.getDefault().lookup(GraphController.class).getModel().getGraphVisible();
  boolean refreshed=RankingFactory.refreshRanking((AbstractRanking)ranking,graph);
  if (ranking instanceof NodeRanking) {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Node node : graph.getNodes().toArray()) {
      Object rank=ranking.getValue(node);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(node,normalizedValue);
        }
      }
      rankingResult.addResult(node,rank,result);
    }
  }
 else {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Edge edge : graph.getEdges().toArray()) {
      Object rank=ranking.getValue(edge);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(edge,normalizedValue);
        }
      }
      rankingResult.addResult(edge,rank,result);
    }
  }
  rankingEventBus.publishResults(rankingResult);
  if (refreshed) {
    rankingModelImpl.fireChangeEvent();
  }
}
Program: 190062
Project: 190062
Buggy source:
private void fireChangeEvent(){
  ChangeEvent changeEvent=new ChangeEvent(this);
  for (  ChangeListener changeListener : listeners) {
    changeListener.stateChanged(changeEvent);
  }
}

Fixed version (ground truth):
public void fireChangeEvent(){
  ChangeEvent changeEvent=new ChangeEvent(this);
  for (  ChangeListener changeListener : listeners) {
    changeListener.stateChanged(changeEvent);
  }
}
Program: 190063
Project: 190063
Buggy source:
public FilterLibraryImpl(){
  content=new InstanceContent();
  lookup=new AbstractLookup(content);
  for (  FilterBuilder builder : Lookup.getDefault().lookupAll(FilterBuilder.class)) {
    content.add(builder);
  }
  for (  Query query : Lookup.getDefault().lookupAll(Query.class)) {
    content.add(query);
  }
  for (  CategoryBuilder catBuilder : Lookup.getDefault().lookupAll(CategoryBuilder.class)) {
    content.add(catBuilder);
  }
  content.add(new HierarchicalGraphMask());
  buildBuildersMap();
}

Fixed version (ground truth):
public FilterLibraryImpl(){
  content=new InstanceContent();
  lookup=new AbstractLookup(content);
  for (  FilterBuilder builder : Lookup.getDefault().lookupAll(FilterBuilder.class)) {
    content.add(builder);
  }
  for (  Query query : Lookup.getDefault().lookupAll(Query.class)) {
    content.add(query);
  }
  for (  CategoryBuilder catBuilder : Lookup.getDefault().lookupAll(CategoryBuilder.class)) {
    content.add(catBuilder);
  }
  content.add(new HierarchicalGraphMask());
}
Program: 190064
Project: 190064
Buggy source:
public FilterBuilder getBuilder(Filter filter){
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  buildBuildersMap();
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  return null;
}

Fixed version (ground truth):
public FilterBuilder getBuilder(Filter filter){
  if (buildersMap == null) {
    buildBuildersMap();
  }
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  buildBuildersMap();
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  return null;
}
Program: 190065
Project: 190065
Buggy source:
public float getSize(float normalizedValue){
  if (interpolator != null) {
    normalizedValue=interpolator.interpolate(normalizedValue);
  }
  return normalizedValue * maxSize + minSize;
}

Fixed version (ground truth):
public float getSize(float normalizedValue){
  if (interpolator != null) {
    normalizedValue=interpolator.interpolate(normalizedValue);
  }
  return normalizedValue * (maxSize - minSize) + minSize;
}
Program: 190066
Project: 190066
Buggy source:
private void setValue(int index,AttributeValueImpl value){
  updateColumns();
  this.values[index]=value;
  attributeTable.model.fireAttributeEvent(new ValueEvent(EventType.SET_VALUE,attributeTable,object,value));
}

Fixed version (ground truth):
private void setValue(int index,AttributeValueImpl value){
  updateColumns();
  AttributeValueImpl oldValue=this.values[index];
  this.values[index]=value;
  if (!((oldValue == null && value == null) || (oldValue != null && oldValue.equals(value.getValue())))) {
    attributeTable.model.fireAttributeEvent(new ValueEvent(EventType.SET_VALUE,attributeTable,object,value));
  }
}
Program: 190067
Project: 190067
Buggy source:
public Object getValue(){
  if (column.getOrigin() != AttributeOrigin.DELEGATE) {
    return value;
  }
 else {
    if (value == null)     return null;
    AttributeValueDelegateProvider attributeValueDelegateProvider=column.getProvider();
    Object result;
    if (AttributeUtilsImpl.getDefault().isEdgeColumn(column))     result=attributeValueDelegateProvider.getEdgeValue(column,value);
 else     if (AttributeUtilsImpl.getDefault().isNodeColumn(column))     result=attributeValueDelegateProvider.getNodeValue(column,value);
 else     throw new AssertionError();
    if (result.getClass().isArray())     result=ListFactory.fromArray(result);
    return result;
  }
}

Fixed version (ground truth):
public Object getValue(){
  if (column.getOrigin() != AttributeOrigin.DELEGATE) {
    return value;
  }
 else {
    if (value == null) {
      return null;
    }
    AttributeValueDelegateProvider attributeValueDelegateProvider=column.getProvider();
    Object result;
    if (AttributeUtilsImpl.getDefault().isEdgeColumn(column)) {
      result=attributeValueDelegateProvider.getEdgeValue(column,value);
    }
 else     if (AttributeUtilsImpl.getDefault().isNodeColumn(column)) {
      result=attributeValueDelegateProvider.getNodeValue(column,value);
    }
 else {
      throw new AssertionError();
    }
    if (result.getClass().isArray()) {
      result=ListFactory.fromArray(result);
    }
    return result;
  }
}
Program: 190070
Project: 190070
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("String_Node_Str")) {
    TextManager.this.model=VizController.getInstance().getVizModel().getTextModel();
    if (model.getNodeTextColumns() == null || model.getNodeTextColumns().length == 0) {
      AttributeController attributeController=Lookup.getDefault().lookup(AttributeController.class);
      if (attributeController != null && attributeController.getModel() != null) {
        AttributeModel attributeModel=attributeController.getModel();
        AttributeColumn[] nodeCols=new AttributeColumn[]{attributeModel.getNodeTable().getColumn(PropertiesColumn.NODE_LABEL.getIndex())};
        AttributeColumn[] edgeCols=new AttributeColumn[]{attributeModel.getEdgeTable().getColumn(PropertiesColumn.EDGE_LABEL.getIndex())};
        model.setTextColumns(nodeCols,edgeCols);
      }
    }
    DynamicController dynamicController=Lookup.getDefault().lookup(DynamicController.class);
    currentTimeInterval=dynamicController.getModel().getVisibleInterval();
  }
}

Fixed version (ground truth):
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("String_Node_Str")) {
    TextManager.this.model=VizController.getInstance().getVizModel().getTextModel();
    if (model.getNodeTextColumns() == null || model.getNodeTextColumns().length == 0) {
      AttributeController attributeController=Lookup.getDefault().lookup(AttributeController.class);
      if (attributeController != null && attributeController.getModel() != null) {
        AttributeModel attributeModel=attributeController.getModel();
        AttributeColumn[] nodeCols=new AttributeColumn[]{attributeModel.getNodeTable().getColumn(PropertiesColumn.NODE_LABEL.getIndex())};
        AttributeColumn[] edgeCols=new AttributeColumn[]{attributeModel.getEdgeTable().getColumn(PropertiesColumn.EDGE_LABEL.getIndex())};
        model.setTextColumns(nodeCols,edgeCols);
      }
    }
    DynamicModel dynamicModel=dynamicController.getModel();
    if (dynamicModel != null) {
      currentTimeInterval=dynamicModel.getVisibleInterval();
    }
 else {
      currentTimeInterval=null;
    }
  }
}
Program: 190071
Project: 190071
Buggy source:
@Override public BigDecimal getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<BigDecimal> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigDecimal total=new BigDecimal(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(values.get(i));
return total.divide(new BigDecimal(values.size()));
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigDecimal bd=values.get(values.size() / 2 - 1);
bd=bd.add(values.get(values.size() / 2));
return bd.divide(new BigDecimal(2));
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigDecimal sum=new BigDecimal(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(values.get(i));
return sum;
case MIN:
BigDecimal minimum=values.get(0);
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(values.get(i)) > 0) minimum=values.get(i);
return minimum;
case MAX:
BigDecimal maximum=values.get(0);
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(values.get(i)) < 0) maximum=values.get(i);
return maximum;
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public BigDecimal getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<BigDecimal>(low,high,false,false),estimator);
}
Program: 190072
Project: 190072
Buggy source:
@Override public BigInteger getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<BigInteger> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigInteger total=BigInteger.valueOf(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(values.get(i));
return total.divide(BigInteger.valueOf(values.size()));
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigInteger bi=values.get(values.size() / 2 - 1);
bi=bi.add(values.get(values.size() / 2));
return bi.divide(BigInteger.valueOf(2));
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigInteger sum=BigInteger.valueOf(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(values.get(i));
return sum;
case MIN:
BigInteger minimum=values.get(0);
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(values.get(i)) > 0) minimum=values.get(i);
return minimum;
case MAX:
BigInteger maximum=values.get(0);
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(values.get(i)) < 0) maximum=values.get(i);
return maximum;
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public BigInteger getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<BigInteger>(low,high,false,false),estimator);
}
Program: 190073
Project: 190073
Buggy source:
@Override public Boolean getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Boolean> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    throw new UnsupportedOperationException("String_Node_Str");
case MEDIAN:
  if (values.size() % 2 == 1)   return values.get(values.size() / 2);
return values.get(values.size() / 2 - 1);
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
throw new UnsupportedOperationException("String_Node_Str");
case MIN:
Boolean minimum=values.get(0);
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(values.get(i)) > 0) minimum=values.get(i);
return minimum;
case MAX:
Boolean maximum=values.get(0);
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(values.get(i)) < 0) maximum=values.get(i);
return maximum;
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Boolean getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Boolean>(low,high,false,false),estimator);
}
Program: 190074
Project: 190074
Buggy source:
@Override public Byte getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Byte> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigInteger total=BigInteger.valueOf(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(BigInteger.valueOf(values.get(i)));
return total.divide(BigInteger.valueOf(values.size())).byteValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigInteger bi=BigInteger.valueOf(values.get(values.size() / 2 - 1));
bi=bi.add(BigInteger.valueOf(values.get(values.size() / 2)));
return bi.divide(BigInteger.valueOf(2)).byteValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigInteger sum=BigInteger.valueOf(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(BigInteger.valueOf(values.get(i)));
return sum.byteValue();
case MIN:
BigInteger minimum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(BigInteger.valueOf(values.get(i))) > 0) minimum=BigInteger.valueOf(values.get(i));
return minimum.byteValue();
case MAX:
BigInteger maximum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(BigInteger.valueOf(values.get(i))) < 0) maximum=BigInteger.valueOf(values.get(i));
return maximum.byteValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Byte getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Byte>(low,high,false,false),estimator);
}
Program: 190075
Project: 190075
Buggy source:
@Override public Character getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Character> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    throw new UnsupportedOperationException("String_Node_Str");
case MEDIAN:
  if (values.size() % 2 == 1)   return values.get(values.size() / 2);
return values.get(values.size() / 2 - 1);
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
throw new UnsupportedOperationException("String_Node_Str");
case MIN:
Character minimum=values.get(0);
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(values.get(i)) > 0) minimum=values.get(i);
return minimum;
case MAX:
Character maximum=values.get(0);
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(values.get(i)) < 0) maximum=values.get(i);
return maximum;
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Character getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Character>(low,high,false,false),estimator);
}
Program: 190076
Project: 190076
Buggy source:
@Override public Double getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Double> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigDecimal total=new BigDecimal(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(new BigDecimal(values.get(i)));
return total.divide(new BigDecimal(values.size())).doubleValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigDecimal bd=new BigDecimal(values.get(values.size() / 2 - 1));
bd=bd.add(new BigDecimal(values.get(values.size() / 2)));
return bd.divide(new BigDecimal(2)).doubleValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigDecimal sum=new BigDecimal(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(new BigDecimal(values.get(i)));
return sum.doubleValue();
case MIN:
BigDecimal minimum=new BigDecimal(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(new BigDecimal(values.get(i))) > 0) minimum=new BigDecimal(values.get(i));
return minimum.doubleValue();
case MAX:
BigDecimal maximum=new BigDecimal(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(new BigDecimal(values.get(i))) < 0) maximum=new BigDecimal(values.get(i));
return maximum.doubleValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Double getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Double>(low,high,false,false),estimator);
}
Program: 190077
Project: 190077
Buggy source:
@Override public Float getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Float> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigDecimal total=new BigDecimal(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(new BigDecimal(values.get(i)));
return total.divide(new BigDecimal(values.size())).floatValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigDecimal bd=new BigDecimal(values.get(values.size() / 2 - 1));
bd=bd.add(new BigDecimal(values.get(values.size() / 2)));
return bd.divide(new BigDecimal(2)).floatValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigDecimal sum=new BigDecimal(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(new BigDecimal(values.get(i)));
return sum.floatValue();
case MIN:
BigDecimal minimum=new BigDecimal(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(new BigDecimal(values.get(i))) > 0) minimum=new BigDecimal(values.get(i));
return minimum.floatValue();
case MAX:
BigDecimal maximum=new BigDecimal(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(new BigDecimal(values.get(i))) < 0) maximum=new BigDecimal(values.get(i));
return maximum.floatValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Float getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Float>(low,high,false,false),estimator);
}
Program: 190078
Project: 190078
Buggy source:
@Override public Integer getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Integer> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigInteger total=BigInteger.valueOf(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(BigInteger.valueOf(values.get(i)));
return total.divide(BigInteger.valueOf(values.size())).intValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigInteger bi=BigInteger.valueOf(values.get(values.size() / 2 - 1));
bi=bi.add(BigInteger.valueOf(values.get(values.size() / 2)));
return bi.divide(BigInteger.valueOf(2)).intValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigInteger sum=BigInteger.valueOf(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(BigInteger.valueOf(values.get(i)));
return sum.intValue();
case MIN:
BigInteger minimum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(BigInteger.valueOf(values.get(i))) > 0) minimum=BigInteger.valueOf(values.get(i));
return minimum.intValue();
case MAX:
BigInteger maximum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(BigInteger.valueOf(values.get(i))) < 0) maximum=BigInteger.valueOf(values.get(i));
return maximum.intValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Integer getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Integer>(low,high,false,false),estimator);
}
Program: 190079
Project: 190079
Buggy source:
@Override public Long getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Long> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigInteger total=BigInteger.valueOf(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(BigInteger.valueOf(values.get(i)));
return total.divide(BigInteger.valueOf(values.size())).longValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigInteger bi=BigInteger.valueOf(values.get(values.size() / 2 - 1));
bi=bi.add(BigInteger.valueOf(values.get(values.size() / 2)));
return bi.divide(BigInteger.valueOf(2)).longValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigInteger sum=BigInteger.valueOf(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(BigInteger.valueOf(values.get(i)));
return sum.longValue();
case MIN:
BigInteger minimum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(BigInteger.valueOf(values.get(i))) > 0) minimum=BigInteger.valueOf(values.get(i));
return minimum.longValue();
case MAX:
BigInteger maximum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(BigInteger.valueOf(values.get(i))) < 0) maximum=BigInteger.valueOf(values.get(i));
return maximum.longValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Long getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Long>(low,high,false,false),estimator);
}
Program: 190080
Project: 190080
Buggy source:
@Override public Short getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<Short> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    BigInteger total=BigInteger.valueOf(0);
  for (int i=0; i < values.size(); ++i)   total=total.add(BigInteger.valueOf(values.get(i)));
return total.divide(BigInteger.valueOf(values.size())).shortValue();
case MEDIAN:
if (values.size() % 2 == 1) return values.get(values.size() / 2);
BigInteger bi=BigInteger.valueOf(values.get(values.size() / 2 - 1));
bi=bi.add(BigInteger.valueOf(values.get(values.size() / 2)));
return bi.divide(BigInteger.valueOf(2)).shortValue();
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
BigInteger sum=BigInteger.valueOf(0);
for (int i=0; i < values.size(); ++i) sum=sum.add(BigInteger.valueOf(values.get(i)));
return sum.shortValue();
case MIN:
BigInteger minimum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(BigInteger.valueOf(values.get(i))) > 0) minimum=BigInteger.valueOf(values.get(i));
return minimum.shortValue();
case MAX:
BigInteger maximum=BigInteger.valueOf(values.get(0));
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(BigInteger.valueOf(values.get(i))) < 0) maximum=BigInteger.valueOf(values.get(i));
return maximum.shortValue();
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public Short getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<Short>(low,high,false,false),estimator);
}
Program: 190081
Project: 190081
Buggy source:
@Override public String getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  List<String> values=getValues(low,high);
  if (values.isEmpty())   return null;
switch (estimator) {
case AVERAGE:
    throw new UnsupportedOperationException("String_Node_Str");
case MEDIAN:
  if (values.size() % 2 == 1)   return values.get(values.size() / 2);
return values.get(values.size() / 2 - 1);
case MODE:
Hashtable<Integer,Integer> map=new Hashtable<Integer,Integer>();
for (int i=0; i < values.size(); ++i) {
int prev=0;
if (map.containsKey(values.get(i).hashCode())) prev=map.get(values.get(i).hashCode());
map.put(values.get(i).hashCode(),prev + 1);
}
int max=map.get(values.get(0).hashCode());
int index=0;
for (int i=1; i < values.size(); ++i) if (max < map.get(values.get(i).hashCode())) {
max=map.get(values.get(i).hashCode());
index=i;
}
return values.get(index);
case SUM:
throw new UnsupportedOperationException("String_Node_Str");
case MIN:
String minimum=values.get(0);
for (int i=1; i < values.size(); ++i) if (minimum.compareTo(values.get(i)) > 0) minimum=values.get(i);
return minimum;
case MAX:
String maximum=values.get(0);
for (int i=1; i < values.size(); ++i) if (maximum.compareTo(values.get(i)) < 0) maximum=values.get(i);
return maximum;
case FIRST:
return values.get(0);
case LAST:
return values.get(values.size() - 1);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public String getValue(double low,double high,Estimator estimator){
  if (low > high)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  return getValue(new Interval<String>(low,high,false,false),estimator);
}
Program: 190083
Project: 190083
Buggy source:
public void run(){
  String title=NbBundle.getMessage(DesktopImportControllerUI.class,"String_Node_Str");
  JPanel panel=pui.getPanel();
  pui.setup(processor);
  final DialogDescriptor dd2=new DialogDescriptor(panel,title);
  if (panel instanceof ValidationPanel) {
    ValidationPanel vp=(ValidationPanel)panel;
    vp.addChangeListener(new ChangeListener(){
      public void stateChanged(      ChangeEvent e){
        dd2.setValid(!((ValidationPanel)e.getSource()).isProblem());
      }
    }
);
    dd2.setValid(!vp.isProblem());
  }
  Object result=DialogDisplayer.getDefault().notify(dd2);
  if (result.equals(NotifyDescriptor.CANCEL_OPTION) || result.equals(NotifyDescriptor.CLOSED_OPTION)) {
    pui.unsetup();
    return;
  }
  pui.unsetup();
}

Fixed version (ground truth):
public void run(){
  String title=NbBundle.getMessage(DesktopImportControllerUI.class,"String_Node_Str");
  JPanel panel=pui.getPanel();
  pui.setup(processor);
  final DialogDescriptor dd2=new DialogDescriptor(panel,title);
  if (panel instanceof ValidationPanel) {
    ValidationPanel vp=(ValidationPanel)panel;
    vp.addChangeListener(new ChangeListener(){
      public void stateChanged(      ChangeEvent e){
        dd2.setValid(!((ValidationPanel)e.getSource()).isProblem());
      }
    }
);
    dd2.setValid(!vp.isProblem());
  }
  Object result=DialogDisplayer.getDefault().notify(dd2);
  if (result.equals(NotifyDescriptor.CANCEL_OPTION) || result.equals(NotifyDescriptor.CLOSED_OPTION)) {
    validResult.setResult(false);
  }
 else {
    pui.unsetup();
    validResult.setResult(true);
  }
}