nus-yam/ex-repair huggingface dataset:
Program: 36556
Project: 36556
Buggy source:
/** 
 * Set title alignment.
 */
public void setTitlePosition(Pos align){
  BorderPane.setAlignment(titleL,align);
}

Fixed version (ground truth):
/** 
 * Set title alignment. 
 */
public void setTitlePosition(Pos align){
  BorderPane.setAlignment(titleL,align);
}
Program: 36561
Project: 36561
Buggy source:
void set(boolean change,Metadata m){
  if (change)   itemPlayedES.forEach(h -> h.accept(val,m));
  itemUpdatedES.forEach(h -> h.accept(val,m));
  val=m;
}

Fixed version (ground truth):
void set(boolean change,Metadata m){
  Metadata ov=val;
  Metadata nv=m;
  val=nv;
  if (change)   itemPlayedES.forEach(h -> h.accept(ov,nv));
  itemUpdatedES.forEach(h -> h.accept(ov,nv));
}
Program: 36562
Project: 36562
Buggy source:
public final boolean isUnderLock(){
  return container.isUnderLock();
}

Fixed version (ground truth):
public final boolean isUnderLock(){
  return container.lockedUnder.get();
}
Program: 36565
Project: 36565
Buggy source:
public Layouter(Container con,int index){
  Objects.requireNonNull(con);
  this.index=index;
  this.container=con;
  cp.onSelect=layout -> {
switch (layout) {
case "String_Node_Str":
      closeAndDo(cp.root,this::showSplitV);
    break;
case "String_Node_Str":
  closeAndDo(cp.root,this::showSplitH);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showWidgetArea);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showTabs);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showFreeform);
break;
}
}
;
cp.onCancel=this::hide;
cp.textCoverter=text -> text;
cp.itemSupply=() -> stream("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
cp.buildContent();
setAnchors(cp.root,0d);
Interpolator i=new CircularInterpolator(EASE_OUT);
a1=new FadeTransition(ANIM_DUR,cp.root);
a1.setInterpolator(LINEAR);
a2=new ScaleTransition(ANIM_DUR,cp.root);
a2.setInterpolator(i);
cp.root.setOpacity(0);
cp.root.setScaleX(0);
cp.root.setScaleY(0);
root.setOnDragOver(DragUtil.componentDragAcceptHandler);
root.setOnDragDropped(e -> {
if (DragUtil.hasComponent()) {
container.swapChildren(index,DragUtil.getComponent());
e.setDropCompleted(true);
e.consume();
}
}
);
clickShowHider=e -> {
if (e.getButton() == PRIMARY) {
if (cp.root.getOpacity() != 0) return;
if (container.isUnderLock()) return;
show();
e.consume();
}
}
;
exitHider=e -> cp.onCancel.run();
setWeakMode(true);
setShow(GUI.isLayoutMode());
}

Fixed version (ground truth):
public Layouter(Container con,int index){
  Objects.requireNonNull(con);
  this.index=index;
  this.container=con;
  cp.onSelect=layout -> {
switch (layout) {
case "String_Node_Str":
      closeAndDo(cp.root,this::showSplitV);
    break;
case "String_Node_Str":
  closeAndDo(cp.root,this::showSplitH);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showWidgetArea);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showTabs);
break;
case "String_Node_Str":
closeAndDo(cp.root,this::showFreeform);
break;
}
}
;
cp.onCancel=this::hide;
cp.textCoverter=text -> text;
cp.itemSupply=() -> stream("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
cp.buildContent();
setAnchors(cp.root,0d);
Interpolator i=new CircularInterpolator(EASE_OUT);
a1=new FadeTransition(ANIM_DUR,cp.root);
a1.setInterpolator(LINEAR);
a2=new ScaleTransition(ANIM_DUR,cp.root);
a2.setInterpolator(i);
cp.root.setOpacity(0);
cp.root.setScaleX(0);
cp.root.setScaleY(0);
root.setOnDragOver(DragUtil.componentDragAcceptHandler);
root.setOnDragDropped(e -> {
if (DragUtil.hasComponent()) {
container.swapChildren(index,DragUtil.getComponent());
e.setDropCompleted(true);
e.consume();
}
}
);
clickShowHider=e -> {
if (e.getButton() == PRIMARY) {
if (cp.root.getOpacity() != 0) return;
if (container.lockedUnder.get()) return;
show();
e.consume();
}
}
;
exitHider=e -> cp.onCancel.run();
setWeakMode(true);
setShow(GUI.isLayoutMode());
}
Program: 36566
Project: 36566
Buggy source:
/** 
 * @param c container to make contract with
 * @param i index of the child within the container
 */
public WidgetArea(Container c,int i){
  super(c,i);
  try {
    FXMLLoader loader=new FXMLLoader(this.getClass().getResource("String_Node_Str"));
    loader.setRoot(content_root);
    loader.setController(this);
    loader.load();
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex.getMessage());
  }
  controls=new AreaControls(this);
  content_padding.getChildren().addAll(controls.root);
  Util.setAnchors(controls.root,0d);
  root.setOnDragOver(DragUtil.componentDragAcceptHandler);
  root.setOnDragDropped(e -> {
    if (DragUtil.hasComponent()) {
      container.swapChildren(index,DragUtil.getComponent());
      e.setDropCompleted(true);
      e.consume();
    }
  }
);
  if (GUI.isLayoutMode())   show();
 else   hide();
}

Fixed version (ground truth):
/** 
 * @param c container to make contract with
 * @param i index of the child within the container
 */
public WidgetArea(Container c,int i){
  super(c,i);
  try {
    FXMLLoader loader=new FXMLLoader(this.getClass().getResource("String_Node_Str"));
    loader.setRoot(content_root);
    loader.setController(this);
    loader.load();
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex.getMessage());
  }
  controls=new AreaControls(this);
  content_padding.getChildren().addAll(controls.root);
  root.setOnDragOver(DragUtil.componentDragAcceptHandler);
  root.setOnDragDropped(e -> {
    if (DragUtil.hasComponent()) {
      container.swapChildren(index,DragUtil.getComponent());
      e.setDropCompleted(true);
      e.consume();
    }
  }
);
  if (GUI.isLayoutMode())   show();
 else   hide();
}
Program: 36567
Project: 36567
Buggy source:
/** 
 * { @inheritDoc } Index can only take on value 1 or 2. Other values will do nothing.
 * @throws UnsupportedOperationException if component not Container type.
 */
@Override public void addChild(Integer index,Component c){
  if (index == null)   return;
  if (index < 1 || index > 2)   throw new IndexOutOfBoundsException("String_Node_Str" + index + "String_Node_Str");
  if (c instanceof Container)   Container.class.cast(c).parent=this;
  children.put(index,c);
  load();
  initialize();
}

Fixed version (ground truth):
/** 
 * { @inheritDoc } Index can only take on value 1 or 2. Other values will do nothing.
 * @throws UnsupportedOperationException if component not Container type.
 */
@Override public void addChild(Integer index,Component c){
  if (index == null)   return;
  if (index < 1 || index > 2)   throw new IndexOutOfBoundsException("String_Node_Str" + index + "String_Node_Str");
  if (c instanceof Container)   Container.class.cast(c).setParent(this);
  children.put(index,c);
  load();
  setParentRec();
}
Program: 36568
Project: 36568
Buggy source:
/** 
 * Adds the widget as child. Since there is only one child, the index parameter is ignored.
 * @param c widget or container. Null value will clear all children.
 * @param index is can only take 1 or 2 value. other values will donothing.
 */
@Override public void addChild(Integer index,Component c){
  if (index == null)   return;
  if (index < 1 || index > 2)   throw new IndexOutOfBoundsException("String_Node_Str" + index + "String_Node_Str");
  if (!(c instanceof Container))   getChildren().put(index,null);
 else   getChildren().put(index,c);
  load();
  initialize();
}

Fixed version (ground truth):
/** 
 * Adds the widget as child. Since there is only one child, the index parameter is ignored.
 * @param c widget or container. Null value will clear all children.
 * @param index is can only take 1 or 2 value. other values will donothing.
 */
@Override public void addChild(Integer index,Component c){
  if (index == null)   return;
  if (index < 1 || index > 2)   throw new IndexOutOfBoundsException("String_Node_Str" + index + "String_Node_Str");
  if (!(c instanceof Container))   getChildren().put(index,null);
 else   getChildren().put(index,c);
  load();
  setParentRec();
}
Program: 36569
Project: 36569
Buggy source:
@IsInput("String_Node_Str") public void setItems(List<? extends Metadata> items){
  table.setItemsRaw(items);
}

Fixed version (ground truth):
@IsInput("String_Node_Str") public void setItems(List<? extends Metadata> items){
  if (items == null)   return;
  table.setItemsRaw(items);
}
Program: 36570
Project: 36570
Buggy source:
/** 
 * HELPER METHODS 
 */
void savePlaylist(){
  List<PlaylistItem> l=table.getItems();
  if (l.isEmpty())   return;
  String initialName="String_Node_Str" + new Date(System.currentTimeMillis());
  MapConfigurable mc=new MapConfigurable(new ValueConfig("String_Node_Str",initialName));
  SimpleConfigurator sc=new SimpleConfigurator<String>(mc,c -> {
    String n=c.getField("String_Node_Str").getValue();
    Playlist p=new Playlist(UUID.randomUUID());
    p.setAll(l);
    p.serializeToFile(new File(App.PLAYLIST_FOLDER(),n + "String_Node_Str"));
  }
);
  PopOver p=new PopOver(sc);
  p.title.set("String_Node_Str");
  p.show(PopOver.ScreenCentricPos.App_Center);
}

Fixed version (ground truth):
/** 
 * HELPER METHODS 
 */
void savePlaylist(){
  List<PlaylistItem> l=table.getItems();
  if (l.isEmpty())   return;
  String initialName="String_Node_Str" + new Date(System.currentTimeMillis());
  MapConfigurable mc=new MapConfigurable(new ValueConfig("String_Node_Str",initialName));
  SimpleConfigurator sc=new SimpleConfigurator<String>(mc,c -> {
    String n=c.getField("String_Node_Str").getValue();
    Playlist p=new Playlist(UUID.randomUUID());
    p.setAll(l);
    p.serializeToFile(new File(App.PLAYLIST_FOLDER(),n + "String_Node_Str"));
  }
);
  PopOver p=new PopOver(sc);
  p.title.set("String_Node_Str");
  p.show(PopOver.ScreenPos.App_Center);
}
Program: 36571
Project: 36571
Buggy source:
void saveSelectedAsPlaylist(){
  List<PlaylistItem> l=table.getSelectedItems();
  if (l.isEmpty())   return;
  MapConfigurable mc=new MapConfigurable(new ValueConfig("String_Node_Str","String_Node_Str"));
  SimpleConfigurator sc=new SimpleConfigurator<String>(mc,c -> {
    String n=c.getField("String_Node_Str").getValue();
    Playlist p=new Playlist(UUID.randomUUID());
    p.setAll(l);
    p.serializeToFile(new File(App.PLAYLIST_FOLDER(),n + "String_Node_Str"));
  }
);
  PopOver p=new PopOver(sc);
  p.title.set("String_Node_Str");
  p.show(PopOver.ScreenCentricPos.App_Center);
}

Fixed version (ground truth):
void saveSelectedAsPlaylist(){
  List<PlaylistItem> l=table.getSelectedItems();
  if (l.isEmpty())   return;
  MapConfigurable mc=new MapConfigurable(new ValueConfig("String_Node_Str","String_Node_Str"));
  SimpleConfigurator sc=new SimpleConfigurator<String>(mc,c -> {
    String n=c.getField("String_Node_Str").getValue();
    Playlist p=new Playlist(UUID.randomUUID());
    p.setAll(l);
    p.serializeToFile(new File(App.PLAYLIST_FOLDER(),n + "String_Node_Str"));
  }
);
  PopOver p=new PopOver(sc);
  p.title.set("String_Node_Str");
  p.show(PopOver.ScreenPos.App_Center);
}
Program: 36573
Project: 36573
Buggy source:
public static void suspend(){
  logger.info("String_Node_Str");
  state.realTime.set(getRealTime());
  Player.state.serialize();
  player.dispose();
}

Fixed version (ground truth):
public static void suspend(){
  LOGGER.info("String_Node_Str");
  state.realTime.set(getRealTime());
  Player.state.serialize();
  player.dispose();
}
Program: 36574
Project: 36574
Buggy source:
public static void activate(){
  logger.info("String_Node_Str");
  post_activating=true;
  Status s=state.status.get();
  if (s == PAUSED || s == PLAYING)   startTime=state.currentTime.get();
  if (s == PAUSED) {
    player.play(PlaylistManager.use(p -> p.getPlaying(),null));
    util.async.Async.runFX(1000,player::pause);
  }
  if (s == PLAYING) {
    player.play(PlaylistManager.use(p -> p.getPlaying(),null));
  }
}

Fixed version (ground truth):
public static void activate(){
  LOGGER.info("String_Node_Str");
  post_activating=true;
  Status s=state.status.get();
  if (s == PAUSED || s == PLAYING)   startTime=state.currentTime.get();
  if (s == PAUSED) {
    player.play(PlaylistManager.use(p -> p.getPlaying(),null));
    util.async.Async.runFX(1000,player::pause);
  }
  if (s == PLAYING) {
    player.play(PlaylistManager.use(p -> p.getPlaying(),null));
  }
}
Program: 36575
Project: 36575
Buggy source:
/** 
 * Open chooser and add or play new items.
 * @param add true to add items, false to clear playlist and play items
 */
public void addOrEnqueueUrl(boolean add){
  String title=add ? "String_Node_Str" : "String_Node_Str";
  SimpleConfigurator content=new SimpleConfigurator<URI>(new ValueConfig<URI>("String_Node_Str",URI.create("String_Node_Str"),title),c -> {
    URI uri=c.getField("String_Node_Str").getValue();
    if (add) {
      addUri(uri);
    }
 else {
      PLAYBACK.stop();
      clear();
      addUri(uri);
      playFirstItem();
    }
  }
);
  String uri="String_Node_Str";
  Text t1=new Text("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  Text t2=new Text(uri);
  t2.getStyleClass().add("String_Node_Str");
  VBox cnt=new VBox(t1,t2);
  cnt.setSpacing(8);
  VBox.setMargin(t2,new Insets(0,0,0,20));
  Icon infoB=new Icon(INFO,11,"String_Node_Str");
  infoB.setOnMouseClicked(e -> {
    PopOver helpP=PopOver.createHelpPopOver("String_Node_Str");
    helpP.setContentNode(cnt);
    helpP.getContentNode().setOnMouseClicked(pe -> {
      Environment.browse(URI.create(uri));
      pe.consume();
    }
);
    helpP.show(infoB);
  }
);
  PopOver p=new PopOver(title,content);
  p.getHeaderIcons().add(infoB);
  p.show(PopOver.ScreenCentricPos.App_Center);
  p.detached.set(true);
}

Fixed version (ground truth):
/** 
 * Open chooser and add or play new items.
 * @param add true to add items, false to clear playlist and play items
 */
public void addOrEnqueueUrl(boolean add){
  String title=add ? "String_Node_Str" : "String_Node_Str";
  SimpleConfigurator content=new SimpleConfigurator<URI>(new ValueConfig<URI>("String_Node_Str",URI.create("String_Node_Str"),title),c -> {
    URI uri=c.getField("String_Node_Str").getValue();
    if (add) {
      addUri(uri);
    }
 else {
      PLAYBACK.stop();
      clear();
      addUri(uri);
      playFirstItem();
    }
  }
);
  String uri="String_Node_Str";
  Text t1=new Text("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  Text t2=new Text(uri);
  t2.getStyleClass().add("String_Node_Str");
  VBox cnt=new VBox(t1,t2);
  cnt.setSpacing(8);
  VBox.setMargin(t2,new Insets(0,0,0,20));
  Icon infoB=new Icon(INFO,11,"String_Node_Str");
  infoB.setOnMouseClicked(e -> {
    PopOver helpP=PopOver.createHelpPopOver("String_Node_Str");
    helpP.setContentNode(cnt);
    helpP.getContentNode().setOnMouseClicked(pe -> {
      Environment.browse(URI.create(uri));
      pe.consume();
    }
);
    helpP.show(infoB);
  }
);
  PopOver p=new PopOver(title,content);
  p.getHeaderIcons().add(infoB);
  p.show(PopOver.ScreenPos.App_Center);
  p.detached.set(true);
}
Program: 36576
Project: 36576
Buggy source:
private static Config createConfig(Field f,Object instance,String name,IsConfig anotation,String group){
  Class c=f.getType();
  if (Config.class.isAssignableFrom(c)) {
    return newFromConfig(f,instance);
  }
 else   if (WritableValue.class.isAssignableFrom(c) || ReadOnlyProperty.class.isAssignableFrom(c))   return newFromProperty(f,instance,name,anotation,group);
 else {
    try {
      noFinal(f);
      f.setAccessible(true);
      MethodHandle getter=methodLookup.unreflectGetter(f);
      MethodHandle setter=methodLookup.unreflectSetter(f);
      return new FieldConfig(name,anotation,instance,group,getter,setter);
    }
 catch (    IllegalAccessException e) {
      throw new RuntimeException("String_Node_Str" + f.getName() + "String_Node_Str"+ e.getMessage());
    }
  }
}

Fixed version (ground truth):
private static Config createConfig(Field f,Object instance,String name,IsConfig anotation,String group){
  Class c=f.getType();
  if (Config.class.isAssignableFrom(c)) {
    return newFromConfig(f,instance);
  }
 else   if (WritableValue.class.isAssignableFrom(c) || ReadOnlyProperty.class.isAssignableFrom(c)) {
    return newFromProperty(f,instance,name,anotation,group);
  }
 else {
    try {
      noFinal(f);
      f.setAccessible(true);
      MethodHandle getter=methodLookup.unreflectGetter(f);
      MethodHandle setter=methodLookup.unreflectSetter(f);
      return new FieldConfig(name,anotation,instance,group,getter,setter);
    }
 catch (    IllegalAccessException e) {
      throw new RuntimeException("String_Node_Str" + f.getName() + "String_Node_Str"+ e.getMessage());
    }
  }
}
Program: 36577
Project: 36577
Buggy source:
/** 
 */
private static <T>T getValueFromMethodHelper(MethodHandle mh,Object instance){
  try {
    if (instance == null)     return (T)mh.invoke();
 else     return (T)mh.invokeWithArguments(instance);
  }
 catch (  Throwable ex) {
    throw new RuntimeException("String_Node_Str" + ex);
  }
}

Fixed version (ground truth):
/** 
 */
private static <T>T getValueFromMethodHelper(MethodHandle mh,Object instance){
  try {
    if (instance == null)     return (T)mh.invoke();
 else     return (T)mh.invokeWithArguments(instance);
  }
 catch (  Throwable e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 36578
Project: 36578
Buggy source:
/** 
 * @param pos the position for the picker to show on 
 */
public void setPos(PopOver.NodeCentricPos pos){
  this.pos=pos;
}

Fixed version (ground truth):
/** 
 * @param pos the position for the picker to show on 
 */
public void setPos(PopOver.NodePos pos){
  this.pos=pos;
}
Program: 36579
Project: 36579
Buggy source:
/** 
 * @return the position for the picker to show on 
 */
public PopOver.NodeCentricPos getPos(){
  return pos;
}

Fixed version (ground truth):
/** 
 * @return the position for the picker to show on 
 */
public PopOver.NodePos getPos(){
  return pos;
}
Program: 36580
Project: 36580
Buggy source:
@Override public void show(ScreenCentricPos pos){
  super.show(pos);
  closer.start();
}

Fixed version (ground truth):
@Override public void show(ScreenPos pos){
  super.show(pos);
  closer.start();
}
Program: 36581
Project: 36581
Buggy source:
/** 
 * Returns rectangular screen area 
 */
public Rectangle2D getScreenArea(Window w,ScreenCentricPos pos){
  Screen ps=Screen.getPrimary();
  if (this == MAIN)   return ps.getBounds();
  if (this == APP_WINDOW)   return getScreenForPoint(w.getX() + w.getWidth() / 2,w.getY() + w.getHeight() / 2).getBounds();
 else {
    List<Screen> ss=Screen.getScreens();
    Screen l=min(ss,ps,by(a -> a.getBounds().getMinX()));
    Screen r=max(ss,ps,by(a -> a.getBounds().getMaxX()));
switch (pos) {
case Screen_Bottom_Left:
case Screen_Top_Left:
      return l.getBounds();
case Screen_Bottom_Right:
case Screen_Top_Right:
    return r.getBounds();
case Screen_Center:
{
    Screen t=min(ss,ps,by(a -> a.getBounds().getMinY()));
    Screen b=max(ss,ps,by(a -> a.getBounds().getMaxY()));
    return new Rectangle2D(l.getBounds().getMinX(),t.getBounds().getMinY(),r.getBounds().getMaxX() - l.getBounds().getMinX(),b.getBounds().getMaxY() - t.getBounds().getMinY());
  }
default :
return null;
}
}
}

Fixed version (ground truth):
/** 
 * Returns rectangular screen area 
 */
public Rectangle2D getScreenArea(Window w,ScreenPos pos){
  Screen ps=Screen.getPrimary();
  if (this == MAIN)   return ps.getBounds();
  if (this == APP_WINDOW)   return getScreenForPoint(w.getX() + w.getWidth() / 2,w.getY() + w.getHeight() / 2).getBounds();
 else {
    List<Screen> ss=Screen.getScreens();
    Screen l=min(ss,ps,by(a -> a.getBounds().getMinX()));
    Screen r=max(ss,ps,by(a -> a.getBounds().getMaxX()));
switch (pos) {
case Screen_Bottom_Left:
case Screen_Top_Left:
      return l.getBounds();
case Screen_Bottom_Right:
case Screen_Top_Right:
    return r.getBounds();
case Screen_Center:
{
    Screen t=min(ss,ps,by(a -> a.getBounds().getMinY()));
    Screen b=max(ss,ps,by(a -> a.getBounds().getMaxY()));
    return new Rectangle2D(l.getBounds().getMinX(),t.getBounds().getMinY(),r.getBounds().getMaxX() - l.getBounds().getMinX(),b.getBounds().getMaxY() - t.getBounds().getMinY());
  }
default :
return null;
}
}
}
Program: 36582
Project: 36582
Buggy source:
public NodeCentricPos reverse(){
switch (this) {
case Center:
    return Center;
case UpLeft:
  return DownRight;
case UpCenter:
return DownCenter;
case UpRight:
return DownLeft;
case DownLeft:
return UpRight;
case DownCenter:
return UpCenter;
case DownRight:
return UpLeft;
case RightUp:
return LeftDown;
case RightCenter:
return LeftCenter;
case RightDown:
return LeftUp;
case LeftUp:
return RightDown;
case LeftCenter:
return RightCenter;
case LeftDown:
return RightUp;
default :
throw new AssertionError(this + "String_Node_Str");
}
}

Fixed version (ground truth):
public NodePos reverse(){
switch (this) {
case Center:
    return Center;
case UpLeft:
  return DownRight;
case UpCenter:
return DownCenter;
case UpRight:
return DownLeft;
case DownLeft:
return UpRight;
case DownCenter:
return UpCenter;
case DownRight:
return UpLeft;
case RightUp:
return LeftDown;
case RightCenter:
return LeftCenter;
case RightDown:
return LeftUp;
case LeftUp:
return RightDown;
case LeftCenter:
return RightCenter;
case LeftDown:
return RightUp;
default :
throw new AssertionError(this + "String_Node_Str");
}
}
Program: 36583
Project: 36583
Buggy source:
public static void launchComponent(File launcher){
  try {
    WidgetFactory wf=null;
    Component w=null;
    String wn=FileUtil.readFileLines(launcher).limit(1).findAny().orElse("String_Node_Str");
    wf=WidgetManager.getFactory(wn);
    if (wf != null)     w=wf.create();
    if (w == null) {
      try {
        w=(Component)App.INSTANCE.serialization.x.fromXML(launcher);
      }
 catch (      ClassCastException|StreamException ignored) {
        LOGGER.error("String_Node_Str",launcher);
      }
    }
    if (w == null) {
      wf=WidgetManager.getFactory(getName(launcher));
      if (wf != null)       w=wf.create();
    }
    if (w != null) {
      if (launching1st) {
        App.getWindow().setContent(w);
        launching1st=false;
      }
 else {
        showWindow(w);
      }
    }
  }
 catch (  Exception x) {
    LOGGER.error("String_Node_Str",x);
  }
}

Fixed version (ground truth):
public static void launchComponent(File launcher){
  try {
    WidgetFactory wf=null;
    Component w=null;
    String wn=FileUtil.readFileLines(launcher).limit(1).findAny().orElse("String_Node_Str");
    wf=WidgetManager.getFactory(wn);
    if (wf != null)     w=wf.create();
    if (w == null) {
      try {
        w=(Component)App.INSTANCE.serialization.x.fromXML(launcher);
      }
 catch (      ClassCastException|StreamException ignored) {
        LOGGER.error("String_Node_Str",launcher);
      }
    }
    if (w == null) {
      wf=WidgetManager.getFactory(getName(launcher));
      if (wf != null)       w=wf.create();
    }
    if (w != null) {
      if (launching1st) {
        App.getWindow().setContent(w);
        launching1st=false;
      }
 else {
        showWindow(w);
      }
    }
  }
 catch (  Exception x) {
    LOGGER.error("String_Node_Str",launcher,x);
  }
}
Program: 36585
Project: 36585
Buggy source:
public Subscription monitor(Consumer<? super T> action){
  monitors.add(action);
  if (getValue() != null)   action.accept(getValue());
  return () -> monitors.remove(action);
}

Fixed version (ground truth):
public Subscription monitor(Consumer<? super T> action){
  monitors.add(action);
  action.accept(getValue());
  return () -> monitors.remove(action);
}
Program: 36588
Project: 36588
Buggy source:
private void showWarnButton(boolean val){
  n.setRight(val ? warnB : null);
  warnB.setVisible(val);
}

Fixed version (ground truth):
private void showWarnButton(boolean val){
  n.setRight(val ? warnB : null);
  warnB.setVisible(val);
  if (val)   warnTooltip.setText(Parser.getError());
}
Program: 36589
Project: 36589
Buggy source:
@Override protected void generateValue(){
  if (inconsistent_state || converter == null)   return;
  conjuction=chain.stream().filter(g -> g.on.get()).map(g -> g.chained.getValue()).filter(ISNTØ).map(g -> converter.apply(g._2,g._1)).reduce(Predicate::and).orElse(isTRUE);
  if (onFilterChange != null)   onFilterChange.accept(conjuction);
}

Fixed version (ground truth):
@Override protected void generateValue(){
  if (inconsistent_state || converter == null)   return;
  conjuction=chain.stream().filter(g -> g.on.get()).map(g -> g.chained.getValue()).filter(ISNTØ).map(g -> converter.apply(g._2,g._1)).reduce(Predicate::and).orElse(ALL);
  if (onFilterChange != null)   onFilterChange.accept(conjuction);
}
Program: 36590
Project: 36590
Buggy source:
public PredicateChainItemNode(int i,Supplier<PredicateItemNode<F>> chainedFactory){
  super(i,chainedFactory);
  conjuction=isTRUE;
}

Fixed version (ground truth):
public PredicateChainItemNode(int i,Supplier<PredicateItemNode<F>> chainedFactory){
  super(i,chainedFactory);
  conjuction=ALL;
}
Program: 36591
Project: 36591
Buggy source:
public void clear(){
  empty=true;
  value=tuple(isTRUE,prefTypeSupplier.get()._3);
}

Fixed version (ground truth):
public void clear(){
  empty=true;
  value=tuple(ALL,prefTypeSupplier.get()._3);
}
Program: 36592
Project: 36592
Buggy source:
/** 
 * PRIVATE 
 */
private void updateComparator(Object ignored){
  Comparator<T> c=getSortOrder().stream().map(column -> {
    F f=(F)column.getUserData();
    int type=column.getSortType() == ASCENDING ? 1 : -1;
    return (Comparator<T>)(m1,m2) -> type * ((Comparable)m1.getField(f)).compareTo((m2.getField(f)));
  }
).reduce(Comparator::thenComparing).orElse((a,b) -> 0);
  itemsComparator.setValue(c);
}

Fixed version (ground truth):
/** 
 * PRIVATE 
 */
private void updateComparator(Object ignored){
  Comparator<T> c=getSortOrder().stream().map(column -> {
    F f=(F)column.getUserData();
    int type=column.getSortType() == ASCENDING ? 1 : -1;
    return (Comparator<T>)(m1,m2) -> type * ((Comparable)m1.getField(f)).compareTo((m2.getField(f)));
  }
).reduce(Comparator::thenComparing).orElse(SAME);
  itemsComparator.setValue(c);
}
Program: 36593
Project: 36593
Buggy source:
/** 
 * Sorts items using provided comparator. Any sort order is cleared.
 * @param comparator 
 */
public void sort(Comparator<T> comparator){
  getSortOrder().clear();
  allitems.sorted(comparator);
}

Fixed version (ground truth):
/** 
 * Sorts items using provided comparator. Any sort order is cleared.
 * @param comparator 
 */
public void sort(Comparator<T> comparator){
  getSortOrder().clear();
  allitems.sort(comparator);
}
Program: 36597
Project: 36597
Buggy source:
@FXML private void addFiles(){
  addNedit(false,false);
}

Fixed version (ground truth):
@FXML private void addFiles(){
  addNedit(editOnAdd.get(),false);
}
Program: 36598
Project: 36598
Buggy source:
@FXML private void addDirectory(){
  addNedit(false,true);
}

Fixed version (ground truth):
@FXML private void addDirectory(){
  addNedit(editOnAdd.get(),true);
}
Program: 36602
Project: 36602
Buggy source:
@Override public void init(){
  root.getChildren().setAll(table.getRoot(),optionPane);
  VBox.setVgrow(table.getRoot(),Priority.ALWAYS);
  InfoTable<PlaylistItem> infoL=new InfoTable(duration,table);
  infoL.textFactory=(all,list) -> {
    double d=list.stream().mapToDouble(PlaylistItem::getTimeMs).sum();
    return DEFAULT_TEXT_FACTORY.apply(all,list) + "String_Node_Str" + new FormattedDuration(d);
  }
;
  PlaylistManager.getItems().addListener(playlistitemsL);
  root.setOnScroll(Event::consume);
  table.addEventFilter(MOUSE_PRESSED,consumeOnSecondaryButton);
  table.addEventFilter(MOUSE_RELEASED,consumeOnSecondaryButton);
  addMenu.setText("String_Node_Str");
  remMenu.setText("String_Node_Str");
  selMenu.setText("String_Node_Str");
  orderMenu.setText("String_Node_Str");
  Icons.setIcon(addMenu,PLUS,"String_Node_Str","String_Node_Str");
  Icons.setIcon(remMenu,MINUS,"String_Node_Str","String_Node_Str");
  Icons.setIcon(selMenu,CROP,"String_Node_Str","String_Node_Str");
  Icons.setIcon(orderMenu,NAVICON,"String_Node_Str","String_Node_Str");
  Menu sortM=new Menu("String_Node_Str");
  for (  Field f : Field.values())   sortM.getItems().add(menuItem(f.toStringEnum(),() -> table.sortBy(f)));
  orderMenu.getItems().add(0,sortM);
}

Fixed version (ground truth):
@Override public void init(){
  root.getChildren().setAll(table.getRoot(),optionPane);
  VBox.setVgrow(table.getRoot(),Priority.ALWAYS);
  InfoTable<PlaylistItem> infoL=new InfoTable(duration,table);
  infoL.textFactory=(all,list) -> {
    if (list == null)     return "String_Node_Str";
    double d=list.stream().filter(isNotNULL).mapToDouble(PlaylistItem::getTimeMs).sum();
    return DEFAULT_TEXT_FACTORY.apply(all,list) + "String_Node_Str" + new FormattedDuration(d);
  }
;
  PlaylistManager.getItems().addListener(playlistitemsL);
  root.setOnScroll(Event::consume);
  table.addEventFilter(MOUSE_PRESSED,consumeOnSecondaryButton);
  table.addEventFilter(MOUSE_RELEASED,consumeOnSecondaryButton);
  addMenu.setText("String_Node_Str");
  remMenu.setText("String_Node_Str");
  selMenu.setText("String_Node_Str");
  orderMenu.setText("String_Node_Str");
  Icons.setIcon(addMenu,PLUS,"String_Node_Str","String_Node_Str");
  Icons.setIcon(remMenu,MINUS,"String_Node_Str","String_Node_Str");
  Icons.setIcon(selMenu,CROP,"String_Node_Str","String_Node_Str");
  Icons.setIcon(orderMenu,NAVICON,"String_Node_Str","String_Node_Str");
  Menu sortM=new Menu("String_Node_Str");
  for (  Field f : Field.values())   sortM.getItems().add(menuItem(f.toStringEnum(),() -> table.sortBy(f)));
  orderMenu.getItems().add(0,sortM);
}
Program: 36604
Project: 36604
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void showImages(List<File> img_files){
  if (img_files.isEmpty())   return;
  showImage(img_files.get(0));
  active_image=0;
  img_files.forEach(f -> addThumbnail(f));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void showImages(List<File> img_files){
  if (img_files.isEmpty())   return;
  showImage(img_files.get(0));
  active_image=0;
  img_files.forEach(this::addThumbnail);
}
Program: 36606
Project: 36606
Buggy source:
private void addNedit(boolean edit,boolean dir){
  Stream<File> files;
  if (dir) {
    File f=Enviroment.chooseFile("String_Node_Str",true,last_file,root.getScene().getWindow(),AudioFileFormat.filter(Use.APP));
    files=f == null ? Stream.empty() : getFilesAudio(f,Use.APP,Integer.MAX_VALUE);
    if (f != null)     last_file=f;
  }
 else {
    List<File> fs=Enviroment.chooseFiles("String_Node_Str",last_file,root.getScene().getWindow(),AudioFileFormat.filter(Use.APP));
    files=fs.stream();
    File f=files == null ? null : getCommonRoot(fs);
    if (f != null)     last_file=f;
  }
  if (files != null) {
    Task ts=runAsTask("String_Node_Str",() -> files.map(SimpleItem::new).collect(toList()),(success,result) -> {
      if (success) {
        BiConsumer<Boolean,List<Metadata>> onEnd=(succes,added) -> {
          if (succes & edit)           WidgetManager.use(TaggingFeature.class,NOLAYOUT,w -> w.read(added));
          hideInfo.restart();
        }
;
        Task t=MetadataReader.readAaddMetadata(result,onEnd,false);
        taskInfo.showNbind(t);
      }
 else {
        hideInfo.restart();
      }
    }
);
    taskInfo.showNbind(ts);
  }
}

Fixed version (ground truth):
private void addNedit(boolean edit,boolean dir){
  Stream<File> files;
  if (dir) {
    File f=Enviroment.chooseFile("String_Node_Str",true,last_file,root.getScene().getWindow(),AudioFileFormat.filter(Use.APP));
    files=f == null ? Stream.empty() : getFilesAudio(f,Use.APP,Integer.MAX_VALUE);
    if (f != null)     last_file=f;
  }
 else {
    List<File> fs=Enviroment.chooseFiles("String_Node_Str",last_file,root.getScene().getWindow(),AudioFileFormat.filter(Use.APP));
    files=fs.stream();
    File f=files == null ? null : getCommonRoot(fs);
    if (f != null)     last_file=f;
  }
  addNeditDo(files,edit);
}
Program: 36607
Project: 36607
Buggy source:
@Override public void close(){
  monitor1.unsubscribe();
  monitor2.unsubscribe();
  monitor3.unsubscribe();
}

Fixed version (ground truth):
@Override public void close(){
  d1.unsubscribe();
  d2.unsubscribe();
  d3.unsubscribe();
}
Program: 36610
Project: 36610
Buggy source:
@Override public void close(){
  playingItemMonitoring.unsubscribe();
  PLAYBACK.statusProperty().removeListener(statusListener);
  PLAYBACK.loopModeProperty().removeListener(loopModeListener);
  PLAYBACK.muteProperty().removeListener(muteListener);
  PLAYBACK.totalTimeProperty().removeListener(totalTimeListener);
  PLAYBACK.realTimeProperty().removeListener(realTimeListener);
  PLAYBACK.currentTimeProperty().removeListener(currTimeListener);
  balance.balanceProperty().unbind();
  volume.valueProperty().unbind();
  seeker.unbindTime();
}

Fixed version (ground truth):
@Override public void close(){
  playingItemMonitoring.unsubscribe();
  PLAYBACK.statusProperty().removeListener(statusListener);
  PLAYBACK.loopModeProperty().removeListener(loopModeListener);
  PLAYBACK.muteProperty().removeListener(muteListener);
  PLAYBACK.totalTimeProperty().removeListener(totalTimeListener);
  PLAYBACK.realTimeProperty().removeListener(realTimeListener);
  PLAYBACK.currentTimeProperty().removeListener(currTimeListener);
  balance.balanceProperty().unbind();
  volume.valueProperty().unbind();
  seeker.unbindTime();
  d1.unsubscribe();
}
Program: 36612
Project: 36612
Buggy source:
@Override public void close(){
  d1.unsubscribe();
  d2.unsubscribe();
  d3.unsubscribe();
  d4.unsubscribe();
  d5.unsubscribe();
  seeker.unbindTime();
  volume.valueProperty().unbind();
}

Fixed version (ground truth):
@Override public void close(){
  ds.forEach(Subscription::unsubscribe);
  seeker.unbindTime();
  volume.valueProperty().unbind();
}
Program: 36616
Project: 36616
Buggy source:
private void clear(){
  rater.setRating(0d);
  title.setText("String_Node_Str");
  track.setText("String_Node_Str");
  disc.setText("String_Node_Str");
  gap1.setText("String_Node_Str");
  artist.setText("String_Node_Str");
  album.setText("String_Node_Str");
  album_artist.setText("String_Node_Str");
  year.setText("String_Node_Str");
  genre.setText("String_Node_Str");
  composer.setText("String_Node_Str");
  publisher.setText("String_Node_Str");
  gap2.setText("String_Node_Str");
  rating.setText("String_Node_Str");
  playcount.setText("String_Node_Str");
  comment.setText("String_Node_Str");
  category.setText("String_Node_Str");
  gap3.setText("String_Node_Str");
  filesize.setText("String_Node_Str");
  filename.setText("String_Node_Str");
  format.setText("String_Node_Str");
  bitrate.setText("String_Node_Str");
  encoding.setText("String_Node_Str");
  location.setText("String_Node_Str");
}

Fixed version (ground truth):
private void clear(){
  rater.rating.set(0d);
  title.setText("String_Node_Str");
  track.setText("String_Node_Str");
  disc.setText("String_Node_Str");
  gap1.setText("String_Node_Str");
  artist.setText("String_Node_Str");
  album.setText("String_Node_Str");
  album_artist.setText("String_Node_Str");
  year.setText("String_Node_Str");
  genre.setText("String_Node_Str");
  composer.setText("String_Node_Str");
  publisher.setText("String_Node_Str");
  gap2.setText("String_Node_Str");
  rating.setText("String_Node_Str");
  playcount.setText("String_Node_Str");
  comment.setText("String_Node_Str");
  category.setText("String_Node_Str");
  gap3.setText("String_Node_Str");
  filesize.setText("String_Node_Str");
  filename.setText("String_Node_Str");
  format.setText("String_Node_Str");
  bitrate.setText("String_Node_Str");
  encoding.setText("String_Node_Str");
  location.setText("String_Node_Str");
}
Program: 36617
Project: 36617
Buggy source:
private List<Metadata> filerList(List<Metadata> list){
  List<Metadata> l;
  if (table.getSelectionModel().isEmpty()) {
    l=list;
  }
 else {
    Predicate<Metadata> p=table.getSelectedItems().stream().map(MetadataGroup::toMetadataPredicate).reduce(Predicate::or).orElse(isFALSE);
    l=list.stream().filter(p).collect(toList());
  }
  return l;
}

Fixed version (ground truth):
private List<Metadata> filerList(List<Metadata> list){
  List<MetadataGroup> mgs=table.getSelectionModel().isEmpty() ? table.getItems() : table.getSelectedItems();
  Predicate<Metadata> p=mgs.stream().map(MetadataGroup::toMetadataPredicate).reduce(Predicate::or).orElse(isFALSE);
  return list.stream().filter(p).collect(toList());
}
Program: 36619
Project: 36619
Buggy source:
/** 
 * Set skin by its name (filename of the stylesheet). Use "" to set default skin. <p> Fires skin change event.
 * @param skincss 
 */
default void setSkinCurrent(String skincss){
  if (skincss.isEmpty()) {
    getSkinOwner().getStylesheets().clear();
    skinIndexProperty().set(-1);
  }
 else {
    List<String> skins=getSkins();
    getSkinOwner().getStylesheets().setAll(skincss);
    skinIndexProperty().set(skins.indexOf(skincss));
  }
  if (getOnSkinChanged() != null)   getOnSkinChanged().accept(skincss);
  System.out.println(skincss);
}

Fixed version (ground truth):
/** 
 * Set skin by its name (filename of the stylesheet). Use "" to set default skin. <p> Fires skin change event.
 * @param skincss 
 */
default void setSkinCurrent(String skincss){
  if (skincss.isEmpty()) {
    getSkinOwner().getStylesheets().clear();
    skinIndexProperty().set(-1);
  }
 else {
    List<String> skins=getSkins();
    getSkinOwner().getStylesheets().setAll(skincss);
    skinIndexProperty().set(skins.indexOf(skincss));
  }
  if (getOnSkinChanged() != null)   getOnSkinChanged().accept(skincss);
}
Program: 36620
Project: 36620
Buggy source:
public Icon addIcon(FontAwesomeIconName icon,String text,String descriptn,boolean drag_activated){
  Icon l=new Icon(icon,icon_size,descriptn);
  l.setContentDisplay(ContentDisplay.TOP);
  l.setFont(new Font(l.getFont().getName(),13));
  l.setText(text);
  l.scaleYProperty().bind(l.scaleXProperty());
  if (drag_activated) {
    l.addEventHandler(DRAG_ENTERED,e -> description.setText(descriptn));
    l.addEventHandler(DRAG_EXITED,e -> description.setText("String_Node_Str"));
    l.addEventHandler(DRAG_ENTERED,e -> l.setScaleX(1.1));
    l.addEventHandler(DRAG_EXITED,e -> l.setScaleX(1));
  }
 else {
    l.addEventHandler(MOUSE_ENTERED,e -> description.setText(descriptn));
    l.addEventHandler(MOUSE_EXITED,e -> description.setText("String_Node_Str"));
    l.addEventHandler(MOUSE_ENTERED,e -> l.setScaleX(1.1));
    l.addEventHandler(MOUSE_EXITED,e -> l.setScaleX(1));
  }
  actionBox.getChildren().add(l);
  return l;
}

Fixed version (ground truth):
public Icon addIcon(FontAwesomeIconName icon,String text,String descriptn,boolean drag_activated){
  Icon l=new Icon(icon,icon_size);
  l.setContentDisplay(CENTER);
  l.setFont(new Font(l.getFont().getName(),13));
  l.setText(text);
  l.scaleYProperty().bind(l.scaleXProperty());
  if (drag_activated) {
    l.addEventHandler(DRAG_ENTERED,e -> description.setText(descriptn));
    l.addEventHandler(DRAG_EXITED,e -> description.setText("String_Node_Str"));
    l.addEventHandler(DRAG_ENTERED,e -> l.setScaleX(1.1));
    l.addEventHandler(DRAG_EXITED,e -> l.setScaleX(1));
  }
 else {
    l.addEventHandler(MOUSE_ENTERED,e -> description.setText(descriptn));
    l.addEventHandler(MOUSE_EXITED,e -> description.setText("String_Node_Str"));
    l.addEventHandler(MOUSE_ENTERED,e -> l.setScaleX(1.1));
    l.addEventHandler(MOUSE_EXITED,e -> l.setScaleX(1));
  }
  actionBox.getChildren().add(l);
  return l;
}
Program: 36621
Project: 36621
Buggy source:
@Override public void onTick(TickEvent event){
  if (this.entity.isDead) {
    this.repeat=false;
  }
 else {
    Logging.debug("String_Node_Str" + this.effect.getEffectName() + "String_Node_Str"+ this.entity.getName());
    this.entity.addPotionEffect(new PotionEffect(this.effect));
  }
}

Fixed version (ground truth):
@Override public void onTick(TickEvent event){
  if (this.entity.isDead) {
    this.repeat=false;
  }
 else {
    Logging.debug("String_Node_Str" + effect.getEffectName() + "String_Node_Str"+ entity.getName());
    this.entity.addPotionEffect(new PotionEffect(this.effect));
  }
}
Program: 36622
Project: 36622
Buggy source:
public void onLivingHurtEvent(LivingHurtEvent event){
  if (event.source.getEntity() instanceof EntityPlayerMP) {
    EntityPlayerMP player=(EntityPlayerMP)event.source.getEntity();
    PlayerData playerData=PlayerStore.getPlayer(player);
    ArrayList<Slug> slugList=PerkStore.getSlugs(event.entity);
    ArrayList<EntitySkill> skillStore=SkillStore.getInstance().getEntitySkill();
    Boolean requiresPerk=false;
    if (slugList != null) {
      requiresPerk=true;
    }
    for (    EntitySkill skill : skillStore) {
      for (      Triplet entry : skill.exp) {
        if (Utils.MatchObject(event.entity,-1,entry.object,-1)) {
          if (requiresPerk) {
            if (!PlayerHandler.hasPerk(playerData,slugList) || !PlayerHandler.isWielding(skill,player)) {
              PlayerHandler.taskFail(player);
              event.ammount=1;
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void onLivingHurtEvent(LivingHurtEvent event){
  if (event.source.getEntity() instanceof EntityPlayerMP) {
    EntityPlayerMP player=(EntityPlayerMP)event.source.getEntity();
    PlayerData playerData=PlayerStore.getPlayer(player);
    ArrayList<Slug> slugList=PerkStore.getSlugs(event.entity);
    ArrayList<EntitySkill> skillStore=SkillStore.getInstance().getEntitySkill();
    Boolean requiresPerk=false;
    if (slugList != null) {
      requiresPerk=true;
    }
    for (    EntitySkill skill : skillStore) {
      for (      Triplet entry : skill.exp) {
        if (Utils.MatchEntity(event.entity,entry)) {
          if (requiresPerk) {
            if (!PlayerHandler.hasPerk(playerData,slugList) || !PlayerHandler.isWielding(skill,player)) {
              PlayerHandler.taskFail(player);
              event.ammount=1;
            }
          }
        }
      }
    }
  }
}
Program: 36624
Project: 36624
Buggy source:
public void touchUp(){
  searchObject();
}

Fixed version (ground truth):
public void touchUp(){
  searchObject();
  getSlug();
}
Program: 36625
Project: 36625
Buggy source:
@Override public void touchUp(){
  this.initTool();
  this.initName();
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Block)Block.blockRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void touchUp(){
  this.initTool();
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Block)Block.blockRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}
Program: 36626
Project: 36626
Buggy source:
@Override public void touchUp(){
  this.initTool();
  this.initName();
  ArrayList<Triplet> initalised=new ArrayList<Triplet>();
  for (  Triplet object : exp) {
    object.object=(Class)EntityList.stringToClassMapping.get(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void touchUp(){
  this.initTool();
  ArrayList<Triplet> initalised=new ArrayList<Triplet>();
  for (  Triplet object : exp) {
    object.object=(Class)EntityList.stringToClassMapping.get(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}
Program: 36627
Project: 36627
Buggy source:
@Override public void touchUp(){
  this.initName();
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Item)Item.itemRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void touchUp(){
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Item)Item.itemRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}
Program: 36628
Project: 36628
Buggy source:
public static boolean hasPerk(PlayerData player,ArrayList<Slug> slugList){
  for (  Slug slug : slugList) {
    if (player.getPerkList().contains(slug)) {
      return true;
    }
    return false;
  }
  return false;
}

Fixed version (ground truth):
public static boolean hasPerk(PlayerData player,ArrayList<Slug> slugList){
  for (  Slug slug : slugList) {
    for (    Slug current : player.getPerkList()) {
      if (slug.getSlug().equals(current.getSlug()))       return true;
    }
  }
  return false;
}
Program: 36629
Project: 36629
Buggy source:
@SubscribeEvent public void onPlayerLoggedInEvent(PlayerLoggedInEvent event){
  new DataSave().onPlayerLoggedInEvent(event);
  new PlayerHandler().reactivatePerks(event);
}

Fixed version (ground truth):
@SubscribeEvent public void onPlayerLoggedInEvent(PlayerLoggedInEvent event){
  new DataSave().onPlayerLoggedInEvent(event);
  new PlayerHandler().reactivatePerks(event);
  new PlayerHandler().checkPlayerSkills(event);
}
Program: 36631
Project: 36631
Buggy source:
@Override public void touchUp(){
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Block)Block.blockRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void touchUp(){
  this.initTool();
  ArrayList<Quad> initalised=new ArrayList<Quad>();
  for (  Quad object : exp) {
    object.object=(Block)Block.blockRegistry.getObject(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}
Program: 36632
Project: 36632
Buggy source:
@Override public void touchUp(){
  ArrayList<Triplet> initalised=new ArrayList<Triplet>();
  for (  Triplet object : exp) {
    object.object=(Class)EntityList.stringToClassMapping.get(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void touchUp(){
  this.initTool();
  ArrayList<Triplet> initalised=new ArrayList<Triplet>();
  for (  Triplet object : exp) {
    object.object=(Class)EntityList.stringToClassMapping.get(object.name);
    if (object.object != null) {
      Logging.debug(object.name + "String_Node_Str");
      initalised.add(object);
    }
 else {
      Logging.error(object.name + "String_Node_Str");
    }
  }
}
Program: 36633
Project: 36633
Buggy source:
public void initTool(){
  toolClass=ToolRegistry.getEntry(tool);
}

Fixed version (ground truth):
public void initTool(){
  this.toolClass=ToolRegistry.getEntry(tool);
}