Program: 47407
Project: 47407
Buggy source:
/** 
 * Rename the name of the selected file
 * @param pathId (colon separated path for the repository file)
 * @param newName (New name of the file)
 * @return
 */
@PUT @Path("String_Node_Str") @Consumes({WILDCARD}) @Produces({WILDCARD}) public Response doRename(@PathParam("String_Node_Str") String pathId,@QueryParam("String_Node_Str") String newName){
  try {
    RepositoryFileDto fileToBeRenamed=getRepoWs().getFile(idToPath(pathId));
    StringBuilder buf=new StringBuilder(fileToBeRenamed.getPath().length());
    buf.append(getParentPath(fileToBeRenamed.getPath()));
    buf.append(RepositoryFile.SEPARATOR);
    buf.append(newName);
    String extension=getExtension(fileToBeRenamed.getName());
    if (extension != null) {
      buf.append(extension);
    }
    getRepoWs().moveFile(fileToBeRenamed.getId(),buf.toString(),"String_Node_Str");
    return Response.ok().build();
  }
 catch (  Throwable t) {
    return processErrorResponse(t.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Rename the name of the selected file
 * @param pathId (colon separated path for the repository file)
 * @param newName (New name of the file)
 * @return
 */
@PUT @Path("String_Node_Str") @Consumes({WILDCARD}) @Produces({WILDCARD}) public Response doRename(@PathParam("String_Node_Str") String pathId,@QueryParam("String_Node_Str") String newName){
  try {
    IUnifiedRepository repository=PentahoSystem.get(IUnifiedRepository.class,PentahoSessionHolder.getSession());
    RepositoryFile fileToBeRenamed=repository.getFile(idToPath(pathId));
    StringBuilder buf=new StringBuilder(fileToBeRenamed.getPath().length());
    buf.append(getParentPath(fileToBeRenamed.getPath()));
    buf.append(RepositoryFile.SEPARATOR);
    buf.append(newName);
    String extension=getExtension(fileToBeRenamed.getName());
    if (extension != null) {
      buf.append(extension);
    }
    repository.moveFile(fileToBeRenamed.getId(),buf.toString(),"String_Node_Str");
    RepositoryFile movedFile=repository.getFileById(fileToBeRenamed.getId());
    if (movedFile != null) {
      if (!movedFile.isFolder()) {
        Map<String,Properties> localePropertiesMap=movedFile.getLocalePropertiesMap();
        if (localePropertiesMap == null) {
          localePropertiesMap=new HashMap<String,Properties>();
          Properties properties=new Properties();
          properties.setProperty("String_Node_Str",newName);
          properties.setProperty("String_Node_Str",newName);
          localePropertiesMap.put("String_Node_Str",properties);
        }
 else {
          for (          Entry<String,Properties> entry : localePropertiesMap.entrySet()) {
            Properties properties=entry.getValue();
            if (properties.containsKey("String_Node_Str")) {
              properties.setProperty("String_Node_Str",newName);
            }
            if (properties.containsKey("String_Node_Str")) {
              properties.setProperty("String_Node_Str",newName);
            }
          }
        }
        RepositoryFile updatedFile=new RepositoryFile.Builder(movedFile).localePropertiesMap(localePropertiesMap).name(newName).title(newName).build();
        repository.updateFile(updatedFile,getData(movedFile),"String_Node_Str");
      }
      return Response.ok().build();
    }
 else {
      return Response.ok("String_Node_Str").build();
    }
  }
 catch (  Throwable t) {
    return processErrorResponse(t.getLocalizedMessage());
  }
}