nus-yam/ex-repair huggingface dataset:
Program: 38046
Project: 38046
Buggy source:
public void init(VaadinRequest request){
  DefaultNotificationHolder notifications=new DefaultNotificationHolder();
  DefaultBadgeHolder badge=new DefaultBadgeHolder();
  AppLayoutComponent layout=AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProvider()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).withNavigatorConsumer(navigator -> {
  }
).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add("String_Node_Str",VaadinIcons.HOME,badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add("String_Node_Str",VaadinIcons.SPLINE_CHART,View2.class).add("String_Node_Str",VaadinIcons.CONNECT,View3.class).add("String_Node_Str",VaadinIcons.COG,View4.class).build()).add("String_Node_Str",VaadinIcons.MENU,View5.class).add("String_Node_Str",VaadinIcons.LIST,View6.class).build();
  setContent(layout);
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  DefaultNotificationHolder notifications=new DefaultNotificationHolder();
  DefaultBadgeHolder badge=new DefaultBadgeHolder();
  AppLayoutComponent layout=AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).withNavigatorConsumer(navigator -> {
  }
).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add("String_Node_Str",VaadinIcons.HOME,badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add("String_Node_Str",VaadinIcons.SPLINE_CHART,View2.class).add("String_Node_Str",VaadinIcons.CONNECT,View3.class).add("String_Node_Str",VaadinIcons.COG,View4.class).build()).add("String_Node_Str",VaadinIcons.MENU,View5.class).add("String_Node_Str",VaadinIcons.LIST,View6.class).build();
  setContent(layout);
}
Program: 38047
Project: 38047
Buggy source:
public void init(VaadinRequest request){
  setContent(AppLayout.getDefaultBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications)).withNavigationElementInfoProvider(new DefaultNavigationElementInfoProducer()).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  setContent(AppLayout.getDefaultBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications)).withNavigationElementInfoProducer(new DefaultNavigationElementInfoProducer()).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}
Program: 38048
Project: 38048
Buggy source:
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProducer(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}
Program: 38049
Project: 38049
Buggy source:
public void init(VaadinRequest request){
  DefaultNotificationHolder notifications=new DefaultNotificationHolder();
  DefaultBadgeHolder badge=new DefaultBadgeHolder();
  AppLayoutComponent layout=AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).withNavigatorConsumer(navigator -> {
  }
).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add("String_Node_Str",VaadinIcons.HOME,badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add("String_Node_Str",VaadinIcons.SPLINE_CHART,View2.class).add("String_Node_Str",VaadinIcons.CONNECT,View3.class).add("String_Node_Str",VaadinIcons.COG,View4.class).build()).add("String_Node_Str",VaadinIcons.MENU,View5.class).add("String_Node_Str",VaadinIcons.LIST,View6.class).build();
  setContent(layout);
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  DefaultNotificationHolder notifications=new DefaultNotificationHolder();
  DefaultBadgeHolder badge=new DefaultBadgeHolder();
  AppLayoutComponent layout=AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProducer(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).withNavigatorConsumer(navigator -> {
  }
).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add("String_Node_Str",VaadinIcons.HOME,badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add("String_Node_Str",VaadinIcons.SPLINE_CHART,View2.class).add("String_Node_Str",VaadinIcons.CONNECT,View3.class).add("String_Node_Str",VaadinIcons.COG,View4.class).build()).add("String_Node_Str",VaadinIcons.MENU,View5.class).add("String_Node_Str",VaadinIcons.LIST,View6.class).build();
  setContent(layout);
}
Program: 38050
Project: 38050
Buggy source:
/** 
 * Appends a menu element which is bound to a view which then can be navigated to by clicking on the element at the DEFAULT position Note: The caption, icon and navigation path will also be determined via the NavigationElementInfoProvider
 * @param caption
 * @param path
 * @param icon
 * @param badgeHolder
 * @param element
 * @param position
 * @return
 */
public T add(String caption,String path,Resource icon,DefaultBadgeHolder badgeHolder,Class<? extends View> element,AppLayoutConfiguration.Position position){
  addToPosition(new NavigatorNavigationElement(caption,path,icon,badgeHolder,element),position);
  return (T)this;
}

Fixed version (ground truth):
/** 
 * Appends a menu element which is bound to a view which then can be navigated to by clicking on the element at the DEFAULT position Note: The caption, icon and navigation path will also be determined via the NavigationElementInfoProvider
 * @param caption
 * @param icon
 * @param badgeHolder
 * @param element
 * @param position
 * @return
 */
public T add(String caption,Resource icon,DefaultBadgeHolder badgeHolder,Class<? extends View> element,AppLayoutConfiguration.Position position){
  addToPosition(new NavigatorNavigationElement(caption,icon,badgeHolder,element),position);
  return (T)this;
}
Program: 38051
Project: 38051
Buggy source:
/** 
 * Appends a menu element which is bound to a view which then can be navigated to by clicking on the element at the DEFAULT position Note: The caption, icon and navigation path will also be determined via the NavigationElementInfoProvider
 * @param caption
 * @param viewName
 * @param icon
 * @param badgeHolder
 * @param element
 * @param position
 * @return
 */
public T add(String caption,String viewName,Resource icon,DefaultBadgeHolder badgeHolder,View element,AppLayoutConfiguration.Position position){
  addToPosition(new NavigatorNavigationElement(caption,viewName,icon,badgeHolder,element),position);
  return (T)this;
}

Fixed version (ground truth):
/** 
 * Appends a menu element which is bound to a view which then can be navigated to by clicking on the element at the DEFAULT position Note: The caption, icon and navigation path will also be determined via the NavigationElementInfoProvider
 * @param caption
 * @param viewName
 * @param icon
 * @param badgeHolder
 * @param view
 * @param position
 * @return
 */
public T add(String caption,String viewName,Resource icon,DefaultBadgeHolder badgeHolder,View view,AppLayoutConfiguration.Position position){
  addToPosition(new NavigatorNavigationElement(caption,viewName,icon,badgeHolder,view),position);
  return (T)this;
}
Program: 38052
Project: 38052
Buggy source:
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badge.clearCount();
  notifications.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
    for (int i=0; i < 10; i++) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
      addNotification(MEDIUM);
    }
  }
);
  currentThread.start();
}

Fixed version (ground truth):
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badge.clearCount();
  notifications.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(3000);
      for (int i=0; i < 10; i++) {
        Thread.sleep(1000);
        addNotification(MEDIUM);
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
);
  currentThread.start();
}
Program: 38055
Project: 38055
Buggy source:
public static CDIAppLayoutBuilderWrapper getCDIBuilder(Behaviour behaviour){
  return new CDIAppLayoutBuilderWrapper(behaviour);
}

Fixed version (ground truth):
public static CDIBuilderNavigatorPreamble getCDIBuilder(Behaviour behaviour){
  return new CDIBuilderNavigatorPreamble(CDIAppLayoutBuilder.get(behaviour.getInstance()));
}
Program: 38057
Project: 38057
Buggy source:
public void navigateTo(String viewName){
  if (currentViewName == null || !currentViewName.equals(viewName)) {
    contentHolder.setContent(views.get(viewName).getViewComponent());
    this.listeners.forEach(viewChangeListener -> viewChangeListener.beforeViewChange(new ViewChangeListener.ViewChangeEvent(this,views.getOrDefault(currentViewName,null),views.get(viewName),viewName,null)));
    currentViewName=viewName;
  }
}

Fixed version (ground truth):
public void navigateTo(String viewName){
  if (currentViewName == null || !currentViewName.equals(viewName)) {
    if (views.containsKey(viewName)) {
      contentHolder.setContent(views.get(viewName).getViewComponent());
      this.listeners.forEach(viewChangeListener -> viewChangeListener.beforeViewChange(new ViewChangeListener.ViewChangeEvent(this,views.getOrDefault(currentViewName,null),views.get(viewName),viewName,null)));
      currentViewName=viewName;
    }
 else {
      currentViewName=null;
      if (errorView != null) {
        contentHolder.setContent(errorView.getViewComponent());
      }
 else {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
}
Program: 38059
Project: 38059
Buggy source:
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withErrorView(() -> new View1()).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProvider()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppBarDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(View1.class,badge).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withErrorView(() -> new View1()).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProvider()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppBarDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}
Program: 38060
Project: 38060
Buggy source:
public NavigationButton(String name,Resource icon){
  com.vaadin.ui.Button button=new com.vaadin.ui.Button(name);
  button.setIcon(icon);
  button.addStyleName(ValoTheme.BUTTON_BORDERLESS);
  button.addStyleName("String_Node_Str");
  button.addStyleName("String_Node_Str");
  button.setWidth(100,Sizeable.Unit.PERCENTAGE);
}

Fixed version (ground truth):
public NavigationButton(String name,Resource icon){
  super(name);
  setIcon(icon);
  addStyleName(ValoTheme.BUTTON_BORDERLESS);
  addStyleName("String_Node_Str");
  addStyleName("String_Node_Str");
  setWidth(100,Sizeable.Unit.PERCENTAGE);
}
Program: 38061
Project: 38061
Buggy source:
public AbstractNavigationDrawer(String filename) throws IOException {
  super(AbstractNavigationDrawer.class.getResourceAsStream(filename));
  contentHolder.setMargin(false);
  menuElementHolder.setMargin(false);
  menuElementHolder.setWidth(99,Unit.PERCENTAGE);
  setSizeFull();
  addStyleName(getStyleName());
  super.addComponent(contentHolder,"String_Node_Str");
  super.addComponent(menuElementHolder,"String_Node_Str");
  super.addComponent(appBar,"String_Node_Str");
  appBar.addComponents(titleWrapper,appBarElementHolder);
  appBar.setSizeFull();
  appBar.setComponentAlignment(appBarElementHolder,Alignment.TOP_RIGHT);
  appBarElementHolder.setSpacing(false);
  titleWrapper.setHeight(45,Unit.PIXELS);
  titleWrapper.setComponentAlignment(title,Alignment.MIDDLE_LEFT);
}

Fixed version (ground truth):
public AbstractNavigationDrawer(String filename) throws IOException {
  super(AbstractNavigationDrawer.class.getResourceAsStream(filename));
  contentHolder.setMargin(false);
  menuElementHolder.setMargin(false);
  menuElementHolder.setWidth(99,Unit.PERCENTAGE);
  setSizeFull();
  addStyleName(getStyleName());
  super.addComponent(contentHolder,"String_Node_Str");
  super.addComponent(menuElementHolder,"String_Node_Str");
  super.addComponent(appBar,"String_Node_Str");
  appBar.addComponents(titleWrapper,appBarElementHolder);
  appBar.setWidth(100,Unit.PERCENTAGE);
  appBar.setHeight(45,Unit.PIXELS);
  appBar.setComponentAlignment(appBarElementHolder,Alignment.MIDDLE_RIGHT);
  appBarElementHolder.setSpacing(false);
  titleWrapper.setHeight(100,Unit.PERCENTAGE);
  titleWrapper.setComponentAlignment(title,Alignment.MIDDLE_LEFT);
}
Program: 38062
Project: 38062
Buggy source:
public AbstractNavigationDrawer(String filename) throws IOException {
  super(AbstractNavigationDrawer.class.getResourceAsStream(filename));
  contentHolder.setMargin(false);
  menuElementHolder.setMargin(false);
  setSizeFull();
  addStyleName(getStyleName());
  super.addComponent(contentHolder,"String_Node_Str");
  super.addComponent(menuElementHolder,"String_Node_Str");
  super.addComponent(appBar,"String_Node_Str");
  appBar.addComponents(titleWrapper,appBarElementHolder);
  appBar.setSizeFull();
  appBar.setComponentAlignment(appBarElementHolder,Alignment.TOP_RIGHT);
  appBarElementHolder.setSpacing(false);
  titleWrapper.setHeight(100,Unit.PERCENTAGE);
  titleWrapper.setComponentAlignment(title,Alignment.MIDDLE_LEFT);
}

Fixed version (ground truth):
public AbstractNavigationDrawer(String filename) throws IOException {
  super(AbstractNavigationDrawer.class.getResourceAsStream(filename));
  contentHolder.setMargin(false);
  menuElementHolder.setMargin(false);
  menuElementHolder.setWidth(99,Unit.PERCENTAGE);
  setSizeFull();
  addStyleName(getStyleName());
  super.addComponent(contentHolder,"String_Node_Str");
  super.addComponent(menuElementHolder,"String_Node_Str");
  super.addComponent(appBar,"String_Node_Str");
  appBar.addComponents(titleWrapper,appBarElementHolder);
  appBar.setSizeFull();
  appBar.setComponentAlignment(appBarElementHolder,Alignment.TOP_RIGHT);
  appBarElementHolder.setSpacing(false);
  titleWrapper.setHeight(100,Unit.PERCENTAGE);
  titleWrapper.setComponentAlignment(title,Alignment.MIDDLE_LEFT);
}
Program: 38063
Project: 38063
Buggy source:
@HttpPost @Route("String_Node_Str") public void checkMe(){
  try {
    Session session=Request().session();
    long uid=session == null || session.attribute("String_Node_Str") == null ? 0 : session.attribute("String_Node_Str");
    if (uid < 1) {
      throw new HttpException("String_Node_Str",200);
    }
    User user=userService.getUser(uid);
    session.addAttribute("String_Node_Str",user.getId());
    session.addAttribute("String_Node_Str",user.getUsername());
    session.addAttribute("String_Node_Str",user.getEmail());
    Map<String,Object> resp=new HashMap<>(2);
    resp.put("String_Node_Str",user);
    resp.put("String_Node_Str","String_Node_Str");
    Succeed(resp);
  }
 catch (  Exception e) {
    Fail(e);
  }
}

Fixed version (ground truth):
@HttpPost @Route("String_Node_Str") public void checkMe(){
  try {
    Session session=Request().session();
    long uid=session == null || session.attribute("String_Node_Str") == null ? 0 : session.attribute("String_Node_Str");
    if (uid < 1) {
      throw new HttpException("String_Node_Str",200);
    }
    LoginUser user=userService.getLoginUser(uid);
    user.setFavoriteTopicIds(userMetaService.getFavoriteIds(uid));
    session.addAttribute("String_Node_Str",user.getId());
    session.addAttribute("String_Node_Str",user.getUsername());
    session.addAttribute("String_Node_Str",user.getEmail());
    Map<String,Object> resp=new HashMap<>(2);
    resp.put("String_Node_Str",user);
    resp.put("String_Node_Str","String_Node_Str");
    Succeed(resp);
  }
 catch (  Exception e) {
    Fail(e);
  }
}
Program: 38064
Project: 38064
Buggy source:
@Override public LoginUser getLoginUser(long id){
  User user=getUser(id);
  LoginUser loginUser=DozerMapperUtil.map(user,LoginUser.class);
  loginUser.setFavoriteTopicIds(userMetaService.getFavoriteIds(id));
  return loginUser;
}

Fixed version (ground truth):
@Override public LoginUser getLoginUser(long id){
  User user=getUser(id);
  LoginUser loginUser=DozerMapperUtil.map(user,LoginUser.class);
  return loginUser;
}
Program: 38065
Project: 38065
Buggy source:
public static void main(String[] args) throws IOException {
  while (!order.isClosed()) {
    int cost;
    String continueChoice;
    do {
      System.out.print("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      int choice=Integer.parseInt(reader.readLine());
      cost=priceOnProducts.get(choice);
      System.out.print("String_Node_Str");
      int count=Integer.parseInt(reader.readLine());
      order.setTotalCost(cost * count);
      System.out.print("String_Node_Str");
      continueChoice=reader.readLine();
    }
 while (continueChoice.equalsIgnoreCase("String_Node_Str"));
    if (strategy == null) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      String paymentMethod=reader.readLine();
      if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByPayPal();
      }
 else       if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByCreditCard();
      }
      order.processOrder(strategy);
    }
    System.out.print("String_Node_Str" + order.getTotalCost() + "String_Node_Str");
    String proceed=reader.readLine();
    if (proceed.equalsIgnoreCase("String_Node_Str")) {
      if (strategy.pay(order.getTotalCost())) {
        System.out.println("String_Node_Str");
      }
 else {
        System.out.println("String_Node_Str");
      }
      order.setClosed();
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  while (!order.isClosed()) {
    int cost;
    String continueChoice;
    do {
      System.out.print("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      int choice=Integer.parseInt(reader.readLine());
      cost=priceOnProducts.get(choice);
      System.out.print("String_Node_Str");
      int count=Integer.parseInt(reader.readLine());
      order.setTotalCost(cost * count);
      System.out.print("String_Node_Str");
      continueChoice=reader.readLine();
    }
 while (continueChoice.equalsIgnoreCase("String_Node_Str"));
    if (strategy == null) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      String paymentMethod=reader.readLine();
      if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByPayPal();
      }
 else {
        strategy=new PayByCreditCard();
      }
      order.processOrder(strategy);
      System.out.print("String_Node_Str" + order.getTotalCost() + "String_Node_Str");
      String proceed=reader.readLine();
      if (proceed.equalsIgnoreCase("String_Node_Str")) {
        if (strategy.pay(order.getTotalCost())) {
          System.out.println("String_Node_Str");
        }
 else {
          System.out.println("String_Node_Str");
        }
        order.setClosed();
      }
    }
  }
}
Program: 38066
Project: 38066
Buggy source:
public CreditCard(String number,String date,String cvv){
}

Fixed version (ground truth):
CreditCard(String number,String date,String cvv){
}
Program: 38067
Project: 38067
Buggy source:
public static File fix(VideoFile result){
  System.out.println("String_Node_Str");
  return new File("String_Node_Str");
}

Fixed version (ground truth):
public File fix(VideoFile result){
  System.out.println("String_Node_Str");
  return new File("String_Node_Str");
}
Program: 38068
Project: 38068
Buggy source:
private void simulateNetworkLatency(){
  try {
    Thread.currentThread().sleep(2500);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void simulateNetworkLatency(){
  try {
    Thread.sleep(2500);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}
Program: 38069
Project: 38069
Buggy source:
private void simulateNetworkLatency(){
  try {
    Thread.currentThread().sleep(2500);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void simulateNetworkLatency(){
  try {
    Thread.sleep(2500);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}
Program: 38070
Project: 38070
Buggy source:
private Singleton(String value){
  try {
    Thread.currentThread().sleep(1000);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
  this.value=value;
}

Fixed version (ground truth):
private Singleton(String value){
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
  this.value=value;
}
Program: 38071
Project: 38071
Buggy source:
public static void main(String[] args) throws IOException {
  while (!order.isClosed()) {
    int cost;
    String continueChoice;
    do {
      System.out.print("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      int choice=Integer.parseInt(reader.readLine());
      cost=priceOnProducts.get(choice);
      System.out.print("String_Node_Str");
      int count=Integer.parseInt(reader.readLine());
      order.setTotalCost(cost * count);
      System.out.print("String_Node_Str");
      continueChoice=reader.readLine();
    }
 while (continueChoice.equalsIgnoreCase("String_Node_Str"));
    if (strategy == null) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      String paymentMethod=reader.readLine();
      if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByPayPal();
      }
 else       if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByCreditCard();
      }
      order.processOrder(strategy);
    }
    System.out.print("String_Node_Str" + Order.getTotalCost() + "String_Node_Str");
    String proceed=reader.readLine();
    if (proceed.equalsIgnoreCase("String_Node_Str")) {
      if (strategy.pay(Order.getTotalCost())) {
        System.out.println("String_Node_Str");
      }
 else {
        System.out.println("String_Node_Str");
      }
      order.setClosed();
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  while (!order.isClosed()) {
    int cost;
    String continueChoice;
    do {
      System.out.print("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      int choice=Integer.parseInt(reader.readLine());
      cost=priceOnProducts.get(choice);
      System.out.print("String_Node_Str");
      int count=Integer.parseInt(reader.readLine());
      order.setTotalCost(cost * count);
      System.out.print("String_Node_Str");
      continueChoice=reader.readLine();
    }
 while (continueChoice.equalsIgnoreCase("String_Node_Str"));
    if (strategy == null) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      String paymentMethod=reader.readLine();
      if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByPayPal();
      }
 else       if (paymentMethod.equals("String_Node_Str")) {
        strategy=new PayByCreditCard();
      }
      order.processOrder(strategy);
    }
    System.out.print("String_Node_Str" + order.getTotalCost() + "String_Node_Str");
    String proceed=reader.readLine();
    if (proceed.equalsIgnoreCase("String_Node_Str")) {
      if (strategy.pay(order.getTotalCost())) {
        System.out.println("String_Node_Str");
      }
 else {
        System.out.println("String_Node_Str");
      }
      order.setClosed();
    }
  }
}
Program: 38072
Project: 38072
Buggy source:
public static int getTotalCost(){
  return totalCost;
}

Fixed version (ground truth):
public int getTotalCost(){
  return totalCost;
}
Program: 38073
Project: 38073
Buggy source:
private void simulateNetworkLatency(){
  try {
    int i=0;
    System.out.println();
    while (i < 10) {
      System.out.print("String_Node_Str");
      Thread.currentThread().sleep(500);
      i++;
    }
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void simulateNetworkLatency(){
  try {
    int i=0;
    System.out.println();
    while (i < 10) {
      System.out.print("String_Node_Str");
      Thread.sleep(500);
      i++;
    }
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}
Program: 38074
Project: 38074
Buggy source:
private void simulateNetworkLatency(){
  try {
    int i=0;
    System.out.println();
    while (i < 10) {
      System.out.print("String_Node_Str");
      Thread.currentThread().sleep(500);
      i++;
    }
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void simulateNetworkLatency(){
  try {
    int i=0;
    System.out.println();
    while (i < 10) {
      System.out.print("String_Node_Str");
      Thread.sleep(500);
      i++;
    }
  }
 catch (  InterruptedException ex) {
    ex.printStackTrace();
  }
}
Program: 38075
Project: 38075
Buggy source:
private static String getMessage(Throwable t){
  if (t.getMessage().isEmpty()) {
    return t.getClass().getSimpleName();
  }
 else {
    return t.getClass().getSimpleName() + "String_Node_Str" + t.getMessage();
  }
}

Fixed version (ground truth):
private static String getMessage(Throwable t){
  if (t.getMessage() == null) {
    return t.getClass().getSimpleName();
  }
 else {
    return t.getClass().getSimpleName() + "String_Node_Str" + t.getMessage();
  }
}
Program: 38076
Project: 38076
Buggy source:
private static String getMessage(Throwable t){
  if (t.getMessage().isEmpty()) {
    return t.getClass().getSimpleName();
  }
 else {
    return t.getClass().getSimpleName() + "String_Node_Str" + t.getMessage();
  }
}

Fixed version (ground truth):
private static String getMessage(Throwable t){
  if (t.getMessage() == null) {
    return t.getClass().getSimpleName();
  }
 else {
    return t.getClass().getSimpleName() + "String_Node_Str" + t.getMessage();
  }
}
Program: 38077
Project: 38077
Buggy source:
@Override public void startElement(String uri,String localName,String qName,Attributes attributes) throws SAXException {
switch (qName) {
case "String_Node_Str":
    file=new File(attributes.getValue("String_Node_Str"));
  break;
case "String_Node_Str":
failures.add(new Failure.Builder().source(attributes.getValue("String_Node_Str")).severity(attributes.getValue("String_Node_Str").toUpperCase()).file(file).line(Integer.parseInt(attributes.getValue("String_Node_Str"))).message(attributes.getValue("String_Node_Str")).build());
default :
break;
}
}

Fixed version (ground truth):
@Override public void startElement(String uri,String localName,String qName,Attributes attributes){
switch (qName) {
case "String_Node_Str":
    file=new File(attributes.getValue("String_Node_Str"));
  break;
case "String_Node_Str":
failures.add(new Failure.Builder().source(attributes.getValue("String_Node_Str")).severity(attributes.getValue("String_Node_Str").toUpperCase()).file(file).line(Integer.parseInt(attributes.getValue("String_Node_Str"))).message(attributes.getValue("String_Node_Str")).build());
default :
break;
}
}
Program: 38078
Project: 38078
Buggy source:
private boolean isUntracked(Task task){
  return !(task instanceof Test) && !isStyleTask(task);
}

Fixed version (ground truth):
private static boolean isUntracked(Task task){
  return !(task instanceof Test) && !isStyleTask(task);
}
Program: 38079
Project: 38079
Buggy source:
private void configureCheckstyleTask(final Project project,final Checkstyle checkstyleTask,final String circleReportsDir,final StyleTaskTimer timer){
  checkstyleTask.doFirst(new Action<Task>(){
    @Override public void execute(    Task task){
      checkstyleTask.getReports().findByName("String_Node_Str").setEnabled(true);
    }
  }
);
  CircleStyleFinalizer finalizer=createTask(project.getTasks(),checkstyleTask.getName() + "String_Node_Str",CircleStyleFinalizer.class);
  if (finalizer == null) {
    return;
  }
  finalizer.setReportParser(CheckstyleReportHandler.PARSER);
  finalizer.setStyleTask(checkstyleTask);
  finalizer.setReporting(checkstyleTask);
  finalizer.setStyleTaskTimer(timer);
  finalizer.setTargetFile(new File(new File(circleReportsDir,"String_Node_Str"),project.getName() + "String_Node_Str" + checkstyleTask.getName()+ "String_Node_Str"));
  checkstyleTask.finalizedBy(finalizer);
}

Fixed version (ground truth):
private static void configureCheckstyleTask(final Project project,final Checkstyle checkstyleTask,final String circleReportsDir,final StyleTaskTimer timer){
  checkstyleTask.doFirst(new Action<Task>(){
    @Override public void execute(    Task task){
      checkstyleTask.getReports().findByName("String_Node_Str").setEnabled(true);
    }
  }
);
  CircleStyleFinalizer finalizer=createTask(project.getTasks(),checkstyleTask.getName() + "String_Node_Str",CircleStyleFinalizer.class);
  if (finalizer == null) {
    return;
  }
  finalizer.setReportParser(CheckstyleReportHandler.PARSER);
  finalizer.setStyleTask(checkstyleTask);
  finalizer.setReporting(checkstyleTask);
  finalizer.setStyleTaskTimer(timer);
  finalizer.setTargetFile(new File(new File(circleReportsDir,"String_Node_Str"),project.getName() + "String_Node_Str" + checkstyleTask.getName()+ "String_Node_Str"));
  checkstyleTask.finalizedBy(finalizer);
}
Program: 38080
Project: 38080
Buggy source:
private void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + (++attemptNumber) + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}

Fixed version (ground truth):
private static void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + (++attemptNumber) + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}
Program: 38081
Project: 38081
Buggy source:
private void configureFindbugsTask(final Project project,final FindBugs findbugsTask,final String circleReportsDir,final StyleTaskTimer timer){
  findbugsTask.doFirst(new Action<Task>(){
    @Override public void execute(    Task task){
      for (      SingleFileReport report : findbugsTask.getReports()) {
        report.setEnabled(false);
      }
      FindBugsXmlReport xmlReport=(FindBugsXmlReport)findbugsTask.getReports().findByName("String_Node_Str");
      xmlReport.setEnabled(true);
      xmlReport.setWithMessages(true);
    }
  }
);
  CircleStyleFinalizer finalizer=createTask(project.getTasks(),findbugsTask.getName() + "String_Node_Str",CircleStyleFinalizer.class);
  if (finalizer == null) {
    return;
  }
  finalizer.setReportParser(FindBugsReportHandler.PARSER);
  finalizer.setStyleTask(findbugsTask);
  finalizer.setReporting(findbugsTask);
  finalizer.setStyleTaskTimer(timer);
  finalizer.setTargetFile(new File(new File(circleReportsDir,"String_Node_Str"),project.getName() + "String_Node_Str" + findbugsTask.getName()+ "String_Node_Str"));
  findbugsTask.finalizedBy(finalizer);
}

Fixed version (ground truth):
private static void configureFindbugsTask(final Project project,final FindBugs findbugsTask,final String circleReportsDir,final StyleTaskTimer timer){
  findbugsTask.doFirst(new Action<Task>(){
    @Override public void execute(    Task task){
      for (      SingleFileReport report : findbugsTask.getReports()) {
        report.setEnabled(false);
      }
      FindBugsXmlReport xmlReport=(FindBugsXmlReport)findbugsTask.getReports().findByName("String_Node_Str");
      xmlReport.setEnabled(true);
      xmlReport.setWithMessages(true);
    }
  }
);
  CircleStyleFinalizer finalizer=createTask(project.getTasks(),findbugsTask.getName() + "String_Node_Str",CircleStyleFinalizer.class);
  if (finalizer == null) {
    return;
  }
  finalizer.setReportParser(FindBugsReportHandler.PARSER);
  finalizer.setStyleTask(findbugsTask);
  finalizer.setReporting(findbugsTask);
  finalizer.setStyleTaskTimer(timer);
  finalizer.setTargetFile(new File(new File(circleReportsDir,"String_Node_Str"),project.getName() + "String_Node_Str" + findbugsTask.getName()+ "String_Node_Str"));
  findbugsTask.finalizedBy(finalizer);
}
Program: 38082
Project: 38082
Buggy source:
@Override public void characters(char[] ch,int start,int length) throws SAXException {
  if (content != null) {
    content.append(ch,start,length);
  }
}

Fixed version (ground truth):
@Override public void characters(char[] ch,int start,int length){
  if (content != null) {
    content.append(ch,start,length);
  }
}
Program: 38083
Project: 38083
Buggy source:
@Override public void endElement(String uri,String localName,String qName) throws SAXException {
switch (qName) {
case "String_Node_Str":
    sources.add(content.toString());
  content=null;
break;
case "String_Node_Str":
failure.message(content.toString());
content=null;
break;
case "String_Node_Str":
failures.add(failure.build());
failure=null;
break;
default :
break;
}
depth--;
}

Fixed version (ground truth):
@Override public void endElement(String uri,String localName,String qName){
switch (qName) {
case "String_Node_Str":
    sources.add(content.toString());
  content=null;
break;
case "String_Node_Str":
failure.message(content.toString());
content=null;
break;
case "String_Node_Str":
failures.add(failure.build());
failure=null;
break;
default :
break;
}
depth--;
}
Program: 38084
Project: 38084
Buggy source:
@Override public void startElement(String uri,String localName,String qName,Attributes attributes) throws SAXException {
  depth++;
switch (qName) {
case "String_Node_Str":
    content=new StringBuilder();
  break;
case "String_Node_Str":
depth=0;
failure=new Failure.Builder().source(attributes.getValue("String_Node_Str")).severity("String_Node_Str");
break;
case "String_Node_Str":
content=new StringBuilder();
break;
case "String_Node_Str":
if (depth == 1) {
String sourcepath=attributes.getValue("String_Node_Str");
File sourceFile=new File(sourcepath);
for (String source : sources) {
if (source.endsWith(sourcepath)) {
sourceFile=new File(source);
}
}
failure.file(sourceFile).line(Integer.parseInt(attributes.getValue("String_Node_Str")));
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void startElement(String uri,String localName,String qName,Attributes attributes){
  depth++;
switch (qName) {
case "String_Node_Str":
    content=new StringBuilder();
  break;
case "String_Node_Str":
depth=0;
failure=new Failure.Builder().source(attributes.getValue("String_Node_Str")).severity("String_Node_Str");
break;
case "String_Node_Str":
content=new StringBuilder();
break;
case "String_Node_Str":
if (depth == 1) {
String sourcepath=attributes.getValue("String_Node_Str");
File sourceFile=new File(sourcepath);
for (String source : sources) {
if (source.endsWith(sourcepath)) {
sourceFile=new File(source);
}
}
failure.file(sourceFile).line(Integer.parseInt(attributes.getValue("String_Node_Str")));
}
break;
default :
break;
}
}
Program: 38085
Project: 38085
Buggy source:
private Task task(String projectName,String taskName){
  Task task=Mockito.mock(Task.class,Mockito.RETURNS_DEEP_STUBS);
  when(task.getProject().getName()).thenReturn(projectName);
  when(task.getName()).thenReturn(taskName);
  return task;
}

Fixed version (ground truth):
private static Task task(String projectName,String taskName){
  Task task=Mockito.mock(Task.class,Mockito.RETURNS_DEEP_STUBS);
  when(task.getProject().getName()).thenReturn(projectName);
  when(task.getName()).thenReturn(taskName);
  return task;
}
Program: 38086
Project: 38086
Buggy source:
@Test public void testTwoErrors() throws TransformerException {
  Report report=failuresReport(ROOT,"String_Node_Str","String_Node_Str",FAILED_CHECKSTYLE_TIME_NANOS,CHECKSTYLE_FAILURES);
  assertThat(report).isEqualTo(REPORT);
}

Fixed version (ground truth):
@Test public void testTwoErrors(){
  Report report=failuresReport(ROOT,"String_Node_Str","String_Node_Str",FAILED_CHECKSTYLE_TIME_NANOS,CHECKSTYLE_FAILURES);
  assertThat(report).isEqualTo(REPORT);
}
Program: 38087
Project: 38087
Buggy source:
@Test public void testNoErrors() throws TransformerException {
  Report report=failuresReport(ROOT,"String_Node_Str","String_Node_Str",FAILED_CHECKSTYLE_TIME_NANOS,ImmutableList.<Failure>of());
  assertThat(report).isEqualTo(new Report.Builder().name("String_Node_Str").subname("String_Node_Str").elapsedTimeNanos(FAILED_CHECKSTYLE_TIME_NANOS).build());
}

Fixed version (ground truth):
@Test public void testNoErrors(){
  Report report=failuresReport(ROOT,"String_Node_Str","String_Node_Str",FAILED_CHECKSTYLE_TIME_NANOS,ImmutableList.<Failure>of());
  assertThat(report).isEqualTo(new Report.Builder().name("String_Node_Str").subname("String_Node_Str").elapsedTimeNanos(FAILED_CHECKSTYLE_TIME_NANOS).build());
}
Program: 38088
Project: 38088
Buggy source:
private void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + attemptNumber + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}

Fixed version (ground truth):
private void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + (++attemptNumber) + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}
Program: 38089
Project: 38089
Buggy source:
private void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + attemptNumber + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}

Fixed version (ground truth):
private void configureBuildFailureFinalizer(Project rootProject,String circleReportsDir){
  int attemptNumber=1;
  File targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str");
  while (targetFile.exists()) {
    targetFile=new File(new File(circleReportsDir,"String_Node_Str"),"String_Node_Str" + (++attemptNumber) + "String_Node_Str");
  }
  Integer container;
  try {
    container=Integer.parseInt(System.getenv("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
    container=null;
  }
  CircleBuildFailureListener listener=new CircleBuildFailureListener();
  CircleBuildFinishedAction action=new CircleBuildFinishedAction(container,targetFile,listener);
  rootProject.getGradle().addListener(listener);
  rootProject.getGradle().buildFinished(action);
}
Program: 38090
Project: 38090
Buggy source:
@Override public void getAllStudent(Context context,DatabaseQueryCallback<List<Student>> callback){
  DatabaseHelper databaseHelper=DatabaseHelper.getInstance(context);
  SQLiteDatabase sqLiteDatabase=databaseHelper.getReadableDatabase();
  String SELECT_QUERY=String.format("String_Node_Str",Config.COLUMN_STUDENT_NAME,Config.COLUMN_SUBJECT_OF_STUDENT_REGISTRATION,Config.COLUMN_STUDENT_EMAIL,Config.COLUMN_STUDENT_PHONE,Config.TABLE_STUDENT);
  Cursor cursor=null;
  try {
    cursor=sqLiteDatabase.rawQuery(SELECT_QUERY,null);
    if (cursor != null && cursor.moveToFirst()) {
      List<Student> studentList=new ArrayList<>();
      do {
        String name=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_NAME));
        long registrationNumber=cursor.getLong(cursor.getColumnIndex(Config.COLUMN_STUDENT_REGISTRATION));
        String email=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_EMAIL));
        String phone=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_PHONE));
        studentList.add(new Student(name,registrationNumber,phone,email));
      }
 while (cursor.moveToNext());
      callback.onQuerySuccess(studentList);
    }
 else     callback.onQueryFailed(new Exception("String_Node_Str"));
  }
 catch (  Exception e) {
    Logger.d("String_Node_Str" + e.getMessage());
    callback.onQueryFailed(e);
    Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
 finally {
    if (cursor != null)     cursor.close();
    sqLiteDatabase.close();
  }
}

Fixed version (ground truth):
@Override public void getAllStudent(Context context,DatabaseQueryCallback<List<Student>> callback){
  DatabaseHelper databaseHelper=DatabaseHelper.getInstance(context);
  SQLiteDatabase sqLiteDatabase=databaseHelper.getReadableDatabase();
  String SELECT_QUERY=String.format("String_Node_Str",Config.COLUMN_STUDENT_NAME,Config.COLUMN_STUDENT_REGISTRATION,Config.COLUMN_STUDENT_EMAIL,Config.COLUMN_STUDENT_PHONE,Config.TABLE_STUDENT);
  Cursor cursor=null;
  try {
    cursor=sqLiteDatabase.rawQuery(SELECT_QUERY,null);
    if (cursor != null && cursor.moveToFirst()) {
      List<Student> studentList=new ArrayList<>();
      do {
        String name=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_NAME));
        long registrationNumber=cursor.getLong(cursor.getColumnIndex(Config.COLUMN_STUDENT_REGISTRATION));
        String email=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_EMAIL));
        String phone=cursor.getString(cursor.getColumnIndex(Config.COLUMN_STUDENT_PHONE));
        studentList.add(new Student(name,registrationNumber,phone,email));
      }
 while (cursor.moveToNext());
      callback.onQuerySuccess(studentList);
    }
 else     callback.onQueryFailed(new Exception("String_Node_Str"));
  }
 catch (  Exception e) {
    Logger.d("String_Node_Str" + e.getMessage());
    callback.onQueryFailed(e);
    Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
 finally {
    if (cursor != null)     cursor.close();
    sqLiteDatabase.close();
  }
}