nus-yam/ex-repair huggingface dataset:
Program: 21514
Project: 21514
Buggy source:
public void run(){
  plugin=downloadLink.getPlugin();
  PluginStep step=plugin.getNextStep(downloadLink);
  statusBar.setPluginForHostActive(true);
  while (!aborted && step != null && step.getStatus() != PluginStep.STATUS_ERROR) {
switch (step.getStep()) {
case PluginStep.STEP_WAIT_TIME:
      try {
        long milliSeconds=(Long)step.getParameter();
        logger.info("String_Node_Str" + milliSeconds + "String_Node_Str");
        Thread.sleep(milliSeconds);
        step.setStatus(PluginStep.STATUS_DONE);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    break;
case PluginStep.STEP_CAPTCHA:
  String captchaText=getCaptcha((String)step.getParameter());
step.setParameter(captchaText);
step.setStatus(PluginStep.STATUS_DONE);
}
step=plugin.getNextStep(downloadLink);
}
statusBar.setPluginForHostActive(false);
if (aborted) {
logger.warning("String_Node_Str");
}
if (step != null && step.getStatus() == PluginStep.STATUS_ERROR) {
logger.severe("String_Node_Str");
}
btnStartStop.setSelected(false);
}

Fixed version (ground truth):
public void run(){
  downloadLink=tabDownloadTable.getNextDownloadLink();
  plugin=downloadLink.getPlugin();
  PluginStep step=plugin.getNextStep(downloadLink);
  statusBar.setPluginForHostActive(true);
  while (!aborted && step != null && step.getStatus() != PluginStep.STATUS_ERROR) {
switch (step.getStep()) {
case PluginStep.STEP_WAIT_TIME:
      try {
        long milliSeconds=(Long)step.getParameter();
        logger.info("String_Node_Str" + milliSeconds + "String_Node_Str");
        Thread.sleep(milliSeconds);
        step.setStatus(PluginStep.STATUS_DONE);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    break;
case PluginStep.STEP_CAPTCHA:
  String captchaText=getCaptcha((String)step.getParameter());
step.setParameter(captchaText);
step.setStatus(PluginStep.STATUS_DONE);
}
step=plugin.getNextStep(downloadLink);
}
statusBar.setPluginForHostActive(false);
if (aborted) {
logger.warning("String_Node_Str");
}
if (step != null && step.getStatus() == PluginStep.STATUS_ERROR) {
logger.severe("String_Node_Str");
}
btnStartStop.setSelected(false);
}
Program: 21515
Project: 21515
Buggy source:
private boolean prepareDownload(DownloadLink downloadLink){
  try {
    URLConnection urlConnection=new URL(postTarget).openConnection();
    urlConnection.setDoOutput(true);
    String postParams=createPostParameterFromHashMap(postParameter);
    OutputStreamWriter wr=new OutputStreamWriter(urlConnection.getOutputStream());
    wr.write(postParams);
    wr.flush();
    int length=urlConnection.getContentLength();
    File fileOutput=downloadLink.getFileOutput();
    downloadLink.setDownloadLength(length);
    return download(downloadLink,urlConnection);
  }
 catch (  IOException e) {
    logger.severe("String_Node_Str" + e.toString());
  }
  return false;
}

Fixed version (ground truth):
private boolean prepareDownload(DownloadLink downloadLink){
  try {
    URLConnection urlConnection=new URL(postTarget).openConnection();
    urlConnection.setDoOutput(true);
    String postParams=createPostParameterFromHashMap(postParameter);
    OutputStreamWriter wr=new OutputStreamWriter(urlConnection.getOutputStream());
    wr.write(postParams);
    wr.flush();
    int length=urlConnection.getContentLength();
    File fileOutput=downloadLink.getFileOutput();
    downloadLink.setDownloadLength(length);
    logger.info("String_Node_Str");
    return download(downloadLink,urlConnection);
  }
 catch (  IOException e) {
    logger.severe("String_Node_Str" + e.toString());
  }
  return false;
}
Program: 21521
Project: 21521
Buggy source:
public void requestSent(BOSHMessageEvent event){
  try {
    Thread.sleep(10);
  }
 catch (  InterruptedException intx) {
  }
}

Fixed version (ground truth):
public void requestSent(BOSHMessageEvent event){
synchronized (orderedResends) {
    String actual=event.getBody().toXML();
    orderedResends.add(actual);
    orderedResends.notify();
  }
}
Program: 21523
Project: 21523
Buggy source:
void doFragment(ResourceImpl resource){
  ManifestEntry entry=manifest.getHost();
  if (entry == null) {
    return;
  }
 else {
    RequirementImpl r=new RequirementImpl("String_Node_Str");
    StringBuffer sb=new StringBuffer();
    sb.append("String_Node_Str");
    sb.append(entry.getName());
    sb.append("String_Node_Str");
    sb.append(entry.getVersion());
    sb.append("String_Node_Str");
    r.setFilter(sb.toString());
    r.setComment("String_Node_Str" + entry.getName());
    r.setExtend(true);
    r.setOptional(false);
    r.setMultiple(false);
    resource.addRequirement(r);
    CapabilityImpl capability=new CapabilityImpl("String_Node_Str");
    capability.addProperty("String_Node_Str",entry.getName());
    capability.addProperty("String_Node_Str",entry.getVersion());
    resource.addCapability(capability);
  }
}

Fixed version (ground truth):
void doFragment(ResourceImpl resource){
  ManifestEntry entry=manifest.getHost();
  if (entry == null) {
    return;
  }
 else {
    RequirementImpl r=new RequirementImpl("String_Node_Str");
    StringBuffer sb=new StringBuffer();
    sb.append("String_Node_Str");
    sb.append(entry.getName());
    sb.append("String_Node_Str");
    appendVersion(sb,entry.getVersion());
    sb.append("String_Node_Str");
    r.setFilter(sb.toString());
    r.setComment("String_Node_Str" + entry.getName());
    r.setExtend(true);
    r.setOptional(false);
    r.setMultiple(false);
    resource.addRequirement(r);
    CapabilityImpl capability=new CapabilityImpl("String_Node_Str");
    capability.addProperty("String_Node_Str",entry.getName());
    capability.addProperty("String_Node_Str",entry.getVersion());
    resource.addCapability(capability);
  }
}
Program: 21524
Project: 21524
Buggy source:
CapabilityImpl createCapability(String name,ManifestEntry pack){
  CapabilityImpl capability=new CapabilityImpl(name);
  capability.addProperty(name,pack.getName());
  capability.addProperty("String_Node_Str",pack.getVersion());
  Map attributes=pack.getAttributes();
  if (attributes != null)   for (Iterator at=attributes.keySet().iterator(); at.hasNext(); ) {
    String key=(String)at.next();
    if (key.equalsIgnoreCase("String_Node_Str") || key.equalsIgnoreCase("String_Node_Str"))     continue;
 else {
      Object value=attributes.get(key);
      capability.addProperty(key,value);
    }
  }
  return capability;
}

Fixed version (ground truth):
CapabilityImpl createCapability(String name,ManifestEntry pack){
  CapabilityImpl capability=new CapabilityImpl(name);
  capability.addProperty(name,pack.getName());
  capability.addProperty("String_Node_Str",pack.getVersion());
  Map attributes=pack.getAttributes();
  if (attributes != null)   for (Iterator at=attributes.keySet().iterator(); at.hasNext(); ) {
    String key=(String)at.next();
    if (key.equalsIgnoreCase("String_Node_Str") || key.equalsIgnoreCase("String_Node_Str"))     continue;
 else {
      Object value=attributes.get(key);
      capability.addProperty(key,value);
    }
  }
  Map directives=pack.getDirectives();
  if (directives != null)   for (Iterator at=directives.keySet().iterator(); at.hasNext(); ) {
    String key=(String)at.next();
    Object value=directives.get(key);
    capability.addProperty(key,value);
  }
  return capability;
}
Program: 21525
Project: 21525
Buggy source:
void createImportFilter(RequirementImpl req,String name,ManifestEntry pack){
  StringBuffer filter=new StringBuffer();
  filter.append("String_Node_Str");
  filter.append(name);
  filter.append("String_Node_Str");
  filter.append(pack.getName());
  filter.append("String_Node_Str");
  VersionRange version=pack.getVersion();
  if (version != null) {
    if (version.isRange()) {
      filter.append("String_Node_Str");
      filter.append("String_Node_Str");
      if (version.includeLow())       filter.append("String_Node_Str");
      filter.append(version.low);
      filter.append("String_Node_Str");
      filter.append("String_Node_Str");
      filter.append("String_Node_Str");
      if (version.includeHigh())       filter.append("String_Node_Str");
      filter.append(version.high);
      filter.append("String_Node_Str");
    }
 else {
      filter.append("String_Node_Str");
      filter.append(pack.getVersion());
      filter.append("String_Node_Str");
    }
  }
  Map attributes=pack.getAttributes();
  Set attrs=doImportPackageAttributes(req,filter,attributes);
  if (attrs.size() > 0) {
    String del="String_Node_Str";
    filter.append("String_Node_Str");
    for (Iterator i=attrs.iterator(); i.hasNext(); ) {
      filter.append(del);
      filter.append(i.next());
      del="String_Node_Str";
    }
    filter.append("String_Node_Str");
  }
  filter.append("String_Node_Str");
  req.setFilter(filter.toString());
}

Fixed version (ground truth):
void createImportFilter(RequirementImpl req,String name,ManifestEntry pack){
  StringBuffer filter=new StringBuffer();
  filter.append("String_Node_Str");
  filter.append(name);
  filter.append("String_Node_Str");
  filter.append(pack.getName());
  filter.append("String_Node_Str");
  appendVersion(filter,pack.getVersion());
  Map attributes=pack.getAttributes();
  Set attrs=doImportPackageAttributes(req,filter,attributes);
  if (attrs.size() > 0) {
    String del="String_Node_Str";
    filter.append("String_Node_Str");
    for (Iterator i=attrs.iterator(); i.hasNext(); ) {
      filter.append(del);
      filter.append(i.next());
      del="String_Node_Str";
    }
    filter.append("String_Node_Str");
  }
  filter.append("String_Node_Str");
  req.setFilter(filter.toString());
}
Program: 21526
Project: 21526
Buggy source:
public static Tag toXML(Capability capability){
  Tag tag=new Tag("String_Node_Str");
  tag.addAttribute("String_Node_Str",capability.getName());
  Map properties=capability.getProperties();
  for (Iterator k=properties.keySet().iterator(); k.hasNext(); ) {
    String key=(String)k.next();
    List values=(List)properties.get(key);
    for (Iterator v=values.iterator(); v.hasNext(); ) {
      Object value=v.next();
      Tag p=new Tag("String_Node_Str");
      tag.addContent(p);
      p.addAttribute("String_Node_Str",key);
      if (value != null)       p.addAttribute("String_Node_Str",value.toString());
 else       System.out.println("String_Node_Str" + key);
      String type=null;
      if (value instanceof Number)       type="String_Node_Str";
 else       if (value.getClass() == VersionRange.class)       type="String_Node_Str";
      if (type != null)       p.addAttribute("String_Node_Str",type);
    }
  }
  return tag;
}

Fixed version (ground truth):
public static Tag toXML(Capability capability){
  Tag tag=new Tag("String_Node_Str");
  tag.addAttribute("String_Node_Str",capability.getName());
  Map properties=capability.getProperties();
  for (Iterator k=properties.keySet().iterator(); k.hasNext(); ) {
    String key=(String)k.next();
    List values=(List)properties.get(key);
    for (Iterator v=values.iterator(); v.hasNext(); ) {
      Object value=v.next();
      Tag p=new Tag("String_Node_Str");
      tag.addContent(p);
      p.addAttribute("String_Node_Str",key);
      if (value != null) {
        p.addAttribute("String_Node_Str",valueString(value));
        String type=null;
        if (value instanceof Number)         type="String_Node_Str";
 else         if (value.getClass() == VersionRange.class)         type="String_Node_Str";
 else         if (value.getClass().isArray()) {
          type="String_Node_Str";
        }
        if (type != null)         p.addAttribute("String_Node_Str",type);
      }
 else       System.out.println("String_Node_Str" + key);
    }
  }
  return tag;
}
Program: 21527
Project: 21527
Buggy source:
public List getEntries(String line) throws IOException {
  List v=new Vector();
  Set aliases=new HashSet();
  StreamTokenizer st=getStreamTokenizer(line);
  do {
    Parameter parameter=getParameter(st);
    ManifestEntry p=new ManifestEntry(parameter.key);
    while (st.ttype == ';') {
      parameter=getParameter(st);
      if (parameter.value == null) {
        aliases.add(parameter.key);
      }
 else {
        if (parameter.type == Parameter.ATTRIBUTE)         p.addParameter(parameter);
 else         p.addParameter(parameter);
      }
    }
    v.add(p);
    for (Iterator a=aliases.iterator(); a.hasNext(); ) {
      v.add(p.getAlias((String)a.next()));
    }
  }
 while (st.ttype == ',');
  return v;
}

Fixed version (ground truth):
public List getEntries(String line) throws IOException {
  List v=new Vector();
  Set aliases=new HashSet();
  StreamTokenizer st=getStreamTokenizer(line);
  do {
    Parameter parameter=getParameter(st);
    ManifestEntry p=new ManifestEntry(parameter.key);
    while (st.ttype == ';') {
      parameter=getParameter(st);
      if (parameter.value == null) {
        aliases.add(parameter.key);
      }
 else {
        if (parameter.type == Parameter.ATTRIBUTE)         p.addParameter(parameter);
 else         if (parameter.type == Parameter.DIRECTIVE)         p.addParameter(parameter);
 else         p.addParameter(parameter);
      }
    }
    v.add(p);
    for (Iterator a=aliases.iterator(); a.hasNext(); ) {
      v.add(p.getAlias((String)a.next()));
    }
  }
 while (st.ttype == ',');
  return v;
}
Program: 21528
Project: 21528
Buggy source:
public VersionRange(String string){
  string=string.trim();
  Matcher m=RANGE.matcher(string);
  if (m.matches()) {
    start=m.group(1).charAt(0);
    low=new Version(m.group(2));
    high=new Version(m.group(6));
    end=m.group(10).charAt(0);
    if (low.compareTo(high) >= 0)     throw new IllegalArgumentException("String_Node_Str" + low + "String_Node_Str"+ high);
  }
 else   high=low=new Version(string);
}

Fixed version (ground truth):
public VersionRange(String string){
  string=string.trim();
  Matcher m=RANGE.matcher(string);
  if (m.matches()) {
    start=m.group(1).charAt(0);
    low=new Version(m.group(2));
    high=new Version(m.group(6));
    end=m.group(10).charAt(0);
    if (low.compareTo(high) > 0)     throw new IllegalArgumentException("String_Node_Str" + low + "String_Node_Str"+ high);
  }
 else   high=low=new Version(string);
}
Program: 21529
Project: 21529
Buggy source:
private void checkDatabase(){
  Cursor mCursor=mDatabaseHelper.getDecision(mApplicationName);
  if (mCursor.getCount() == 0) {
    Log.i(TAG,"String_Node_Str");
    ruleNotification();
  }
 else {
    Log.i(TAG,"String_Node_Str");
    mCursor.moveToFirst();
    boolean action=false;
    boolean endLoop=false;
    while (!endLoop) {
      if (mApplicationName.equals(mCursor.getString(1)) && mCursor.getString(2).equals(mOFMatch.getDataLayerType()) && mCursor.getString(3).equals(mOFMatch.getNetworkProtocol())&& mCursor.getString(4).equals(mOFMatch.getTransportDestination())&& mCursor.getString(5).equals(mOFMatch.getTransportSource())&& mCursor.getString(6).equals(mOFMatch.getInputPort())) {
        if (mCursor.getString(7).equals("String_Node_Str")) {
          action=true;
        }
      }
      if (mCursor.isAfterLast() == false) {
        mCursor.moveToNext();
      }
 else {
        endLoop=true;
      }
    }
    sendFirewallResponse(action,mInquiry);
  }
  mCursor.close();
}

Fixed version (ground truth):
private void checkDatabase(){
  Cursor mCursor=mDatabaseHelper.getDecision(mApplicationName);
  if (mCursor.getCount() == 0) {
    Log.i(TAG,"String_Node_Str");
    ruleNotification();
  }
 else {
    Log.i(TAG,"String_Node_Str");
    mCursor.moveToFirst();
    boolean action=false;
    boolean endLoop=false;
    while (!endLoop) {
      if (mApplicationName.equals(mCursor.getString(1)) && mCursor.getString(2).equals(mOFMatch.getDataLayerType()) && mCursor.getString(3).equals(mOFMatch.getNetworkProtocol())&& mCursor.getString(4).equals(mOFMatch.getTransportDestination())&& mCursor.getString(5).equals(mOFMatch.getTransportSource())&& mCursor.getString(6).equals(mOFMatch.getInputPort())) {
        if (mCursor.getString(7).equals("String_Node_Str")) {
          action=true;
        }
      }
      mCursor.moveToNext();
      if (mCursor.isAfterLast() == true) {
        endLoop=true;
      }
    }
    sendFirewallResponse(action,mInquiry);
  }
  mCursor.close();
}
Program: 21530
Project: 21530
Buggy source:
public void run(){
  this.con.user=con.jAuctionServer.authenticateUser(username,password);
  String auth_key=null;
  if (this.con.user != null) {
    this.con.user.con=this.con;
    auth_key=con.user.getAuthKey();
  }
  HashMap data=new HashMap();
  data.put("String_Node_Str",auth_key);
  data.put("String_Node_Str",con.user.getId());
  con.respond(responseName(),data);
}

Fixed version (ground truth):
public void run(){
  this.con.user=con.jAuctionServer.authenticateUser(username,password);
  String auth_key=null;
  HashMap data=new HashMap();
  if (this.con.user != null) {
    this.con.user.con=this.con;
    auth_key=con.user.getAuthKey();
    data.put("String_Node_Str",con.user.getId());
  }
  data.put("String_Node_Str",auth_key);
  con.respond(responseName(),data);
}
Program: 21531
Project: 21531
Buggy source:
protected void onmnStartClick(){
  if (!logcat.isActive()) {
    logcat.stop();
    mnStart.setText("String_Node_Str");
    return;
  }
  try {
    if (!logcat.start()) {
      MsgBox.show(shlYetAnotherLogcat,"String_Node_Str","String_Node_Str",SWT.ICON_ERROR);
      return;
    }
  }
 catch (  Exception e) {
    MsgBox.show(shlYetAnotherLogcat,"String_Node_Str",e.getMessage(),SWT.ICON_ERROR);
    return;
  }
  mnStart.setText("String_Node_Str");
}

Fixed version (ground truth):
protected void onmnStartClick(){
  if (logcat.isActive()) {
    logcat.stop();
    mnStart.setText("String_Node_Str");
    return;
  }
  try {
    if (!logcat.start()) {
      MsgBox.show(shlYetAnotherLogcat,"String_Node_Str","String_Node_Str",SWT.ICON_ERROR);
      return;
    }
  }
 catch (  Exception e) {
    MsgBox.show(shlYetAnotherLogcat,"String_Node_Str",e.getMessage(),SWT.ICON_ERROR);
    return;
  }
  mnStart.setText("String_Node_Str");
}
Program: 21532
Project: 21532
Buggy source:
protected void onmnNewFilterClick(){
  FilterList filterList;
  String name;
  boolean linkState;
  UserFilterObject userFilter;
  TabContent filterLoggerUi;
  AddNewFilterDialog dlg=new AddNewFilterDialog(shlYetAnotherLogcat,SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
  filterList=(FilterList)dlg.open();
  if (filterList == null)   return;
  name=dlg.getFilterName();
  linkState=dlg.getLinkState();
  userFilter=new UserFilterObject(filterList,name,linkState);
  userFilters.add(userFilter);
  filterLoggerUi=new TabContent(tbTabContainer,name,true);
  UserFilterObject.saveFilters(userFilters,"String_Node_Str");
  try {
    logcat.addSlot(name,filterList).linkUi(filterLoggerUi);
  }
 catch (  Exception e) {
    Log.write(e.getMessage());
    e.printStackTrace(Log.getPrintStreamInstance());
  }
}

Fixed version (ground truth):
protected void onmnNewFilterClick(){
  FilterList filterList;
  String name;
  boolean linkState;
  UserFilterObject userFilter;
  TabContent filterLoggerUi;
  AddNewFilterDialog dlg=new AddNewFilterDialog(shlYetAnotherLogcat,SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
  filterList=(FilterList)dlg.open();
  if (filterList == null)   return;
  name=dlg.getFilterName();
  linkState=dlg.getLinkState();
  userFilter=new UserFilterObject(filterList,name,linkState);
  userFilters.add(userFilter);
  filterLoggerUi=new TabContent(tbTabContainer,name,true);
  UserFilterObject.saveFilters(userFilters,"String_Node_Str");
  try {
    logcat.addSlot(name,filterList,filterLoggerUi);
  }
 catch (  Exception e) {
    Log.write(e.getMessage());
    e.printStackTrace(Log.getPrintStreamInstance());
  }
}
Program: 21534
Project: 21534
Buggy source:
public FilteredLogSlot addSlot(String name,FilterList list){
  FilteredLogSlot slot=null;
  if (StringHelper.isNullOrEmpty(name))   return null;
  slot=new FilteredLogSlot(name,list);
  slots.add(slot);
  if (slots.getCount() == 1) {
    generalLoggerUi=slot.getLoggerUi();
  }
  return slot;
}

Fixed version (ground truth):
public FilteredLogSlot addSlot(String name,FilterList list,TabContent ui){
  FilteredLogSlot slot=null;
  if (StringHelper.isNullOrEmpty(name))   return null;
  slot=new FilteredLogSlot(name,list);
  try {
    slot.linkUi(ui);
  }
 catch (  Exception e) {
  }
  slots.add(slot);
  if (slots.getCount() == 1) {
    generalLoggerUi=slot.getLoggerUi();
  }
  return slot;
}
Program: 21535
Project: 21535
Buggy source:
public boolean tryAdd(LogEntry entry) throws Exception {
  checkDisposed();
  if (filters.match(entry)) {
    loggerUi.writeLog(entry);
    entries.addEntry(entry);
  }
  return true;
}

Fixed version (ground truth):
public boolean tryAdd(LogEntry entry) throws Exception {
  checkDisposed();
  if (filters == null)   return false;
  if (filters.match(entry)) {
    loggerUi.writeLog(entry);
    entries.addEntry(entry);
  }
  return true;
}
Program: 21536
Project: 21536
Buggy source:
public static LogEntry parse(String buffer){
  LogEntry log=null;
  char typeId;
  int pid;
  String tag, msg;
  Pattern regex=Pattern.compile("String_Node_Str");
  Matcher match=regex.matcher(buffer);
  if (match.find()) {
    if (match.groupCount() == 4) {
      typeId=match.group(1).charAt(0);
      tag=match.group(2).trim();
      try {
        pid=Integer.parseInt(match.group(3).trim());
      }
 catch (      Exception e) {
        return null;
      }
      msg=match.group(4);
      log=new LogEntry(typeId,tag,pid,msg);
    }
  }
  return log;
}

Fixed version (ground truth):
public static LogEntry parse(String buffer){
  LogEntry log=null;
  char typeId;
  int pid;
  String tag, msg;
  Pattern regex=Pattern.compile("String_Node_Str");
  Matcher match=regex.matcher(buffer);
  if (match.find()) {
    if (match.groupCount() == 4) {
      typeId=match.group(1).charAt(0);
      tag=match.group(2).trim();
      try {
        pid=Integer.parseInt(match.group(3).trim());
      }
 catch (      Exception e) {
        e.printStackTrace(Log.getPrintStreamInstance());
        return null;
      }
      msg=match.group(4);
      log=new LogEntry(typeId,tag,pid,msg);
    }
  }
  return log;
}
Program: 21537
Project: 21537
Buggy source:
private void writeLogToList(LogEntry entry){
  try {
    logList.addItem(getColorForEntry(entry),getLogItemsForLogObject(entry));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void writeLogToList(LogEntry entry){
  if (entry == null)   return;
  try {
    logList.addItem(getColorForEntry(entry),getLogItemsForLogObject(entry));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 21538
Project: 21538
Buggy source:
public Object open(){
  createContents();
  shell.open();
  shell.layout();
  Display display=getParent().getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  logcatShell.stopShell();
  return result;
}

Fixed version (ground truth):
public Object open(){
  createContents();
  locateCenter();
  shell.open();
  shell.layout();
  Display display=getParent().getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  logcatShell.stopShell();
  return result;
}
Program: 21539
Project: 21539
Buggy source:
public Object open(){
  createContents();
  shlAddANew.open();
  shlAddANew.layout();
  Display display=getParent().getDisplay();
  while (!shlAddANew.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  return filters.getCount() == 0 ? null : filters;
}

Fixed version (ground truth):
public Object open(){
  createContents();
  locateCenter();
  shlAddANew.open();
  shlAddANew.layout();
  Display display=getParent().getDisplay();
  while (!shlAddANew.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  return filters.getCount() == 0 ? null : filters;
}
Program: 21540
Project: 21540
Buggy source:
public Object open(){
  createContents();
  shell.open();
  shell.layout();
  Display display=getParent().getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  return result;
}

Fixed version (ground truth):
public Object open(){
  createContents();
  locateCenter();
  shell.open();
  shell.layout();
  Display display=getParent().getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  return result;
}
Program: 21541
Project: 21541
Buggy source:
/** 
 * @param < T >
 * @param json
 * @param typeRef
 */
@SuppressWarnings("String_Node_Str") public <T>T jsonToObject(final JSonNode json,final TypeRef<T> type){
  final Type clazz=((ParameterizedTypeImpl)type.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
  return (T)this.jsonToObject(json,clazz);
}

Fixed version (ground truth):
/** 
 * @param < T >
 * @param json
 * @param typeRef
 */
@SuppressWarnings("String_Node_Str") public <T>T jsonToObject(final JSonNode json,final TypeRef<T> type){
  return (T)this.jsonToObject(json,type.getType());
}
Program: 21543
Project: 21543
Buggy source:
@Override public void actionPerformed(final ActionEvent e){
  more.setVisible(false);
  scrollPane.setVisible(true);
  logField.setText(Exceptions.getStackTrace(exception));
  pack();
}

Fixed version (ground truth):
@Override public void actionPerformed(final ActionEvent e){
  scrollPane.setVisible(true);
  logField.setText(Exceptions.getStackTrace(exception));
  more.setVisible(false);
  pack();
}
Program: 21545
Project: 21545
Buggy source:
/** 
 */
protected void dispose(){
}

Fixed version (ground truth):
/** 
 */
protected void dispose(){
  getDialog().realDispose();
}
Program: 21547
Project: 21547
Buggy source:
/** 
 * @param title2
 */
private void setTitle(final String title2){
  getDialog().setTitle(title2);
}

Fixed version (ground truth):
/** 
 * @param title2
 */
protected void setTitle(final String title2){
  getDialog().setTitle(title2);
}
Program: 21548
Project: 21548
Buggy source:
@Override protected void addButtons(final JPanel buttonBar){
  final JButton more=new JButton(APPWORKUTILS.ExceptionDialog_layoutDialogContent_more_button.s());
  more.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  more.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    final ActionEvent e){
      scrollPane.setVisible(true);
      logField.setText(Exceptions.getStackTrace(exception));
      more.setVisible(false);
      pack();
    }
  }
);
  more.setHorizontalAlignment(SwingConstants.RIGHT);
  buttonBar.add(more,"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void addButtons(final JPanel buttonBar){
  final JButton more=new JButton(APPWORKUTILS.ExceptionDialog_layoutDialogContent_more_button.s());
  more.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  more.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    final ActionEvent e){
      scrollPane.setVisible(true);
      logField.setText(Exceptions.getStackTrace(exception));
      logLabel.setVisible(true);
      more.setVisible(false);
      pack();
    }
  }
);
  more.setHorizontalAlignment(SwingConstants.RIGHT);
  buttonBar.add(more,"String_Node_Str");
}
Program: 21549
Project: 21549
Buggy source:
@Override public void actionPerformed(final ActionEvent e){
  scrollPane.setVisible(true);
  logField.setText(Exceptions.getStackTrace(exception));
  more.setVisible(false);
  pack();
}

Fixed version (ground truth):
@Override public void actionPerformed(final ActionEvent e){
  scrollPane.setVisible(true);
  logField.setText(Exceptions.getStackTrace(exception));
  logLabel.setVisible(true);
  more.setVisible(false);
  pack();
}
Program: 21551
Project: 21551
Buggy source:
@Override protected String[] createReturnValue(){
  return getLogins();
}

Fixed version (ground truth):
@Override protected LoginData createReturnValue(){
  if ((getReturnmask() & (Dialog.RETURN_OK | Dialog.RETURN_TIMEOUT)) == 0) {
    return null;
  }
  return new LoginData(accid.getText(),new String(pass.getPassword()),save.isSelected());
}
Program: 21552
Project: 21552
Buggy source:
public LoginDialog(int flag,String title,String message,String defaultMessage,ImageIcon icon,String okOption,String cancelOption){
  super(flag & 0xffffffff & (~Dialog.STYLE_SHOW_DO_NOT_DISPLAY_AGAIN),title,icon,okOption,cancelOption);
  remember=BinaryLogic.containsAll(flag,Dialog.STYLE_SHOW_DO_NOT_DISPLAY_AGAIN);
  register=BinaryLogic.containsAll(flag,REGISTER);
  this.defaultMessage=defaultMessage;
  this.message=message;
}

Fixed version (ground truth):
public LoginDialog(final int flag){
  super(flag & 0xffffffff & ~Dialog.STYLE_SHOW_DO_NOT_DISPLAY_AGAIN,APPWORKUTILS.AccountNew_AccountNew_title.s(),ImageProvider.getImageIcon("String_Node_Str",32,32),null,null);
}
Program: 21553
Project: 21553
Buggy source:
@Override protected void packed(){
  login.selectAll();
  requestFocus();
  login.requestFocusInWindow();
}

Fixed version (ground truth):
@Override protected void packed(){
  accid.selectAll();
  requestFocus();
  accid.requestFocusInWindow();
}
Program: 21555
Project: 21555
Buggy source:
/** 
 * This method adds an action to the queue. if the caller is a queueaction itself, the action will be executed directly. In this case, this method can throw Exceptions. If the caller is not the QUeuethread, this method is not able to throw exceptions, but the exceptions are passed to the exeptionhandler method of the queueaction
 * @param < T >
 * @param < E >
 * @param item
 * @throws T
 */
public <E,T extends Throwable>void add(final QueueAction<?,T> action) throws T {
  action.reset();
  action.setCallerThread(this,Thread.currentThread());
  if (this.isQueueThread(action)) {
    this.startItem(action,false);
  }
 else {
    this.internalAdd(action);
  }
}

Fixed version (ground truth):
/** 
 * This method adds an action to the queue. if the caller is a queueaction itself, the action will be executed directly. In this case, this method can throw Exceptions. If the caller is not the QUeuethread, this method is not able to throw exceptions, but the exceptions are passed to the exeptionhandler method of the queueaction
 * @param < T >
 * @param < E >
 * @param item
 * @throws T
 */
public <E,T extends Throwable>void add(final QueueAction<?,T> action) throws T {
  action.reset();
  action.setCallerThread(this,Thread.currentThread());
  if (isQueueThread(action)) {
    this.startItem(action,false);
  }
 else {
    internalAdd(action);
  }
}
Program: 21556
Project: 21556
Buggy source:
public long getQueueSize(QueuePriority prio){
  if (prio == null)   return -1;
synchronized (this.queueLock) {
    ArrayList<QueueAction<?,? extends Throwable>> ret=this.queue.get(prio);
    if (ret == null)     return -1;
    return ret.size();
  }
}

Fixed version (ground truth):
public long getQueueSize(final QueuePriority prio){
  if (prio == null) {
    return -1;
  }
synchronized (queueLock) {
    final ArrayList<QueueAction<?,? extends Throwable>> ret=queue.get(prio);
    if (ret == null) {
      return -1;
    }
    return ret.size();
  }
}
Program: 21557
Project: 21557
Buggy source:
@SuppressWarnings("String_Node_Str") protected <T extends Throwable>void startItem(final QueueAction<?,T> item,final boolean callExceptionhandler) throws T {
  try {
    if (this.thread != item.getCallerThread()) {
synchronized (this.queueThreadHistory) {
        this.queueThreadHistory.add(item);
      }
    }
    item.start(this);
  }
 catch (  final Throwable e) {
    if (!callExceptionhandler || !item.callExceptionHandler()) {
      if (e instanceof RuntimeException) {
        throw (RuntimeException)e;
      }
 else {
        throw (T)e;
      }
    }
  }
 finally {
    item.setFinished(true);
    if (this.thread != item.getCallerThread()) {
synchronized (this.queueThreadHistory) {
        if (this.queueThreadHistory.size() != 0) {
          this.queueThreadHistory.remove(this.queueThreadHistory.size() - 1);
        }
      }
    }
synchronized (item) {
      item.notify();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected <T extends Throwable>void startItem(final QueueAction<?,T> item,final boolean callExceptionhandler) throws T {
  try {
    if (thread != item.getCallerThread()) {
synchronized (queueThreadHistory) {
        queueThreadHistory.add(item);
      }
    }
    item.start(this);
  }
 catch (  final Throwable e) {
    if (!callExceptionhandler || !item.callExceptionHandler()) {
      if (e instanceof RuntimeException) {
        throw (RuntimeException)e;
      }
 else {
        throw (T)e;
      }
    }
  }
 finally {
    item.setFinished(true);
    if (thread != item.getCallerThread()) {
synchronized (queueThreadHistory) {
        if (queueThreadHistory.size() != 0) {
          queueThreadHistory.remove(queueThreadHistory.size() - 1);
        }
      }
    }
synchronized (item) {
      item.notify();
    }
  }
}
Program: 21558
Project: 21558
Buggy source:
/** 
 * Only use this method if you can asure that the caller is NEVER the queue itself. if you are not sure use #add
 * @param < E >
 * @param < T >
 * @param action
 * @throws T
 */
public <E,T extends Throwable>void addAsynch(final QueueAction<?,T> action){
  if (this.isQueueThread(action)) {
    throw new RuntimeException("String_Node_Str");
  }
 else {
    action.reset();
    action.setCallerThread(this,Thread.currentThread());
    this.internalAdd(action);
  }
}

Fixed version (ground truth):
/** 
 * Only use this method if you can asure that the caller is NEVER the queue itself. if you are not sure use #add
 * @param < E >
 * @param < T >
 * @param action
 * @throws T
 */
public <E,T extends Throwable>void addAsynch(final QueueAction<?,T> action){
  if (isQueueThread(action)) {
    throw new RuntimeException("String_Node_Str");
  }
 else {
    action.reset();
    action.setCallerThread(this,Thread.currentThread());
    internalAdd(action);
  }
}
Program: 21559
Project: 21559
Buggy source:
public boolean isEmpty(){
synchronized (this.queueLock) {
    for (    final QueuePriority prio : this.prios) {
      if (!this.queue.get(prio).isEmpty()) {
        return false;
      }
    }
    return true;
  }
}

Fixed version (ground truth):
public boolean isEmpty(){
synchronized (queueLock) {
    for (    final QueuePriority prio : prios) {
      if (!queue.get(prio).isEmpty()) {
        return false;
      }
    }
    return true;
  }
}
Program: 21560
Project: 21560
Buggy source:
@Override public void run(){
  if (this.thread != null) {
    return;
  }
  this.thread=this;
  QueueAction<?,? extends Throwable> item=null;
  while (true) {
    try {
      this.handlePreRun();
synchronized (this) {
        while (this.waitFlag) {
          try {
            this.wait();
          }
 catch (          final Exception e) {
            org.appwork.utils.logging.Log.exception(e);
          }
        }
      }
synchronized (this.queueLock) {
        item=null;
        for (        final QueuePriority prio : this.prios) {
          if (this.queue.get(prio).size() > 0) {
            item=this.queue.get(prio).remove(0);
            break;
          }
        }
        if (item == null) {
          this.waitFlag=true;
        }
      }
      if (item == null || this.waitFlag) {
        continue;
      }
      try {
        this.startItem(item,true);
      }
 catch (      final Throwable e) {
      }
    }
 catch (    final Throwable e) {
      Log.L.info("String_Node_Str");
      Log.exception(e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (thread != null) {
    return;
  }
  thread=this;
  QueueAction<?,? extends Throwable> item=null;
  while (true) {
    try {
      handlePreRun();
synchronized (this) {
        while (waitFlag) {
          try {
            this.wait();
          }
 catch (          final Exception e) {
            org.appwork.utils.logging.Log.exception(e);
          }
        }
      }
synchronized (queueLock) {
        item=null;
        for (        final QueuePriority prio : prios) {
          if (queue.get(prio).size() > 0) {
            item=queue.get(prio).remove(0);
            break;
          }
        }
        if (item == null) {
          waitFlag=true;
        }
      }
      if (item == null || waitFlag) {
        continue;
      }
      try {
        this.startItem(item,true);
      }
 catch (      final Throwable e) {
      }
    }
 catch (    final Throwable e) {
      Log.L.info("String_Node_Str");
      Log.exception(e);
    }
  }
}
Program: 21561
Project: 21561
Buggy source:
protected QueueAction<?,? extends Throwable> getLastHistoryItem(){
synchronized (this.queueThreadHistory) {
    if (this.queueThreadHistory.size() == 0) {
      return null;
    }
    return this.queueThreadHistory.get(this.queueThreadHistory.size() - 1);
  }
}

Fixed version (ground truth):
protected QueueAction<?,? extends Throwable> getLastHistoryItem(){
synchronized (queueThreadHistory) {
    if (queueThreadHistory.size() == 0) {
      return null;
    }
    return queueThreadHistory.get(queueThreadHistory.size() - 1);
  }
}
Program: 21562
Project: 21562
Buggy source:
/** 
 * this functions returns true if the current running Thread is our QueueThread OR the SourceQueueItem chain is rooted in current running QueueItem
 */
public boolean isQueueThread(final QueueAction<?,? extends Throwable> item){
  if (Thread.currentThread() == this.thread) {
    return true;
  }
  QueueAction<?,? extends Throwable> last=item;
  Thread t=null;
  while (last != null && (t=last.getCallerThread()) != null) {
    if (t != null && t instanceof Queue) {
      if (t == this.thread) {
        if (this.debugFlag) {
          org.appwork.utils.logging.Log.L.warning("String_Node_Str" + item);
        }
        return true;
      }
      last=((Queue)t).getLastHistoryItem();
    }
 else {
      break;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * this functions returns true if the current running Thread is our QueueThread OR the SourceQueueItem chain is rooted in current running QueueItem
 */
public boolean isQueueThread(final QueueAction<?,? extends Throwable> item){
  if (Thread.currentThread() == thread) {
    return true;
  }
  QueueAction<?,? extends Throwable> last=item;
  Thread t=null;
  final ArrayList<Object> his=new ArrayList<Object>();
  while (last != null && (t=last.getCallerThread()) != null) {
    if (t != null && t instanceof Queue) {
      if (t == thread) {
        if (debugFlag) {
          org.appwork.utils.logging.Log.L.warning("String_Node_Str" + item);
        }
        return true;
      }
      last=((Queue)t).getLastHistoryItem();
      if (his.contains(last)) {
        break;
      }
      his.add(last);
    }
 else {
      break;
    }
  }
  return false;
}
Program: 21563
Project: 21563
Buggy source:
/** 
 * changes this queue's debugFlag
 * @param b
 */
public void setDebug(final boolean b){
  this.debugFlag=b;
}

Fixed version (ground truth):
/** 
 * changes this queue's debugFlag
 * @param b
 */
public void setDebug(final boolean b){
  debugFlag=b;
}
Program: 21564
Project: 21564
Buggy source:
/** 
 * returns true if this queue shows debug info
 * @return
 */
public boolean isDebug(){
  return this.debugFlag;
}

Fixed version (ground truth):
/** 
 * returns true if this queue shows debug info
 * @return
 */
public boolean isDebug(){
  return debugFlag;
}
Program: 21565
Project: 21565
Buggy source:
public void enqueue(final QueueAction<?,?> action){
  action.reset();
  action.setCallerThread(this,Thread.currentThread());
  this.internalAdd(action);
}

Fixed version (ground truth):
public void enqueue(final QueueAction<?,?> action){
  action.reset();
  action.setCallerThread(this,Thread.currentThread());
  internalAdd(action);
}
Program: 21566
Project: 21566
Buggy source:
public boolean isWaiting(){
  return this.waitFlag;
}

Fixed version (ground truth):
public boolean isWaiting(){
  return waitFlag;
}
Program: 21567
Project: 21567
Buggy source:
public Queue(final String id){
  super(id);
  this.prios=QueuePriority.values();
  for (  final QueuePriority prio : this.prios) {
    this.queue.put(prio,new ArrayList<QueueAction<?,? extends Throwable>>());
  }
  this.setDaemon(true);
  this.start();
}

Fixed version (ground truth):
public Queue(final String id){
  super(id);
  prios=QueuePriority.values();
  for (  final QueuePriority prio : prios) {
    queue.put(prio,new ArrayList<QueueAction<?,? extends Throwable>>());
  }
  setDaemon(true);
  start();
}
Program: 21568
Project: 21568
Buggy source:
@SuppressWarnings("String_Node_Str") public <E,T extends Throwable>E addWait(final QueueAction<E,T> item) throws T {
  item.reset();
  item.setCallerThread(this,Thread.currentThread());
  if (this.isQueueThread(item)) {
    this.startItem(item,false);
  }
 else {
    this.internalAdd(item);
    try {
      while (!item.isFinished()) {
synchronized (item) {
          item.wait(1000);
        }
      }
    }
 catch (    final InterruptedException e) {
      item.handleException(e);
    }
    if (item.getExeption() != null) {
      if (!item.callExceptionHandler()) {
        if (item.getExeption() instanceof RuntimeException) {
          throw (RuntimeException)item.getExeption();
        }
 else {
          throw (T)item.getExeption();
        }
      }
    }
    if (item.gotKilled() && !item.gotStarted()) {
      item.handleException(new InterruptedException("String_Node_Str"));
    }
  }
  return item.getResult();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <E,T extends Throwable>E addWait(final QueueAction<E,T> item) throws T {
  item.reset();
  item.setCallerThread(this,Thread.currentThread());
  if (isQueueThread(item)) {
    this.startItem(item,false);
  }
 else {
    internalAdd(item);
    try {
      while (!item.isFinished()) {
synchronized (item) {
          item.wait(1000);
        }
      }
    }
 catch (    final InterruptedException e) {
      item.handleException(e);
    }
    if (item.getExeption() != null) {
      if (!item.callExceptionHandler()) {
        if (item.getExeption() instanceof RuntimeException) {
          throw (RuntimeException)item.getExeption();
        }
 else {
          throw (T)item.getExeption();
        }
      }
    }
    if (item.gotKilled() && !item.gotStarted()) {
      item.handleException(new InterruptedException("String_Node_Str"));
    }
  }
  return item.getResult();
}
Program: 21569
Project: 21569
Buggy source:
public void internalAdd(final QueueAction<?,?> action){
synchronized (this.queueLock) {
    this.queue.get(action.getQueuePrio()).add(action);
  }
synchronized (this) {
    if (this.waitFlag) {
      this.waitFlag=false;
      this.notify();
    }
  }
}

Fixed version (ground truth):
public void internalAdd(final QueueAction<?,?> action){
synchronized (queueLock) {
    queue.get(action.getQueuePrio()).add(action);
  }
synchronized (this) {
    if (waitFlag) {
      waitFlag=false;
      notify();
    }
  }
}
Program: 21570
Project: 21570
Buggy source:
public void killQueue(){
synchronized (this.queueLock) {
    for (    final QueuePriority prio : this.prios) {
      for (      final QueueAction<?,? extends Throwable> item : this.queue.get(prio)) {
        item.kill();
synchronized (item) {
          item.notify();
        }
      }
      this.queue.get(prio).clear();
    }
  }
}

Fixed version (ground truth):
public void killQueue(){
synchronized (queueLock) {
    for (    final QueuePriority prio : prios) {
      for (      final QueueAction<?,? extends Throwable> item : queue.get(prio)) {
        item.kill();
synchronized (item) {
          item.notify();
        }
      }
      queue.get(prio).clear();
    }
  }
}
Program: 21571
Project: 21571
Buggy source:
/** 
 */
public void reset(){
  if (currentState == initState)   return;
  if (finalState != currentState)   throw new StateConflictException("String_Node_Str" + currentState);
  StateEvent event=new StateEvent(this,StateEvent.CHANGED,currentState,initState);
  this.currentState=this.initState;
  eventSender.fireEvent(event);
  path.clear();
  path.add(initState);
}

Fixed version (ground truth):
/** 
 */
public void reset(){
  StateEvent event;
synchronized (lock) {
    if (currentState == initState)     return;
    if (finalState != currentState)     throw new StateConflictException("String_Node_Str" + currentState);
    event=new StateEvent(this,StateEvent.CHANGED,currentState,initState);
    this.currentState=this.initState;
    path.clear();
    path.add(initState);
  }
  eventSender.fireEvent(event);
}
Program: 21572
Project: 21572
Buggy source:
/** 
 * @param newState
 */
private synchronized void forceState(State newState){
  if (currentState == newState)   return;
  StateEvent event=new StateEvent(this,StateEvent.CHANGED,currentState,newState);
  path.add(newState);
  Log.L.finest(owner + "String_Node_Str" + currentState+ "String_Node_Str"+ newState);
  currentState=newState;
  eventSender.fireEvent(event);
}

Fixed version (ground truth):
/** 
 * @param newState
 */
public void forceState(State newState){
  StateEvent event;
synchronized (lock) {
    if (currentState == newState)     return;
    event=new StateEvent(this,StateEvent.CHANGED,currentState,newState);
    path.add(newState);
    Log.L.finest(owner + "String_Node_Str" + currentState+ "String_Node_Str"+ newState);
    currentState=newState;
  }
  eventSender.fireEvent(event);
}
Program: 21573
Project: 21573
Buggy source:
/** 
 * @return
 */
public boolean isFinal(){
  return finalState != currentState;
}

Fixed version (ground truth):
/** 
 * @return
 */
public boolean isFinal(){
  return finalState == currentState;
}
Program: 21574
Project: 21574
Buggy source:
/** 
 * Restore the saved tree state
 */
public void restore(){
  restoreState(tree.getModel().getRoot(),new ArrayList<Object>());
  if (selectedPathes != null && selectedPathes.length > 0) {
    tree.getSelectionModel().setSelectionPaths(selectedPathes);
  }
}

Fixed version (ground truth):
/** 
 * Restore the saved tree state
 */
public void restore(){
  restoreState(tree.getModel().getRoot(),new ArrayList<Object>());
  if (selectedPathes != null && selectedPathes.length > 0) {
    tree.getSelectionModel().clearSelection();
    tree.getSelectionModel().setSelectionPaths(selectedPathes);
  }
}
Program: 21575
Project: 21575
Buggy source:
@Override public void write(byte b[],int off,int len) throws IOException {
  if (len < checkStep) {
    out.write(b,off,len);
    increase(len);
  }
 else {
    index1=off;
    index3=len;
    index2=Math.min(checkStep,index3 - checkStep);
    while (index2 != 0) {
      out.write(b,index1,index2);
      increase(index2);
      index1+=index2;
      index2=Math.min(checkStep,index3 - checkStep);
      index3-=index2;
    }
  }
}

Fixed version (ground truth):
@Override public void write(byte b[],int off,int len) throws IOException {
  if (len < checkStep) {
    out.write(b,off,len);
    increase(len);
  }
 else {
    offset=off;
    rest=len;
    while (rest != 0) {
      todo=rest;
      if (todo > checkStep)       todo=checkStep;
      out.write(b,offset,todo);
      increase(todo);
      rest-=todo;
      offset+=todo;
    }
  }
}
Program: 21576
Project: 21576
Buggy source:
public CollPaintException(){
}

Fixed version (ground truth):
public CollPaintException(){
  super();
}
Program: 21577
Project: 21577
Buggy source:
public void updateLine(int startX,int startY,int endX,int endY) throws CollPaintException ;

Fixed version (ground truth):
public void updateLine(float startX,float startY,float endX,float endY) throws CollPaintException ;
Program: 21578
Project: 21578
Buggy source:
public void updateLine(int startX,int startY,int endX,int endY,AsyncCallback<Void> callback);

Fixed version (ground truth):
public void updateLine(float startX,float startY,float endX,float endY,AsyncCallback<Void> callback);