nus-yam/ex-repair huggingface dataset:
Program: 21176
Project: 21176
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  String wait=br.getRegex("String_Node_Str").getMatch(0);
  int waittime=0;
  if (wait != null)   waittime=Integer.parseInt(wait.trim());
  if (waittime > 60) {
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waittime * 1000l);
  }
 else {
    sleep(waittime * 1000l,downloadLink);
  }
  br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1000l);
  String id=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
  if (id == null)   id=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
  br.getPage("String_Node_Str" + id);
  Form form=br.getForm(3);
  String captchaUrl=form.getRegex("String_Node_Str").getMatch(0);
  File captchaFile=this.getLocalCaptchaFile(this);
  try {
    Browser.download(captchaFile,br.cloneBrowser().openGetConnection(captchaUrl));
  }
 catch (  Exception e) {
    throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  }
  String captchaCode=Plugin.getCaptchaCode(captchaFile,this,downloadLink);
  form.put("String_Node_Str",captchaCode);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,form,true,1);
  if (!dl.getConnection().isContentDisposition()) {
    throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  String wait=br.getRegex("String_Node_Str").getMatch(0);
  int waittime=0;
  if (wait != null)   waittime=Integer.parseInt(wait.trim());
  if (waittime > 60) {
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waittime * 1000l);
  }
 else {
    sleep(waittime * 1000l,downloadLink);
  }
  br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1000l);
  String id=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
  br.getPage("String_Node_Str" + id);
  Form form=br.getForm(3);
  String captchaUrl="String_Node_Str" + br.getHost() + "String_Node_Str"+ br.getRegex("String_Node_Str").getMatch(0);
  File captchaFile=this.getLocalCaptchaFile(this);
  try {
    Browser.download(captchaFile,br.cloneBrowser().openGetConnection(captchaUrl));
  }
 catch (  Exception e) {
    throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  }
  String captchaCode=Plugin.getCaptchaCode(captchaFile,this,downloadLink);
  form.put("String_Node_Str",captchaCode);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,form,true,1);
  if (!dl.getConnection().isContentDisposition()) {
    throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  }
  dl.startDownload();
}
Program: 21180
Project: 21180
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  Form free=br.getForm(4);
  free.put("String_Node_Str","String_Node_Str");
  br.setDebug(true);
  br.submitForm(free);
  String url=br.getRegex("String_Node_Str").getMatch(0);
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  this.sleep(60000,downloadLink);
  dl=br.openDownload(downloadLink,url,true,1);
  if (dl.getConnection().getResponseCode() == 404) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  Form free=br.getForm(4);
  if (free == null)   throw new PluginException(LinkStatus.ERROR_FATAL,"String_Node_Str");
  free.put("String_Node_Str","String_Node_Str");
  br.setDebug(true);
  br.submitForm(free);
  String url=br.getRegex("String_Node_Str").getMatch(0);
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  this.sleep(60000,downloadLink);
  dl=br.openDownload(downloadLink,url,true,1);
  if (dl.getConnection().getResponseCode() == 404) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  dl.startDownload();
}
Program: 21184
Project: 21184
Buggy source:
public String getContainerFile(){
  String Filename=new File(containerFile).getName();
  return JDUtilities.getResourceFile("String_Node_Str" + Filename).getAbsolutePath();
}

Fixed version (ground truth):
public String getContainerFile(){
  if (containerFile == null)   return null;
  String Filename=new File(containerFile).getName();
  return JDUtilities.getResourceFile("String_Node_Str" + Filename).getAbsolutePath();
}
Program: 21185
Project: 21185
Buggy source:
private void chmodUnrar(String path){
  Executer exec=new Executer("String_Node_Str");
  exec.addParameter("String_Node_Str");
  exec.addParameter("String_Node_Str");
  exec.setRunin(path);
  exec.setWaitTimeout(2);
  exec.start();
  exec.waitTimeout();
}

Fixed version (ground truth):
private void chmodUnrar(String path){
  Executer exec=new Executer("String_Node_Str");
  exec.addParameter("String_Node_Str");
  exec.addParameter("String_Node_Str");
  exec.setRunin(path);
  exec.setWaitTimeout(-1);
  exec.start();
  exec.waitTimeout();
}
Program: 21186
Project: 21186
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  url=downloadLink.getDownloadURL() + "String_Node_Str";
  this.setBrowserExclusive();
  br.setAcceptLanguage("String_Node_Str");
  String id=new Regex(url,"String_Node_Str").getMatch(0);
  br.postPage("String_Node_Str","String_Node_Str" + id);
  String infos[][]=br.getRegex("String_Node_Str").getMatches();
  if (infos.length != 1 && infos[0].length != 4 && !infos[0][1].equalsIgnoreCase("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setDownloadSize(Long.parseLong(infos[0][3].trim()));
  downloadLink.setName(infos[0][2].trim());
  return true;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  url=downloadLink.getDownloadURL() + "String_Node_Str";
  this.setBrowserExclusive();
  br.setAcceptLanguage("String_Node_Str");
  String id=new Regex(url,"String_Node_Str").getMatch(0);
  if (br.postPage("String_Node_Str","String_Node_Str" + id).matches("String_Node_Str")) {
    br.getPage("String_Node_Str");
    String[] strings=br.getRegex("String_Node_Str").getRow(0);
    downloadLink.setDownloadSize(Regex.getSize(strings[0].trim()));
    downloadLink.setName(strings[1].trim());
    return true;
  }
  String infos[][]=br.getRegex("String_Node_Str").getMatches();
  if (infos.length != 1 && infos[0].length != 4 && !infos[0][1].equalsIgnoreCase("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setDownloadSize(Long.parseLong(infos[0][3].trim()));
  downloadLink.setName(infos[0][2].trim());
  return true;
}
Program: 21191
Project: 21191
Buggy source:
public void handlePremium(DownloadLink parameter,Account account) throws Exception {
  DownloadLink downloadLink=(DownloadLink)parameter;
  LinkStatus linkStatus=downloadLink.getLinkStatus();
  getFileInformation(parameter);
  login(account);
  if (!this.isPremium()) {
    throw new PluginException(LinkStatus.ERROR_PREMIUM,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
  }
  br.getPage(downloadLink.getDownloadURL());
  Form form=br.getForm(1);
  if (form.containsHTML("String_Node_Str")) {
    if (downloadLink.getStringProperty("String_Node_Str",null) == null) {
      passCode=Plugin.getUserInput(null,downloadLink);
    }
 else {
      passCode=downloadLink.getStringProperty("String_Node_Str",null);
    }
    form.put("String_Node_Str",passCode);
    br.submitForm(form);
    if (br.containsHTML("String_Node_Str")) {
      downloadLink.setProperty("String_Node_Str",null);
      linkStatus.addStatus(LinkStatus.ERROR_CAPTCHA);
      return;
    }
    downloadLink.setProperty("String_Node_Str",passCode);
  }
  url=br.getRegex("String_Node_Str").getMatch(0);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,url,true,1);
  dl.startDownload();
}

Fixed version (ground truth):
public void handlePremium(DownloadLink parameter,Account account) throws Exception {
  DownloadLink downloadLink=(DownloadLink)parameter;
  LinkStatus linkStatus=downloadLink.getLinkStatus();
  getFileInformation(parameter);
  url=downloadLink.getDownloadURL() + "String_Node_Str";
  login(account);
  if (!this.isPremium()) {
    throw new PluginException(LinkStatus.ERROR_PREMIUM,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
  }
  br.getPage(url);
  Form form=br.getForm(1);
  if (form.containsHTML("String_Node_Str")) {
    if (downloadLink.getStringProperty("String_Node_Str",null) == null) {
      passCode=Plugin.getUserInput(null,downloadLink);
    }
 else {
      passCode=downloadLink.getStringProperty("String_Node_Str",null);
    }
    form.put("String_Node_Str",passCode);
    br.submitForm(form);
    if (br.containsHTML("String_Node_Str")) {
      downloadLink.setProperty("String_Node_Str",null);
      linkStatus.addStatus(LinkStatus.ERROR_CAPTCHA);
      return;
    }
    downloadLink.setProperty("String_Node_Str",passCode);
  }
  url=br.getRegex("String_Node_Str").getMatch(0);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,url,true,1);
  dl.startDownload();
}
Program: 21194
Project: 21194
Buggy source:
/** 
 * Gibt den Archivtyp zurück. möglich sind: ARCHIVE_TYPE_7Z (bad) ARCHIVE_TYPE_NONE (bad) ARCHIVE_TYPE_UNIX ARCHIVE_TYPE_NORMAL
 * @param file
 * @return
 */
private int getArchiveType(File file){
  String name=file.getName();
  if (name.matches("String_Node_Str"))   return ARCHIVE_TYPE_7Z;
  if (name.matches("String_Node_Str"))   return ARCHIVE_TYPE_UNIX;
  if (name.matches("String_Node_Str"))   return ARCHIVE_TYPE_NORMAL;
  return ARCHIVE_TYPE_NONE;
}

Fixed version (ground truth):
/** 
 * Gibt den Archivtyp zurück. möglich sind: ARCHIVE_TYPE_7Z (bad) ARCHIVE_TYPE_NONE (bad) ARCHIVE_TYPE_UNIX ARCHIVE_TYPE_NORMAL
 * @param file
 * @return
 */
private int getArchiveType(File file){
  String name=file.getName();
  if (name.matches("String_Node_Str"))   return ARCHIVE_TYPE_7Z;
  if (name.matches("String_Node_Str")) {
    try {
      Signature fs=FileSignatures.getFileSignature(file);
      if (fs.getId().equals("String_Node_Str"))       return ARCHIVE_TYPE_RAR;
 else       if (fs.getId().equals("String_Node_Str"))       return ARCHIVE_TYPE_7Z;
    }
 catch (    IOException e) {
    }
    return ARCHIVE_TYPE_UNIX;
  }
  if (name.matches("String_Node_Str"))   return ARCHIVE_TYPE_NORMAL;
{
    try {
      Signature fs=FileSignatures.getFileSignature(file);
      if (fs.getId().equals("String_Node_Str"))       return ARCHIVE_TYPE_RAR;
 else       if (fs.getId().equals("String_Node_Str"))       return ARCHIVE_TYPE_7Z;
    }
 catch (    IOException e) {
    }
    return ARCHIVE_TYPE_NONE;
  }
}
Program: 21195
Project: 21195
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink){
  br.setCookiesExclusive(true);
  br.clearCookies(getHost());
  br.setFollowRedirects(false);
  downloadurl=downloadLink.getDownloadURL();
  try {
    br.getPage(downloadurl);
    if (!br.containsHTML("String_Node_Str")) {
      String linkinfo[][]=new Regex(br.getRequest().getHtmlCode(),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatches();
      if (linkinfo.length != 1) {
        linkinfo=br.getRegex("String_Node_Str").getMatches();
      }
      if (linkinfo[0][2].matches("String_Node_Str")) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(linkinfo[0][1]) * 1024 * 1024));
      }
 else       if (linkinfo[0][2].matches("String_Node_Str")) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(linkinfo[0][1]) * 1024));
      }
      downloadLink.setName(linkinfo[0][0]);
      return true;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  downloadLink.setAvailable(false);
  return false;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink){
  br.setCookiesExclusive(true);
  br.clearCookies(getHost());
  br.setFollowRedirects(false);
  downloadurl=downloadLink.getDownloadURL();
  try {
    br.getPage(downloadurl);
    if (!br.containsHTML("String_Node_Str")) {
      String[] linkinfo=null;
      try {
        linkinfo=new Regex(br.getRequest().getHtmlCode(),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getRow(0);
      }
 catch (      Exception e) {
      }
      if (linkinfo == null || linkinfo.length < 1) {
        linkinfo=new Regex(br.getRequest().getHtmlCode(),"String_Node_Str").getRow(0);
      }
      downloadLink.setDownloadSize(Regex.getSize(linkinfo[1]));
      downloadLink.setName(linkinfo[0]);
      return true;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  downloadLink.setAvailable(false);
  return false;
}
Program: 21196
Project: 21196
Buggy source:
private DownloadLink findStartLink(DownloadLink link){
  int type=getArchivePartType(link);
switch (type) {
case JDUnrarConstants.MULTIPART_START_PART:
case JDUnrarConstants.MULTIPART_START_PART_V2:
    break;
case JDUnrarConstants.SINGLE_PART_ARCHIVE:
  return link;
case JDUnrarConstants.NO_RAR_ARCHIVE:
return null;
}
File file=null;
String filename=null;
if (type == JDUnrarConstants.MULTIPART_START_PART) {
filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
if (!(file=new File(filename + "String_Node_Str")).exists()) {
}
 else if (!(file=new File(filename + "String_Node_Str")).exists()) {
}
 else if (!(file=new File(filename + "String_Node_Str")).exists()) {
}
 else if (!(file=new File(filename + "String_Node_Str")).exists()) {
}
 else if (!(file=new File(filename + "String_Node_Str")).exists()) {
}
 else {
return null;
}
}
 else if (type == JDUnrarConstants.MULTIPART_START_PART_V2) {
filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
if (!(file=new File(filename + "String_Node_Str")).exists()) {
return null;
}
}
DownloadLink dlink=JDUtilities.getController().getDownloadLinkByFileOutput(file);
if (dlink == null) {
System.out.print("String_Node_Str");
dlink=new DownloadLink(null,file.getName(),DUMMY_HOSTER,"String_Node_Str",true);
dlink.getLinkStatus().setStatus(link.getLinkStatus().getStatus());
FilePackage fp=new FilePackage();
fp.setDownloadDirectory(file.getParent());
dlink.setFilePackage(fp);
}
return dlink;
}

Fixed version (ground truth):
private DownloadLink findStartLink(DownloadLink link){
  int type=getArchivePartType(link);
switch (type) {
case JDUnrarConstants.MULTIPART_START_PART:
case JDUnrarConstants.MULTIPART_START_PART_V2:
    break;
case JDUnrarConstants.SINGLE_PART_ARCHIVE:
  return link;
case JDUnrarConstants.NO_RAR_ARCHIVE:
return null;
}
File file=null;
String filename=null;
if (type == JDUnrarConstants.MULTIPART_START_PART) {
filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else {
return null;
}
}
 else if (type == JDUnrarConstants.MULTIPART_START_PART_V2) {
filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
if (!(file=new File(filename + "String_Node_Str")).exists()) {
return null;
}
}
DownloadLink dlink=JDUtilities.getController().getDownloadLinkByFileOutput(file);
if (dlink == null) {
System.out.print("String_Node_Str");
dlink=new DownloadLink(null,file.getName(),DUMMY_HOSTER,"String_Node_Str",true);
dlink.getLinkStatus().setStatus(link.getLinkStatus().getStatus());
FilePackage fp=new FilePackage();
fp.setDownloadDirectory(file.getParent());
dlink.setFilePackage(fp);
}
return dlink;
}
Program: 21197
Project: 21197
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 2;
}

Fixed version (ground truth):
public int getMaxSimultanFreeDownloadNum(){
  return 1;
}
Program: 21198
Project: 21198
Buggy source:
public Request createFormRequest(Form form) throws Exception {
  if (form == null)   return null;
  String base=null;
  if (request != null)   base=request.getUrl().toString();
  String action=form.getAction(base);
switch (form.method) {
case Form.METHOD_GET:
    StringBuilder stbuffer=new StringBuilder();
  boolean first=true;
for (Map.Entry<String,InputField> entry : form.getVars().entrySet()) {
  if (entry.getKey() != null && entry.getValue().getValue() != null && entry.getValue().getValue().length() > 0) {
    if (first) {
      first=false;
    }
 else {
      stbuffer.append("String_Node_Str");
    }
    stbuffer.append(entry.getKey());
    stbuffer.append("String_Node_Str");
    stbuffer.append(entry.getValue().getValue());
  }
}
String varString=stbuffer.toString();
if (varString != null && !varString.matches("String_Node_Str")) {
if (action.matches("String_Node_Str")) {
action+="String_Node_Str";
}
 else if (action.matches("String_Node_Str")) {
action+="String_Node_Str";
}
action+=varString;
}
return createGetRequest(action);
case Form.METHOD_POST:
return createPostRequest(action,form.getVarsMap());
}
return null;
}

Fixed version (ground truth):
public Request createFormRequest(Form form) throws Exception {
  if (form == null)   return null;
  String base=null;
  if (request != null)   base=request.getUrl().toString();
  String action=form.getAction(base);
switch (form.method) {
case Form.METHOD_GET:
    StringBuilder stbuffer=new StringBuilder();
  boolean first=true;
for (Map.Entry<String,InputField> entry : form.getVars().entrySet()) {
  if (entry.getKey() != null) {
    if (first) {
      first=false;
    }
 else {
      stbuffer.append("String_Node_Str");
    }
    stbuffer.append(entry.getKey());
    stbuffer.append("String_Node_Str");
    if (entry.getValue().getValue() != null) {
      stbuffer.append(entry.getValue().getValue());
    }
 else {
      stbuffer.append("String_Node_Str");
    }
  }
}
String varString=stbuffer.toString();
if (varString != null && !varString.matches("String_Node_Str")) {
if (action.matches("String_Node_Str")) {
action+="String_Node_Str";
}
 else if (action.matches("String_Node_Str")) {
action+="String_Node_Str";
}
action+=varString;
}
return createGetRequest(action);
case Form.METHOD_POST:
return createPostRequest(action,form.getVarsMap());
}
return null;
}
Program: 21199
Project: 21199
Buggy source:
public String getPostDataString(){
  if (postData.isEmpty()) {
    return null;
  }
  StringBuilder buffer=new StringBuilder();
  for (  Map.Entry<String,String> entry : postData.entrySet()) {
    if (entry.getKey() != null && entry.getValue() != null && entry.getValue().length() > 0) {
      buffer.append("String_Node_Str");
      buffer.append(entry.getKey());
      buffer.append("String_Node_Str");
      buffer.append(entry.getValue());
    }
  }
  return buffer.toString().substring(1);
}

Fixed version (ground truth):
public String getPostDataString(){
  if (postData.isEmpty()) {
    return null;
  }
  StringBuilder buffer=new StringBuilder();
  for (  Map.Entry<String,String> entry : postData.entrySet()) {
    if (entry.getKey() != null) {
      buffer.append("String_Node_Str");
      buffer.append(entry.getKey());
      buffer.append("String_Node_Str");
      if (entry.getValue() != null) {
        buffer.append(entry.getValue());
      }
 else {
        buffer.append("String_Node_Str");
      }
    }
  }
  return buffer.toString().substring(1);
}
Program: 21200
Project: 21200
Buggy source:
public String getPass(){
  return pass;
}

Fixed version (ground truth):
public String getPass(){
  return pass.trim();
}
Program: 21201
Project: 21201
Buggy source:
public String getUser(){
  return user;
}

Fixed version (ground truth):
public String getUser(){
  return user.trim();
}
Program: 21202
Project: 21202
Buggy source:
/** 
 * @param args
 * @throws UnsupportedEncodingException 
 * @throws java.text.ParseException
 * @throws ParseException
 * @throws UnsupportedEncodingException
 * @throws java.text.ParseException
 */
public static void main(String[] args) throws UnsupportedEncodingException {
  if (false) {
    SimpleDateFormat DATE_FORMAT=new SimpleDateFormat("String_Node_Str");
    String expires="String_Node_Str";
    try {
      System.out.println(DATE_FORMAT.parse(expires));
    }
 catch (    ParseException e) {
      e.printStackTrace();
      try {
        System.out.println(new SimpleDateFormat("String_Node_Str").parse(expires));
      }
 catch (      ParseException e2) {
        e2.printStackTrace();
      }
    }
  }
  if (false) {
    String l[]={"String_Node_Str"};
    for (    String kk : l) {
      System.out.print(kk + "String_Node_Str");
      System.out.println(Plugin.getFileNameFromDispositionHeader(kk));
    }
  }
  System.out.println(Encoding.urlEncode("String_Node_Str"));
  System.out.println(Encoding.urlEncode("String_Node_Str"));
  System.out.println(new String(Plugin.extractFileNameFromURL("String_Node_Str").getBytes("String_Node_Str"),"String_Node_Str"));
  System.out.println(Encoding.urlEncode("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * @param args
 * @throws UnsupportedEncodingException
 * @throws java.text.ParseException
 * @throws ParseException
 * @throws UnsupportedEncodingException
 * @throws java.text.ParseException
 */
public static void main(String[] args) throws UnsupportedEncodingException {
  if (false) {
    SimpleDateFormat DATE_FORMAT=new SimpleDateFormat("String_Node_Str");
    String expires="String_Node_Str";
    try {
      System.out.println(DATE_FORMAT.parse(expires));
    }
 catch (    ParseException e) {
      e.printStackTrace();
      try {
        System.out.println(new SimpleDateFormat("String_Node_Str").parse(expires));
      }
 catch (      ParseException e2) {
        e2.printStackTrace();
      }
    }
  }
  if (false) {
    String l[]={"String_Node_Str"};
    for (    String kk : l) {
      System.out.print(kk + "String_Node_Str");
      System.out.println(Plugin.getFileNameFromDispositionHeader(kk));
    }
  }
}
Program: 21205
Project: 21205
Buggy source:
public void showDialog(){
  setVisible(true);
  this.setLocation(JDUtilities.getCenterOfComponent(parentFrame,this));
  setVisible(false);
  setModal(true);
  setVisible(true);
}

Fixed version (ground truth):
public void showDialog(){
  setModal(true);
  this.setLocation(JDUtilities.getCenterOfComponent(parentFrame,this));
  setVisible(true);
}
Program: 21209
Project: 21209
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  br.getPage(downloadLink.getDownloadURL());
  br.setFollowRedirects(true);
  br.setDebug(true);
  if (br.containsHTML("String_Node_Str")) {
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,30 * 60 * 1000l);
  }
  Form[] forms=br.getForms();
  if (getPluginConfig().getBooleanProperty("String_Node_Str",false)) {
    Form login=forms[0];
    login.put("String_Node_Str",getPluginConfig().getStringProperty("String_Node_Str"));
    login.put("String_Node_Str",getPluginConfig().getStringProperty("String_Node_Str"));
    login.put("String_Node_Str","String_Node_Str");
    br.submitForm(login);
    if (br.containsHTML("String_Node_Str")) {
      logger.severe("String_Node_Str" + getPluginConfig().getStringProperty("String_Node_Str") + "String_Node_Str");
      getPluginConfig().setProperty("String_Node_Str",false);
      getPluginConfig().save();
    }
  }
  if (forms.length < 2) {
    throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  }
  Form captchaForm=forms[1];
  String captchaCode=getCaptchaCode("String_Node_Str",downloadLink);
  captchaForm.put("String_Node_Str",captchaCode);
  br.submitForm(captchaForm);
  Form download=br.getFormbyID("String_Node_Str");
  dl=br.openDownload(downloadLink,download);
  if (!dl.getConnection().isContentDisposition()) {
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink parameter) throws Exception {
  getFileInformation(parameter);
  handleFree0(parameter);
}
Program: 21210
Project: 21210
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException {
  br.getPage(downloadLink.getDownloadURL());
  String[] dat=br.getRegex("String_Node_Str").getRow(0);
  downloadLink.setName(dat[0]);
  downloadLink.setDownloadSize(Regex.getSize(dat[1]));
  return true;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  setBrowserExclusive();
  br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str")) {
    downloadLink.getLinkStatus().setStatusText("String_Node_Str");
    return true;
  }
  String[] dat=br.getRegex("String_Node_Str").getRow(0);
  if (dat.length != 2)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(dat[0]);
  downloadLink.setDownloadSize(Regex.getSize(dat[1]));
  return true;
}
Program: 21211
Project: 21211
Buggy source:
public GigaSizeCom(PluginWrapper wrapper){
  super(wrapper);
  setConfigElements();
}

Fixed version (ground truth):
public GigaSizeCom(PluginWrapper wrapper){
  super(wrapper);
  enablePremium("String_Node_Str");
}
Program: 21212
Project: 21212
Buggy source:
public void windowIconified(WindowEvent arg0){
  if (new Date().getTime() > this.lastDeIconifiedEvent + 750) {
    guiFrame.setVisible(false);
  }
 else {
    guiFrame.setExtendedState(Frame.NORMAL);
    guiFrame.setVisible(true);
  }
}

Fixed version (ground truth):
public void windowIconified(WindowEvent arg0){
  miniIt();
}
Program: 21213
Project: 21213
Buggy source:
public void windowDeiconified(WindowEvent arg0){
  this.lastDeIconifiedEvent=new Date().getTime();
}

Fixed version (ground truth):
public void windowDeiconified(WindowEvent arg0){
  windowIconified(arg0);
}
Program: 21214
Project: 21214
Buggy source:
public void mouseClicked(MouseEvent e){
  if (SwingUtilities.isLeftMouseButton(e)) {
    if (toolParent.isVisible()) {
      hideTooltip();
    }
    if (e.getClickCount() > 1) {
      guiFrame.setVisible(!guiFrame.isVisible());
      if (guiFrame.isVisible())       guiFrame.setExtendedState(Frame.NORMAL);
    }
  }
 else   if (SwingUtilities.isRightMouseButton(e)) {
    showPopup(e.getPoint());
  }
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent arg0){
}
Program: 21215
Project: 21215
Buggy source:
public void mousePressed(MouseEvent e){
  if (e.getSource() instanceof TrayIcon) {
    if (e.getClickCount() >= (subConfig.getBooleanProperty(PROPERTY_SINGLE_CLICK,false) ? 1 : 2) && !SwingUtilities.isRightMouseButton(e)) {
      guiFrame.setVisible(!guiFrame.isVisible());
      if (guiFrame.isVisible())       guiFrame.setExtendedState(Frame.NORMAL);
    }
 else {
      if (trayIconPopup != null && trayIconPopup.isShowing()) {
        trayIconPopup.dispose();
        trayIconPopup=null;
      }
 else       if (SwingUtilities.isRightMouseButton(e)) {
        trayIconPopup=new TrayIconPopup();
        calcLocation(trayIconPopup,e.getPoint());
        trayIconPopup.setVisible(true);
      }
    }
  }
}

Fixed version (ground truth):
public void mousePressed(MouseEvent e){
  if (e.getSource() instanceof TrayIcon) {
    if (e.getClickCount() >= (subConfig.getBooleanProperty(PROPERTY_SINGLE_CLICK,false) ? 1 : 2) && !SwingUtilities.isRightMouseButton(e)) {
      miniIt();
    }
 else {
      if (trayIconPopup != null && trayIconPopup.isShowing()) {
        trayIconPopup.dispose();
        trayIconPopup=null;
      }
 else       if (SwingUtilities.isRightMouseButton(e)) {
        trayIconPopup=new TrayIconPopup();
        calcLocation(trayIconPopup,e.getPoint());
        trayIconPopup.setVisible(true);
      }
    }
  }
}
Program: 21216
Project: 21216
Buggy source:
public void windowIconified(WindowEvent arg0){
  if (subConfig.getBooleanProperty(PROPERTY_MINIMIZE_TO_TRAY,true)) {
    if (new Date().getTime() > this.lastDeIconifiedEvent + 750) {
      guiFrame.setVisible(false);
    }
 else {
      guiFrame.setExtendedState(Frame.NORMAL);
      guiFrame.setVisible(true);
    }
  }
}

Fixed version (ground truth):
public void windowIconified(WindowEvent arg0){
  if (subConfig.getBooleanProperty(PROPERTY_MINIMIZE_TO_TRAY,true)) {
    miniIt();
  }
}
Program: 21217
Project: 21217
Buggy source:
public void windowDeiconified(WindowEvent arg0){
  this.lastDeIconifiedEvent=new Date().getTime();
}

Fixed version (ground truth):
public void windowDeiconified(WindowEvent arg0){
  windowIconified(arg0);
}
Program: 21219
Project: 21219
Buggy source:
public DDLWarez_Linkgrabber(int id,Browser br){
  downloadlink=null;
  gotjob=false;
  _status=THREADFAIL;
  Worker_ID=id;
  this.br=br;
}

Fixed version (ground truth):
public DDLWarez_Linkgrabber(ProgressController progress,int id,Browser br){
  downloadlink=null;
  gotjob=false;
  _status=THREADFAIL;
  Worker_ID=id;
  this.br=br;
  this.progress=progress;
}
Program: 21221
Project: 21221
Buggy source:
@Override public void run(){
  if (gotjob == true) {
    logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
    String base=br.getBaseURL();
    String action=form.getAction(base);
    if (action.contains("String_Node_Str")) {
      Browser clone=br.cloneBrowser();
      for (int retry=1; retry <= 10; retry++) {
        try {
          clone.submitForm(form);
          downloadlink=clone.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
          break;
        }
 catch (        Exception e) {
          logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
synchronized (DDLWarez.Worker_Delay) {
            DDLWarez.Worker_Delay=1000;
          }
        }
        try {
          Thread.sleep(1500);
        }
 catch (        InterruptedException e) {
        }
      }
    }
 else {
      logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
      _status=THREADFAIL;
      return;
    }
  }
  logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
  _status=THREADPASS;
}

Fixed version (ground truth):
@Override public void run(){
  if (gotjob == true) {
    logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
    String base=br.getBaseURL();
    String action=form.getAction(base);
    if (action.contains("String_Node_Str")) {
      Browser clone=br.cloneBrowser();
      for (int retry=1; retry <= 10; retry++) {
        try {
          clone.submitForm(form);
          downloadlink=clone.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
          break;
        }
 catch (        Exception e) {
          logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
synchronized (DDLWarez.Worker_Delay) {
            DDLWarez.Worker_Delay=1000;
          }
        }
        try {
          Thread.sleep(1500);
        }
 catch (        InterruptedException e) {
        }
      }
    }
 else {
      logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
      _status=THREADFAIL;
      progress.increase(1);
      return;
    }
  }
  logger.finest("String_Node_Str" + new Integer(Worker_ID) + "String_Node_Str");
  _status=THREADPASS;
  progress.increase(1);
}
Program: 21224
Project: 21224
Buggy source:
@Override public void onBufferChanged(Executer exec,DynByteBuffer buffer,int latestNum){
  String lastLine;
  try {
    lastLine=new String(buffer.getLast(buffer.position() - lastLinePosition),Executer.CODEPAGE);
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    lastLine=new String(buffer.getLast(buffer.position() - lastLinePosition));
  }
  if (new Regex(lastLine,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).matches()) {
    exec.writetoOutputStream(this.password);
  }
  if (new Regex(lastLine,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).matches()) {
    exec.interrupt();
  }
 else   if (new Regex(lastLine,"String_Node_Str").matches()) {
    exec.writetoOutputStream("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onBufferChanged(Executer exec,DynByteBuffer buffer,int latestNum){
  String lastLine;
  try {
    lastLine=new String(buffer.getLast(buffer.position() - lastLinePosition),JDUnrar.CODEPAGE);
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    lastLine=new String(buffer.getLast(buffer.position() - lastLinePosition));
  }
  if (new Regex(lastLine,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).matches()) {
    exec.writetoOutputStream(this.password);
  }
  if (new Regex(lastLine,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).matches()) {
    exec.interrupt();
  }
 else   if (new Regex(lastLine,"String_Node_Str").matches()) {
    exec.writetoOutputStream("String_Node_Str");
  }
}
Program: 21226
Project: 21226
Buggy source:
/** 
 * Gibt das ArchiveFile zum lokalen Pfad currentWorkingFile zurück
 * @param currentWorkingFile
 * @return
 */
ArchivFile getArchivFile(String currentWorkingFile){
  currentWorkingFile=Encoding.filterString(currentWorkingFile);
  for (  ArchivFile af : files) {
    if (Encoding.filterString(af.getFilepath()).equals(currentWorkingFile)) {
      return af;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gibt das ArchiveFile zum lokalen Pfad currentWorkingFile zurück. Falls sonderzeichen den namensmatch unmöglich machen, Wird über levensthein veruscht den besten Trefer zu finden
 * @param currentWorkingFile
 * @return
 */
ArchivFile getArchivFile(String currentWorkingFile){
  for (  ArchivFile af : files) {
    if (af.getFilepath().equals(currentWorkingFile)) {
      return af;
    }
  }
  ArchivFile best=null;
  int value=Integer.MAX_VALUE;
  int cur;
  for (  ArchivFile af : files) {
    cur=JDUtilities.getLevenshteinDistance(best.getFilepath(),currentWorkingFile);
    if (cur < value) {
      value=cur;
      best=af;
    }
  }
  return best;
}
Program: 21233
Project: 21233
Buggy source:
public ShareOnlineBiz(PluginWrapper wrapper){
  super(wrapper);
}

Fixed version (ground truth):
public ShareOnlineBiz(PluginWrapper wrapper){
  super(wrapper);
  this.enablePremium("String_Node_Str");
}
Program: 21235
Project: 21235
Buggy source:
public boolean initAddon(){
  NAMES=new ArrayList<User>();
  sb=new StringBuffer();
  initConfigEntries();
  return true;
}

Fixed version (ground truth):
public boolean initAddon(){
  NAMES=new ArrayList<User>();
  sb=new StringBuffer();
  return true;
}
Program: 21240
Project: 21240
Buggy source:
public void writetoOutputStream(String data){
  if (data == null || data.length() == 0)   data="String_Node_Str";
  data=data.trim() + "String_Node_Str";
  try {
    outputStream.write(data.getBytes());
    if (isDebug())     logger.finest("String_Node_Str" + data);
    outputStream.flush();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void writetoOutputStream(String data){
  if (data == null || data.length() == 0)   data="String_Node_Str";
  try {
    outputStream.write(data.getBytes());
    outputStream.write("String_Node_Str".getBytes());
    if (isDebug())     logger.finest("String_Node_Str" + data);
    outputStream.flush();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 21241
Project: 21241
Buggy source:
public void interrupt(){
  super.interrupt();
  if (sbeObserver != null)   this.sbeObserver.interrupt();
  if (sboObserver != null)   this.sboObserver.interrupt();
  process.destroy();
}

Fixed version (ground truth):
public void interrupt(){
  new InterruptedException("String_Node_Str").printStackTrace();
  super.interrupt();
  if (sbeObserver != null)   this.sbeObserver.interrupt();
  if (sboObserver != null)   this.sboObserver.interrupt();
  process.destroy();
}
Program: 21242
Project: 21242
Buggy source:
public Installer(){
  ConfigContainer configContainer;
  configContainer=new ConfigContainer(this,"String_Node_Str");
  configContainer.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME),SimpleGUI.PARAM_LOCALE,JDLocale.getLocaleIDs().toArray(new String[]{}),JDLocale.L("String_Node_Str","String_Node_Str")).setDefaultValue(Locale.getDefault()));
  SimpleGUI.showConfigDialog(null,configContainer,true);
  if (JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME).getStringProperty(SimpleGUI.PARAM_LOCALE) == null) {
    JDUtilities.getLogger().severe("String_Node_Str");
    this.aborted=true;
    return;
  }
  JDLocale.setLocale(JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME).getStringProperty(SimpleGUI.PARAM_LOCALE,"String_Node_Str"));
  configContainer=new ConfigContainer(this,"String_Node_Str");
  configContainer.addEntry(new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,JDUtilities.getConfiguration(),Configuration.PARAM_DOWNLOAD_DIRECTORY,JDLocale.L("String_Node_Str","String_Node_Str")).setDefaultValue(JDUtilities.getResourceFile("String_Node_Str").getAbsolutePath()));
  SimpleGUI.showConfigDialog(null,configContainer,true);
  if (JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY) == null) {
    JDUtilities.getLogger().severe("String_Node_Str");
    this.aborted=true;
    return;
  }
  JDUtilities.saveConfig();
}

Fixed version (ground truth):
public Installer(){
  ConfigContainer configContainer;
  configContainer=new ConfigContainer(this,"String_Node_Str");
  configContainer.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME),SimpleGUI.PARAM_LOCALE,JDLocale.getLocaleIDs().toArray(new String[]{}),JDLocale.L("String_Node_Str","String_Node_Str")).setDefaultValue(Locale.getDefault()));
  SimpleGUI.showConfigDialog(null,configContainer);
  if (JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME).getStringProperty(SimpleGUI.PARAM_LOCALE) == null) {
    JDUtilities.getLogger().severe("String_Node_Str");
    this.aborted=true;
    return;
  }
  JDLocale.setLocale(JDUtilities.getSubConfig(SimpleGUI.GUICONFIGNAME).getStringProperty(SimpleGUI.PARAM_LOCALE,"String_Node_Str"));
  configContainer=new ConfigContainer(this,"String_Node_Str");
  configContainer.addEntry(new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,JDUtilities.getConfiguration(),Configuration.PARAM_DOWNLOAD_DIRECTORY,JDLocale.L("String_Node_Str","String_Node_Str")).setDefaultValue(JDUtilities.getResourceFile("String_Node_Str").getAbsolutePath()));
  SimpleGUI.showConfigDialog(null,configContainer);
  if (JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY) == null) {
    JDUtilities.getLogger().severe("String_Node_Str");
    this.aborted=true;
    return;
  }
  JDUtilities.saveConfig();
}
Program: 21245
Project: 21245
Buggy source:
public static void showConfigDialog(Frame parent,ConfigContainer container,boolean alwaysOnTop){
  ConfigPanel config=new ConfigEntriesPanel(container);
  JPanel panel=new JPanel(new BorderLayout());
  panel.add(new JPanel(),BorderLayout.NORTH);
  panel.add(config,BorderLayout.CENTER);
  ConfigurationPopup pop=new ConfigurationPopup(parent,config,panel);
  pop.setModal(true);
  pop.setAlwaysOnTop(alwaysOnTop);
  pop.setLocation(JDUtilities.getCenterOfComponent(parent,pop));
  pop.setVisible(true);
}

Fixed version (ground truth):
public static void showConfigDialog(Frame parent,ConfigPanel config){
  JPanel panel=new JPanel(new BorderLayout());
  panel.add(new JPanel(),BorderLayout.NORTH);
  panel.add(config,BorderLayout.CENTER);
  ConfigurationPopup pop=new ConfigurationPopup(parent,config,panel);
  pop.setModal(true);
  pop.setAlwaysOnTop(true);
  pop.setLocation(JDUtilities.getCenterOfComponent(parent,pop));
  pop.setVisible(true);
}
Program: 21246
Project: 21246
Buggy source:
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  Browser br=new Browser();
  br.postPage("String_Node_Str" + getHost() + "String_Node_Str","String_Node_Str" + account.getUser() + "String_Node_Str"+ account.getPass()+ "String_Node_Str");
  if (br.getRedirectLocation() == null || !br.getRedirectLocation().trim().equalsIgnoreCase("String_Node_Str")) {
    ai.setValid(false);
    return ai;
  }
  br.getPage("String_Node_Str");
  String validUntil=br.getRegex("String_Node_Str").getMatch(0).trim();
  String days=new Regex(validUntil,"String_Node_Str").getMatch(0);
  String hours=new Regex(validUntil,"String_Node_Str").getMatch(0);
  long res=0;
  if (days != null)   res+=Long.parseLong(days.trim()) * 24 * 60* 60* 1000;
  if (hours != null)   res+=Long.parseLong(hours.trim()) * 60 * 60* 1000;
  res+=new Date().getTime();
  logger.info(new Date(res) + "String_Node_Str");
  ai.setValidUntil(res);
  return ai;
}

Fixed version (ground truth):
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  Browser br=new Browser();
  br.postPage("String_Node_Str" + getHost() + "String_Node_Str","String_Node_Str" + account.getUser() + "String_Node_Str"+ account.getPass()+ "String_Node_Str");
  if (br.getRedirectLocation() == null || !br.getRedirectLocation().trim().equalsIgnoreCase("String_Node_Str")) {
    ai.setValid(false);
    return ai;
  }
  br.getPage("String_Node_Str");
  String validUntil=br.getRegex("String_Node_Str").getMatch(0).trim();
  String days=new Regex(validUntil,"String_Node_Str").getMatch(0);
  String hours=new Regex(validUntil,"String_Node_Str").getMatch(0);
  long res=0;
  if (days != null)   res+=Long.parseLong(days.trim()) * 24 * 60* 60* 1000;
  if (hours != null)   res+=Long.parseLong(hours.trim()) * 60 * 60* 1000;
  res+=new Date().getTime();
  ai.setValidUntil(res);
  return ai;
}
Program: 21247
Project: 21247
Buggy source:
@Override public ArrayList<MenuItem> createMenuitems(){
  ArrayList<MenuItem> menu=new ArrayList<MenuItem>();
  menu.add(new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1).setActionListener(this));
  menu.add(new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),0).setActionListener(this));
  return menu;
}

Fixed version (ground truth):
@Override public ArrayList<MenuItem> createMenuitems(){
  ArrayList<MenuItem> menu=new ArrayList<MenuItem>();
  menu.add(new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),0).setActionListener(this));
  menu.add(new MenuItem(MenuItem.SEPARATOR));
  menu.add(new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1).setActionListener(this));
  return menu;
}
Program: 21248
Project: 21248
Buggy source:
private DownloadLink findStartLink(DownloadLink link){
  int type=getArchivePartType(link);
switch (type) {
case JDUnrarConstants.MULTIPART_START_PART:
case JDUnrarConstants.SINGLE_PART_ARCHIVE:
case JDUnrarConstants.NO_RAR_ARCHIVE:
    return null;
}
String filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
File file;
if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else {
  return null;
}
DownloadLink dlink=JDUtilities.getController().getDownloadLinkByFileOutput(file);
if (dlink == null) {
  System.out.print("String_Node_Str");
  dlink=new DownloadLink(null,file.getName(),DUMMY_HOSTER,"String_Node_Str",true);
  dlink.getLinkStatus().setStatus(link.getLinkStatus().getStatus());
  FilePackage fp=new FilePackage();
  fp.setDownloadDirectory(file.getParent());
  dlink.setFilePackage(fp);
}
return dlink;
}

Fixed version (ground truth):
private DownloadLink findStartLink(DownloadLink link){
  int type=getArchivePartType(link);
switch (type) {
case JDUnrarConstants.MULTIPART_START_PART:
case JDUnrarConstants.SINGLE_PART_ARCHIVE:
    break;
case JDUnrarConstants.NO_RAR_ARCHIVE:
  return null;
}
String filename=new Regex(link.getFileOutput(),"String_Node_Str").getMatch(0);
File file;
if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else if ((file=new File(filename + "String_Node_Str")).exists()) {
}
 else {
return null;
}
DownloadLink dlink=JDUtilities.getController().getDownloadLinkByFileOutput(file);
if (dlink == null) {
System.out.print("String_Node_Str");
dlink=new DownloadLink(null,file.getName(),DUMMY_HOSTER,"String_Node_Str",true);
dlink.getLinkStatus().setStatus(link.getLinkStatus().getStatus());
FilePackage fp=new FilePackage();
fp.setDownloadDirectory(file.getParent());
dlink.setFilePackage(fp);
}
return dlink;
}
Program: 21249
Project: 21249
Buggy source:
private void save(){
  if (new CountdownConfirmDialog(this.frame,JDLocale.L("String_Node_Str","String_Node_Str"),10,true,CountdownConfirmDialog.STYLE_YES | CountdownConfirmDialog.STYLE_NO).result) {
    Configuration configuration=JDUtilities.getConfiguration();
    StringBuffer b=new StringBuffer();
    for (    String element : JDRR.steps) {
      b.append(element + System.getProperty("String_Node_Str"));
    }
    methode=b.toString().trim();
    if (JDRR.auth != null) {
      user=new Regex(JDRR.auth,"String_Node_Str").getMatch(0);
      pass=new Regex(JDRR.auth,"String_Node_Str").getMatch(0);
      configuration.setProperty(Configuration.PARAM_HTTPSEND_USER,user);
      configuration.setProperty(Configuration.PARAM_HTTPSEND_PASS,pass);
    }
    btnCancel.setText(JDLocale.L("String_Node_Str","String_Node_Str"));
    configuration.setProperty(Configuration.PARAM_HTTPSEND_IP,routerip.getText().trim());
    configuration.setProperty(Configuration.PARAM_HTTPSEND_REQUESTS,methode);
    configuration.setProperty(Configuration.PARAM_HTTPSEND_ROUTERNAME,"String_Node_Str");
    configuration.setProperty(Configuration.PARAM_RECONNECT_TYPE,JDLocale.L("String_Node_Str","String_Node_Str"));
    if (reconnect_duration <= 2000) {
      reconnect_duration=2000;
    }
    configuration.setProperty(Configuration.PARAM_HTTPSEND_WAITFORIPCHANGE,(reconnect_duration / 1000) * 2);
    configuration.setProperty(Configuration.PARAM_HTTPSEND_IPCHECKWAITTIME,(reconnect_duration / 1000) / 2);
    JDUtilities.saveConfig();
  }
}

Fixed version (ground truth):
private void save(){
  if (new CountdownConfirmDialog(this.frame,JDLocale.L("String_Node_Str","String_Node_Str"),10,true,CountdownConfirmDialog.STYLE_YES | CountdownConfirmDialog.STYLE_NO).result) {
    Configuration configuration=JDUtilities.getConfiguration();
    StringBuffer b=new StringBuffer();
    for (    String element : JDRR.steps) {
      b.append(element + System.getProperty("String_Node_Str"));
    }
    methode=b.toString().trim();
    if (JDRR.auth != null) {
      user=new Regex(JDRR.auth,"String_Node_Str").getMatch(0);
      pass=new Regex(JDRR.auth,"String_Node_Str").getMatch(0);
      configuration.setProperty(Configuration.PARAM_HTTPSEND_USER,user);
      configuration.setProperty(Configuration.PARAM_HTTPSEND_PASS,pass);
    }
    btnCancel.setText(JDLocale.L("String_Node_Str","String_Node_Str"));
    configuration.setProperty(Configuration.PARAM_HTTPSEND_IP,routerip.getText().trim());
    configuration.setProperty(Configuration.PARAM_HTTPSEND_REQUESTS,methode);
    configuration.setProperty(Configuration.PARAM_HTTPSEND_ROUTERNAME,"String_Node_Str");
    configuration.setProperty(Configuration.PARAM_RECONNECT_TYPE,JDLocale.L("String_Node_Str","String_Node_Str"));
    if (reconnect_duration <= 2000) {
      reconnect_duration=2000;
    }
    configuration.setProperty(Configuration.PARAM_HTTPSEND_WAITFORIPCHANGE,(reconnect_duration / 1000) * 2);
    configuration.setProperty(Configuration.PARAM_HTTPSEND_IPCHECKWAITTIME,(reconnect_duration / 1000) / 2);
    JDUtilities.saveConfig();
    saved=true;
  }
}