nus-yam/ex-repair huggingface dataset:
Program: 88986
Project: 88986
Buggy source:
/** 
 * Sends a list of notifications via email.
 * @param notifications List of notifications
 * @param recipient Recipient of the email notification
 */
public void sendNotificationsEmail(final List<Notification> notifications,Account recipient){
  try {
    String subject=notifications.size() > 1 ? Messages.get("String_Node_Str",notifications.size()) : Messages.get("String_Node_Str",notifications.get(0).rendered.replaceAll("String_Node_Str","String_Node_Str"));
    this.sendEmail(subject,recipient.name + "String_Node_Str" + recipient.email+ "String_Node_Str",TemplateService.getInstance().getRenderedTemplate(PLAIN_TEXT_TEMPLATE,notifications,recipient),TemplateService.getInstance().getRenderedTemplate(HTML_TEMPLATE,notifications,recipient));
    JPA.withTransaction(new F.Callback0(){
      @Override public void invoke() throws Throwable {
        for (        Notification notification : notifications) {
          notification.isSent=true;
          notificationManager.update(notification);
        }
      }
    }
);
    Logger.info("String_Node_Str" + notifications.size() + "String_Node_Str"+ recipient.id+ "String_Node_Str");
  }
 catch (  Exception e) {
    Logger.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sends a list of notifications via email.
 * @param notifications List of notifications
 * @param recipient Recipient of the email notification
 */
public void sendNotificationsEmail(final List<Notification> notifications,Account recipient){
  try {
    String subject=notifications.size() > 1 ? Messages.get("String_Node_Str",notifications.size()) : Messages.get("String_Node_Str",notifications.get(0).rendered.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str"));
    this.sendEmail(subject,recipient.name + "String_Node_Str" + recipient.email+ "String_Node_Str",TemplateService.getInstance().getRenderedTemplate(PLAIN_TEXT_TEMPLATE,notifications,recipient),TemplateService.getInstance().getRenderedTemplate(HTML_TEMPLATE,notifications,recipient));
    JPA.withTransaction(new F.Callback0(){
      @Override public void invoke() throws Throwable {
        for (        Notification notification : notifications) {
          notification.isSent=true;
          notificationManager.update(notification);
        }
      }
    }
);
    Logger.info("String_Node_Str" + notifications.size() + "String_Node_Str"+ recipient.id+ "String_Node_Str");
  }
 catch (  Exception e) {
    Logger.error("String_Node_Str" + e.getMessage());
  }
}
Program: 88987
Project: 88987
Buggy source:
@Override public void delete(Object model){
  JPA.em().remove(model);
}

Fixed version (ground truth):
@Override public void delete(Object model){
  Folder folder=((Folder)model);
  if (!folder.folders.isEmpty()) {
    for (    Folder subFolder : folder.folders) {
      delete(subFolder);
    }
  }
  for (  Media media : folder.files) {
    mediaManager.delete(media);
  }
  JPA.em().remove(folder);
}
Program: 88988
Project: 88988
Buggy source:
@Override public void delete(Object model){
  Group group=((Group)model);
  List<Post> posts=postManager.getPostsForGroup(group,0,0);
  for (  Post post : posts) {
    postManager.delete(post);
  }
  for (  Media media : group.mediaFolder.files) {
    mediaManager.delete(media);
  }
  notificationManager.deleteReferences(group);
  elasticsearchService.delete(group);
  JPA.em().remove(group);
}

Fixed version (ground truth):
@Override public void delete(Object model){
  Group group=((Group)model);
  List<Post> posts=postManager.getPostsForGroup(group,0,0);
  for (  Post post : posts) {
    postManager.delete(post);
  }
  folderManager.delete(group.mediaFolder);
  notificationManager.deleteReferences(group);
  elasticsearchService.delete(group);
  JPA.em().remove(group);
}
Program: 88989
Project: 88989
Buggy source:
public Result viewMediaTemp(){
  long bytes=MediaController.sizeTemp();
  String size=(bytes > 0) ? MediaController.bytesToString(bytes,false) : "String_Node_Str";
  return ok(mediaTemp.render(size));
}

Fixed version (ground truth):
public Result viewMediaTemp(){
  long bytes=mediaController.sizeTemp();
  String size=(bytes > 0) ? mediaController.bytesToString(bytes,false) : "String_Node_Str";
  return ok(mediaTemp.render(size));
}
Program: 88990
Project: 88990
Buggy source:
@Transactional(readOnly=true) public Result media(Long id){
  Form<Media> mediaForm=Form.form(Media.class);
  Group group=Group.findById(id);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (!Secured.viewGroup(group)) {
    return redirect(routes.GroupController.view(id));
  }
  Navigation.set(Level.GROUPS,"String_Node_Str",group.title,controllers.routes.GroupController.stream(group.id,PAGE,false));
  List<Media> mediaSet=group.media;
  return ok(media.render(group,mediaForm,mediaSet));
}

Fixed version (ground truth):
@Transactional(readOnly=true) public Result media(Long id){
  Form<Media> mediaForm=Form.form(Media.class);
  Group group=Group.findById(id);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (!Secured.viewGroup(group)) {
    return redirect(routes.GroupController.view(id));
  }
  Navigation.set(Level.GROUPS,"String_Node_Str",group.title,controllers.routes.GroupController.stream(group.id,PAGE,false));
  List<Media> mediaSet=group.media;
  for (  Media media : mediaSet) {
    media.sizeInByte=mediaController.bytesToString(media.size,false);
  }
  return ok(media.render(group,mediaForm,mediaSet));
}
Program: 88991
Project: 88991
Buggy source:
/** 
 * Cleans the temporary media directoy used for ZIP Downloads
 */
public void cleanUpTemp(){
  Logger.info("String_Node_Str");
  String tmpPath=Play.application().configuration().getString("String_Node_Str");
  File dir=new File(tmpPath);
  Logger.info("String_Node_Str" + dir.toString());
  File[] files=dir.listFiles();
  Logger.info("String_Node_Str" + dir.getAbsolutePath());
  if (files != null) {
    long hours=1;
    long eligibleForDeletion=System.currentTimeMillis() - (hours * 60 * 60* 1000L);
    Logger.info("String_Node_Str" + files.length + "String_Node_Str");
    if (files != null) {
      for (      File file : files) {
        Logger.info("String_Node_Str" + file.getName());
        if (file.getName().startsWith(tempPrefix) && file.lastModified() < eligibleForDeletion) {
          Logger.info("String_Node_Str" + file.getName());
          file.delete();
        }
      }
    }
  }
 else {
    Logger.info("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Cleans the temporary media directoy used for ZIP Downloads
 */
public void cleanUpTemp(){
  Logger.info("String_Node_Str");
  String tmpPath=conf.getString("String_Node_Str");
  File dir=new File(tmpPath);
  Logger.info("String_Node_Str" + dir.toString());
  File[] files=dir.listFiles();
  Logger.info("String_Node_Str" + dir.getAbsolutePath());
  if (files != null) {
    long hours=1;
    long eligibleForDeletion=System.currentTimeMillis() - (hours * 60 * 60* 1000L);
    Logger.info("String_Node_Str" + files.length + "String_Node_Str");
    if (files != null) {
      for (      File file : files) {
        Logger.info("String_Node_Str" + file.getName());
        if (file.getName().startsWith(tempPrefix) && file.lastModified() < eligibleForDeletion) {
          Logger.info("String_Node_Str" + file.getName());
          file.delete();
        }
      }
    }
  }
 else {
    Logger.info("String_Node_Str");
  }
}
Program: 88993
Project: 88993
Buggy source:
/** 
 * Size of temporary media directoy used for ZIP Downloads
 */
public static long sizeTemp(){
  String tmpPath=Play.application().configuration().getString("String_Node_Str");
  File dir=new File(tmpPath);
  return FileUtils.sizeOfDirectory(dir);
}

Fixed version (ground truth):
/** 
 * Size of temporary media directoy used for ZIP Downloads
 */
public long sizeTemp(){
  String tmpPath=conf.getString("String_Node_Str");
  File dir=new File(tmpPath);
  return FileUtils.sizeOfDirectory(dir);
}
Program: 88994
Project: 88994
Buggy source:
private File createZIP(List<Media> media,String fileName) throws IOException {
  String tmpPath=Play.application().configuration().getString("String_Node_Str");
  File file=File.createTempFile(tempPrefix,"String_Node_Str",new File(tmpPath));
  ZipOutputStream zipOut=new ZipOutputStream(new FileOutputStream(file));
  zipOut.setLevel(Deflater.NO_COMPRESSION);
  byte[] buffer=new byte[4092];
  int byteCount=0;
  for (  Media m : media) {
    zipOut.putNextEntry(new ZipEntry(m.fileName));
    FileInputStream fis=new FileInputStream(m.file);
    byteCount=0;
    while ((byteCount=fis.read(buffer)) != -1) {
      zipOut.write(buffer,0,byteCount);
    }
    fis.close();
    zipOut.closeEntry();
  }
  zipOut.flush();
  zipOut.close();
  return file;
}

Fixed version (ground truth):
private File createZIP(List<Media> media,String fileName) throws IOException {
  String tmpPath=conf.getString("String_Node_Str");
  File file=File.createTempFile(tempPrefix,"String_Node_Str",new File(tmpPath));
  ZipOutputStream zipOut=new ZipOutputStream(new FileOutputStream(file));
  zipOut.setLevel(Deflater.NO_COMPRESSION);
  byte[] buffer=new byte[4092];
  int byteCount=0;
  for (  Media m : media) {
    zipOut.putNextEntry(new ZipEntry(m.fileName));
    FileInputStream fis=new FileInputStream(m.file);
    byteCount=0;
    while ((byteCount=fis.read(buffer)) != -1) {
      zipOut.write(buffer,0,byteCount);
    }
    fis.close();
    zipOut.closeEntry();
  }
  zipOut.flush();
  zipOut.close();
  return file;
}
Program: 88995
Project: 88995
Buggy source:
public static String bytesToString(long bytes,boolean si){
  int unit=si ? 1000 : 1024;
  if (bytes < unit)   return bytes + "String_Node_Str";
  int exp=(int)(Math.log(bytes) / Math.log(unit));
  String pre=(si ? "String_Node_Str" : "String_Node_Str").charAt(exp - 1) + (si ? "String_Node_Str" : "String_Node_Str");
  return String.format("String_Node_Str",bytes / Math.pow(unit,exp),pre);
}

Fixed version (ground truth):
public String bytesToString(long bytes,boolean si){
  int unit=si ? 1000 : 1024;
  if (bytes < unit)   return bytes + "String_Node_Str";
  int exp=(int)(Math.log(bytes) / Math.log(unit));
  String pre=(si ? "String_Node_Str" : "String_Node_Str").charAt(exp - 1) + (si ? "String_Node_Str" : "String_Node_Str");
  return String.format("String_Node_Str",bytes / Math.pow(unit,exp),pre);
}
Program: 88996
Project: 88996
Buggy source:
protected F.Promise<Result> onProdServerError(Http.RequestHeader request,UsefulException exception){
  group=group.findByTitle(configuration.getString("String_Node_Str"));
  if (group != null) {
    post.content="String_Node_Str" + request + "String_Node_Str"+ exception;
    post.owner=Account.findByEmail(configuration.getString("String_Node_Str"));
    post.group=group;
    post.create();
  }
  return F.Promise.<Result>pure(Results.redirect(controllers.routes.Application.error()));
}

Fixed version (ground truth):
protected F.Promise<Result> onProdServerError(Http.RequestHeader request,UsefulException exception){
  group=group.findByTitle(configuration.getString("String_Node_Str"));
  if (group != null) {
    post.content="String_Node_Str" + request + "String_Node_Str"+ exception;
    post.owner=account.findByEmail(configuration.getString("String_Node_Str"));
    post.group=group;
    post.create();
  }
  return F.Promise.<Result>pure(Results.redirect(controllers.routes.Application.error()));
}
Program: 88997
Project: 88997
Buggy source:
@Override public void initialization(){
  jpaApi.withTransaction(() -> {
    if (adminAccount.findByEmail(adminMail) == null) {
      adminAccount.email=adminMail;
      adminAccount.firstname="String_Node_Str";
      adminAccount.lastname="String_Node_Str";
      adminAccount.role=AccountRole.ADMIN;
      adminAccount.avatar="String_Node_Str";
      adminAccount.password=Component.md5(adminPassword);
      adminAccount.create();
    }
    if (dummyAccount.findByEmail(dummyMail) == null) {
      dummyAccount.email=dummyMail;
      dummyAccount.firstname="String_Node_Str";
      dummyAccount.lastname="String_Node_Str";
      dummyAccount.role=AccountRole.DUMMY;
      dummyAccount.avatar="String_Node_Str";
      dummyAccount.password=Component.md5(dummyPassword);
      dummyAccount.create();
    }
    if (Group.findByTitle(adminGroupTitle) == null) {
      adminGroup.title=adminGroupTitle;
      adminGroup.groupType=GroupType.close;
      adminGroup.description="String_Node_Str";
      adminGroup.createWithGroupAccount(adminAccount);
    }
    if (Group.findByTitle("String_Node_Str") == null) {
      feedbackGroup.title="String_Node_Str";
      feedbackGroup.groupType=GroupType.open;
      feedbackGroup.description="String_Node_Str";
      feedbackGroup.createWithGroupAccount(adminAccount);
    }
  }
);
}

Fixed version (ground truth):
@Override public void initialization(){
  jpaApi.withTransaction(() -> {
    if (Account.findByEmail(adminMail) == null) {
      adminAccount.email=adminMail;
      adminAccount.firstname="String_Node_Str";
      adminAccount.lastname="String_Node_Str";
      adminAccount.role=AccountRole.ADMIN;
      adminAccount.avatar="String_Node_Str";
      adminAccount.password=Component.md5(adminPassword);
      adminAccount.create();
    }
    if (Account.findByEmail(dummyMail) == null) {
      dummyAccount.email=dummyMail;
      dummyAccount.firstname="String_Node_Str";
      dummyAccount.lastname="String_Node_Str";
      dummyAccount.role=AccountRole.DUMMY;
      dummyAccount.avatar="String_Node_Str";
      dummyAccount.password=Component.md5(dummyPassword);
      dummyAccount.create();
    }
    if (Group.findByTitle(adminGroupTitle) == null) {
      adminGroup.title=adminGroupTitle;
      adminGroup.groupType=GroupType.close;
      adminGroup.description="String_Node_Str";
      adminGroup.createWithGroupAccount(adminAccount);
    }
    if (Group.findByTitle("String_Node_Str") == null) {
      feedbackGroup.title="String_Node_Str";
      feedbackGroup.groupType=GroupType.open;
      feedbackGroup.description="String_Node_Str";
      feedbackGroup.createWithGroupAccount(adminAccount);
    }
  }
);
}
Program: 88999
Project: 88999
Buggy source:
@Security.Authenticated(Secured.class) public static Result stream(String filter,int page){
  Navigation.set(Level.STREAM);
  Account currentAccount=Component.currentAccount();
  return ok(stream.render(currentAccount,Post.getFilteredStream(currentAccount,LIMIT,page,filter),postForm,Post.countStream(currentAccount,filter),LIMIT,page,filter));
}

Fixed version (ground truth):
@Security.Authenticated(Secured.class) public static Result stream(String filter,int page){
switch (filter) {
case "String_Node_Str":
    Navigation.set(Level.STREAM,"String_Node_Str");
  break;
case "String_Node_Str":
Navigation.set(Level.STREAM,"String_Node_Str");
break;
case "String_Node_Str":
Navigation.set(Level.STREAM,"String_Node_Str");
break;
case "String_Node_Str":
Navigation.set(Level.STREAM,"String_Node_Str");
break;
default :
Navigation.set(Level.STREAM,"String_Node_Str");
}
Account currentAccount=Component.currentAccount();
return ok(stream.render(currentAccount,Post.getFilteredStream(currentAccount,LIMIT,page,filter),postForm,Post.countStream(currentAccount,filter),LIMIT,page,filter));
}
Program: 89000
Project: 89000
Buggy source:
public static Result searchHome(){
  return ok(search.render());
}

Fixed version (ground truth):
public static Result searchHome(){
  Navigation.set(Level.SEARCH);
  return ok(search.render());
}
Program: 89002
Project: 89002
Buggy source:
static public void resize(File file,int width,int height) throws FileOperationException {
  BufferedImage image;
  try {
    image=ImageIO.read(file);
    image=Scalr.resize(image,Scalr.Method.ULTRA_QUALITY,Scalr.Mode.FIT_EXACT,width,height);
    ImageIO.write(image,"String_Node_Str",file);
    image.flush();
  }
 catch (  IOException|IllegalArgumentException e) {
    logger.error(e.getMessage(),e);
    throw new FileOperationException("String_Node_Str");
  }
}

Fixed version (ground truth):
static public void resize(File file,int width,int height) throws FileOperationException {
  BufferedImage image;
  try {
    image=ImageIO.read(file);
    image=Scalr.resize(image,Scalr.Method.ULTRA_QUALITY,Scalr.Mode.FIT_EXACT,width,height);
    saveToJPG(image,file);
    image.flush();
  }
 catch (  IOException|IllegalArgumentException e) {
    logger.error(e.getMessage(),e);
    throw new FileOperationException("String_Node_Str");
  }
}
Program: 89003
Project: 89003
Buggy source:
static public void crop(File file,int x,int y,int width,int height) throws FileOperationException {
  BufferedImage image;
  try {
    image=ImageIO.read(file);
    image=Scalr.crop(image,x,y,width,height);
    ImageIO.write(image,"String_Node_Str",file);
    image.flush();
  }
 catch (  IOException|IllegalArgumentException e) {
    logger.error(e.getMessage(),e);
    throw new FileOperationException("String_Node_Str");
  }
}

Fixed version (ground truth):
static public void crop(File file,int x,int y,int width,int height) throws FileOperationException {
  BufferedImage image;
  try {
    image=ImageIO.read(file);
    image=Scalr.crop(image,x,y,width,height);
    saveToJPG(image,file);
    image.flush();
  }
 catch (  IOException|IllegalArgumentException e) {
    logger.error(e.getMessage(),e);
    throw new FileOperationException("String_Node_Str");
  }
}
Program: 89004
Project: 89004
Buggy source:
/** 
 * Returns all notifications for current user.
 * @return Html rendered instance
 */
@Transactional(readOnly=true) private static Html getNotifications(){
  Account account=Component.currentAccount();
  if (account == null) {
    return new Html("String_Node_Str");
  }
  List<Notification> list=null;
  try {
    list=Notification.findByAccountIdUnread(account.id);
  }
 catch (  Throwable throwable) {
    throwable.printStackTrace();
  }
  List<Integer> countedNotifications=NotificationController.countNotifications(list);
  return views.html.Notification.menuitem.render(list,countedNotifications.get(0),Notification.countUnreadNotificationsForAccountId(account.id));
}

Fixed version (ground truth):
/** 
 * Returns all notifications for current user.
 * @return Html rendered instance
 */
@Transactional(readOnly=true) public static Html getNotifications(){
  Account account=Component.currentAccount();
  if (account == null) {
    return new Html("String_Node_Str");
  }
  List<Notification> list=null;
  try {
    list=Notification.findByAccountIdUnread(account.id);
  }
 catch (  Throwable throwable) {
    throwable.printStackTrace();
  }
  List<Integer> countedNotifications=NotificationController.countNotifications(list);
  return views.html.Notification.menuitem.render(list,countedNotifications.get(0),Notification.countUnreadNotificationsForAccountId(account.id));
}
Program: 89005
Project: 89005
Buggy source:
@Override public List<Account> getRecipients(){
  List<Account> recipients=new ArrayList<Account>();
  if (this.type.equals(Group.GROUP_INVITATION)) {
    for (    String accountId : inviteList) {
      try {
        final Account account=Account.findById(Long.parseLong(accountId));
        GroupAccount groupAccount=GroupAccount.find(account,this);
        if (!Group.isMember(this,account) && Friendship.alreadyFriendly(this.getSender(),account) && groupAccount == null) {
          final Group thisGroup=this;
          (new GroupAccount(account,thisGroup,LinkType.invite)).create();
          recipients.add(account);
        }
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
catch (      Throwable t) {
        t.printStackTrace();
      }
    }
    return recipients;
  }
 else   if (this.type.equals(Group.GROUP_NEW_REQUEST)) {
    return this.getAsAccountList(this.owner);
  }
 else   if (this.type.equals(Group.GROUP_NEW_MEDIA)) {
    final Group currentGroup=this;
    return GroupAccount.findAccountsByGroup(currentGroup,LinkType.establish);
  }
  return this.temporaryRecipients;
}

Fixed version (ground truth):
@Override public List<Account> getRecipients(){
  List<Account> recipients=new ArrayList<>();
switch (this.type) {
case Group.GROUP_INVITATION:
    for (    String accountId : inviteList) {
      try {
        final Account account=Account.findByIdTransactional(Long.parseLong(accountId));
        GroupAccount groupAccount=GroupAccount.findTransactional(account,this);
        if (!Group.isMemberTransactional(this,account) && Friendship.alreadyFriendlyTransactional(this.getSender(),account) && groupAccount == null) {
          final Group thisGroup=this;
          JPA.withTransaction(new F.Callback0(){
            @Override public void invoke() throws Throwable {
              (new GroupAccount(account,thisGroup,LinkType.invite)).create();
            }
          }
);
          recipients.add(account);
        }
      }
 catch (      Throwable t) {
        t.printStackTrace();
      }
    }
  return recipients;
case Group.GROUP_NEW_REQUEST:
return this.getAsAccountList(this.owner);
case Group.GROUP_NEW_MEDIA:
final Group currentGroup=this;
return GroupAccount.findAccountsByGroupTransactional(currentGroup,LinkType.establish);
}
return this.temporaryRecipients;
}
Program: 89006
Project: 89006
Buggy source:
/** 
 * Constructor, sets the web socket attributes.
 * @param accountId Current user ID of this context
 * @param in WebSocket input stream
 * @param out WebSocket output stream
 */
public WebSocketActor(Long accountId,WebSocket.In<JsonNode> in,WebSocket.Out<JsonNode> out){
  this.account=Account.findById(accountId);
  this.in=in;
  this.out=out;
}

Fixed version (ground truth):
/** 
 * Constructor, sets the web socket attributes.
 * @param accountId Current user ID of this context
 * @param in WebSocket input stream
 * @param out WebSocket output stream
 */
public WebSocketActor(Long accountId,WebSocket.In<JsonNode> in,WebSocket.Out<JsonNode> out){
  this.account=Account.findByIdTransactional(accountId);
  this.in=in;
  this.out=out;
}
Program: 89007
Project: 89007
Buggy source:
/** 
 * Returns all accounts that are assigned to a group as list.
 * @param group Group to retrieve a list of accounts from
 * @return List of accounts of group
 */
public List<Account> getGroupAsAccountList(final Group group){
  return GroupAccount.findAccountsByGroup(group,LinkType.establish);
}

Fixed version (ground truth):
/** 
 * Returns all accounts that are assigned to a group as list.
 * @param group Group to retrieve a list of accounts from
 * @return List of accounts of group
 */
public List<Account> getGroupAsAccountList(final Group group){
  return GroupAccount.findAccountsByGroupTransactional(group,LinkType.establish);
}
Program: 89008
Project: 89008
Buggy source:
/** 
 * Helper method to return one account as a List<Account> as required by getRecipients() in the INotifiable interface.
 * @param account One account to be returned as list
 * @return List of account instances
 */
public List<Account> getAsAccountList(Account account){
  List<Account> accounts=new ArrayList<Account>();
  accounts.add(account);
  return accounts;
}

Fixed version (ground truth):
/** 
 * Helper method to return one account as a List<Account> as required by getRecipients() in the INotifiable interface.
 * @param account One account to be returned as list
 * @return List of account instances
 */
public List<Account> getAsAccountList(Account account){
  List<Account> accounts=new ArrayList<>();
  accounts.add(account);
  return accounts;
}
Program: 89009
Project: 89009
Buggy source:
/** 
 * WebSocket method when sending chat.
 * @param wsMessage WebSocket message as JsonNode object
 * @param senderActor Sending actor
 * @param sender Sending account
 * @return WebSocket response
 */
@SuppressWarnings("String_Node_Str") private JsonNode wsSendChat(JsonNode wsMessage,ActorRef senderActor,Account sender){
  if (!wsMessage.has("String_Node_Str") || !wsMessage.has("String_Node_Str")) {
    return this.errorResponse("String_Node_Str");
  }
  Long recipientAccountId=wsMessage.get("String_Node_Str").asLong();
  String text=wsMessage.get("String_Node_Str").asText();
  ActorRef recipientActor=this.getActorForAccountId(recipientAccountId);
  Account recipient=Account.findById(recipientAccountId);
  if (recipientActor == null) {
    return this.errorResponse("String_Node_Str");
  }
  if (recipientActor.equals(senderActor)) {
    return this.errorResponse("String_Node_Str");
  }
  if (sender == null || recipient == null || !(Friendship.alreadyFriendly(sender,recipient))) {
    return this.errorResponse("String_Node_Str");
  }
  ObjectNode node=this.successResponseTemplate(WebSocketService.WS_METHOD_RECEIVE_CHAT);
  node.put("String_Node_Str",Json.toJson(sender.getAsJson()));
  node.put("String_Node_Str",text);
  recipientActor.tell(Json.toJson(node),senderActor);
  return Json.toJson("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * WebSocket method when sending chat.
 * @param wsMessage WebSocket message as JsonNode object
 * @param senderActor Sending actor
 * @param sender Sending account
 * @return WebSocket response
 */
@SuppressWarnings("String_Node_Str") private JsonNode wsSendChat(JsonNode wsMessage,ActorRef senderActor,Account sender){
  if (!wsMessage.has("String_Node_Str") || !wsMessage.has("String_Node_Str")) {
    return this.errorResponse("String_Node_Str");
  }
  Long recipientAccountId=wsMessage.get("String_Node_Str").asLong();
  String text=wsMessage.get("String_Node_Str").asText();
  ActorRef recipientActor=this.getActorForAccountId(recipientAccountId);
  Account recipient=Account.findByIdTransactional(recipientAccountId);
  if (recipientActor == null) {
    return this.errorResponse("String_Node_Str");
  }
  if (recipientActor.equals(senderActor)) {
    return this.errorResponse("String_Node_Str");
  }
  if (sender == null || recipient == null || !(Friendship.alreadyFriendlyTransactional(sender,recipient))) {
    return this.errorResponse("String_Node_Str");
  }
  ObjectNode node=this.successResponseTemplate(WebSocketService.WS_METHOD_RECEIVE_CHAT);
  node.put("String_Node_Str",Json.toJson(sender.getAsJson()));
  node.put("String_Node_Str",text);
  recipientActor.tell(Json.toJson(node),senderActor);
  return Json.toJson("String_Node_Str");
}
Program: 89011
Project: 89011
Buggy source:
/** 
 * Private constructor for singleton instance
 */
private LdapService(){
  String server=Play.application().configuration().getString("String_Node_Str");
  int port=Integer.parseInt(Play.application().configuration().getString("String_Node_Str"));
  boolean startTls=Boolean.parseBoolean(Play.application().configuration().getString("String_Node_Str"));
  LdapConnectionConfig connectionConfig=new LdapConnectionConfig();
  connectionConfig.setLdapHost(server);
  connectionConfig.setLdapPort(port);
  connectionConfig.setUseTls(startTls);
  this.connection=new LdapNetworkConnection(connectionConfig);
}

Fixed version (ground truth):
/** 
 * Private constructor for singleton instance
 */
private LdapService(){
  this.ldapServer=Play.application().configuration().getString("String_Node_Str");
  this.ldapPort=Integer.parseInt(Play.application().configuration().getString("String_Node_Str"));
  this.ldapStartTls=Boolean.parseBoolean(Play.application().configuration().getString("String_Node_Str"));
}
Program: 89014
Project: 89014
Buggy source:
public static Result delete(Long id){
  Group group=Group.findById(id);
  if (Secured.deleteGroup(group)) {
    group.delete();
    flash("String_Node_Str","String_Node_Str" + group.title + "String_Node_Str");
  }
 else {
    flash("String_Node_Str","String_Node_Str");
  }
  return redirect(controllers.routes.GroupController.index());
}

Fixed version (ground truth):
@Transactional public static Result delete(Long id){
  Group group=Group.findById(id);
  if (Secured.deleteGroup(group)) {
    group.delete();
    flash("String_Node_Str","String_Node_Str" + group.title + "String_Node_Str");
  }
 else {
    flash("String_Node_Str","String_Node_Str");
  }
  return redirect(controllers.routes.GroupController.index());
}
Program: 89016
Project: 89016
Buggy source:
@Override public void delete(){
  Notification.deleteReferences(this);
  JPA.em().remove(this);
}

Fixed version (ground truth):
@Override public void delete(){
  final Friendship self=this;
  JPA.withTransaction(new F.Callback0(){
    @Override public void invoke() throws Throwable {
      Notification.deleteReferences(self);
    }
  }
);
  JPA.em().remove(this);
}
Program: 89017
Project: 89017
Buggy source:
@Override public void delete(){
  List<Post> comments=getCommentsForPost(this.id,0,0);
  for (  Post comment : comments) {
    comment.delete();
  }
  Notification.deleteReferences(this);
  JPA.em().remove(this);
}

Fixed version (ground truth):
@Override public void delete(){
  final Post self=this;
  JPA.withTransaction(new F.Callback0(){
    @Override public void invoke() throws Throwable {
      List<Post> comments=getCommentsForPost(self.id,0,0);
      for (      Post comment : comments) {
        comment.delete();
      }
      Notification.deleteReferences(self);
      JPA.em().remove(self);
    }
  }
);
}
Program: 89018
Project: 89018
Buggy source:
public static int countPostsForGroup(Group group){
  return ((Number)JPA.em().createQuery("String_Node_Str").setParameter(1,group.id).getSingleResult()).intValue();
}

Fixed version (ground truth):
public static int countPostsForGroup(final Group group){
  try {
    return JPA.withTransaction(new F.Function0<Integer>(){
      @Override public Integer apply() throws Throwable {
        return ((Number)JPA.em().createQuery("String_Node_Str").setParameter(1,group.id).getSingleResult()).intValue();
      }
    }
);
  }
 catch (  Throwable throwable) {
    throwable.printStackTrace();
    return 0;
  }
}
Program: 89019
Project: 89019
Buggy source:
@SuppressWarnings("String_Node_Str") public static List<Post> getCommentsForPost(Long id,int start,int max){
  return (List<Post>)JPA.em().createQuery("String_Node_Str").setParameter(1,id).setFirstResult(start).setMaxResults(max).getResultList();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static List<Post> getCommentsForPost(final Long id,final int start,final int max){
  try {
    return JPA.withTransaction(new F.Function0<List<Post>>(){
      @Override public List<Post> apply() throws Throwable {
        return (List<Post>)JPA.em().createQuery("String_Node_Str").setParameter(1,id).setFirstResult(start).setMaxResults(max).getResultList();
      }
    }
);
  }
 catch (  Throwable throwable) {
    throwable.printStackTrace();
    return null;
  }
}
Program: 89020
Project: 89020
Buggy source:
@SuppressWarnings("String_Node_Str") public static List<Post> getPostsForGroup(Group group,int limit,int page){
  Query query=JPA.em().createQuery("String_Node_Str").setParameter(1,group.id);
  int offset=(page * limit) - limit;
  query=limit(query,limit,offset);
  return query.getResultList();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static List<Post> getPostsForGroup(final Group group,final int limit,final int page){
  try {
    return JPA.withTransaction(new F.Function0<List<Post>>(){
      @Override public List<Post> apply() throws Throwable {
        Query query=JPA.em().createQuery("String_Node_Str").setParameter(1,group.id);
        int offset=(page * limit) - limit;
        query=limit(query,limit,offset);
        return query.getResultList();
      }
    }
);
  }
 catch (  Throwable throwable) {
    throwable.printStackTrace();
    return null;
  }
}
Program: 89021
Project: 89021
Buggy source:
/** 
 * Accepts a group entry request.
 * @param groupId Group ID
 * @param accountId Account ID
 * @return Result
 */
public static Result acceptRequest(long groupId,long accountId){
  Account account=Account.findById(accountId);
  Group group=Group.findById(groupId);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (account != null && Secured.isOwnerOfGroup(group,Component.currentAccount())) {
    GroupAccount groupAccount=GroupAccount.find(account,group);
    if (groupAccount != null) {
      groupAccount.linkType=LinkType.establish;
      groupAccount.update();
    }
  }
 else {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  group.temporarySender=group.owner;
  group.addTemporaryRecipient(account);
  NotificationService.getInstance().createNotification(group,Group.GROUP_REQUEST_SUCCESS);
  return redirect(controllers.routes.GroupController.index());
}

Fixed version (ground truth):
/** 
 * Accepts a group entry request.
 * @param groupId Group ID
 * @param accountId Account ID
 * @return Result
 */
@Transactional public static Result acceptRequest(long groupId,long accountId){
  Account account=Account.findById(accountId);
  Group group=Group.findById(groupId);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (account != null && Secured.isOwnerOfGroup(group,Component.currentAccount())) {
    GroupAccount groupAccount=GroupAccount.find(account,group);
    if (groupAccount != null) {
      groupAccount.linkType=LinkType.establish;
      groupAccount.update();
    }
  }
 else {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  group.temporarySender=group.owner;
  group.addTemporaryRecipient(account);
  NotificationService.getInstance().createNotification(group,Group.GROUP_REQUEST_SUCCESS);
  return redirect(controllers.routes.GroupController.index());
}
Program: 89022
Project: 89022
Buggy source:
/** 
 * Declines a group entry request.
 * @param groupId Group ID
 * @param accountId Account ID
 * @return Result
 */
public static Result declineRequest(long groupId,long accountId){
  Account account=Account.findById(accountId);
  Group group=Group.findById(groupId);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (account != null && Secured.isOwnerOfGroup(group,Component.currentAccount())) {
    GroupAccount groupAccount=GroupAccount.find(account,group);
    if (groupAccount != null) {
      groupAccount.linkType=LinkType.reject;
    }
  }
  group.temporarySender=group.owner;
  group.addTemporaryRecipient(account);
  NotificationService.getInstance().createNotification(group,Group.GROUP_REQUEST_DECLINE);
  return redirect(controllers.routes.GroupController.index());
}

Fixed version (ground truth):
/** 
 * Declines a group entry request.
 * @param groupId Group ID
 * @param accountId Account ID
 * @return Result
 */
@Transactional public static Result declineRequest(long groupId,long accountId){
  Account account=Account.findById(accountId);
  Group group=Group.findById(groupId);
  if (group == null) {
    flash("String_Node_Str",Messages.get("String_Node_Str"));
    return redirect(controllers.routes.GroupController.index());
  }
  if (account != null && Secured.isOwnerOfGroup(group,Component.currentAccount())) {
    GroupAccount groupAccount=GroupAccount.find(account,group);
    if (groupAccount != null) {
      groupAccount.linkType=LinkType.reject;
    }
  }
  group.temporarySender=group.owner;
  group.addTemporaryRecipient(account);
  NotificationService.getInstance().createNotification(group,Group.GROUP_REQUEST_DECLINE);
  return redirect(controllers.routes.GroupController.index());
}
Program: 89023
Project: 89023
Buggy source:
public static Result inviteMember(long groupId){
  Group group=Group.findById(groupId);
  Account currentUser=Component.currentAccount();
  if (Secured.inviteMember(group)) {
    DynamicForm form=Form.form().bindFromRequest();
    group.inviteList=form.data().values();
    if (group.inviteList.size() < 1) {
      flash("String_Node_Str",Messages.get("String_Node_Str"));
      return redirect(controllers.routes.GroupController.invite(groupId));
    }
    group.temporarySender=currentUser;
    NotificationService.getInstance().createNotification(group,Group.GROUP_INVITATION);
  }
  flash("String_Node_Str",Messages.get("String_Node_Str"));
  return redirect(controllers.routes.GroupController.view(groupId,PAGE));
}

Fixed version (ground truth):
@Transactional public static Result inviteMember(long groupId){
  Group group=Group.findById(groupId);
  Account currentUser=Component.currentAccount();
  if (Secured.inviteMember(group)) {
    DynamicForm form=Form.form().bindFromRequest();
    group.inviteList=form.data().values();
    if (group.inviteList.size() < 1) {
      flash("String_Node_Str",Messages.get("String_Node_Str"));
      return redirect(controllers.routes.GroupController.invite(groupId));
    }
    group.temporarySender=currentUser;
    NotificationService.getInstance().createNotification(group,Group.GROUP_INVITATION);
  }
  flash("String_Node_Str",Messages.get("String_Node_Str"));
  return redirect(controllers.routes.GroupController.view(groupId,PAGE));
}
Program: 89025
Project: 89025
Buggy source:
public static Result invite(long groupId){
  Group group=Group.findById(groupId);
  Navigation.set(Level.GROUPS,"String_Node_Str",group.title,controllers.routes.GroupController.view(group.id,PAGE));
  return ok(invite.render(group,Friendship.friendsToInvite(Component.currentAccount(),group),GroupAccount.findAccountsByGroup(group,LinkType.invite)));
}

Fixed version (ground truth):
@Transactional public static Result invite(long groupId){
  Group group=Group.findById(groupId);
  Navigation.set(Level.GROUPS,"String_Node_Str",group.title,controllers.routes.GroupController.view(group.id,PAGE));
  return ok(invite.render(group,Friendship.friendsToInvite(Component.currentAccount(),group),GroupAccount.findAccountsByGroup(group,LinkType.invite)));
}
Program: 89026
Project: 89026
Buggy source:
public List<ValidationError> validate(){
  List<ValidationError> errors=new ArrayList<ValidationError>();
  if (Group.findByTitle(this.title) != null) {
    errors.add(new ValidationError("String_Node_Str","String_Node_Str"));
    return errors;
  }
  return null;
}

Fixed version (ground truth):
public List<ValidationError> validate(){
  List<ValidationError> errors=new ArrayList<>();
  if (Group.findByTitle(this.title) != null) {
    errors.add(new ValidationError("String_Node_Str","String_Node_Str"));
    return errors;
  }
  return null;
}
Program: 89027
Project: 89027
Buggy source:
@Override public String getTargetUrl(){
  if (this.type.equals(Group.GROUP_REQUEST_SUCCESS) || this.type.equals(Group.GROUP_NEW_MEDIA) || this.type.equals(Group.GROUP_NEW_REQUEST)) {
    return controllers.routes.GroupController.view(this.id,1).toString();
  }
  return controllers.routes.GroupController.index().toString();
}

Fixed version (ground truth):
@Override public String getTargetUrl(){
  if (this.type.equals(Group.GROUP_REQUEST_SUCCESS) || this.type.equals(Group.GROUP_NEW_MEDIA)) {
    return controllers.routes.GroupController.view(this.id,1).toString();
  }
  return controllers.routes.GroupController.index().toString();
}
Program: 89028
Project: 89028
Buggy source:
@Override public List<Account> getRecipients(){
  List<Account> recipients=new ArrayList<>();
switch (this.type) {
case Group.GROUP_INVITATION:
    for (    String accountId : inviteList) {
      try {
        final Account account=Account.findById(Long.parseLong(accountId));
        GroupAccount groupAccount=GroupAccount.find(account,this);
        if (!Group.isMember(this,account) && Friendship.alreadyFriendly(this.getSender(),account) && groupAccount == null) {
          final Group thisGroup=this;
          JPA.withTransaction(new F.Callback0(){
            @Override public void invoke() throws Throwable {
              (new GroupAccount(account,thisGroup,LinkType.invite)).create();
            }
          }
);
          recipients.add(account);
        }
      }
 catch (      Throwable t) {
        t.printStackTrace();
      }
    }
  return recipients;
case Group.GROUP_NEW_REQUEST:
return this.getAsAccountList(this.owner);
case Group.GROUP_NEW_MEDIA:
final Group currentGroup=this;
return GroupAccount.findAccountsByGroup(currentGroup,LinkType.establish);
}
return this.temporaryRecipients;
}

Fixed version (ground truth):
@Override public List<Account> getRecipients(){
  List<Account> recipients=new ArrayList<>();
switch (this.type) {
case Group.GROUP_INVITATION:
    for (    String accountId : inviteList) {
      try {
        final Account account=Account.findById(Long.parseLong(accountId));
        GroupAccount groupAccount=GroupAccount.find(account,this);
        if (!Group.isMember(this,account) && Friendship.alreadyFriendly(this.getSender(),account) && groupAccount == null) {
          (new GroupAccount(account,this,LinkType.invite)).create();
          recipients.add(account);
        }
      }
 catch (      Throwable t) {
        t.printStackTrace();
      }
    }
  return recipients;
case Group.GROUP_NEW_REQUEST:
return this.getAsAccountList(this.owner);
case Group.GROUP_NEW_MEDIA:
final Group currentGroup=this;
return GroupAccount.findAccountsByGroup(currentGroup,LinkType.establish);
}
return this.temporaryRecipients;
}
Program: 89030
Project: 89030
Buggy source:
@Override protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser){
  try {
    de.cau.cs.kieler.klassviz.text.ui.contentassist.antlr.internal.InternalClassDataParser typedParser=(de.cau.cs.kieler.klassviz.text.ui.contentassist.antlr.internal.InternalClassDataParser)parser;
    typedParser.entryRuleKTypeSelection();
    return typedParser.getFollowElements();
  }
 catch (  RecognitionException ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
@Override protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser){
  try {
    de.cau.cs.kieler.klassviz.text.ui.contentassist.antlr.internal.InternalClassDataParser typedParser=(de.cau.cs.kieler.klassviz.text.ui.contentassist.antlr.internal.InternalClassDataParser)parser;
    typedParser.entryRuleKClassModel();
    return typedParser.getFollowElements();
  }
 catch (  RecognitionException ex) {
    throw new RuntimeException(ex);
  }
}
Program: 89031
Project: 89031
Buggy source:
public static void main(String[] args){
  String picture="String_Node_Str";
  Tortoise.getBackgroundWindow().setBackgroundImage(picture);
  Tortoise.show();
  Tortoise.setSpeed(10);
  int side=2;
  for (int i=0; i < 75; i++) {
    Color penColor=PenColors.Yellows.Yellow;
    Tortoise.setPenColor(penColor);
    side=side + 1;
    Tortoise.move(side);
    Tortoise.setX(555);
    Tortoise.setY(65);
    Tortoise.turn(360 / 4);
    Tortoise.turn(1);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  String picture="String_Node_Str";
  Tortoise.getBackgroundWindow().setBackgroundImage(picture);
  Tortoise.show();
  Tortoise.setSpeed(10);
  int side=2;
  for (int i=0; i < 75; i++) {
    Color penColor=PenColors.Yellows.Yellow;
    Tortoise.setPenColor(penColor);
    side=side + 1;
    Tortoise.move(side);
    Tortoise.setX(555);
    Tortoise.setY(65);
    Tortoise.turn(360 / 3);
    Tortoise.turn(1);
  }
}
Program: 89032
Project: 89032
Buggy source:
/** 
 * Removes everything from the window. <br> <b>Example:</b>   {@code  Tortoise.clearWindow()}
 */
public static void clear(){
  turtle().clear();
}

Fixed version (ground truth):
/** 
 * Removes everything from the window. <br> <b>Example:</b>   {@code  Tortoise.clearWindow()}
 */
public static void clear(){
  turtle().clear();
  turtle().getBackgroundWindow().setTurtle(turtle());
}
Program: 89033
Project: 89033
Buggy source:
public CanvasPanel add(Paintable painter){
  if (!this.painters.contains(painter)) {
    this.painters.add(painter);
  }
  return this;
}

Fixed version (ground truth):
public CanvasPanel add(Paintable painter){
  if (!this.painters.contains(painter)) {
    this.painters.add(painter);
  }
  this.repaint();
  return this;
}
Program: 89034
Project: 89034
Buggy source:
public void addTo(TurtleWindow panel){
  panel.getCanvas().add(this);
}

Fixed version (ground truth):
/** 
 * Adds a circle to the window <div><b>Example:</b>   {@code  circle.addTo(panel)}</div>
 * @param panel the ProgramWindow or panel
 */
public void addTo(ProgramWindow panel){
  panel.getCanvas().add(this);
}
Program: 89035
Project: 89035
Buggy source:
private void createBubble(int x,int y){
  programWindow.removePaintable();
  int radius=NumberUtils.getRandomInt(10,50);
  Circle circle=new Circle(radius,ColorWheel.getNextColor());
  circle.setCenter(x,y);
  circle.addTo(programWindow);
}

Fixed version (ground truth):
private void createBubble(int x,int y){
  programWindow.clearWindow();
  int radius=NumberUtils.getRandomInt(10,50);
  Circle circle=new Circle(radius,ColorWheel.getNextColor());
  circle.setCenter(x,y);
  circle.addTo(programWindow);
}
Program: 89036
Project: 89036
Buggy source:
public TortoiseMaze(){
  Tortoise.setSpeed(10);
  Tortoise.setPenColor(PenColors.Greens.Green);
  Tortoise.setPenWidth(4);
  ImageIcon leftArrow=new ImageIcon("String_Node_Str");
  JButton leftButton=new JButton(leftArrow);
  Tortoise.getBackgroundWindow().addButton(leftButton);
  ImageIcon upArrow=new ImageIcon("String_Node_Str");
  JButton upButton=new JButton(upArrow);
  Tortoise.getBackgroundWindow().addButton(upButton);
  ImageIcon rightArrow=new ImageIcon("String_Node_Str");
  JButton rightButton=new JButton(rightArrow);
  Tortoise.getBackgroundWindow().addButton(rightButton);
  rightButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.turn(90);
    }
  }
);
  leftButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.turn(-90);
    }
  }
);
  upButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.move(25);
    }
  }
);
  Tortoise.setVisible(true);
}

Fixed version (ground truth):
public TortoiseMaze(){
  Tortoise.show();
  Tortoise.setSpeed(10);
  Tortoise.setPenColor(PenColors.Greens.Green);
  Tortoise.setPenWidth(4);
  ImageIcon leftArrow=new ImageIcon("String_Node_Str");
  JButton leftButton=new JButton(leftArrow);
  Tortoise.getBackgroundWindow().addButton(leftButton);
  ImageIcon upArrow=new ImageIcon("String_Node_Str");
  JButton upButton=new JButton(upArrow);
  Tortoise.getBackgroundWindow().addButton(upButton);
  ImageIcon rightArrow=new ImageIcon("String_Node_Str");
  JButton rightButton=new JButton(rightArrow);
  Tortoise.getBackgroundWindow().addButton(rightButton);
  rightButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.turn(90);
    }
  }
);
  leftButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.turn(-90);
    }
  }
);
  upButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Tortoise.move(25);
    }
  }
);
  Tortoise.setVisible(true);
}
Program: 89037
Project: 89037
Buggy source:
@Test public void dividing() throws Exception {
  Number number=1.0 / 5;
  Assert.assertEquals(number.getClass(),______.class);
  Assert.assertEquals(number,.2);
}

Fixed version (ground truth):
@Test public void dividing() throws Exception {
  Number number=1.0 / 5;
  Assert.assertEquals(number.getClass(),______.class);
  Assert.assertEquals(number,___);
}
Program: 89038
Project: 89038
Buggy source:
public static void testFrame(JFrame frame,WindowAdapter... array){
  frame.pack();
  for (  WindowAdapter closer : array) {
    frame.addWindowListener(closer);
  }
  WindowUtils.centerWindow(frame);
  frame.setVisible(true);
}

Fixed version (ground truth):
public static void testFrame(JFrame frame,WindowAdapter... array){
  frame.pack();
  for (  WindowAdapter closer : array) {
    frame.addWindowListener(closer);
  }
  WindowUtils.centerWindow(frame);
}