nus-yam/ex-repair huggingface dataset:
Program: 59458
Project: 59458
Buggy source:
/** 
 * Format the price for a given currency pair.
 * @param price The price to format.
 * @param currencyPair The currency pair to trade.
 */
private final String formatPrice(BigDecimal price,CurrencyPair currencyPair){
  if (currencyPair.getCurrency().equals(CurrencyImpl.BTC) && currencyPair.getPaymentCurrency().equals(CurrencyImpl.USD)) {
    DecimalFormat btcDecimalFormat=new DecimalFormat("String_Node_Str");
    return btcDecimalFormat.format(price);
  }
 else   if (currencyPair.getCurrency().equals(CurrencyImpl.LTC)) {
    DecimalFormat ltcDecimalFormat=new DecimalFormat("String_Node_Str");
    return ltcDecimalFormat.format(price);
  }
 else {
    throw new CurrencyNotSupportedException("String_Node_Str" + currencyPair.getName() + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Format the price for a given currency pair.
 * @param price The price to format.
 * @param currencyPair The currency pair to trade.
 */
private final String formatPrice(BigDecimal price,CurrencyPair currencyPair){
  if (currencyPair.getCurrency().equals(CurrencyImpl.BTC) && currencyPair.getPaymentCurrency().equals(CurrencyImpl.USD)) {
    DecimalFormat btcDecimalFormat=new DecimalFormat("String_Node_Str");
    return btcDecimalFormat.format(price);
  }
 else   if (currencyPair.getCurrency().equals(CurrencyImpl.LTC)) {
    DecimalFormat ltcDecimalFormat=new DecimalFormat("String_Node_Str",DecimalFormatSymbols.getInstance(Locale.ENGLISH));
    return ltcDecimalFormat.format(price);
  }
 else {
    throw new CurrencyNotSupportedException("String_Node_Str" + currencyPair.getName() + "String_Node_Str");
  }
}
Program: 59459
Project: 59459
Buggy source:
/** 
 * Get the fee for an order in the resulting currency.
 * @param order The order to use for the fee computation.
 * @return The fee in the resulting currency (currency value for buy, payment currency value for sell).
 */
public Price getFeeForOrder(SiteOrder order){
  if (order instanceof WithdrawOrder) {
    if (order.getCurrencyPair().getCurrency().equals(CurrencyImpl.BTC)) {
      return new Price("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      throw new CurrencyNotSupportedException("String_Node_Str" + order.toString());
    }
  }
 else   if (order instanceof DepositOrder) {
    Currency depositedCurrency=((DepositOrder)order).getCurrency();
    if (depositedCurrency.equals(CurrencyImpl.BTC)) {
      return new Price("String_Node_Str",CurrencyImpl.BTC);
    }
 else {
      throw new NotYetImplementedException("String_Node_Str" + getName() + "String_Node_Str"+ depositedCurrency.getName());
    }
  }
 else {
    return super.getFeeForOrder(order);
  }
}

Fixed version (ground truth):
/** 
 * Get the fee for an order in the resulting currency.
 * @param order The order to use for the fee computation.
 * @return The fee in the resulting currency (currency value for buy, payment currency value for sell).
 */
public Price getFeeForOrder(SiteOrder order){
  if (order instanceof WithdrawOrder) {
    if (order.getCurrencyPair().getCurrency().equals(CurrencyImpl.BTC)) {
      return new Price("String_Node_Str");
    }
 else {
      throw new CurrencyNotSupportedException("String_Node_Str" + order.toString());
    }
  }
 else   if (order instanceof DepositOrder) {
    Currency depositedCurrency=((DepositOrder)order).getCurrency();
    if (depositedCurrency.equals(CurrencyImpl.BTC)) {
      return new Price("String_Node_Str",CurrencyImpl.BTC);
    }
 else {
      throw new NotYetImplementedException("String_Node_Str" + getName() + "String_Node_Str"+ depositedCurrency.getName());
    }
  }
 else {
    return super.getFeeForOrder(order);
  }
}
Program: 59460
Project: 59460
Buggy source:
/** 
 * Format an amount btc-e compliant.
 * @param amount The amount to format.
 */
private final String formatAmount(BigDecimal amount){
  DecimalFormat amountFormat=new DecimalFormat("String_Node_Str");
  return amountFormat.format(amount);
}

Fixed version (ground truth):
/** 
 * Format an amount btc-e compliant.
 * @param amount The amount to format.
 */
private final String formatAmount(BigDecimal amount){
  DecimalFormat amountFormat=new DecimalFormat("String_Node_Str",DecimalFormatSymbols.getInstance(Locale.ENGLISH));
  return amountFormat.format(amount);
}
Program: 59461
Project: 59461
Buggy source:
/** 
 * Check all the orders and change their status eventually.
 */
void updateOrders(){
  boolean continueChecks=true;
  while (continueChecks) {
    continueChecks=false;
    for (int orderIndex=0; orderIndex < getOrders().values().size(); ++orderIndex) {
      Order currentOrder=getOrders().get(orderIndex);
      if (currentOrder.hasDependencies()) {
        for (int currentDependencyIndex=0; currentDependencyIndex < currentOrder.getDependencies().size(); ) {
          if (currentOrder.getDependencies().get(currentDependencyIndex).getStatus() == OrderStatus.FILLED) {
            currentOrder.getDependencies().remove(currentDependencyIndex);
            continueChecks=true;
          }
 else {
            ++currentDependencyIndex;
          }
        }
        if (!currentOrder.hasDependencies()) {
          executeOrder(currentOrder);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check all the orders and change their status eventually.
 */
void updateOrders(){
  boolean continueChecks=true;
  while (continueChecks) {
    continueChecks=false;
    for (int orderIndex=0; orderIndex < getOrders().size(); ++orderIndex) {
      String orderKey=(String)(getOrders().keySet().toArray()[orderIndex]);
      Order currentOrder=getOrders().get(orderKey);
      if (currentOrder == null) {
        System.out.println("String_Node_Str");
      }
      if (currentOrder.hasDependencies()) {
        for (int currentDependencyIndex=0; currentDependencyIndex < currentOrder.getDependencies().size(); ) {
          if (currentOrder.getDependencies().get(currentDependencyIndex).getStatus() == OrderStatus.FILLED) {
            currentOrder.getDependencies().remove(currentDependencyIndex);
            continueChecks=true;
          }
 else {
            ++currentDependencyIndex;
          }
        }
        if (!currentOrder.hasDependencies()) {
          executeOrder(currentOrder);
        }
      }
    }
  }
}
Program: 59462
Project: 59462
Buggy source:
/** 
 * Private constructor for singleton pattern).
 */
private ModuleLoader(){
  for (  File currentJar : getModuleJars()) {
    loadClassesFromJar(currentJar);
  }
}

Fixed version (ground truth):
/** 
 * Private constructor for singleton pattern).
 */
private ModuleLoader(){
  File[] moduleJars=getModuleJars();
  if (moduleJars != null) {
    for (    File currentJar : getModuleJars()) {
      LogUtils.getInstance().getLogger().info("String_Node_Str" + currentJar.getName());
      loadClassesFromJar(currentJar);
    }
  }
 else {
    LogUtils.getInstance().getLogger().warn("String_Node_Str");
  }
}
Program: 59463
Project: 59463
Buggy source:
/** 
 * Get all the jars from the modules as an array of files.
 * @return All the module jars as an array of files.
 */
private File[] getModuleJars(){
  File extDir=new File(getJarLocation(),"String_Node_Str");
  return extDir.listFiles(new JarFilenameFilter());
}

Fixed version (ground truth):
/** 
 * Get all the jars from the modules as an array of files.
 * @return All the module jars as an array of files.
 */
private File[] getModuleJars(){
  File extDir=new File(getJarLocation(),"String_Node_Str");
  if (!extDir.isDirectory()) {
    LogUtils.getInstance().getLogger().error(extDir.getName() + "String_Node_Str");
    return null;
  }
  return extDir.listFiles(new JarFilenameFilter());
}
Program: 59464
Project: 59464
Buggy source:
/** 
 * Get the location of the jar, this ModuleLoader is in. So we can compute the ext/ directory relative to this jar file.
 * @see http://stackoverflow.com/questions/320542/how-to-get-the-path-of-a-running-jar-file
 * @return The location of this loaded jar file.
 */
private File getJarLocation(){
  String path=ModuleLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
  try {
    String decodedPath=URLDecoder.decode(path,"String_Node_Str");
    return new File(decodedPath);
  }
 catch (  UnsupportedEncodingException uee) {
    LogUtils.getInstance().getLogger().error("String_Node_Str" + uee);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get the location of the jar, this ModuleLoader is in. So we can compute the ext/ directory relative to this jar file.
 * @see http://stackoverflow.com/questions/320542/how-to-get-the-path-of-a-running-jar-file
 * @return The location of this loaded jar file.
 */
private File getJarLocation(){
  String path=ModuleLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
  try {
    String decodedPath=URLDecoder.decode(path,"String_Node_Str");
    return new File(decodedPath).getParentFile();
  }
 catch (  UnsupportedEncodingException uee) {
    LogUtils.getInstance().getLogger().error("String_Node_Str" + uee);
  }
  return null;
}
Program: 59466
Project: 59466
Buggy source:
/** 
 * Logs received data 
 */
public void logMethodReturn(String methodName,Object[] params,Object result){
  try {
    if (methodName.equals("String_Node_Str")) {
      activityLog.add(now() + "String_Node_Str" + ((Map)result).get("String_Node_Str")+ "String_Node_Str");
      sessions.put("String_Node_Str" + ((Map)result).get("String_Node_Str"),result);
      ((Map)result).put("String_Node_Str","String_Node_Str");
    }
 else     if (methodName.equals("String_Node_Str")) {
      List consoles=((List)((Map)result).get("String_Node_Str"));
      for (      Object console : consoles) {
        activityLog.add(now() + "String_Node_Str" + ((Map)console).get("String_Node_Str")+ "String_Node_Str");
        sessions.put("String_Node_Str" + ((Map)console).get("String_Node_Str"),result);
        ((Map)console).put("String_Node_Str","String_Node_Str");
      }
    }
 else     if (methodName.equals("String_Node_Str")) {
      logConsole("String_Node_Str" + params[0],new String(RpcConnection.getData((Map)result)),false);
    }
 else     if (methodName.startsWith("String_Node_Str") && methodName.endsWith("String_Node_Str")) {
      logConsole(params[0].toString(),new String(RpcConnection.getData((Map)result)),false);
    }
  }
 catch (  MsfException mex) {
  }
}

Fixed version (ground truth):
/** 
 * Logs received data 
 */
public void logMethodReturn(String methodName,Object[] params,Object result){
  try {
    if (methodName.equals("String_Node_Str")) {
      activityLog.add(now() + "String_Node_Str" + ((Map)result).get("String_Node_Str")+ "String_Node_Str");
      sessions.put("String_Node_Str" + ((Map)result).get("String_Node_Str"),result);
      ((Map)result).put("String_Node_Str","String_Node_Str");
    }
 else     if (methodName.equals("String_Node_Str")) {
      List consoles=((List)((Map)result).get("String_Node_Str"));
      for (      Object console : consoles) {
        activityLog.add(now() + "String_Node_Str" + ((Map)console).get("String_Node_Str")+ "String_Node_Str");
        sessions.put("String_Node_Str" + ((Map)console).get("String_Node_Str"),result);
        ((Map)console).put("String_Node_Str","String_Node_Str");
      }
    }
 else     if (methodName.equals("String_Node_Str")) {
      logConsole("String_Node_Str" + params[0],new String(RpcConnection.getData((Map)result)),false);
    }
 else     if (methodName.startsWith("String_Node_Str") && methodName.endsWith("String_Node_Str")) {
      logConsole(params[0],new String(RpcConnection.getData((Map)result)),false);
    }
  }
 catch (  MsfException mex) {
  }
}
Program: 59467
Project: 59467
Buggy source:
/** 
 * Record console communication 
 */
public void logConsole(String sessionId,String message,boolean sending){
  Map session=(Map)sessions.get(sessionId);
  if (session == null || message.length() == 0)   return;
  if ((message.indexOf('\n') - message.length()) % message.length() != -1)   message="String_Node_Str" + message;
  ArrayList consoleLog=(ArrayList)session.get("String_Node_Str");
  if (consoleLog == null) {
    consoleLog=new ArrayList(30);
    session.put("String_Node_Str",consoleLog);
  }
  message=htmlEntities(message);
  if (sending)   consoleLog.add(now() + "String_Node_Str" + message);
 else   consoleLog.add(now() + "String_Node_Str" + message);
}

Fixed version (ground truth):
/** 
 * Record console communication 
 */
public void logConsole(Object sessionId,String message,boolean sending){
  Map session=(Map)sessions.get(sessionId);
  if (session == null || message.length() == 0)   return;
  if ((message.indexOf('\n') - message.length()) % message.length() != -1)   message="String_Node_Str" + message;
  ArrayList consoleLog=(ArrayList)session.get("String_Node_Str");
  if (consoleLog == null) {
    consoleLog=new ArrayList(30);
    session.put("String_Node_Str",consoleLog);
  }
  message=htmlEntities(message);
  if (sending)   consoleLog.add(now() + "String_Node_Str" + message);
 else   consoleLog.add(now() + "String_Node_Str" + message);
}
Program: 59469
Project: 59469
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void executeRequestsNow(int howMany){
  int started=0;
  for (  JobRequest jobRequest : JobManager.instance().getAllJobRequests()) {
    if (isSoonButNotImmediate(jobRequest)) {
      JobRequest.Builder builder=jobRequest.cancelAndEdit();
      builder.setExecutionWindow(10000,jobRequest.getEndMs()).build().schedule();
      started++;
    }
    if (started == howMany) {
      break;
    }
  }
  Logger.d(TAG,String.format("String_Node_Str",started));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void executeRequestsNow(int howMany){
  int started=0;
  for (  JobRequest jobRequest : JobManager.instance().getAllJobRequests()) {
    if (isSoonButNotImmediate(jobRequest)) {
      JobRequest.Builder builder=jobRequest.cancelAndEdit();
      long endMillis=Math.max(jobRequest.getEndMs(),RUN_NOW_TIME_WINDOW_END);
      builder.setExecutionWindow(RUN_NOW_TIME_WINDOW_START,endMillis).build().schedule();
      started++;
    }
    if (started == howMany) {
      break;
    }
  }
  Logger.d(TAG,String.format("String_Node_Str",started));
}
Program: 59470
Project: 59470
Buggy source:
private boolean isSoonButNotImmediate(JobRequest jobRequest){
  return jobRequest.getStartMs() < SOON_THRESHOLD;
}

Fixed version (ground truth):
private boolean isSoonButNotImmediate(JobRequest jobRequest){
  return IMMEDIATE_THRESHOLD < jobRequest.getStartMs() && jobRequest.getStartMs() < SOON_THRESHOLD;
}
Program: 59472
Project: 59472
Buggy source:
private boolean sendBroadcast(Resource updatedResource){
  return LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(ACTION_RESOURCE_MODIFIED).putExtra("String_Node_Str",updatedResource));
}

Fixed version (ground truth):
private boolean sendBroadcast(Resource updatedResource){
  if (updatedResource != null) {
    return LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(ACTION_RESOURCE_MODIFIED).putExtra("String_Node_Str",updatedResource));
  }
  return false;
}
Program: 59473
Project: 59473
Buggy source:
@Override public void onError(final String requestId,final ErrorInfo error){
  backgroundThreadHandler.post(new Runnable(){
    @Override public void run(){
      final Resource resource;
      if (error.getCode() == ErrorInfo.REQUEST_CANCELLED) {
        resource=ResourceRepo.getInstance().getResource(requestId);
        if (resource != null) {
          ResourceRepo.getInstance().delete(resource.getLocalUri());
        }
      }
 else {
        resource=ResourceRepo.getInstance().resourceFailed(requestId,error.getCode(),error.getDescription());
      }
      if (resource != null) {
        sendBroadcast(resource);
      }
    }
  }
);
  cancelNotification(requestId);
  int id=idsProvider.incrementAndGet();
  requestIdsToNotificationIds.put(requestId,id);
  notificationManager.notify(id,getBuilder(requestId,Resource.UploadStatus.FAILED).setContentTitle("String_Node_Str").setContentText(error.getDescription()).setStyle(new NotificationCompat.BigTextStyle().setBigContentTitle("String_Node_Str").bigText(error.getDescription())).build());
  cleanupBitmap(requestId);
}

Fixed version (ground truth):
@Override public void onError(final String requestId,final ErrorInfo error){
  backgroundThreadHandler.post(new Runnable(){
    @Override public void run(){
      final Resource resource;
      if (error.getCode() == ErrorInfo.REQUEST_CANCELLED) {
        resource=ResourceRepo.getInstance().getResource(requestId);
        if (resource != null) {
          ResourceRepo.getInstance().delete(resource.getLocalUri());
        }
      }
 else {
        resource=ResourceRepo.getInstance().resourceFailed(requestId,error.getCode(),error.getDescription());
      }
      sendBroadcast(resource);
    }
  }
);
  cancelNotification(requestId);
  int id=idsProvider.incrementAndGet();
  requestIdsToNotificationIds.put(requestId,id);
  notificationManager.notify(id,getBuilder(requestId,Resource.UploadStatus.FAILED).setContentTitle("String_Node_Str").setContentText(error.getDescription()).setStyle(new NotificationCompat.BigTextStyle().setBigContentTitle("String_Node_Str").bigText(error.getDescription())).build());
  cleanupBitmap(requestId);
}
Program: 59474
Project: 59474
Buggy source:
private void addFileToDirectory(WPBFile parentDirectory,WPBFile file,InputStream is) throws WPBException, IOException {
  String dirPath="String_Node_Str";
  String filePath=null;
  if (parentDirectory != null) {
    dirPath=getDirectoryFullPath(parentDirectory.getExternalKey(),adminStorage);
  }
  if (dirPath.length() > 0) {
    filePath=dirPath + "String_Node_Str" + file.getFileName();
  }
 else {
    filePath=file.getFileName();
  }
  WPBFilePath cloudFile=new WPBFilePath(PUBLIC_BUCKET,filePath);
  cloudFileStorage.storeFile(is,cloudFile);
  cloudFileStorage.updateContentType(cloudFile,ContentTypeDetector.fileNameToContentType(file.getFileName()));
  WPBFileInfo fileInfo=cloudFileStorage.getFileInfo(cloudFile);
  file.setBlobKey(cloudFile.getPath());
  file.setHash(fileInfo.getCrc32());
  file.setSize(fileInfo.getSize());
  file.setContentType(fileInfo.getContentType());
  file.setAdjustedContentType(file.getContentType());
  file.setDirectoryFlag(0);
  if (parentDirectory != null) {
    file.setOwnerExtKey(parentDirectory.getExternalKey());
  }
 else {
    file.setOwnerExtKey("String_Node_Str");
  }
  WPBResource resource=new WPBResource(file.getExternalKey(),file.getFileName(),WPBResource.FILE_TYPE);
  if (file.getExternalKey() != null) {
    adminStorage.update(file);
    try {
      adminStorage.update(resource);
    }
 catch (    WPBException e) {
    }
  }
 else {
    adminStorage.addWithKey(file);
    try {
      adminStorage.addWithKey(resource);
    }
 catch (    WPBException e) {
    }
  }
}

Fixed version (ground truth):
private void addFileToDirectory(WPBFile parentDirectory,WPBFile file,InputStream is) throws WPBException, IOException {
  String dirPath="String_Node_Str";
  String filePath=null;
  if (parentDirectory != null) {
    dirPath=getDirectoryFullPath(parentDirectory.getExternalKey(),adminStorage);
  }
  if (dirPath.length() > 0) {
    filePath=dirPath + "String_Node_Str" + file.getFileName();
  }
 else {
    filePath=file.getFileName();
  }
  WPBFilePath cloudFile=new WPBFilePath(PUBLIC_BUCKET,filePath);
  cloudFileStorage.storeFile(is,cloudFile);
  cloudFileStorage.updateContentType(cloudFile,ContentTypeDetector.fileNameToContentType(file.getFileName()));
  WPBFileInfo fileInfo=cloudFileStorage.getFileInfo(cloudFile);
  file.setBlobKey(cloudFile.getPath());
  file.setHash(fileInfo.getCrc32());
  file.setSize(fileInfo.getSize());
  file.setContentType(fileInfo.getContentType());
  file.setAdjustedContentType(file.getContentType());
  file.setDirectoryFlag(0);
  if (parentDirectory != null) {
    file.setOwnerExtKey(parentDirectory.getExternalKey());
  }
 else {
    file.setOwnerExtKey("String_Node_Str");
  }
  WPBResource resource=new WPBResource(file.getExternalKey(),file.getFileName(),WPBResource.FILE_TYPE);
  adminStorage.delete(file.getExternalKey(),WPBFile.class);
  adminStorage.addWithKey(file);
  try {
    adminStorage.delete(resource.getRkey(),WPBResource.class);
    adminStorage.addWithKey(resource);
  }
 catch (  WPBException e) {
  }
}
Program: 59475
Project: 59475
Buggy source:
@After public void tearDown(){
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
}

Fixed version (ground truth):
@After public void tearDown(){
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
  Whitebox.setInternalState(DefaultWPBCacheFactory.class,"String_Node_Str",(WPBCacheFactory)null);
}
Program: 59476
Project: 59476
Buggy source:
@Before public void setUp(){
  publicServlet=new WPBPublicContentServlet();
  loggerMock=EasyMock.createMock(Logger.class);
  Whitebox.setInternalState(WPBPublicContentServlet.class,"String_Node_Str",loggerMock);
  requestMock=EasyMock.createMock(HttpServletRequest.class);
  responseMock=EasyMock.createMock(HttpServletResponse.class);
  urisCacheMock=EasyMock.createMock(WPBUrisCache.class);
  parametersCacheMock=EasyMock.createMock(WPBParametersCache.class);
  filesCacheMock=EasyMock.createMock(WPBFilesCache.class);
  messagesCacheMock=EasyMock.createMock(WPBMessagesCache.class);
  articlesCacheMock=EasyMock.createMock(WPBArticlesCache.class);
  pagesCacheMock=EasyMock.createMock(WPBPagesCache.class);
  modulesCacheMock=EasyMock.createMock(WPBPageModulesCache.class);
  projectCacheMock=EasyMock.createMock(WPBProjectCache.class);
  cacheInstances=new WPBCacheInstances(urisCacheMock,pagesCacheMock,modulesCacheMock,parametersCacheMock,filesCacheMock,articlesCacheMock,messagesCacheMock,projectCacheMock);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
}

Fixed version (ground truth):
@Before public void setUp(){
  WPBCacheFactory cacheFactoryMock=EasyMock.createMock(WPBCacheFactory.class);
  Whitebox.setInternalState(DefaultWPBCacheFactory.class,"String_Node_Str",cacheFactoryMock);
  publicServlet=new WPBPublicContentServlet();
  loggerMock=EasyMock.createMock(Logger.class);
  Whitebox.setInternalState(WPBPublicContentServlet.class,"String_Node_Str",loggerMock);
  requestMock=EasyMock.createMock(HttpServletRequest.class);
  responseMock=EasyMock.createMock(HttpServletResponse.class);
  urisCacheMock=EasyMock.createMock(WPBUrisCache.class);
  parametersCacheMock=EasyMock.createMock(WPBParametersCache.class);
  filesCacheMock=EasyMock.createMock(WPBFilesCache.class);
  messagesCacheMock=EasyMock.createMock(WPBMessagesCache.class);
  articlesCacheMock=EasyMock.createMock(WPBArticlesCache.class);
  pagesCacheMock=EasyMock.createMock(WPBPagesCache.class);
  modulesCacheMock=EasyMock.createMock(WPBPageModulesCache.class);
  projectCacheMock=EasyMock.createMock(WPBProjectCache.class);
  cacheInstances=new WPBCacheInstances(urisCacheMock,pagesCacheMock,modulesCacheMock,parametersCacheMock,filesCacheMock,articlesCacheMock,messagesCacheMock,projectCacheMock);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
  Whitebox.setInternalState(CmsConfigurationFactory.class,"String_Node_Str",(Object)null);
}
Program: 59477
Project: 59477
Buggy source:
private void handleRequestTypeText(WPBPage webPage,HttpServletRequest req,HttpServletResponse resp,InternalModel model) throws WPBException, IOException {
  if (webPage == null) {
    resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
    return;
  }
  resp.setCharacterEncoding("String_Node_Str");
  Integer isTemplateSource=webPage.getIsTemplateSource();
  if (isTemplateSource != 1) {
    String ifNoneMatch=req.getHeader(HEADER_IF_NONE_MATCH);
    if (ifNoneMatch != null && ifNoneMatch.equals(webPage.getHash().toString())) {
      resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
      return;
    }
    resp.addHeader(HEADER_ETAG,webPage.getHash().toString());
    String cqp=req.getParameter(cache_query_param);
    if (cqp != null) {
      resp.addHeader(HEADER_CACHE_CONTROL,"String_Node_Str".concat(cache_max_age));
    }
  }
 else {
    resp.addHeader(HEADER_CACHE_CONTROL,"String_Node_Str");
  }
  String content=pageContentBuilder.buildPageContent(req,webPage,model);
  resp.addHeader(HEADER_CONTENT_LENGTH,Integer.toString(content.length()));
  resp.setContentType(webPage.getContentType());
  ServletOutputStream os=resp.getOutputStream();
  os.write(content.getBytes("String_Node_Str"));
}

Fixed version (ground truth):
private void handleRequestTypeText(WPBPage webPage,HttpServletRequest req,HttpServletResponse resp,InternalModel model) throws WPBException, IOException {
  if (webPage == null) {
    resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
    return;
  }
  resp.setCharacterEncoding("String_Node_Str");
  Integer isTemplateSource=webPage.getIsTemplateSource();
  if (isTemplateSource != 1) {
    String ifNoneMatch=req.getHeader(HEADER_IF_NONE_MATCH);
    if (ifNoneMatch != null && ifNoneMatch.equals(webPage.getHash().toString())) {
      resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
      return;
    }
    resp.addHeader(HEADER_ETAG,webPage.getHash().toString());
    String cqp=req.getParameter(cache_query_param);
    if (cqp != null) {
      resp.addHeader(HEADER_CACHE_CONTROL,"String_Node_Str".concat(cache_max_age));
    }
  }
 else {
    resp.addHeader(HEADER_CACHE_CONTROL,"String_Node_Str");
  }
  byte[] content=pageContentBuilder.buildPageContent(req,webPage,model).getBytes("String_Node_Str");
  resp.addHeader(HEADER_CONTENT_LENGTH,Integer.toString(content.length));
  resp.setContentType(webPage.getContentType());
  ServletOutputStream os=resp.getOutputStream();
  os.write(content);
}
Program: 59478
Project: 59478
Buggy source:
public WBWebPage buildWebPage(Map<Object,Object> properties){
  WBWebPage page=new WBWebPage();
  if (properties.get("String_Node_Str") != null)   page.setExternalKey(properties.get("String_Node_Str").toString().trim());
 else   return null;
  if (properties.get("String_Node_Str") != null) {
    page.setContentType(properties.get("String_Node_Str").toString().trim());
  }
  if (properties.get("String_Node_Str") != null) {
    page.setName(properties.get("String_Node_Str").toString().trim());
  }
 else {
    page.setName("String_Node_Str");
  }
  if (properties.get("String_Node_Str") != null) {
    page.setHtmlSource(properties.get("String_Node_Str").toString().trim());
  }
 else {
    page.setHtmlSource("String_Node_Str");
  }
  page.setHash(page.crc32(page.getHtmlSource()));
  String lastModifiedStr=(String)properties.get("String_Node_Str");
  Long lastModified=0L;
  try {
    lastModified=lastModifiedStr != null ? Long.valueOf(lastModifiedStr) : 0;
  }
 catch (  NumberFormatException e) {
  }
  page.setLastModified(new Date(lastModified));
  String isTemplateSourceStr=(String)properties.get("String_Node_Str");
  Integer isTemplateSource=isTemplateSourceStr != null && !isTemplateSourceStr.equals("String_Node_Str") ? 1 : 0;
  page.setIsTemplateSource(isTemplateSource);
  return page;
}

Fixed version (ground truth):
public WBWebPage buildWebPage(Map<Object,Object> properties){
  WBWebPage page=new WBWebPage();
  if (properties.get("String_Node_Str") != null)   page.setExternalKey(properties.get("String_Node_Str").toString().trim());
 else   return null;
  if (properties.get("String_Node_Str") != null) {
    page.setContentType(properties.get("String_Node_Str").toString().trim());
  }
  if (properties.get("String_Node_Str") != null) {
    page.setName(properties.get("String_Node_Str").toString().trim());
  }
 else {
    page.setName("String_Node_Str");
  }
  if (properties.get("String_Node_Str") != null) {
    page.setPageModelProvider(properties.get("String_Node_Str").toString().trim());
  }
 else {
    page.setPageModelProvider("String_Node_Str");
  }
  if (properties.get("String_Node_Str") != null) {
    page.setHtmlSource(properties.get("String_Node_Str").toString().trim());
  }
 else {
    page.setHtmlSource("String_Node_Str");
  }
  page.setHash(page.crc32(page.getHtmlSource()));
  String lastModifiedStr=(String)properties.get("String_Node_Str");
  Long lastModified=0L;
  try {
    lastModified=lastModifiedStr != null ? Long.valueOf(lastModifiedStr) : 0;
  }
 catch (  NumberFormatException e) {
  }
  page.setLastModified(new Date(lastModified));
  String isTemplateSourceStr=(String)properties.get("String_Node_Str");
  Integer isTemplateSource=isTemplateSourceStr != null && !isTemplateSourceStr.equals("String_Node_Str") ? 1 : 0;
  page.setIsTemplateSource(isTemplateSource);
  return page;
}
Program: 59479
Project: 59479
Buggy source:
public void importContent(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    ServletFileUpload upload=new ServletFileUpload();
    FileItemIterator iterator=upload.getItemIterator(request);
    while (iterator.hasNext()) {
      FileItemStream item=iterator.next();
      if (!item.isFormField() && item.getFieldName().equals("String_Node_Str")) {
        InputStream is=item.openStream();
        storageExporter.importFromZip(is);
        org.json.JSONObject returnJson=new org.json.JSONObject();
        returnJson.put(DATA,"String_Node_Str");
        httpServletToolbox.writeBodyResponseAsJson(response,returnJson,null);
      }
    }
  }
 catch (  Exception e) {
    Map<String,String> errors=new HashMap<String,String>();
    errors.put("String_Node_Str",WBErrors.WB_CANNOT_IMPORT_PROJECT);
    httpServletToolbox.writeBodyResponseAsJson(response,jsonObjectConverter.JSONObjectFromMap(null),errors);
  }
}

Fixed version (ground truth):
public void importContent(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    ServletFileUpload upload=new ServletFileUpload();
    FileItemIterator iterator=upload.getItemIterator(request);
    while (iterator.hasNext()) {
      FileItemStream item=iterator.next();
      if (!item.isFormField() && item.getFieldName().equals("String_Node_Str")) {
        InputStream is=item.openStream();
        storageExporter.importFromZip(is);
        WBCacheFactory wbCacheFactory=DefaultWBCacheFactory.getInstance();
        wbCacheFactory.createWBUrisCacheInstance().Refresh();
        wbCacheFactory.createWBWebPagesCacheInstance().Refresh();
        wbCacheFactory.createWBWebPageModulesCacheInstance().Refresh();
        wbCacheFactory.createWBArticlesCacheInstance().Refresh();
        wbCacheFactory.createWBMessagesCacheInstance().Refresh();
        wbCacheFactory.createWBFilesCacheInstance().Refresh();
        wbCacheFactory.createWBParametersCacheInstance().Refresh();
        wbCacheFactory.createWBProjectCacheInstance().Refresh();
        org.json.JSONObject returnJson=new org.json.JSONObject();
        returnJson.put(DATA,"String_Node_Str");
        httpServletToolbox.writeBodyResponseAsJson(response,returnJson,null);
      }
    }
  }
 catch (  Exception e) {
    Map<String,String> errors=new HashMap<String,String>();
    errors.put("String_Node_Str",WBErrors.WB_CANNOT_IMPORT_PROJECT);
    httpServletToolbox.writeBodyResponseAsJson(response,jsonObjectConverter.JSONObjectFromMap(null),errors);
  }
}
Program: 59480
Project: 59480
Buggy source:
public void updateFileCustomProperties(WBCloudFile file,Map<String,String> customProps) throws IOException {
  String fullFilePath=getLocalFullDataPath(file);
  if (!checkIfFileExists(fullFilePath)) {
    throw new IOException("String_Node_Str");
  }
  String metaPath=getLocalFullMetaPath(file);
  Properties props=getFileProperties(metaPath);
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  props.putAll(customProps);
  storeFileProperties(props,fullFilePath);
}

Fixed version (ground truth):
public void updateFileCustomProperties(WBCloudFile file,Map<String,String> customProps) throws IOException {
  String fullFilePath=getLocalFullDataPath(file);
  if (!checkIfFileExists(fullFilePath)) {
    throw new IOException("String_Node_Str");
  }
  String metaPath=getLocalFullMetaPath(file);
  Properties props=getFileProperties(metaPath);
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  customProps.remove("String_Node_Str");
  props.putAll(customProps);
  storeFileProperties(props,metaPath);
}
Program: 59481
Project: 59481
Buggy source:
public void updateContentType(WBCloudFile file,String contentType) throws IOException {
  String fullFilePath=getLocalFullDataPath(file);
  if (!checkIfFileExists(fullFilePath)) {
    throw new IOException("String_Node_Str");
  }
  String metaPath=getLocalFullMetaPath(file);
  Properties props=getFileProperties(metaPath);
  props.put("String_Node_Str",contentType);
  storeFileProperties(props,fullFilePath);
}

Fixed version (ground truth):
public void updateContentType(WBCloudFile file,String contentType) throws IOException {
  String fullFilePath=getLocalFullDataPath(file);
  if (!checkIfFileExists(fullFilePath)) {
    throw new IOException("String_Node_Str");
  }
  String metaPath=getLocalFullMetaPath(file);
  Properties props=getFileProperties(metaPath);
  props.put("String_Node_Str",contentType);
  storeFileProperties(props,metaPath);
}
Program: 59482
Project: 59482
Buggy source:
public void serveFile(HttpServletRequest request,HttpServletResponse response,String uri) throws WBIOException {
  if (!uri.startsWith(LOCAL_FILE_SERVE_URL)) {
    return;
  }
  String fullFilePath=uri.substring(LOCAL_FILE_SERVE_URL.length());
  int pos=fullFilePath.indexOf('/');
  String bucket=fullFilePath.substring(0,pos);
  String file=fullFilePath.substring(pos + 1);
  file=new String(DatatypeConverter.parseBase64Binary(file));
  WBCloudFile cloudFile=new WBCloudFile(bucket,file);
  InputStream is=null;
  try {
    is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    WBCloudFileInfo fileInfo=cloudFileStorage.getFileInfo(cloudFile);
    response.setContentType(fileInfo.getContentType());
  }
 catch (  Exception e) {
    throw new WBIOException("String_Node_Str",e);
  }
 finally {
    IOUtils.closeQuietly(is);
  }
}

Fixed version (ground truth):
public void serveFile(HttpServletRequest request,HttpServletResponse response,String uri) throws WBIOException {
  if (!uri.startsWith(LOCAL_FILE_SERVE_URL)) {
    return;
  }
  String fullFilePath=uri.substring(LOCAL_FILE_SERVE_URL.length());
  int pos=fullFilePath.indexOf('/');
  String bucket=fullFilePath.substring(0,pos);
  String file=fullFilePath.substring(pos + 1);
  file=new String(WBBase64Utility.fromSafePathBase64(file),Charset.forName("String_Node_Str"));
  WBCloudFile cloudFile=new WBCloudFile(bucket,file);
  InputStream is=null;
  try {
    is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    WBCloudFileInfo fileInfo=cloudFileStorage.getFileInfo(cloudFile);
    response.setContentType(fileInfo.getContentType());
  }
 catch (  Exception e) {
    throw new WBIOException("String_Node_Str",e);
  }
 finally {
    IOUtils.closeQuietly(is);
  }
}
Program: 59483
Project: 59483
Buggy source:
private String sanitizeCloudFilePath(String path){
  String base64=DatatypeConverter.printBase64Binary(path.getBytes());
  base64=base64.replace('/','-');
  return base64;
}

Fixed version (ground truth):
private String sanitizeCloudFilePath(String path){
  return WBBase64Utility.toBase64(path.getBytes(Charset.forName("String_Node_Str")));
}
Program: 59484
Project: 59484
Buggy source:
@Override public void Refresh() throws WBIOException {
synchronized (lock) {
    Map<String,WBWebPageModule> tempMap=new HashMap<String,WBWebPageModule>();
    List<WBWebPageModule> recList=dataStorage.getAllRecords(WBWebPageModule.class);
    for (    WBWebPageModule item : recList) {
      tempMap.put(item.getExternalKey(),item);
    }
    localCache=tempMap;
  }
}

Fixed version (ground truth):
@Override public void Refresh() throws WBIOException {
synchronized (lock) {
    Map<String,WBWebPageModule> tempMapByID=new HashMap<String,WBWebPageModule>();
    Map<String,WBWebPageModule> tempMapByName=new HashMap<String,WBWebPageModule>();
    List<WBWebPageModule> recList=dataStorage.getAllRecords(WBWebPageModule.class);
    for (    WBWebPageModule item : recList) {
      tempMapByID.put(item.getExternalKey(),item);
      tempMapByName.put(item.getName(),item);
    }
    localCacheByID=tempMapByID;
    localCacheByName=tempMapByName;
  }
}
Program: 59485
Project: 59485
Buggy source:
public WBWebPageModule get(String pageName) throws WBIOException {
  return null;
}

Fixed version (ground truth):
public WBWebPageModule get(String moduleName) throws WBIOException {
  if (localCacheByName != null) {
    return localCacheByName.get(moduleName);
  }
  return null;
}
Program: 59486
Project: 59486
Buggy source:
public WBWebPageModule getByExternalKey(String externalKey) throws WBIOException {
  if (localCache == null) {
    Refresh();
  }
  if (localCache != null) {
    return localCache.get(externalKey);
  }
  return null;
}

Fixed version (ground truth):
public WBWebPageModule getByExternalKey(String externalKey) throws WBIOException {
  if (localCacheByID != null) {
    return localCacheByID.get(externalKey);
  }
  return null;
}
Program: 59487
Project: 59487
Buggy source:
@Override public void Refresh() throws WBIOException {
synchronized (lock) {
    Map<String,WBWebPage> tempMap=new HashMap<String,WBWebPage>();
    List<WBWebPage> recList=dataStorage.getAllRecords(WBWebPage.class);
    for (    WBWebPage item : recList) {
      tempMap.put(item.getExternalKey(),item);
    }
    localCache=tempMap;
  }
}

Fixed version (ground truth):
@Override public void Refresh() throws WBIOException {
synchronized (lock) {
    Map<String,WBWebPage> tempMapByID=new HashMap<String,WBWebPage>();
    Map<String,WBWebPage> tempMapByName=new HashMap<String,WBWebPage>();
    List<WBWebPage> recList=dataStorage.getAllRecords(WBWebPage.class);
    for (    WBWebPage item : recList) {
      tempMapByID.put(item.getExternalKey(),item);
      tempMapByName.put(item.getName(),item);
    }
    localCacheByExternalId=tempMapByID;
    localCacheByName=tempMapByName;
  }
}
Program: 59488
Project: 59488
Buggy source:
public WBWebPage get(String pageName) throws WBIOException {
  return null;
}

Fixed version (ground truth):
public WBWebPage get(String pageName) throws WBIOException {
  if (localCacheByName != null) {
    return localCacheByName.get(pageName);
  }
  return null;
}
Program: 59489
Project: 59489
Buggy source:
public WBWebPage getByExternalKey(String externalKey) throws WBIOException {
  if (localCache == null) {
    Refresh();
  }
  if (localCache != null) {
    return localCache.get(externalKey);
  }
  return null;
}

Fixed version (ground truth):
public WBWebPage getByExternalKey(String externalKey) throws WBIOException {
  if (localCacheByExternalId != null) {
    return localCacheByExternalId.get(externalKey);
  }
  return null;
}
Program: 59490
Project: 59490
Buggy source:
public void serveResource(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Long key=Long.valueOf((String)request.getAttribute("String_Node_Str"));
    WBFile wbimage=adminStorage.get(key,WBFile.class);
    WBCloudFile cloudFile=new WBCloudFile("String_Node_Str",wbimage.getBlobKey());
    InputStream is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    response.setContentType(wbimage.getContentType());
  }
 catch (  Exception e) {
    response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
  }
}

Fixed version (ground truth):
public void serveResource(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Long key=Long.valueOf((String)request.getAttribute("String_Node_Str"));
    WBFile wbimage=adminStorage.get(key,WBFile.class);
    WBCloudFile cloudFile=new WBCloudFile("String_Node_Str",wbimage.getBlobKey());
    InputStream is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    response.setContentType(wbimage.getContentType());
    IOUtils.closeQuietly(is);
  }
 catch (  Exception e) {
    response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
  }
}
Program: 59491
Project: 59491
Buggy source:
public void downloadResource(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Long key=Long.valueOf((String)request.getAttribute("String_Node_Str"));
    WBFile wbimage=adminStorage.get(key,WBFile.class);
    WBCloudFile cloudFile=new WBCloudFile("String_Node_Str",wbimage.getBlobKey());
    InputStream is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    response.setHeader("String_Node_Str","String_Node_Str" + wbimage.getFileName() + "String_Node_Str");
    response.setContentType(wbimage.getContentType());
  }
 catch (  Exception e) {
    response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
  }
}

Fixed version (ground truth):
public void downloadResource(HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Long key=Long.valueOf((String)request.getAttribute("String_Node_Str"));
    WBFile wbimage=adminStorage.get(key,WBFile.class);
    WBCloudFile cloudFile=new WBCloudFile("String_Node_Str",wbimage.getBlobKey());
    InputStream is=cloudFileStorage.getFileContent(cloudFile);
    IOUtils.copy(is,response.getOutputStream());
    response.setHeader("String_Node_Str","String_Node_Str" + wbimage.getFileName() + "String_Node_Str");
    response.setContentType(wbimage.getContentType());
    IOUtils.closeQuietly(is);
  }
 catch (  Exception e) {
    response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
  }
}
Program: 59492
Project: 59492
Buggy source:
public WBMessageController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=AdminDataStorageFactory.getInstance();
  validator=new WBMessageValidator();
  validator.setAdminStorage(adminStorage);
  WBCacheFactory wbCacheFactory=DefaultWBCacheFactory.getInstance();
  wbMessageCache=wbCacheFactory.createWBMessagesCacheInstance();
}

Fixed version (ground truth):
public WBMessageController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=AdminDataStorageFactory.getInstance();
  validator=new WBMessageValidator();
  validator.setAdminStorage(adminStorage);
  WBCacheFactory wbCacheFactory=DefaultWBCacheFactory.getInstance();
  wbMessageCache=wbCacheFactory.createWBMessagesCacheInstance();
  adminStorage.addStorageListener(this);
}
Program: 59493
Project: 59493
Buggy source:
public String getPublicFileUrl(WBCloudFile file){
  String fullFilePath=getLocalFullDataPath(file);
  return basePublicUrlPath + fullFilePath;
}

Fixed version (ground truth):
public String getPublicFileUrl(WBCloudFile file){
  String partialPath=file.getBucket() + "String_Node_Str" + sanitizeCloudFilePath(file.getPath());
  return basePublicUrlPath + partialPath;
}
Program: 59494
Project: 59494
Buggy source:
public void initialize(WBBlobHandler blobHandler,WBCacheInstances cacheInstances){
  this.cacheInstances=cacheInstances;
  this.blobHandler=blobHandler;
}

Fixed version (ground truth):
public void initialize(WBCloudFileStorage cloudFileStorage,WBCacheInstances cacheInstances){
  this.cacheInstances=cacheInstances;
  this.cloudFileStorage=cloudFileStorage;
}
Program: 59495
Project: 59495
Buggy source:
public void execute(Environment env,Map params,TemplateModel[] loopVars,TemplateDirectiveBody body) throws TemplateException, IOException {
  if (body != null)   throw new TemplateModelException("String_Node_Str");
  String externalKey=null;
  if (params.containsKey("String_Node_Str")) {
    externalKey=(String)DeepUnwrap.unwrap((TemplateModel)params.get("String_Node_Str"));
  }
 else {
    throw new TemplateModelException("String_Node_Str");
  }
  Integer size=0;
  if (params.containsKey("String_Node_Str")) {
    String strSize=(String)DeepUnwrap.unwrap((TemplateModel)params.get("String_Node_Str"));
    try {
      size=Integer.valueOf(strSize);
    }
 catch (    NumberFormatException e) {
    }
  }
  try {
    String serveUrl="String_Node_Str";
    WBFile image=cacheInstances.getWBFilesCache().getByExternalKey(externalKey);
    if (image != null) {
    }
    String htmlImage="String_Node_Str" + serveUrl + "String_Node_Str";
    env.getOut().write(htmlImage);
  }
 catch (  WBIOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    throw new TemplateModelException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void execute(Environment env,Map params,TemplateModel[] loopVars,TemplateDirectiveBody body) throws TemplateException, IOException {
  if (body != null)   throw new TemplateModelException("String_Node_Str");
  String externalKey=null;
  if (params.containsKey("String_Node_Str")) {
    externalKey=(String)DeepUnwrap.unwrap((TemplateModel)params.get("String_Node_Str"));
  }
 else {
    throw new TemplateModelException("String_Node_Str");
  }
  try {
    String serveUrl="String_Node_Str";
    WBFile image=cacheInstances.getWBFilesCache().getByExternalKey(externalKey);
    if (image != null) {
      WBCloudFile cloudFile=new WBCloudFile("String_Node_Str",image.getBlobKey());
      serveUrl=cloudFileStorage.getPublicFileUrl(cloudFile);
    }
    String htmlImage="String_Node_Str" + serveUrl + "String_Node_Str";
    env.getOut().write(htmlImage);
  }
 catch (  WBIOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    throw new TemplateModelException("String_Node_Str");
  }
}