nus-yam/ex-repair huggingface dataset:
Program: 134876
Project: 134876
Buggy source:
/** 
 * <b>Destroys the channel and unregisters it from the naming service. ONLY USE THIS METHOD IF YOU KNOW FOR CERTAIN THERE IS ONLY ONE SUPPLIER FOR THE CHANNEL!!! Use this method with extreme caution as it's likely to become deprecated in future versions of ACS!</b>
 * @param channelName name of the channel as registered int the CORBA notification service
 * @param channelKind Kind of the channel as registered with the CORBA naming service.
 * @param channelRef reference to the channel being destroyed
 * @throws AcsJException Thrown when the channel isn't registered with the Naming Service.
 * @warning this method assumes
 */
public void destroyNotificationChannel(String channelName,String channelKind,EventChannel channelRef) throws AcsJException {
  try {
    channelRef.destroy();
    NameComponent[] t_NameChannel={new NameComponent(channelName,channelKind)};
    getNamingService().unbind(t_NameChannel);
  }
 catch (  org.omg.CosNaming.NamingContextPackage.NotFound e) {
    String msg="String_Node_Str" + channelName + "String_Node_Str";
    m_logger.severe(msg);
  }
catch (  org.omg.CosNaming.NamingContextPackage.CannotProceed e) {
    Throwable cause=new Throwable(e.getMessage());
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(cause);
  }
catch (  org.omg.CosNaming.NamingContextPackage.InvalidName e) {
    Throwable cause=new Throwable(e.getMessage());
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(cause);
  }
  LOG_NC_ChannelDestroyed_OK.log(m_logger,channelName,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * <b>Destroys the channel and unregisters it from the naming service. ONLY USE THIS METHOD IF YOU KNOW FOR CERTAIN THERE IS ONLY ONE SUPPLIER FOR THE CHANNEL!!! Use this method with extreme caution as it's likely to become deprecated in future versions of ACS!</b>
 * @param channelName name of the channel as registered int the CORBA notification service
 * @param channelKind Kind of the channel as registered with the CORBA naming service.
 * @param channelRef reference to the channel being destroyed
 * @throws AcsJException Thrown when the channel isn't registered with the Naming Service.
 * @warning this method assumes
 */
protected void destroyNotificationChannel(String channelName,String channelKind,EventChannel channelRef) throws AcsJException {
  try {
    channelRef.destroy();
    NameComponent[] t_NameChannel={new NameComponent(channelName,channelKind)};
    getNamingService().unbind(t_NameChannel);
  }
 catch (  org.omg.CosNaming.NamingContextPackage.NotFound e) {
    String msg="String_Node_Str" + channelName + "String_Node_Str";
    m_logger.severe(msg);
  }
catch (  org.omg.CosNaming.NamingContextPackage.CannotProceed e) {
    Throwable cause=new Throwable(e.getMessage());
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(cause);
  }
catch (  org.omg.CosNaming.NamingContextPackage.InvalidName e) {
    Throwable cause=new Throwable(e.getMessage());
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(cause);
  }
  LOG_NC_ChannelDestroyed_OK.log(m_logger,channelName,"String_Node_Str");
}
Program: 134877
Project: 134877
Buggy source:
private void printMonitoringResults(NotificationServiceMonitorControl mc){
  try {
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.EventChannelFactoryNames.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelCount.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelNames.value));
  }
 catch (  InvalidName e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void printMonitoringResults(NotificationServiceMonitorControl mc){
  if (true)   return;
  try {
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.EventChannelFactoryNames.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelCount.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelNames.value));
  }
 catch (  InvalidName e) {
    e.printStackTrace();
  }
}
Program: 134878
Project: 134878
Buggy source:
public void selectionChanged(IWorkbenchPart sourcepart,ISelection selection){
  if (sourcepart != EventDetailView.this && selection instanceof IStructuredSelection) {
    IStructuredSelection iss=(IStructuredSelection)selection;
    Object[] arr=iss.toArray();
    if (arr[0] instanceof EventData) {
      EventData ed=(EventData)arr[0];
      showEventDetails(sourcepart,ed);
    }
  }
}

Fixed version (ground truth):
public void selectionChanged(IWorkbenchPart sourcepart,ISelection selection){
  if (sourcepart != EventDetailView.this && selection instanceof IStructuredSelection) {
    IStructuredSelection iss=(IStructuredSelection)selection;
    if (iss == null)     return;
    Object[] arr=iss.toArray();
    if (arr.length > 0 && arr[0] instanceof EventData) {
      EventData ed=(EventData)arr[0];
      showEventDetails(sourcepart,ed);
    }
  }
}
Program: 134879
Project: 134879
Buggy source:
@Override public void dispose(){
  super.dispose();
  ArrayList<AdminConsumer> consumers=em.getAllConsumers();
  for (  AdminConsumer consumer : consumers) {
    if (consumer != null) {
      consumer.disconnect();
    }
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  super.dispose();
  em.closeAllConsumers();
}
Program: 134880
Project: 134880
Buggy source:
public PopulateEventList(Logger logger,TableViewer viewer){
  super();
  this.logger=logger;
  this.viewer=viewer;
}

Fixed version (ground truth):
public PopulateEventList(Logger logger,TableViewer viewer){
  super();
  this.logger=logger;
  this.viewer=viewer;
  display=viewer.getControl().getDisplay();
}
Program: 134881
Project: 134881
Buggy source:
Thread getThreadForEventList(EventModel em){
  Runnable t=new Runnable(){
    public Runnable r=new Runnable(){
      private long totalNumberDrained;
      public void run(){
        final Display display=viewer.getControl().getDisplay();
        if (!display.isDisposed()) {
          ArrayList<EventData> c=new ArrayList<EventData>(QUEUE_DRAIN_LIMIT);
          int numberDrained=Application.equeue.drainTo(c,QUEUE_DRAIN_LIMIT);
          if (numberDrained == 0)           return;
          totalNumberDrained+=numberDrained;
          viewer.add(c.toArray());
          if (cycles++ % CHECK_MEMORY_FREQUENCY == 0) {
            StopWatch sw=new StopWatch(logger);
            freeMemoryIfNecessary();
            sw.logLapTime("String_Node_Str");
            logger.fine("String_Node_Str" + totalNumberDrained);
          }
        }
      }
    }
;
    public void run(){
      final Display display=viewer.getControl().getDisplay();
      while (true) {
        if (display.isDisposed())         return;
        display.syncExec(r);
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
          System.out.println("String_Node_Str");
          break;
        }
      }
    }
  }
;
  final Thread th=new Thread(t,"String_Node_Str");
  consumers=em.getAllConsumers();
  if (consumers != null) {
    for (    AdminConsumer consumer : consumers) {
      try {
        consumer.consumerReady();
      }
 catch (      AcsJException e) {
        e.printStackTrace();
      }
    }
  }
  return th;
}

Fixed version (ground truth):
Thread getThreadForEventList(EventModel em){
  Runnable t=new Runnable(){
    public Runnable r=new Runnable(){
      private long totalNumberDrained;
      public void run(){
        if (!display.isDisposed()) {
          ArrayList<EventData> c=new ArrayList<EventData>(QUEUE_DRAIN_LIMIT);
          int numberDrained=Application.equeue.drainTo(c,QUEUE_DRAIN_LIMIT);
          if (numberDrained == 0)           return;
          totalNumberDrained+=numberDrained;
          viewer.add(c.toArray());
          if (cycles++ % CHECK_MEMORY_FREQUENCY == 0) {
            StopWatch sw=new StopWatch(logger);
            freeMemoryIfNecessary();
            sw.logLapTime("String_Node_Str");
            logger.fine("String_Node_Str" + totalNumberDrained);
          }
        }
      }
    }
;
    public void run(){
      while (true) {
        if (display.isDisposed())         return;
        display.syncExec(r);
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
          System.out.println("String_Node_Str");
          break;
        }
      }
    }
  }
;
  final Thread th=new Thread(t,"String_Node_Str");
  consumers=em.getAllConsumers();
  if (consumers != null) {
    for (    AdminConsumer consumer : consumers) {
      try {
        consumer.consumerReady();
      }
 catch (      AcsJException e) {
        e.printStackTrace();
      }
    }
  }
  return th;
}
Program: 134882
Project: 134882
Buggy source:
public void run(){
  final Display display=viewer.getControl().getDisplay();
  while (true) {
    if (display.isDisposed())     return;
    display.syncExec(r);
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      System.out.println("String_Node_Str");
      break;
    }
  }
}

Fixed version (ground truth):
public void run(){
  while (true) {
    if (display.isDisposed())     return;
    display.syncExec(r);
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      System.out.println("String_Node_Str");
      break;
    }
  }
}
Program: 134883
Project: 134883
Buggy source:
private void printMonitoringResults(NotificationServiceMonitorControl mc){
  try {
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.EventChannelFactoryNames.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelCount.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelNames.value));
  }
 catch (  InvalidName e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void printMonitoringResults(NotificationServiceMonitorControl mc){
  if (true)   return;
  try {
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.EventChannelFactoryNames.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelCount.value));
    m_logger.info("String_Node_Str" + mc.get_statistic(gov.sandia.NotifyMonitoringExt.ActiveEventChannelNames.value));
  }
 catch (  InvalidName e) {
    e.printStackTrace();
  }
}
Program: 134884
Project: 134884
Buggy source:
public void selectionChanged(IWorkbenchPart sourcepart,ISelection selection){
  if (sourcepart != EventDetailView.this && selection instanceof IStructuredSelection) {
    IStructuredSelection iss=(IStructuredSelection)selection;
    Object[] arr=iss.toArray();
    if (arr[0] instanceof EventData) {
      EventData ed=(EventData)arr[0];
      showEventDetails(sourcepart,ed);
    }
  }
}

Fixed version (ground truth):
public void selectionChanged(IWorkbenchPart sourcepart,ISelection selection){
  if (sourcepart != EventDetailView.this && selection instanceof IStructuredSelection) {
    IStructuredSelection iss=(IStructuredSelection)selection;
    if (iss == null)     return;
    Object[] arr=iss.toArray();
    if (arr.length > 0 && arr[0] instanceof EventData) {
      EventData ed=(EventData)arr[0];
      showEventDetails(sourcepart,ed);
    }
  }
}
Program: 134885
Project: 134885
Buggy source:
@Override public void dispose(){
  super.dispose();
  ArrayList<AdminConsumer> consumers=em.getAllConsumers();
  for (  AdminConsumer consumer : consumers) {
    if (consumer != null) {
      consumer.disconnect();
    }
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  super.dispose();
  em.closeAllConsumers();
}
Program: 134886
Project: 134886
Buggy source:
public PopulateEventList(Logger logger,TableViewer viewer){
  super();
  this.logger=logger;
  this.viewer=viewer;
}

Fixed version (ground truth):
public PopulateEventList(Logger logger,TableViewer viewer){
  super();
  this.logger=logger;
  this.viewer=viewer;
  display=viewer.getControl().getDisplay();
}
Program: 134887
Project: 134887
Buggy source:
Thread getThreadForEventList(EventModel em){
  Runnable t=new Runnable(){
    public Runnable r=new Runnable(){
      private long totalNumberDrained;
      public void run(){
        final Display display=viewer.getControl().getDisplay();
        if (!display.isDisposed()) {
          ArrayList<EventData> c=new ArrayList<EventData>(QUEUE_DRAIN_LIMIT);
          int numberDrained=Application.equeue.drainTo(c,QUEUE_DRAIN_LIMIT);
          if (numberDrained == 0)           return;
          totalNumberDrained+=numberDrained;
          viewer.add(c.toArray());
          if (cycles++ % CHECK_MEMORY_FREQUENCY == 0) {
            StopWatch sw=new StopWatch(logger);
            freeMemoryIfNecessary();
            sw.logLapTime("String_Node_Str");
            logger.fine("String_Node_Str" + totalNumberDrained);
          }
        }
      }
    }
;
    public void run(){
      final Display display=viewer.getControl().getDisplay();
      while (true) {
        if (display.isDisposed())         return;
        display.syncExec(r);
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
          System.out.println("String_Node_Str");
          break;
        }
      }
    }
  }
;
  final Thread th=new Thread(t,"String_Node_Str");
  consumers=em.getAllConsumers();
  if (consumers != null) {
    for (    AdminConsumer consumer : consumers) {
      try {
        consumer.consumerReady();
      }
 catch (      AcsJException e) {
        e.printStackTrace();
      }
    }
  }
  return th;
}

Fixed version (ground truth):
Thread getThreadForEventList(EventModel em){
  Runnable t=new Runnable(){
    public Runnable r=new Runnable(){
      private long totalNumberDrained;
      public void run(){
        if (!display.isDisposed()) {
          ArrayList<EventData> c=new ArrayList<EventData>(QUEUE_DRAIN_LIMIT);
          int numberDrained=Application.equeue.drainTo(c,QUEUE_DRAIN_LIMIT);
          if (numberDrained == 0)           return;
          totalNumberDrained+=numberDrained;
          viewer.add(c.toArray());
          if (cycles++ % CHECK_MEMORY_FREQUENCY == 0) {
            StopWatch sw=new StopWatch(logger);
            freeMemoryIfNecessary();
            sw.logLapTime("String_Node_Str");
            logger.fine("String_Node_Str" + totalNumberDrained);
          }
        }
      }
    }
;
    public void run(){
      while (true) {
        if (display.isDisposed())         return;
        display.syncExec(r);
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
          System.out.println("String_Node_Str");
          break;
        }
      }
    }
  }
;
  final Thread th=new Thread(t,"String_Node_Str");
  consumers=em.getAllConsumers();
  if (consumers != null) {
    for (    AdminConsumer consumer : consumers) {
      try {
        consumer.consumerReady();
      }
 catch (      AcsJException e) {
        e.printStackTrace();
      }
    }
  }
  return th;
}
Program: 134888
Project: 134888
Buggy source:
public void run(){
  final Display display=viewer.getControl().getDisplay();
  while (true) {
    if (display.isDisposed())     return;
    display.syncExec(r);
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      System.out.println("String_Node_Str");
      break;
    }
  }
}

Fixed version (ground truth):
public void run(){
  while (true) {
    if (display.isDisposed())     return;
    display.syncExec(r);
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      System.out.println("String_Node_Str");
      break;
    }
  }
}
Program: 134889
Project: 134889
Buggy source:
/** 
 * @see alma.ACS.jbaci.CallbackDispatcher#dispatchCallback(int,java.lang.Object,alma.ACSErr.Completion,alma.ACS.CBDescOut)
 */
public boolean dispatchCallback(int type,Object value,Callback callback,Completion completion,CBDescOut desc){
  try {
    if (type == CallbackDispatcher.DONE_TYPE)     ((CBlong)callback).done((int)((Long)value).longValue(),completion,desc);
 else     if (type == CallbackDispatcher.WORKING_TYPE)     ((CBlong)callback).working((int)((Long)value).longValue(),completion,desc);
 else     return false;
    return true;
  }
 catch (  Throwable th) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @see alma.ACS.jbaci.CallbackDispatcher#dispatchCallback(int,java.lang.Object,alma.ACSErr.Completion,alma.ACS.CBDescOut)
 */
public boolean dispatchCallback(int type,Object value,Callback callback,Completion completion,CBDescOut desc){
  try {
    if (type == CallbackDispatcher.DONE_TYPE)     ((CBlong)callback).done((int)((Integer)value).intValue(),completion,desc);
 else     if (type == CallbackDispatcher.WORKING_TYPE)     ((CBlong)callback).working((int)((Integer)value).intValue(),completion,desc);
 else     return false;
    return true;
  }
 catch (  Throwable th) {
    return false;
  }
}
Program: 134891
Project: 134891
Buggy source:
private boolean openFile(){
  IsoDateFormat fo=new IsoDateFormat();
  filename=component + "String_Node_Str" + property+ "String_Node_Str"+ getFrecuency()+ "String_Node_Str"+ fo.format(new Date())+ "String_Node_Str";
  try {
    file=new FileWriter(filename);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  writer=new BufferedWriter(file);
  return true;
}

Fixed version (ground truth):
private boolean openFile(){
  IsoDateFormat fo=new IsoDateFormat();
  filename=component.replace('/','-') + "String_Node_Str" + property.replace('/','-')+ "String_Node_Str"+ getFrecuency()+ "String_Node_Str"+ fo.format(new Date())+ "String_Node_Str";
  try {
    file=new FileWriter(filename);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  writer=new BufferedWriter(file);
  return true;
}
Program: 134892
Project: 134892
Buggy source:
/** 
 * Default constructor, takes the parameters, stores them, and creates the filename.
 * @param group The name of the Sampling Group to which the data belongs to.
 * @param frequency The Frequency at which the data was sampled.
 * @param startTimestamp At which time that sampling process started.
 */
public SamplingDataCorrelator(String group,long frequency,Date startTimestamp){
  data=new ArrayList<ArrayList<DataItem>>();
  readers=new ArrayList<BufferedReader>();
  headers=new ArrayList<String>();
  this.group=group;
  this.frequency=frequency;
  this.startTimestamp=startTimestamp;
  formater=new IsoDateFormat();
  filename="String_Node_Str" + this.group + "String_Node_Str"+ this.frequency+ "String_Node_Str"+ formater.format(this.startTimestamp)+ "String_Node_Str";
  header="String_Node_Str";
  meanQty=4;
  meanData=new ArrayList<ArrayList<Double>>();
}

Fixed version (ground truth):
/** 
 * Default constructor, takes the parameters, stores them, and creates the filename.
 * @param group The name of the Sampling Group to which the data belongs to.
 * @param frequency The Frequency at which the data was sampled.
 * @param startTimestamp At which time that sampling process started.
 */
public SamplingDataCorrelator(String group,long frequency,Date startTimestamp){
  data=new ArrayList<ArrayList<DataItem>>();
  readers=new ArrayList<BufferedReader>();
  headers=new ArrayList<String>();
  this.group=group;
  this.frequency=frequency;
  this.startTimestamp=startTimestamp;
  formater=new IsoDateFormat();
  filename="String_Node_Str" + this.group.replace('/','-') + "String_Node_Str"+ this.frequency+ "String_Node_Str"+ formater.format(this.startTimestamp)+ "String_Node_Str";
  header="String_Node_Str";
  meanQty=4;
  meanData=new ArrayList<ArrayList<Double>>();
}
Program: 134893
Project: 134893
Buggy source:
private boolean openFile(){
  IsoDateFormat fo=new IsoDateFormat();
  filename=component + "String_Node_Str" + property+ "String_Node_Str"+ getFrecuency()+ "String_Node_Str"+ fo.format(new Date())+ "String_Node_Str";
  try {
    file=new FileWriter(filename);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  writer=new BufferedWriter(file);
  return true;
}

Fixed version (ground truth):
private boolean openFile(){
  IsoDateFormat fo=new IsoDateFormat();
  filename=component.replace('/','-') + "String_Node_Str" + property.replace('/','-')+ "String_Node_Str"+ getFrecuency()+ "String_Node_Str"+ fo.format(new Date())+ "String_Node_Str";
  try {
    file=new FileWriter(filename);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  writer=new BufferedWriter(file);
  return true;
}
Program: 134894
Project: 134894
Buggy source:
/** 
 * Default constructor, takes the parameters, stores them, and creates the filename.
 * @param group The name of the Sampling Group to which the data belongs to.
 * @param frequency The Frequency at which the data was sampled.
 * @param startTimestamp At which time that sampling process started.
 */
public SamplingDataCorrelator(String group,long frequency,Date startTimestamp){
  data=new ArrayList<ArrayList<DataItem>>();
  readers=new ArrayList<BufferedReader>();
  headers=new ArrayList<String>();
  this.group=group;
  this.frequency=frequency;
  this.startTimestamp=startTimestamp;
  formater=new IsoDateFormat();
  filename="String_Node_Str" + this.group + "String_Node_Str"+ this.frequency+ "String_Node_Str"+ formater.format(this.startTimestamp)+ "String_Node_Str";
  header="String_Node_Str";
  meanQty=4;
  meanData=new ArrayList<ArrayList<Double>>();
}

Fixed version (ground truth):
/** 
 * Default constructor, takes the parameters, stores them, and creates the filename.
 * @param group The name of the Sampling Group to which the data belongs to.
 * @param frequency The Frequency at which the data was sampled.
 * @param startTimestamp At which time that sampling process started.
 */
public SamplingDataCorrelator(String group,long frequency,Date startTimestamp){
  data=new ArrayList<ArrayList<DataItem>>();
  readers=new ArrayList<BufferedReader>();
  headers=new ArrayList<String>();
  this.group=group;
  this.frequency=frequency;
  this.startTimestamp=startTimestamp;
  formater=new IsoDateFormat();
  filename="String_Node_Str" + this.group.replace('/','-') + "String_Node_Str"+ this.frequency+ "String_Node_Str"+ formater.format(this.startTimestamp)+ "String_Node_Str";
  header="String_Node_Str";
  meanQty=4;
  meanData=new ArrayList<ArrayList<Double>>();
}
Program: 134896
Project: 134896
Buggy source:
public void log(Logger logger,Level priority,String message){
  if (guard.check()) {
    logger.log(priority,message);
  }
}

Fixed version (ground truth):
/** 
 * Logs the message at the given level, unless the internal <code>RepeatGuard</code> prevents this based on the timer and/or log record counter. If a log record counter is active, it will be advanced, which corresponds to   {@link RepeatGuard#checkAndIncrement()}. (Note that following the same terminology as   {@link RepeatGuard}, this methods would have to be called <code>logAndIncrement</code>; it is simply called <code>log</code> though because here we don't support the variant of having a counter enabled without using it.) <p> Requires the logger to be set in ctor   {@link #RepeatGuardLogger(AcsLogger,long,TimeUnit,int)} which will become the only choice once the deprecated methods are removed.
 * @see Logger#log(Level,String)
 * @since ACS 8.0.0
 */
public void log(Level level,String message){
  if (logger == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (guard.checkAndIncrement()) {
    logger.log(level,message);
  }
}
Program: 134897
Project: 134897
Buggy source:
public void logAndIncrement(Logger logger,Level priority,String message){
  if (guard.checkAndIncrement()) {
    logger.log(priority,message);
  }
}

Fixed version (ground truth):
/** 
 * Same as   {@link #log(Level,String) but with additional <code>Throwable</code> to be logged.}
 * @see Logger#log(Level,String,Throwable)
 * @since ACS 8.0.0
 */
public void logAndIncrement(Level level,String message,Throwable thr){
  if (logger == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (guard.checkAndIncrement()) {
    logger.log(level,message,thr);
  }
}
Program: 134898
Project: 134898
Buggy source:
/** 
 * Constructor.
 * @param interval Time interval (in <code>timeUnit</code> units).
 * @param timeUnit Time unit of <code>interval</code> parameter.
 * @param maxRepetitions Maximum number of repetitions.
 */
public RepeatGuardLogger(long interval,TimeUnit timeUnit,int maxRepetitions){
  guard=new RepeatGuard(interval,timeUnit,maxRepetitions);
}

Fixed version (ground truth):
/** 
 * Constructor for a time and counter based repeat guard logger. <p> If only time or counter should apply, but not both together, it is better to use the factory methods   {@link #createTimeBasedRepeatGuardLogger(AcsLogger,long,TimeUnit)}or   {@link #createCounterBasedRepeatGuardLogger(AcsLogger,int)}. However it is also possible to use negative values for the quantities that should not be considered. <p>
 * @param logger The logger to be used in 
 * @param interval Time interval (in <code>timeUnit</code> units).
 * @param timeUnit Time unit of <code>interval</code> parameter.
 * @param maxRepetitions Maximum number of skipped repetitions.
 */
public RepeatGuardLogger(AcsLogger logger,long interval,TimeUnit timeUnit,int maxRepetitions){
  guard=new RepeatGuard(interval,timeUnit,maxRepetitions);
  this.logger=logger;
  logger.addLoggerClass(getClass());
}
Program: 134899
Project: 134899
Buggy source:
public void actionPerformed(java.awt.event.ActionEvent e){
  jCloseButton.setEnabled(false);
  jStopButton.setEnabled(true);
  startSampleButton.setEnabled(false);
  getFreqTextField().setEnabled(false);
  getTimeSampTextField().setEnabled(false);
  toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
  startSample();
}

Fixed version (ground truth):
public void actionPerformed(java.awt.event.ActionEvent e){
  jCloseButton.setEnabled(false);
  jStopButton.setEnabled(true);
  startSampleButton.setEnabled(false);
  getFreqTextField().setEnabled(false);
  getTimeSampTextField().setEnabled(false);
  try {
    Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getFreqTextField().setText("String_Node_Str");
  }
  toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
  startSample();
}
Program: 134900
Project: 134900
Buggy source:
private JTextField getFreqTextField(){
  if (freqTextField == null) {
    freqTextField=new JTextField();
    freqTextField.setText("String_Node_Str");
    freqTextField.setPreferredSize(new Dimension(50,19));
  }
  return freqTextField;
}

Fixed version (ground truth):
private JTextField getFreqTextField(){
  if (freqTextField == null) {
    freqTextField=new JTextField();
    freqTextField.setText("String_Node_Str");
    freqTextField.setPreferredSize(new Dimension(50,19));
    freqTextField.addFocusListener(new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        if (!freqTextField.getText().matches("String_Node_Str")) {
          JOptionPane.showConfirmDialog(BeanGrouper.this,"String_Node_Str" + freqTextField.getText() + "String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,JOptionPane.WARNING_MESSAGE);
          freqTextField.setText("String_Node_Str");
          freqTextField.grabFocus();
        }
      }
    }
);
  }
  return freqTextField;
}
Program: 134901
Project: 134901
Buggy source:
private JTextField getTimeSampTextField(){
  if (timeSampTextField == null) {
    timeSampTextField=new JTextField();
    timeSampTextField.setText("String_Node_Str");
    timeSampTextField.setPreferredSize(new Dimension(50,19));
  }
  return timeSampTextField;
}

Fixed version (ground truth):
private JTextField getTimeSampTextField(){
  if (timeSampTextField == null) {
    timeSampTextField=new JTextField();
    timeSampTextField.setText("String_Node_Str");
    timeSampTextField.setPreferredSize(new Dimension(50,19));
    timeSampTextField.addFocusListener(new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        if (!timeSampTextField.getText().matches("String_Node_Str")) {
          JOptionPane.showConfirmDialog(BeanGrouper.this,"String_Node_Str" + timeSampTextField.getText() + "String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,JOptionPane.WARNING_MESSAGE);
          timeSampTextField.setText("String_Node_Str");
          timeSampTextField.grabFocus();
        }
      }
    }
);
  }
  return timeSampTextField;
}
Program: 134902
Project: 134902
Buggy source:
/** 
 * Method to begin the sampling of all the samples contained in the class.
 */
private void startSample(){
  int freq=100;
  setjLabel("String_Node_Str" + toFile.getFileName());
  try {
    freq=Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getFreqTextField().setText("String_Node_Str");
  }
  for (  DataPrinter wp : samplers) {
    wp.setFrecuency(freq);
    try {
      wp.startSample();
      isStopped=false;
    }
 catch (    alma.ACSErrTypeCommon.CouldntAccessComponentEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
catch (    alma.ACSErrTypeCommon.TypeNotSupportedEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
  }
  if (isStopped) {
    jCloseButton.setEnabled(true);
    jStopButton.setEnabled(false);
    startSampleButton.setEnabled(true);
    return;
  }
  int mins=0;
  try {
    mins=Integer.parseInt(getTimeSampTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getTimeSampTextField().setText("String_Node_Str");
  }
  if (mins != 0)   new Watchdog(mins).start();
}

Fixed version (ground truth):
/** 
 * Method to begin the sampling of all the samples contained in the class.
 */
private void startSample(){
  int freq=0;
  try {
    freq=Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
  }
  setjLabel("String_Node_Str" + toFile.getFileName());
  freq=Integer.parseInt(getFreqTextField().getText());
  for (  DataPrinter wp : samplers) {
    wp.setFrecuency(freq);
    try {
      wp.startSample();
      isStopped=false;
    }
 catch (    alma.ACSErrTypeCommon.CouldntAccessComponentEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
catch (    alma.ACSErrTypeCommon.TypeNotSupportedEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
  }
  if (isStopped) {
    jCloseButton.setEnabled(true);
    jStopButton.setEnabled(false);
    startSampleButton.setEnabled(true);
    freqTextField.setEnabled(true);
    timeSampTextField.setEnabled(true);
    return;
  }
  int mins=0;
  try {
    mins=Integer.parseInt(getTimeSampTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getTimeSampTextField().setText("String_Node_Str");
  }
  if (mins != 0)   new Watchdog(mins).start();
}
Program: 134903
Project: 134903
Buggy source:
/** 
 * This method initializes startSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getStartSampleButton(){
  if (startSampleButton == null) {
    startSampleButton=new JButton();
    startSampleButton.setText("String_Node_Str");
    startSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        jCloseButton.setEnabled(false);
        jStopButton.setEnabled(true);
        startSampleButton.setEnabled(false);
        getFreqTextField().setEnabled(false);
        getTimeSampTextField().setEnabled(false);
        toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
        startSample();
      }
    }
);
  }
  return startSampleButton;
}

Fixed version (ground truth):
/** 
 * This method initializes startSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getStartSampleButton(){
  if (startSampleButton == null) {
    startSampleButton=new JButton();
    startSampleButton.setText("String_Node_Str");
    startSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        jCloseButton.setEnabled(false);
        jStopButton.setEnabled(true);
        startSampleButton.setEnabled(false);
        getFreqTextField().setEnabled(false);
        getTimeSampTextField().setEnabled(false);
        try {
          Integer.parseInt(getFreqTextField().getText());
        }
 catch (        NumberFormatException ex) {
          getFreqTextField().setText("String_Node_Str");
        }
        toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
        startSample();
      }
    }
);
  }
  return startSampleButton;
}
Program: 134904
Project: 134904
Buggy source:
public void initialize(int freq){
  if (group == "String_Node_Str")   filename="String_Node_Str" + 10000000L / freq + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
 else   filename=group + "String_Node_Str" + 10000000L / freq + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
}

Fixed version (ground truth):
public void initialize(int freq){
  IsoDateFormat fo=new IsoDateFormat();
  if (group == "String_Node_Str")   filename="String_Node_Str" + 10000000L / freq + "String_Node_Str" + fo.format(new Date()) + "String_Node_Str";
 else   filename=group + "String_Node_Str" + 10000000L / freq + "String_Node_Str" + fo.format(new Date()) + "String_Node_Str";
}
Program: 134905
Project: 134905
Buggy source:
public void dumpToFile(long frequency,double prec){
  long timestamp=data.get(0).get(0).getTime();
  boolean done=false;
  frequency=10000000L / frequency;
  long w=(long)(frequency * prec);
  c=new int[data.size()];
  openFile();
  try {
    writer.write(header + "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  while (!done) {
    String line="String_Node_Str" + timestamp;
    boolean dataPresent=true;
    for (int i=0; i < data.size(); i++) {
      dataPresent=false;
      if (c[i] == data.get(i).size()) {
        line+="String_Node_Str";
        continue;
      }
      DataItem item=data.get(i).get(c[i]);
      if ((item.getTime() >= (timestamp - w)) && (item.getTime() <= (timestamp + w))) {
        line+="String_Node_Str" + item.getValue();
        c[i]++;
        dataPresent=true;
      }
 else       if ((item.getTime() >= (timestamp + w)) && (item.getTime() <= (timestamp + frequency - w))) {
        line+="String_Node_Str";
        c[i]++;
      }
 else       line+="String_Node_Str";
    }
    try {
      if (dataPresent) {
        writer.write(line + "String_Node_Str");
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    int flag=0;
    for (int i=0; i < c.length; i++) {
      if (c[i] == data.get(i).size())       flag++;
    }
    if (flag == c.length)     done=true;
    timestamp+=frequency;
  }
  try {
    writer.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void dumpToFile(long frequency,double prec){
  IsoDateFormat formater=new IsoDateFormat();
  long timestamp=data.get(0).get(0).getTime();
  boolean done=false;
  frequency=10000000L / frequency;
  long w=(long)(frequency * prec);
  c=new int[data.size()];
  openFile();
  try {
    writer.write(header + "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  while (!done) {
    String line="String_Node_Str" + formater.format(new Date(UTCUtility.utcOmgToJava(timestamp)));
    boolean dataPresent=true;
    for (int i=0; i < data.size(); i++) {
      dataPresent=false;
      if (c[i] == data.get(i).size()) {
        line+="String_Node_Str";
        continue;
      }
      DataItem item=data.get(i).get(c[i]);
      if ((item.getTime() >= (timestamp - w)) && (item.getTime() <= (timestamp + w))) {
        line+="String_Node_Str" + item.getValue();
        c[i]++;
        dataPresent=true;
      }
 else       if ((item.getTime() >= (timestamp + w)) && (item.getTime() <= (timestamp + frequency - w))) {
        line+="String_Node_Str";
        c[i]++;
      }
 else       line+="String_Node_Str";
    }
    try {
      if (dataPresent) {
        writer.write(line + "String_Node_Str");
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    int flag=0;
    for (int i=0; i < c.length; i++) {
      if (c[i] == data.get(i).size())       flag++;
    }
    if (flag == c.length)     done=true;
    timestamp+=frequency;
  }
  try {
    writer.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 134906
Project: 134906
Buggy source:
public static void initializeComponents(){
  List<String> listTmp=new ArrayList<String>();
  compList=info.getCManager().getComponentsName();
  cServices=info.getContainerServices();
  for (int i=0; i < compList.length; i++) {
    try {
      ComponentDescriptor c=cServices.getComponentDescriptor(compList[i]);
      if (c.getType().equals(SAMP_MAN_IFACE)) {
        sampManList.add(c.getName());
        info.getContainerServices().getLogger().info("String_Node_Str" + c.getName());
      }
 else {
        listTmp.add(compList[i]);
        cDescriptorList.add(c);
        propList.add(null);
      }
    }
 catch (    AcsJContainerServicesEx e) {
      e.getMessage();
    }
  }
  compList=new String[listTmp.size()];
  compList=listTmp.toArray(compList);
  Arrays.sort(compList);
}

Fixed version (ground truth):
public static void initializeComponents(){
  try {
    info=AcsInformation.getInstance(NAME);
  }
 catch (  AcsInformationException e1) {
    e1.printStackTrace();
  }
  List<String> listTmp=new ArrayList<String>();
  compList=info.getCManager().getComponentsName();
  cServices=info.getContainerServices();
  for (int i=0; i < compList.length; i++) {
    try {
      ComponentDescriptor c=cServices.getComponentDescriptor(compList[i]);
      if (c.getType().equals(SAMP_MAN_IFACE)) {
        sampManList.add(c.getName());
        info.getContainerServices().getLogger().info("String_Node_Str" + c.getName());
      }
 else {
        listTmp.add(compList[i]);
        cDescriptorList.add(c);
        propList.add(null);
      }
    }
 catch (    AcsJContainerServicesEx e) {
      e.getMessage();
    }
  }
  compList=new String[listTmp.size()];
  compList=listTmp.toArray(compList);
  Arrays.sort(compList);
}
Program: 134907
Project: 134907
Buggy source:
public static void main(String[] args){
  window=new SamplingSystemGUI();
  try {
    spinUp(NAME,window.MAN_NAME);
    initializeComponents();
  }
 catch (  AcsInformationException e) {
    e.printStackTrace();
  }
catch (  SamplingManagerException e) {
    e.printStackTrace();
  }
  window.loadWindow();
  window.fillWidgets(getComponents(),propList);
  try {
    tearDown();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  window=new SamplingSystemGUI();
  try {
    initializeComponents();
    if (sampManList.size() == 0) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      System.exit(1);
    }
    spinUp(NAME,sampManList.getFirst());
  }
 catch (  AcsInformationException e) {
    e.printStackTrace();
  }
catch (  SamplingManagerException e) {
    e.printStackTrace();
  }
  window.loadWindow();
  window.fillWidgets(getComponents(),propList);
  try {
    tearDown();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 134908
Project: 134908
Buggy source:
public void loadWindow(){
  System.out.println(SampTool.getSamplingManagers().length);
  String s=(String)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,(Object[])SampTool.getSamplingManagers(),MAN_NAME);
  if (s != null && !s.trim().equals("String_Node_Str"))   this.MAN_NAME=s;
  this.setVisible(true);
  this.validate();
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  this.addWindowListener(new java.awt.event.WindowAdapter(){
    public void windowClosing(    java.awt.event.WindowEvent e){
      if (status != null) {
        writeStatusFile();
      }
    }
  }
);
  readStatusFile(true);
}

Fixed version (ground truth):
public void loadWindow(){
  System.out.println(SampTool.getSamplingManagers().length);
  String s=(String)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,(Object[])SampTool.getSamplingManagers(),MAN_NAME);
  if (s != null && !s.trim().equals("String_Node_Str"))   this.MAN_NAME=s;
 else   System.exit(0);
  this.setVisible(true);
  this.validate();
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  this.addWindowListener(new java.awt.event.WindowAdapter(){
    public void windowClosing(    java.awt.event.WindowEvent e){
      if (status != null) {
        writeStatusFile();
      }
    }
  }
);
  readStatusFile(true);
}
Program: 134909
Project: 134909
Buggy source:
public void actionPerformed(java.awt.event.ActionEvent e){
  jCloseButton.setEnabled(false);
  jStopButton.setEnabled(true);
  startSampleButton.setEnabled(false);
  getFreqTextField().setEnabled(false);
  getTimeSampTextField().setEnabled(false);
  toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
  startSample();
}

Fixed version (ground truth):
public void actionPerformed(java.awt.event.ActionEvent e){
  jCloseButton.setEnabled(false);
  jStopButton.setEnabled(true);
  startSampleButton.setEnabled(false);
  getFreqTextField().setEnabled(false);
  getTimeSampTextField().setEnabled(false);
  try {
    Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getFreqTextField().setText("String_Node_Str");
  }
  toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
  startSample();
}
Program: 134910
Project: 134910
Buggy source:
private JTextField getFreqTextField(){
  if (freqTextField == null) {
    freqTextField=new JTextField();
    freqTextField.setText("String_Node_Str");
    freqTextField.setPreferredSize(new Dimension(50,19));
  }
  return freqTextField;
}

Fixed version (ground truth):
private JTextField getFreqTextField(){
  if (freqTextField == null) {
    freqTextField=new JTextField();
    freqTextField.setText("String_Node_Str");
    freqTextField.setPreferredSize(new Dimension(50,19));
    freqTextField.addFocusListener(new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        if (!freqTextField.getText().matches("String_Node_Str")) {
          JOptionPane.showConfirmDialog(BeanGrouper.this,"String_Node_Str" + freqTextField.getText() + "String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,JOptionPane.WARNING_MESSAGE);
          freqTextField.setText("String_Node_Str");
          freqTextField.grabFocus();
        }
      }
    }
);
  }
  return freqTextField;
}
Program: 134911
Project: 134911
Buggy source:
private JTextField getTimeSampTextField(){
  if (timeSampTextField == null) {
    timeSampTextField=new JTextField();
    timeSampTextField.setText("String_Node_Str");
    timeSampTextField.setPreferredSize(new Dimension(50,19));
  }
  return timeSampTextField;
}

Fixed version (ground truth):
private JTextField getTimeSampTextField(){
  if (timeSampTextField == null) {
    timeSampTextField=new JTextField();
    timeSampTextField.setText("String_Node_Str");
    timeSampTextField.setPreferredSize(new Dimension(50,19));
    timeSampTextField.addFocusListener(new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        if (!timeSampTextField.getText().matches("String_Node_Str")) {
          JOptionPane.showConfirmDialog(BeanGrouper.this,"String_Node_Str" + timeSampTextField.getText() + "String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,JOptionPane.WARNING_MESSAGE);
          timeSampTextField.setText("String_Node_Str");
          timeSampTextField.grabFocus();
        }
      }
    }
);
  }
  return timeSampTextField;
}
Program: 134912
Project: 134912
Buggy source:
/** 
 * Method to begin the sampling of all the samples contained in the class.
 */
private void startSample(){
  int freq=100;
  setjLabel("String_Node_Str" + toFile.getFileName());
  try {
    freq=Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getFreqTextField().setText("String_Node_Str");
  }
  for (  DataPrinter wp : samplers) {
    wp.setFrecuency(freq);
    try {
      wp.startSample();
      isStopped=false;
    }
 catch (    alma.ACSErrTypeCommon.CouldntAccessComponentEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
catch (    alma.ACSErrTypeCommon.TypeNotSupportedEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
  }
  if (isStopped) {
    jCloseButton.setEnabled(true);
    jStopButton.setEnabled(false);
    startSampleButton.setEnabled(true);
    return;
  }
  int mins=0;
  try {
    mins=Integer.parseInt(getTimeSampTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getTimeSampTextField().setText("String_Node_Str");
  }
  if (mins != 0)   new Watchdog(mins).start();
}

Fixed version (ground truth):
/** 
 * Method to begin the sampling of all the samples contained in the class.
 */
private void startSample(){
  int freq=0;
  try {
    freq=Integer.parseInt(getFreqTextField().getText());
  }
 catch (  NumberFormatException ex) {
  }
  setjLabel("String_Node_Str" + toFile.getFileName());
  freq=Integer.parseInt(getFreqTextField().getText());
  for (  DataPrinter wp : samplers) {
    wp.setFrecuency(freq);
    try {
      wp.startSample();
      isStopped=false;
    }
 catch (    alma.ACSErrTypeCommon.CouldntAccessComponentEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
catch (    alma.ACSErrTypeCommon.TypeNotSupportedEx e) {
      wp.setComponentAvailable(false,"String_Node_Str");
    }
  }
  if (isStopped) {
    jCloseButton.setEnabled(true);
    jStopButton.setEnabled(false);
    startSampleButton.setEnabled(true);
    freqTextField.setEnabled(true);
    timeSampTextField.setEnabled(true);
    return;
  }
  int mins=0;
  try {
    mins=Integer.parseInt(getTimeSampTextField().getText());
  }
 catch (  NumberFormatException ex) {
    getTimeSampTextField().setText("String_Node_Str");
  }
  if (mins != 0)   new Watchdog(mins).start();
}
Program: 134913
Project: 134913
Buggy source:
/** 
 * This method initializes startSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getStartSampleButton(){
  if (startSampleButton == null) {
    startSampleButton=new JButton();
    startSampleButton.setText("String_Node_Str");
    startSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        jCloseButton.setEnabled(false);
        jStopButton.setEnabled(true);
        startSampleButton.setEnabled(false);
        getFreqTextField().setEnabled(false);
        getTimeSampTextField().setEnabled(false);
        toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
        startSample();
      }
    }
);
  }
  return startSampleButton;
}

Fixed version (ground truth):
/** 
 * This method initializes startSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getStartSampleButton(){
  if (startSampleButton == null) {
    startSampleButton=new JButton();
    startSampleButton.setText("String_Node_Str");
    startSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        jCloseButton.setEnabled(false);
        jStopButton.setEnabled(true);
        startSampleButton.setEnabled(false);
        getFreqTextField().setEnabled(false);
        getTimeSampTextField().setEnabled(false);
        try {
          Integer.parseInt(getFreqTextField().getText());
        }
 catch (        NumberFormatException ex) {
          getFreqTextField().setText("String_Node_Str");
        }
        toFile.initialize(Integer.parseInt(getFreqTextField().getText()));
        startSample();
      }
    }
);
  }
  return startSampleButton;
}