nus-yam/ex-repair huggingface dataset:
Program: 47357
Project: 47357
Buggy source:
public static void shutdown(){
  clearObjectFactory();
  systemExitPoint();
  setApplicationContext(null);
  if (LocaleHelper.getLocale() == null) {
    LocaleHelper.setLocale(Locale.getDefault());
  }
  if (debug) {
    Logger.debug(PentahoSystem.class,"String_Node_Str");
  }
  if (PentahoSystem.listeners != null) {
    Iterator systemListenerIterator=PentahoSystem.listeners.iterator();
    while (systemListenerIterator.hasNext()) {
      IPentahoSystemListener listener=(IPentahoSystemListener)systemListenerIterator.next();
      if (listener != null) {
        if (debug) {
          Logger.debug(PentahoSystem.class,"String_Node_Str" + listener.getClass().getName());
        }
        try {
          listener.shutdown();
        }
 catch (        Throwable e) {
          Logger.error(PentahoSystem.class.getName(),Messages.getInstance().getErrorString("String_Node_Str",listener.getClass().getName()),e);
        }
      }
    }
  }
  if (debug) {
    Logger.debug(PentahoSystem.class,"String_Node_Str");
  }
  PentahoSystem.initializedStatus=PentahoSystem.SYSTEM_NOT_INITIALIZED;
}

Fixed version (ground truth):
public static void shutdown(){
  if (LocaleHelper.getLocale() == null) {
    LocaleHelper.setLocale(Locale.getDefault());
  }
  if (debug) {
    Logger.debug(PentahoSystem.class,"String_Node_Str");
  }
  if (PentahoSystem.listeners != null) {
    Iterator systemListenerIterator=PentahoSystem.listeners.iterator();
    while (systemListenerIterator.hasNext()) {
      IPentahoSystemListener listener=(IPentahoSystemListener)systemListenerIterator.next();
      if (listener != null) {
        if (debug) {
          Logger.debug(PentahoSystem.class,"String_Node_Str" + listener.getClass().getName());
        }
        try {
          listener.shutdown();
        }
 catch (        Throwable e) {
          Logger.error(PentahoSystem.class.getName(),Messages.getInstance().getErrorString("String_Node_Str",listener.getClass().getName()),e);
        }
      }
    }
  }
  if (debug) {
    Logger.debug(PentahoSystem.class,"String_Node_Str");
  }
  clearObjectFactory();
  systemExitPoint();
  setApplicationContext(null);
  PentahoSystem.initializedStatus=PentahoSystem.SYSTEM_NOT_INITIALIZED;
}
Program: 47358
Project: 47358
Buggy source:
protected void endJob(){
  try {
    outputStream.write(writeAppender.getLayout().getFooter().getBytes());
  }
 catch (  Exception e) {
    System.out.println(e);
  }
  logger.removeAppender(logName);
}

Fixed version (ground truth):
protected void endJob(){
  try {
    outputStream.write(writeAppender.getLayout().getFooter().getBytes());
  }
 catch (  Exception e) {
    System.out.println(e);
  }
  logger.removeAppender(writeAppender);
}
Program: 47359
Project: 47359
Buggy source:
private String updateDatasource(RepositoryFile file,IDatabaseConnection databaseConnection) throws NonExistingDatasourceException, DatasourceMgmtServiceException {
  try {
    if (file != null) {
      file=new RepositoryFile.Builder(file).versionId(file.getVersionId()).id(databaseConnection.getId()).title(RepositoryFile.DEFAULT_LOCALE,databaseConnection.getName()).build();
      file=repository.updateFile(file,new NodeRepositoryFileData(databaseHelper.databaseConnectionToDataNode(databaseConnection)),null);
      renameIfNecessary(databaseConnection,file);
      return file.getId().toString();
    }
 else {
      throw new NonExistingDatasourceException(Messages.getInstance().getErrorString("String_Node_Str",databaseConnection.getName()));
    }
  }
 catch (  UnifiedRepositoryException ure) {
    throw new DatasourceMgmtServiceException(Messages.getInstance().getErrorString("String_Node_Str",databaseConnection.getName(),ure.getLocalizedMessage()),ure);
  }
}

Fixed version (ground truth):
private String updateDatasource(RepositoryFile file,IDatabaseConnection databaseConnection) throws NonExistingDatasourceException, DatasourceMgmtServiceException {
  try {
    if (file != null) {
      file=new RepositoryFile.Builder(file).versionId(file.getVersionId()).id(file.getId()).title(RepositoryFile.DEFAULT_LOCALE,databaseConnection.getName()).build();
      file=repository.updateFile(file,new NodeRepositoryFileData(databaseHelper.databaseConnectionToDataNode(databaseConnection)),null);
      renameIfNecessary(databaseConnection,file);
      return file.getId().toString();
    }
 else {
      throw new NonExistingDatasourceException(Messages.getInstance().getErrorString("String_Node_Str",databaseConnection.getName()));
    }
  }
 catch (  UnifiedRepositoryException ure) {
    throw new DatasourceMgmtServiceException(Messages.getInstance().getErrorString("String_Node_Str",databaseConnection.getName(),ure.getLocalizedMessage()),ure);
  }
}
Program: 47360
Project: 47360
Buggy source:
/** 
 * Retrieve the plugins setting with a provided setting name. This will search the plugins's settings.xml and return the selected setting
 * @param pluginId (Plugin ID for the setting being searched)
 * @param settingName (Setting name of a selected plugin)
 * @return Value of the setting
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public String getPluginSetting(@PathParam("String_Node_Str") String pluginId,@PathParam("String_Node_Str") String settingName){
  if (canAdminister()) {
    IPluginManager pluginManager=PentahoSystem.get(IPluginManager.class,PentahoSessionHolder.getSession());
    return (String)pluginManager.getPluginSetting(pluginId,settingName,null);
  }
  throw new UnauthorizedException();
}

Fixed version (ground truth):
/** 
 * Retrieve the plugins setting with a provided setting name. This will search the plugins's settings.xml and return the selected setting
 * @param pluginId (Plugin ID for the setting being searched)
 * @param settingName (Setting name of a selected plugin)
 * @return Value of the setting
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public String getPluginSetting(@PathParam("String_Node_Str") String pluginId,@PathParam("String_Node_Str") String settingName){
  IPluginManager pluginManager=PentahoSystem.get(IPluginManager.class,PentahoSessionHolder.getSession());
  return (String)pluginManager.getPluginSetting(pluginId,settingName,null);
}
Program: 47361
Project: 47361
Buggy source:
/** 
 * Retrieve the list of XUL overlays for the provided id
 * @param id
 * @return list of <code> Overlay </code>
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public List<Overlay> getOverlays(@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") String id){
  if (!canAdminister()) {
    throw new UnauthorizedException();
  }
  IPluginManager pluginManager=PentahoSystem.get(IPluginManager.class,PentahoSessionHolder.getSession());
  List<XulOverlay> overlays=pluginManager.getOverlays();
  ArrayList<Overlay> result=new ArrayList<Overlay>();
  for (  XulOverlay overlay : overlays) {
    if (!id.isEmpty() && !overlay.getId().equals(id)) {
      continue;
    }
    Overlay tempOverlay=new Overlay(overlay.getId(),overlay.getOverlayUri(),overlay.getSource(),overlay.getResourceBundleUri(),overlay.getPriority());
    result.add(tempOverlay);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Retrieve the list of XUL overlays for the provided id
 * @param id
 * @return list of <code> Overlay </code>
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public List<Overlay> getOverlays(@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") String id){
  IPluginManager pluginManager=PentahoSystem.get(IPluginManager.class,PentahoSessionHolder.getSession());
  List<XulOverlay> overlays=pluginManager.getOverlays();
  ArrayList<Overlay> result=new ArrayList<Overlay>();
  for (  XulOverlay overlay : overlays) {
    if (!id.isEmpty() && !overlay.getId().equals(id)) {
      continue;
    }
    Overlay tempOverlay=new Overlay(overlay.getId(),overlay.getOverlayUri(),overlay.getSource(),overlay.getResourceBundleUri(),overlay.getPriority());
    result.add(tempOverlay);
  }
  return result;
}
Program: 47362
Project: 47362
Buggy source:
/** 
 * Retrieve the list of plugin perspective in the platform
 * @return list of <code> PluginPerspective </code>
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public ArrayList<PluginPerspective> getPluginPerpectives(){
  if (!canAdminister()) {
    throw new UnauthorizedException();
  }
  IPluginPerspectiveManager manager=PentahoSystem.get(IPluginPerspectiveManager.class,PentahoSessionHolder.getSession());
  ArrayList<PluginPerspective> perspectives=new ArrayList<PluginPerspective>();
  for (  IPluginPerspective perspective : manager.getPluginPerspectives()) {
    PluginPerspective pp=new PluginPerspective();
    pp.setId(perspective.getId());
    pp.setTitle(perspective.getTitle());
    pp.setContentUrl(perspective.getContentUrl());
    pp.setLayoutPriority(perspective.getLayoutPriority());
    pp.setRequiredSecurityActions(perspective.getRequiredSecurityActions());
    pp.setResourceBundleUri(perspective.getResourceBundleUri());
    if (perspective.getOverlays() != null) {
      ArrayList<Overlay> safeOverlays=new ArrayList<Overlay>();
      for (      XulOverlay orig : perspective.getOverlays()) {
        Overlay tempOverlay=new Overlay(orig.getId(),orig.getOverlayUri(),orig.getSource(),orig.getResourceBundleUri(),orig.getPriority());
        safeOverlays.add(tempOverlay);
      }
      pp.setOverlays(safeOverlays);
    }
    perspectives.add(pp);
  }
  return perspectives;
}

Fixed version (ground truth):
/** 
 * Retrieve the list of plugin perspective in the platform
 * @return list of <code> PluginPerspective </code>
 */
@GET @Path("String_Node_Str") @Produces({APPLICATION_JSON}) public ArrayList<PluginPerspective> getPluginPerpectives(){
  IPluginPerspectiveManager manager=PentahoSystem.get(IPluginPerspectiveManager.class,PentahoSessionHolder.getSession());
  ArrayList<PluginPerspective> perspectives=new ArrayList<PluginPerspective>();
  for (  IPluginPerspective perspective : manager.getPluginPerspectives()) {
    PluginPerspective pp=new PluginPerspective();
    pp.setId(perspective.getId());
    pp.setTitle(perspective.getTitle());
    pp.setContentUrl(perspective.getContentUrl());
    pp.setLayoutPriority(perspective.getLayoutPriority());
    pp.setRequiredSecurityActions(perspective.getRequiredSecurityActions());
    pp.setResourceBundleUri(perspective.getResourceBundleUri());
    if (perspective.getOverlays() != null) {
      ArrayList<Overlay> safeOverlays=new ArrayList<Overlay>();
      for (      XulOverlay orig : perspective.getOverlays()) {
        Overlay tempOverlay=new Overlay(orig.getId(),orig.getOverlayUri(),orig.getSource(),orig.getResourceBundleUri(),orig.getPriority());
        safeOverlays.add(tempOverlay);
      }
      pp.setOverlays(safeOverlays);
    }
    perspectives.add(pp);
  }
  return perspectives;
}
Program: 47363
Project: 47363
Buggy source:
/** 
 * Returns whether the user is sn authenticated user or not <p><b>Example Request:</b><br> GET api/mantle/isAuthenticated<br> </p>
 * @return String true if the user is an administrator, or false otherwise
 */
@GET @Path("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response isAuthenticated(){
  return buildOkResponse(userConsoleService.isAuthenticated());
}

Fixed version (ground truth):
/** 
 * Returns whether the user is sn authenticated user or not <p><b>Example Request:</b><br> GET api/mantle/isAuthenticated<br> </p>
 * @return String true if the user is an administrator, or false otherwise
 */
@GET @Path("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response isAuthenticated(){
  return buildOkResponse(String.valueOf(userConsoleService.isAuthenticated()));
}
Program: 47364
Project: 47364
Buggy source:
/** 
 * Returns whether the current user is an administrator <p><b>Example Request:</b><br> GET api/mantle/isAdministrator<br> </p>
 * @return String true if the user is an administrator, or false otherwise
 */
@GET @Path("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response isAdministrator(){
  return buildOkResponse(userConsoleService.isAdministrator());
}

Fixed version (ground truth):
/** 
 * Returns whether the current user is an administrator <p><b>Example Request:</b><br> GET api/mantle/isAdministrator<br> </p>
 * @return String true if the user is an administrator, or false otherwise
 */
@GET @Path("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response isAdministrator(){
  return buildOkResponse(String.valueOf(userConsoleService.isAdministrator()));
}
Program: 47365
Project: 47365
Buggy source:
protected RepositoryRequest getRepositoryRequest(RepositoryFileDto repositoryFileDto,boolean showHidden,String filter,boolean includeAcls){
  RepositoryRequest repositoryRequest=new RepositoryRequest(repositoryFileDto.getId(),showHidden,0,filter);
  repositoryRequest.setIncludeAcls(includeAcls);
  return repositoryRequest;
}

Fixed version (ground truth):
protected RepositoryRequest getRepositoryRequest(RepositoryFileDto repositoryFileDto,Boolean showHidden,String filter,Boolean includeAcls){
  RepositoryRequest repositoryRequest=new RepositoryRequest(repositoryFileDto.getId(),showHidden,0,filter);
  repositoryRequest.setIncludeAcls(includeAcls);
  return repositoryRequest;
}
Program: 47366
Project: 47366
Buggy source:
/** 
 * Resume the specified job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/resumeJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response resumeJob(JobRequest jobRequest){
  try {
    JobState state=schedulerService.resumeJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(state.name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Resume the specified job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/resumeJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<p><b>Example Response:</b></p> <pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response resumeJob(JobRequest jobRequest){
  try {
    JobState state=schedulerService.resumeJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(state.name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47370
Project: 47370
Buggy source:
/** 
 * Pause the specified job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/pauseJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response pauseJob(JobRequest jobRequest){
  try {
    JobState state=schedulerService.pauseJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(state.name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Pause the specified job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/pauseJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<p><b>Example Response:</b></p> <pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response pauseJob(JobRequest jobRequest){
  try {
    JobState state=schedulerService.pauseJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(state.name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47373
Project: 47373
Buggy source:
/** 
 * Checks whether the current user has authority to schedule any content in the platform <p><b>Example Request:</b><br /> GET api/scheduler/canSchedule </p>
 * @return true or false. true indicates scheduling is allowed and false indicates scheduling is not allowed for the user.<pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces(TEXT_PLAIN) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public String doGetCanSchedule(){
  return schedulerService.doGetCanSchedule();
}

Fixed version (ground truth):
/** 
 * Checks whether the current user has authority to schedule any content in the platform <p><b>Example Request:</b><br /> GET api/scheduler/canSchedule </p>
 * @return true or false. true indicates scheduling is allowed and false indicates scheduling is not allowed for the user.<p><b>Example Response:</b></p> <pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces(TEXT_PLAIN) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public String doGetCanSchedule(){
  return schedulerService.doGetCanSchedule();
}
Program: 47374
Project: 47374
Buggy source:
/** 
 * Checks if the selected blockout schedule should be fired now <p><b>Example Request:</b><br /> GET api/scheduler/blockout/shouldFireNow </p>
 * @return true or false whether or not the blockout should fire now<pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces({TEXT_PLAIN}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response shouldFireNow(){
  Boolean result=schedulerService.shouldFireNow();
  return buildOkResponse(result.toString());
}

Fixed version (ground truth):
/** 
 * Checks if the selected blockout schedule should be fired now <p><b>Example Request:</b><br /> GET api/scheduler/blockout/shouldFireNow </p>
 * @return true or false whether or not the blockout should fire now<p><b>Example Response:</b></p> <pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces({TEXT_PLAIN}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response shouldFireNow(){
  Boolean result=schedulerService.shouldFireNow();
  return buildOkResponse(result.toString());
}
Program: 47378
Project: 47378
Buggy source:
/** 
 * Checks the state of the selected job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/jobState </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response getJobState(JobRequest jobRequest){
  try {
    return buildPlainTextOkResponse(schedulerService.getJobState(jobRequest).name());
  }
 catch (  UnsupportedOperationException e) {
    return buildPlainTextStatusResponse(UNAUTHORIZED);
  }
catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Checks the state of the selected job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/jobState </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<p><b>Example Response:</b></p> <pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response getJobState(JobRequest jobRequest){
  try {
    return buildPlainTextOkResponse(schedulerService.getJobState(jobRequest).name());
  }
 catch (  UnsupportedOperationException e) {
    return buildPlainTextStatusResponse(UNAUTHORIZED);
  }
catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47379
Project: 47379
Buggy source:
/** 
 * Resume the scheduler from a paused state <p><b>Example Request:</b><br /> POST api/scheduler/start </p>
 * @return A jax-rs Response object containing the status of the scheduler<pre function="syntax.xml"> RUNNING </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response start(){
  try {
    String status=schedulerService.start();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Resume the scheduler from a paused state <p><b>Example Request:</b><br /> POST api/scheduler/start </p>
 * @return A jax-rs Response object containing the status of the scheduler<p><b>Example Response:</b></p> <pre function="syntax.xml"> RUNNING </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response start(){
  try {
    String status=schedulerService.start();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47380
Project: 47380
Buggy source:
/** 
 * Checks whether the current user may schedule a repository file in the platform <p><b>Example Request:</b><br /> GET api/scheduler/isScheduleAllowed?id=fileId </p>
 * @param id The repository file ID of the content to checked<pre function="syntax.xml"> fileId </pre>
 * @return true or false. true indicates scheduling is allowed and false indicates scheduling is not allowed for the file.<pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces(TEXT_PLAIN) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public String isScheduleAllowed(@QueryParam("String_Node_Str") String id){
  return "String_Node_Str" + schedulerService.isScheduleAllowed(id);
}

Fixed version (ground truth):
/** 
 * Checks whether the current user may schedule a repository file in the platform <p><b>Example Request:</b><br /> GET api/scheduler/isScheduleAllowed?id=fileId </p>
 * @param id The repository file ID of the content to checked<pre function="syntax.xml"> fileId </pre>
 * @return true or false. true indicates scheduling is allowed and false indicates scheduling is not allowed for the file.<p><b>Example Response:</b></p> <pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces(TEXT_PLAIN) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public String isScheduleAllowed(@QueryParam("String_Node_Str") String id){
  return "String_Node_Str" + schedulerService.isScheduleAllowed(id);
}
Program: 47381
Project: 47381
Buggy source:
/** 
 * Pause the scheduler from a running state <p><b>Example Request:</b><br /> POST api/scheduler/pause </p>
 * @return A jax-rs Response object containing the status of the scheduler<pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response pause(){
  try {
    String status=schedulerService.pause();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Pause the scheduler from a running state <p><b>Example Request:</b><br /> POST api/scheduler/pause </p>
 * @return A jax-rs Response object containing the status of the scheduler<p><b>Example Response:</b></p> <pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response pause(){
  try {
    String status=schedulerService.pause();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47382
Project: 47382
Buggy source:
/** 
 * Returns the state of the scheduler with the value of RUNNING or PAUSED <p><b>Example Request:</b><br /> GET api/scheduler/state </p>
 * @return status of the scheduler as RUNNING or PAUSED<pre function="syntax.xml"> RUNNING </pre>
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response getState(){
  try {
    String state=schedulerService.getState();
    return buildPlainTextOkResponse(state);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Returns the state of the scheduler with the value of RUNNING or PAUSED <p><b>Example Request:</b><br /> GET api/scheduler/state </p>
 * @return status of the scheduler as RUNNING or PAUSED<p><b>Example Response:</b></p> <pre function="syntax.xml"> RUNNING </pre>
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response getState(){
  try {
    String state=schedulerService.getState();
    return buildPlainTextOkResponse(state);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47384
Project: 47384
Buggy source:
/** 
 * Delete the specified job/schedule from the platform <p><b>Example Request:</b><br /> DELETE api/scheduler/removeJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<pre function="syntax.xml"> REMOVED </pre>
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response removeJob(JobRequest jobRequest){
  try {
    if (schedulerService.removeJob(jobRequest.getJobId())) {
      return buildPlainTextOkResponse("String_Node_Str");
    }
    Job job=schedulerService.getJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(job.getState().name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Delete the specified job/schedule from the platform <p><b>Example Request:</b><br /> DELETE api/scheduler/removeJob </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A jax-rs Response object containing the status of the scheduled job<p><b>Example Response:</b></p> <pre function="syntax.xml"> REMOVED </pre>
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response removeJob(JobRequest jobRequest){
  try {
    if (schedulerService.removeJob(jobRequest.getJobId())) {
      return buildPlainTextOkResponse("String_Node_Str");
    }
    Job job=schedulerService.getJob(jobRequest.getJobId());
    return buildPlainTextOkResponse(job.getState().name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47385
Project: 47385
Buggy source:
/** 
 * Checks if there are blockouts in the system <p><b>Example Request:</b><br /> GET api/scheduler/blockout/hasblockouts </p>
 * @return true or false whether there are blackouts or not<pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces({TEXT_PLAIN}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response hasBlockouts(){
  Boolean hasBlockouts=schedulerService.hasBlockouts();
  return buildOkResponse(hasBlockouts.toString());
}

Fixed version (ground truth):
/** 
 * Checks if there are blockouts in the system <p><b>Example Request:</b><br /> GET api/scheduler/blockout/hasblockouts </p>
 * @return true or false whether there are blackouts or not<p><b>Example Response:</b></p> <pre function="syntax.xml"> true </pre>
 */
@GET @Path("String_Node_Str") @Produces({TEXT_PLAIN}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str")}) public Response hasBlockouts(){
  Boolean hasBlockouts=schedulerService.hasBlockouts();
  return buildOkResponse(hasBlockouts.toString());
}
Program: 47386
Project: 47386
Buggy source:
/** 
 * Execute a previously created job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/triggerNow </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A Response object indicating the status of the scheduler<pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=400,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response triggerNow(JobRequest jobRequest){
  try {
    Job job=schedulerService.triggerNow(jobRequest.getJobId());
    return buildPlainTextOkResponse(job.getState().name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Execute a previously created job/schedule <p><b>Example Request:</b><br /> POST api/scheduler/triggerNow </p>
 * @param jobRequest A JobRequest object containing the jobId<pre function="syntax.xml"> &lt;jobRequest&gt; &lt;jobId&gt;username	JobName	1408369303507&lt;/jobId&gt; &lt;/jobRequest&gt; </pre>
 * @return A Response object indicating the status of the scheduler<p><b>Example Response:</b></p> <pre function="syntax.xml"> NORMAL </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes({APPLICATION_XML,APPLICATION_JSON}) @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=400,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response triggerNow(JobRequest jobRequest){
  try {
    Job job=schedulerService.triggerNow(jobRequest.getJobId());
    return buildPlainTextOkResponse(job.getState().name());
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47388
Project: 47388
Buggy source:
/** 
 * Shuts down the scheduler <p><b>Example Request:</b><br /> POST api/scheduler/shutdown </p>
 * @return A jax-rs Response object containing the status of the scheduler<pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response shutdown(){
  try {
    String status=schedulerService.shutdown();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Shuts down the scheduler <p><b>Example Request:</b><br /> POST api/scheduler/shutdown </p>
 * @return A jax-rs Response object containing the status of the scheduler<p><b>Example Response:</b></p> <pre function="syntax.xml"> PAUSED </pre>
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @StatusCodes({@ResponseCode(code=200,condition="String_Node_Str"),@ResponseCode(code=500,condition="String_Node_Str")}) public Response shutdown(){
  try {
    String status=schedulerService.shutdown();
    return buildPlainTextOkResponse(status);
  }
 catch (  SchedulerException e) {
    throw new RuntimeException(e);
  }
}
Program: 47390
Project: 47390
Buggy source:
/** 
 * @param lineageId
 * @return
 * @throws java.io.FileNotFoundException
 */
public List<RepositoryFileDto> doGetGeneratedContentForSchedule(String lineageId) throws FileNotFoundException {
  SessionResource sessionResource=getSessionResource();
  return getFileService().searchGeneratedContent(sessionResource.doGetCurrentUserDir(),lineageId,QuartzScheduler.RESERVEDMAPKEY_LINEAGE_ID);
}

Fixed version (ground truth):
/** 
 * @param lineageId
 * @return
 * @throws java.io.FileNotFoundException
 */
public List<RepositoryFileDto> doGetGeneratedContentForSchedule(String lineageId) throws FileNotFoundException {
  return getFileService().searchGeneratedContent(getSessionResource().doGetCurrentUserDir(),lineageId,QuartzScheduler.RESERVEDMAPKEY_LINEAGE_ID);
}
Program: 47391
Project: 47391
Buggy source:
public boolean isScheduleAllowed(String id){
  Boolean canSchedule=isScheduleAllowed();
  if (canSchedule) {
    Map<String,Serializable> metadata=repository.getFileMetadata(id);
    if (metadata.containsKey("String_Node_Str")) {
      canSchedule=Boolean.parseBoolean((String)metadata.get("String_Node_Str"));
    }
  }
  return canSchedule;
}

Fixed version (ground truth):
public boolean isScheduleAllowed(String id){
  Boolean canSchedule=isScheduleAllowed();
  if (canSchedule) {
    Map<String,Serializable> metadata=getRepository().getFileMetadata(id);
    if (metadata.containsKey("String_Node_Str")) {
      canSchedule=Boolean.parseBoolean((String)metadata.get("String_Node_Str"));
    }
  }
  return canSchedule;
}
Program: 47392
Project: 47392
Buggy source:
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  for (  SolutionBrowserFile file : filesToDelete) {
    temp+=file.getId() + "String_Node_Str";
    names+=file.getName() + "String_Node_Str";
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}

Fixed version (ground truth):
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  for (  SolutionBrowserFile file : filesToDelete) {
    temp+=file.getId() + "String_Node_Str";
    names+=file.getName() + "String_Node_Str";
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox;
    if (filesToDelete.size() > 1) {
      messageTextBox=new HTML(Messages.getString("String_Node_Str"));
    }
 else {
      messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    }
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}
Program: 47393
Project: 47393
Buggy source:
/** 
 * @param selectedItems
 */
public CopyFilesCommand(List<FileItem> selectedItems){
  super();
  this.repositoryFiles=selectedItems;
}

Fixed version (ground truth):
public CopyFilesCommand(){
}
Program: 47394
Project: 47394
Buggy source:
@Override protected void performOperation(boolean feedback){
  SolutionBrowserClipboard clipBoard=SolutionBrowserClipboard.getInstance();
  clipBoard.setDataForCopy(repositoryFiles);
  clipBoard.setMimeType("String_Node_Str");
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  event.setMessage("String_Node_Str");
  EventBusUtil.EVENT_BUS.fireEvent(event);
}

Fixed version (ground truth):
@Override protected void performOperation(boolean feedback){
  SolutionBrowserClipboard clipBoard=SolutionBrowserClipboard.getInstance();
  clipBoard.setClipboardItemsByIdForCopy(filesToCopy);
  clipBoard.setMimeType("String_Node_Str");
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  event.setMessage("String_Node_Str");
  EventBusUtil.EVENT_BUS.fireEvent(event);
}
Program: 47395
Project: 47395
Buggy source:
/** 
 * @param selectedItems
 */
public CutFilesCommand(List<FileItem> selectedItems){
  super();
  this.repositoryFiles=selectedItems;
}

Fixed version (ground truth):
public CutFilesCommand(){
}
Program: 47396
Project: 47396
Buggy source:
@Override protected void performOperation(boolean feedback){
  SolutionBrowserClipboard clipBoard=SolutionBrowserClipboard.getInstance();
  clipBoard.setDataForCut(repositoryFiles);
  clipBoard.setMimeType("String_Node_Str");
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  event.setMessage("String_Node_Str");
  EventBusUtil.EVENT_BUS.fireEvent(event);
}

Fixed version (ground truth):
@Override protected void performOperation(boolean feedback){
  SolutionBrowserClipboard clipBoard=SolutionBrowserClipboard.getInstance();
  clipBoard.setClipboardItemsForCut(filesToCut);
  clipBoard.setMimeType("String_Node_Str");
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  event.setMessage("String_Node_Str");
  EventBusUtil.EVENT_BUS.fireEvent(event);
}
Program: 47398
Project: 47398
Buggy source:
public DeleteFileCommand(List<FileItem> selectedItemsClone){
  this.repositoryFiles=selectedItemsClone;
}

Fixed version (ground truth):
public DeleteFileCommand(){
}
Program: 47399
Project: 47399
Buggy source:
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  RepositoryFile rf=null;
  for (  FileItem fileItem : repositoryFiles) {
    rf=fileItem.getRepositoryFile();
    temp+=rf.getId() + "String_Node_Str";
    if (rf.getTitle() != null) {
      names+=rf.getTitle() + "String_Node_Str";
    }
 else {
      names+=rf.getName() + "String_Node_Str";
    }
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}

Fixed version (ground truth):
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  for (  SolutionBrowserFile file : filesToDelete) {
    temp+=file.getId() + "String_Node_Str";
    names+=file.getId() + "String_Node_Str";
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}
Program: 47400
Project: 47400
Buggy source:
@Override public void onResponseReceived(Request request,Response response){
  if (response.getStatusCode() == 200) {
    event.setMessage("String_Node_Str");
    EventBusUtil.EVENT_BUS.fireEvent(event);
    new RefreshRepositoryCommand().execute(false);
    FileChooserDialog.setIsDirty(Boolean.TRUE);
    setBrowseRepoDirty(Boolean.TRUE);
    for (    FileItem recentItem : repositoryFiles) {
      if (recentItem != null) {
        SolutionBrowserPanel.getInstance().removeRecent(recentItem.getPath());
        SolutionBrowserPanel.getInstance().removeFavorite(recentItem.getPath());
      }
    }
  }
 else {
    MessageDialogBox dialogBox=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),false,false,true);
    dialogBox.center();
    event.setMessage(Messages.getString("String_Node_Str"));
    EventBusUtil.EVENT_BUS.fireEvent(event);
  }
}

Fixed version (ground truth):
@Override public void onResponseReceived(Request request,Response response){
  if (response.getStatusCode() == 200) {
    event.setMessage("String_Node_Str");
    EventBusUtil.EVENT_BUS.fireEvent(event);
    new RefreshRepositoryCommand().execute(false);
    FileChooserDialog.setIsDirty(Boolean.TRUE);
    setBrowseRepoDirty(Boolean.TRUE);
    for (    SolutionBrowserFile file : filesToDelete) {
      if (file.getPath() != null) {
        SolutionBrowserPanel.getInstance().removeRecent(file.getPath());
        SolutionBrowserPanel.getInstance().removeFavorite(file.getPath());
      }
    }
  }
 else {
    MessageDialogBox dialogBox=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),false,false,true);
    dialogBox.center();
    event.setMessage(Messages.getString("String_Node_Str"));
    EventBusUtil.EVENT_BUS.fireEvent(event);
  }
}
Program: 47401
Project: 47401
Buggy source:
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  for (  SolutionBrowserFile file : filesToDelete) {
    temp+=file.getId() + "String_Node_Str";
    names+=file.getId() + "String_Node_Str";
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}

Fixed version (ground truth):
protected void performOperation(boolean feedback){
  final SolutionFileActionEvent event=new SolutionFileActionEvent();
  event.setAction(this.getClass().getName());
  String temp="String_Node_Str";
  String names="String_Node_Str";
  for (  SolutionBrowserFile file : filesToDelete) {
    temp+=file.getId() + "String_Node_Str";
    names+=file.getName() + "String_Node_Str";
  }
  temp=temp.substring(0,temp.length() - 1);
  names=names.substring(0,names.length() - 1);
  final String filesList=temp;
  if (feedback) {
    final HTML messageTextBox=new HTML(Messages.getString("String_Node_Str",names));
    final PromptDialogBox fileMoveToTrashWarningDialogBox=new PromptDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,true);
    fileMoveToTrashWarningDialogBox.setContent(messageTextBox);
    final IDialogCallback callback=new IDialogCallback(){
      public void cancelPressed(){
        fileMoveToTrashWarningDialogBox.hide();
      }
      public void okPressed(){
        doDelete(filesList,event);
      }
    }
;
    fileMoveToTrashWarningDialogBox.setCallback(callback);
    fileMoveToTrashWarningDialogBox.center();
  }
 else {
    doDelete(filesList,event);
  }
}