Program: 47130
Project: 47130
Buggy source:
/** 
 * Attempt to return information from IMDb about the file based on information from the filename; either the hash, the IMDb ID or the filename itself.
 * @param hash  the video hash
 * @param size  the bytesize to be used with the hash
 * @param imdb  the IMDb ID
 * @param query the string to search IMDb for
 * @return a string array including the IMDb ID, episode title, season number,episode number relative to the season, and the show name, or null if we couldn't find it on IMDb.
 * @throws IOException
 */
private static String[] getInfo(String hash,long size,String imdb,String query,RendererConfiguration r) throws IOException {
  login();
  if (token == null) {
    return null;
  }
  String lang=UMSUtils.getLangList(r,true);
  URL url=new URL(OPENSUBS_URL);
  String hashStr="String_Node_Str";
  String imdbStr="String_Node_Str";
  String qStr="String_Node_Str";
  if (!StringUtils.isEmpty(hash)) {
    hashStr="String_Node_Str" + hash + "String_Node_Str"+ "String_Node_Str"+ size+ "String_Node_Str";
  }
 else   if (!StringUtils.isEmpty(imdb)) {
    imdbStr="String_Node_Str" + imdb + "String_Node_Str";
  }
 else   if (!StringUtils.isEmpty(query)) {
    qStr="String_Node_Str" + query + "String_Node_Str";
  }
 else {
    return null;
  }
  String req="String_Node_Str" + "String_Node_Str" + token + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lang+ "String_Node_Str"+ hashStr+ imdbStr+ qStr+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Pattern re=Pattern.compile("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Pattern.DOTALL);
  String page=postPage(url.openConnection(),req);
  Matcher m=re.matcher(page);
  if (m.find()) {
    LOGGER.debug("String_Node_Str" + m.group(1) + "String_Node_Str"+ m.group(2)+ "String_Node_Str"+ m.group(3)+ "String_Node_Str"+ m.group(4)+ "String_Node_Str"+ m.group(5));
    Pattern re1=Pattern.compile("String_Node_Str");
    String name=m.group(2);
    Matcher m1=re1.matcher(name);
    String eptit="String_Node_Str";
    if (m1.find()) {
      eptit=m1.group(2).trim();
      name=m1.group(1).trim();
    }
    return new String[]{ImdbUtil.ensureTT(m.group(1).trim()),StringEscapeUtils.unescapeHtml4(eptit),StringEscapeUtils.unescapeHtml4(name),m.group(3).trim(),m.group(4).trim(),m.group(5).trim()};
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Attempt to return information from IMDb about the file based on information from the filename; either the hash, the IMDb ID or the filename itself.
 * @param hash  the video hash
 * @param size  the bytesize to be used with the hash
 * @param imdb  the IMDb ID
 * @param query the string to search IMDb for
 * @return a string array including the IMDb ID, episode title, season number,episode number relative to the season, and the show name, or null if we couldn't find it on IMDb.
 * @throws IOException
 */
private static String[] getInfo(String hash,long size,String imdb,String query,RendererConfiguration r) throws IOException {
  if (!login()) {
    return null;
  }
  String lang=UMSUtils.getLangList(r,true);
  URL url=new URL(OPENSUBS_URL);
  String hashStr="String_Node_Str";
  String imdbStr="String_Node_Str";
  String qStr="String_Node_Str";
  if (!StringUtils.isEmpty(hash)) {
    hashStr="String_Node_Str" + hash + "String_Node_Str"+ "String_Node_Str"+ size+ "String_Node_Str";
  }
 else   if (!StringUtils.isEmpty(imdb)) {
    imdbStr="String_Node_Str" + imdb + "String_Node_Str";
  }
 else   if (!StringUtils.isEmpty(query)) {
    qStr="String_Node_Str" + query + "String_Node_Str";
  }
 else {
    return null;
  }
  String req=null;
  tokenLock.readLock().lock();
  try {
    req="String_Node_Str" + "String_Node_Str" + token + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lang+ "String_Node_Str"+ hashStr+ imdbStr+ qStr+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
  finally {
    tokenLock.readLock().unlock();
  }
  Pattern re=Pattern.compile("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Pattern.DOTALL);
  String page=postPage(url.openConnection(),req);
  Matcher m=re.matcher(page);
  if (m.find()) {
    LOGGER.debug("String_Node_Str" + m.group(1) + "String_Node_Str"+ m.group(2)+ "String_Node_Str"+ m.group(3)+ "String_Node_Str"+ m.group(4)+ "String_Node_Str"+ m.group(5));
    Pattern re1=Pattern.compile("String_Node_Str");
    String name=m.group(2);
    Matcher m1=re1.matcher(name);
    String eptit="String_Node_Str";
    if (m1.find()) {
      eptit=m1.group(2).trim();
      name=m1.group(1).trim();
    }
    return new String[]{ImdbUtil.ensureTT(m.group(1).trim()),StringEscapeUtils.unescapeHtml4(eptit),StringEscapeUtils.unescapeHtml4(name),m.group(3).trim(),m.group(4).trim(),m.group(5).trim()};
  }
  return null;
}