nus-yam/ex-repair huggingface dataset:
Program: 85663
Project: 85663
Buggy source:
/** 
 * Reads the XQuery string from the resource file specified
 * @param resource the {@link Resource} instance of the file that contains the XQuerycurrently only classpath and file resources are supported
 * @return the XQuery string from the resource specified
 */
public static String readXQueryFromResource(Resource resource){
  Assert.notNull(resource,"String_Node_Str");
  Assert.isTrue(resource.exists(),"String_Node_Str");
  Assert.isTrue(resource.isReadable(),"String_Node_Str");
  try {
    URL url=resource.getURL();
    InputStream inStream=url.openStream();
    BufferedReader reader=new BufferedReader(new InputStreamReader(inStream));
    String line=reader.readLine();
    StringBuilder builder=new StringBuilder();
    while (line != null) {
      builder.append(line).append("String_Node_Str");
      line=reader.readLine();
    }
    String xQuery=builder.toString();
    reader.close();
    return xQuery;
  }
 catch (  IOException e) {
    throw new MessagingException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Reads the XQuery string from the resource file specified
 * @param resource the {@link Resource} instance of the file that contains the XQuerycurrently only classpath and file resources are supported
 * @return the XQuery string from the resource specified
 */
public static String readXQueryFromResource(Resource resource){
  Assert.notNull(resource,"String_Node_Str");
  Assert.isTrue(resource.exists(),"String_Node_Str");
  Assert.isTrue(resource.isReadable(),"String_Node_Str");
  BufferedReader reader=null;
  try {
    URL url=resource.getURL();
    InputStream inStream=url.openStream();
    reader=new BufferedReader(new InputStreamReader(inStream));
    String line=reader.readLine();
    StringBuilder builder=new StringBuilder();
    while (line != null) {
      builder.append(line).append("String_Node_Str");
      line=reader.readLine();
    }
    String xQuery=builder.toString();
    reader.close();
    return xQuery;
  }
 catch (  IOException e) {
    throw new MessagingException("String_Node_Str",e);
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
}
Program: 85664
Project: 85664
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected Object doTransform(Message<?> message) throws Exception {
  Object transformed;
  List<Object> queryResult;
  if (resultType != null) {
    queryResult=(List<Object>)executor.execute(message,resultType);
  }
 else {
    queryResult=executor.execute(message,resultMapper);
  }
  if (queryResult != null && queryResult.size() == 1) {
    transformed=queryResult.get(0);
  }
 else {
    transformed=queryResult;
  }
  return transformed;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected Object doTransform(Message<?> message){
  Object transformed;
  List<Object> queryResult;
  if (resultType != null) {
    queryResult=(List<Object>)executor.execute(message,resultType);
  }
 else {
    queryResult=executor.execute(message,resultMapper);
  }
  if (queryResult != null && queryResult.size() == 1) {
    transformed=queryResult.get(0);
  }
 else {
    transformed=queryResult;
  }
  return transformed;
}
Program: 85665
Project: 85665
Buggy source:
private void notifyClose(){
  for (  FanViewListener l : observers) {
    l.onFanViewClose();
  }
}

Fixed version (ground truth):
private void notifyClose(){
  if (observers != null) {
    for (    FanViewListener l : observers) {
      l.onFanViewClose();
    }
  }
}
Program: 85666
Project: 85666
Buggy source:
private void notifyOpen(){
  for (  FanViewListener l : observers) {
    l.onFanViewOpen();
  }
}

Fixed version (ground truth):
private void notifyOpen(){
  if (observers != null) {
    for (    FanViewListener l : observers) {
      l.onFanViewOpen();
    }
  }
}
Program: 85667
Project: 85667
Buggy source:
public boolean isOpen(){
  return mFanView.getVisibility() == VISIBLE;
}

Fixed version (ground truth):
public boolean isOpen(){
  return mFanView.getVisibility() == VISIBLE && !isClosing;
}
Program: 85668
Project: 85668
Buggy source:
public void showMenu(){
  if (mFanView.getVisibility() == GONE) {
    mFanView.setVisibility(VISIBLE);
    mTintView.setVisibility(VISIBLE);
    openAnimation=new FanAnimation(0,px,TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,-20,getResources().getDisplayMetrics()),0,animDur);
    openAnimation.setFillAfter(true);
    if (fade) {
      alphaAnimation=new AlphaAnimation(0.8f,0.0f);
      alphaAnimation.setDuration((int)0.75 * animDur);
      alphaAnimation.setFillAfter(true);
      mTintView.startAnimation(alphaAnimation);
    }
 else {
      mTintView.setVisibility(GONE);
    }
    mMainView.startAnimation(openAnimation);
  }
 else {
    closeAnimation=new FanAnimation(px,0,0,TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,-20,getResources().getDisplayMetrics()),animDur);
    closeAnimation.setFillAfter(true);
    closeAnimation.setAnimationListener(new AnimationListener(){
      public void onAnimationStart(      Animation animation){
      }
      public void onAnimationRepeat(      Animation animation){
      }
      public void onAnimationEnd(      Animation animation){
        mFanView.setVisibility(GONE);
        mTintView.setVisibility(GONE);
      }
    }
);
    if (fade) {
      alphaAnimation=new AlphaAnimation(0.0f,0.8f);
      alphaAnimation.setDuration(750);
      alphaAnimation.setFillAfter(true);
      mTintView.startAnimation(alphaAnimation);
    }
 else {
      mTintView.setVisibility(GONE);
    }
    mMainView.startAnimation(closeAnimation);
  }
}

Fixed version (ground truth):
public void showMenu(){
  if (mFanView.getVisibility() == GONE || isClosing) {
    mFanView.setVisibility(VISIBLE);
    mTintView.setVisibility(VISIBLE);
    openAnimation=new FanAnimation(0,px,TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,-20,getResources().getDisplayMetrics()),0,animDur);
    openAnimation.setFillAfter(true);
    if (fade) {
      alphaAnimation=new AlphaAnimation(0.8f,0.0f);
      alphaAnimation.setDuration((int)0.75 * animDur);
      alphaAnimation.setFillAfter(true);
      mTintView.startAnimation(alphaAnimation);
    }
 else {
      mTintView.setVisibility(GONE);
    }
    mMainView.startAnimation(openAnimation);
    isClosing=false;
  }
 else   if (!isClosing && isOpen()) {
    closeAnimation=new FanAnimation(px,0,0,TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,-20,getResources().getDisplayMetrics()),animDur);
    closeAnimation.setFillAfter(true);
    closeAnimation.setAnimationListener(new AnimationListener(){
      public void onAnimationStart(      Animation animation){
      }
      public void onAnimationRepeat(      Animation animation){
      }
      public void onAnimationEnd(      Animation animation){
        mFanView.setVisibility(GONE);
        mTintView.setVisibility(GONE);
        isClosing=false;
      }
    }
);
    if (fade) {
      alphaAnimation=new AlphaAnimation(0.0f,0.8f);
      alphaAnimation.setDuration(750);
      alphaAnimation.setFillAfter(true);
      mTintView.startAnimation(alphaAnimation);
    }
 else {
      mTintView.setVisibility(GONE);
    }
    mMainView.startAnimation(closeAnimation);
    isClosing=true;
  }
}
Program: 85669
Project: 85669
Buggy source:
public void onAnimationEnd(Animation animation){
  mFanView.setVisibility(GONE);
  mTintView.setVisibility(GONE);
}

Fixed version (ground truth):
public void onAnimationEnd(Animation animation){
  mFanView.setVisibility(GONE);
  mTintView.setVisibility(GONE);
  isClosing=false;
}
Program: 85670
Project: 85670
Buggy source:
public Field[] getFields();

Fixed version (ground truth):
public List<Field> getFields();
Program: 85671
Project: 85671
Buggy source:
public Select get(){
  return new Select(view,Select.SelectMethod.DISTINCT,fields);
}

Fixed version (ground truth):
public Select get(){
  return new Select(view,Select.SelectMethod.DISTINCT,fields.toArray(new Field[fields.size()]));
}
Program: 85672
Project: 85672
Buggy source:
public Field[] getFields(){
  return new Field[]{PATH,ALBUM_ART_PATH};
}

Fixed version (ground truth):
public List<Field> getFields(){
  return Arrays.asList(new Field[]{PATH,ALBUM_ART_PATH});
}
Program: 85673
Project: 85673
Buggy source:
public Field[] getFields(){
  return new Field[]{TITLE};
}

Fixed version (ground truth):
public List<Field> getFields(){
  return Arrays.asList(new Field[]{TITLE});
}
Program: 85674
Project: 85674
Buggy source:
public static <T>T[] concatWith(T[] arrays,T... elements){
  return concat(arrays,elements);
}

Fixed version (ground truth):
public static <T>List<T> concatWith(List<T> arrays,T... elements){
  return concat(arrays,Arrays.asList(elements));
}
Program: 85675
Project: 85675
Buggy source:
@SuppressWarnings({"String_Node_Str"}) public static <T>T[] concat(T[]... arrays){
  int resultLength=0;
  for (  T[] array : arrays) {
    resultLength+=array.length;
  }
  T[] result=(T[])new Object[resultLength];
  int pos=0;
  for (  T[] array : arrays) {
    System.arraycopy(array,0,result,pos,array.length);
    pos+=array.length;
  }
  return result;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) public static <T>List<T> concat(List<T>... lists){
  List<T> result=new ArrayList<T>();
  for (  List<T> list : lists) {
    result.addAll(list);
  }
  return result;
}
Program: 85676
Project: 85676
Buggy source:
public void add(final T object){
  if (allowsDuplicates || !objects.contains(object)) {
    activity.runOnUiThread(new Runnable(){
      public void run(){
        objects.add(object);
        Collections.sort(objects,new FormattedInstanceComparator(formatter));
        notifyDataSetChanged();
      }
    }
);
  }
}

Fixed version (ground truth):
public void add(final T object){
  if (allowsDuplicates || !objects.contains(object)) {
    activity.runOnUiThread(new Runnable(){
      public void run(){
        if (allowsDuplicates || !objects.contains(object)) {
          objects.add(object);
          Collections.sort(objects,new FormattedInstanceComparator(formatter));
          notifyDataSetChanged();
        }
      }
    }
);
  }
}
Program: 85677
Project: 85677
Buggy source:
private void resetLastTrack(){
  String lastTrack=tp.playlist.preferences.get(Keys.LAST_TRACK_PLAYED);
  Track restoredTrack=null;
  if (!Shorty.isVoid(lastTrack)) {
    restoredTrack=tp.playlist.getTrack(lastTrack);
  }
  if (restoredTrack == null) {
    tp.player.change(tp.playlist.getNext(playOrderStrategy,null));
  }
 else {
    tp.player.change(restoredTrack);
    tp.player.goToMillis(tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME));
  }
}

Fixed version (ground truth):
private void resetLastTrack(){
  String lastTrack=tp.playlist.preferences.get(Keys.LAST_TRACK_PLAYED);
  Track restoredTrack=null;
  if (!Shorty.isVoid(lastTrack)) {
    restoredTrack=tp.playlist.getTrack(lastTrack);
  }
  if (restoredTrack == null) {
    tp.player.change(tp.playlist.getNext(playOrderStrategy,null));
  }
 else {
    tp.player.change(restoredTrack);
    if (tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME) != null) {
      tp.player.goToMillis(tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME));
    }
 else {
      tp.player.goToMillis(0);
    }
  }
}
Program: 85678
Project: 85678
Buggy source:
private void resetLastTrack(){
  String lastTrack=tp.playlist.preferences.get(Keys.LAST_TRACK_PLAYED);
  Track restoredTrack=null;
  if (!Shorty.isVoid(lastTrack)) {
    restoredTrack=tp.playlist.getTrack(lastTrack);
  }
  if (restoredTrack == null) {
    tp.player.change(tp.playlist.getNext(playOrderStrategy,null));
  }
 else {
    tp.player.change(restoredTrack);
    tp.player.goToMillis(tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME));
  }
}

Fixed version (ground truth):
private void resetLastTrack(){
  String lastTrack=tp.playlist.preferences.get(Keys.LAST_TRACK_PLAYED);
  Track restoredTrack=null;
  if (!Shorty.isVoid(lastTrack)) {
    restoredTrack=tp.playlist.getTrack(lastTrack);
  }
  if (restoredTrack == null) {
    tp.player.change(tp.playlist.getNext(playOrderStrategy,null));
  }
 else {
    tp.player.change(restoredTrack);
    if (tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME) != null) {
      tp.player.goToMillis(tp.playlist.preferences.get(Keys.EXIT_PLAY_TIME));
    }
 else {
      tp.player.goToMillis(0);
    }
  }
}
Program: 85679
Project: 85679
Buggy source:
@Override protected void onListItemClick(ListView l,View v,int position,long id){
  Track trackSelected=fileChooser.choose((String)l.getItemAtPosition(position));
  if (trackSelected != null) {
    tp.player.play(trackSelected);
    SwitchToNowPlayingSlide();
  }
}

Fixed version (ground truth):
@Override protected void onListItemClick(ListView l,View v,int position,long id){
  Track trackSelected=fileChooser.choose((Instance)l.getItemAtPosition(position));
  if (trackSelected != null) {
    tp.player.play(trackSelected);
    SwitchToNowPlayingSlide();
  }
}
Program: 85680
Project: 85680
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
public String getName(){
  return Shorty.isVoid(id) ? EMPTY_REPLACMENT : id;
}
Program: 85681
Project: 85681
Buggy source:
@Override public int hashCode(){
  return name.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return id.hashCode();
}
Program: 85682
Project: 85682
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Album album=(Album)o;
  return name.equals(album.name);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Album album=(Album)o;
  return id.equals(album.id);
}
Program: 85683
Project: 85683
Buggy source:
public Album(String name){
  this.name=Shorty.isVoid(name) ? EMPTY_REPLACMENT : name;
}

Fixed version (ground truth):
public Album(String id){
  this.id=id;
}
Program: 85684
Project: 85684
Buggy source:
public Artist(String name){
  this.name=Shorty.isVoid(name) ? EMPTY_REPLACMENT : name;
}

Fixed version (ground truth):
public Artist(String id){
  this.id=id;
}
Program: 85685
Project: 85685
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
public String getName(){
  return Shorty.isVoid(id) ? EMPTY_REPLACMENT : id;
}
Program: 85686
Project: 85686
Buggy source:
@Override public int hashCode(){
  return name.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return id.hashCode();
}
Program: 85687
Project: 85687
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Artist artist=(Artist)o;
  return name.equals(artist.name);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Artist artist=(Artist)o;
  return id.equals(artist.id);
}
Program: 85688
Project: 85688
Buggy source:
public List<String> getArtistList(Filter filter){
  return getList(filter,Tables.TRACKS.ARTIST);
}

Fixed version (ground truth):
public List<Artist> getArtistList(Filter filter){
  return getList(filter,Tables.TRACKS.ARTIST,new ArtistCreator());
}
Program: 85689
Project: 85689
Buggy source:
private <I,T>List<String> getList(Filter filter,FieldPersistable<I,T> field){
  return OperationExecutor.execute(this,new QuerySqlite<List<String>>(filter,new FieldOrder<I,T>(field,SortOrder.ASC),new MappingDistinct<String>(Tables.TRACKS,field,new CreatorForListSqlite<String>(new StringCreator("String_Node_Str")))));
}

Fixed version (ground truth):
private <I,T,Z>List<I> getList(Filter filter,FieldPersistable<Z,T> field,Creator<I,Cursor> creator){
  return OperationExecutor.execute(this,new QuerySqlite<List<I>>(filter,new FieldOrder<Z,T>(field,SortOrder.ASC),new MappingDistinct<I>(Tables.TRACKS,field,new CreatorForListSqlite<I>(creator))));
}
Program: 85690
Project: 85690
Buggy source:
public List<String> getTrackList(Filter filter){
  return getList(filter,Tables.TRACKS.TITLE);
}

Fixed version (ground truth):
public List<TrackDigest> getTrackList(Filter filter){
  return getList(filter,Tables.TRACKS.TITLE,new Creator<TrackDigest,Cursor>(){
    public TrackDigest create(    Cursor source){
      return new TrackDigest(source.getString(source.getColumnIndex(Tables.TRACKS.TITLE.getName())));
    }
  }
);
}
Program: 85691
Project: 85691
Buggy source:
public List<String> getGenreList(Filter filter){
  return getList(filter,Tables.TRACKS.GENRE);
}

Fixed version (ground truth):
public List<Genre> getGenreList(Filter filter){
  return getList(filter,Tables.TRACKS.GENRE,new GenreCreator());
}
Program: 85692
Project: 85692
Buggy source:
public List<String> getAlbumList(Filter filter){
  return getList(filter,Tables.TRACKS.ALBUM);
}

Fixed version (ground truth):
public List<Album> getAlbumList(Filter filter){
  return getList(filter,Tables.TRACKS.ALBUM,new AlbumCreator());
}
Program: 85693
Project: 85693
Buggy source:
public ContentValues create(Track track){
  final ContentValues values=new ContentValues();
  values.put(Tables.TRACKS.TITLE.getName(),track.GetTitle());
  values.put(Tables.TRACKS.NUMBER.getName(),track.GetNumber());
  values.put(Tables.TRACKS.ARTIST.getName(),track.GetArtist().getName());
  values.put(Tables.TRACKS.ALBUM.getName(),track.GetAlbum().getName());
  values.put(Tables.TRACKS.GENRE.getName(),track.GetGenre().getId());
  values.put(Tables.TRACKS.LENGTH.getName(),track.GetLength());
  values.put(Tables.TRACKS.SRC.getName(),track.GetSrc());
  values.put(Tables.TRACKS.ROOTSRC.getName(),track.GetRootSrc());
  values.put(Tables.TRACKS.ALBUMART.getName(),track.albumArt());
  return values;
}

Fixed version (ground truth):
public ContentValues create(Track track){
  final ContentValues values=new ContentValues();
  values.put(Tables.TRACKS.TITLE.getName(),track.GetTitle());
  values.put(Tables.TRACKS.NUMBER.getName(),track.GetNumber());
  values.put(Tables.TRACKS.ARTIST.getName(),track.GetArtist().getId());
  values.put(Tables.TRACKS.ALBUM.getName(),track.GetAlbum().getId());
  values.put(Tables.TRACKS.GENRE.getName(),track.GetGenre().getId());
  values.put(Tables.TRACKS.LENGTH.getName(),track.GetLength());
  values.put(Tables.TRACKS.SRC.getName(),track.GetSrc());
  values.put(Tables.TRACKS.ROOTSRC.getName(),track.GetRootSrc());
  values.put(Tables.TRACKS.ALBUMART.getName(),track.albumArt());
  return values;
}
Program: 85694
Project: 85694
Buggy source:
private void SetupApplication(){
  tp=(TurtlePlayer)getApplication();
  tp.db=new TurtleDatabase(tp.getApplicationContext());
  tp.playlist=new Playlist(tp.getApplicationContext(),tp.db);
  fileChooser=new FileChooser(FileChooser.Mode.Track,tp.db,this);
  standartPlayOrderStrategy=new PlayOrderSorted(tp.db,tp.playlist);
  shufflePlayOrderStrategy=new PlayOrderRandom(tp.db,tp.playlist);
  playOrderStrategy=tp.playlist.preferences.get(Keys.SHUFFLE) ? shufflePlayOrderStrategy : standartPlayOrderStrategy;
}

Fixed version (ground truth):
private void SetupApplication(){
  tp=(TurtlePlayer)getApplication();
  tp.db=new TurtleDatabase(tp.getApplicationContext());
  tp.playlist=new Playlist(tp.getApplicationContext(),tp.db);
  fileChooser=new FileChooser(FileChooser.Mode.Track,tp.db,this);
  standartPlayOrderStrategy=new PlayOrderSorted(tp.db,tp.playlist);
  shufflePlayOrderStrategy=new PlayOrderRandom(tp.db,tp.playlist);
  playOrderStrategy=tp.playlist.preferences.get(Keys.SHUFFLE) ? shufflePlayOrderStrategy : standartPlayOrderStrategy;
  this.registerReceiver(new BroadcastsHandler(),new IntentFilter(Intent.ACTION_HEADSET_PLUG));
}
Program: 85695
Project: 85695
Buggy source:
public Select get(){
  Select select=new Select(table);
  select.setOrderClause(new OrderClausePartRandom());
  return select;
}

Fixed version (ground truth):
public Select get(){
  Select select=new Select(table);
  select.setOrderClause(new OrderClauseRandom());
  return select;
}
Program: 85696
Project: 85696
Buggy source:
public static String getSeparatedList(String separator,String... values){
  String result="String_Node_Str";
  for (  String value : values) {
    result+=value + separator;
  }
  return removeLast(result,separator);
}

Fixed version (ground truth):
public static String getSeparatedList(String separator,SqlFragment... fragments){
  String result="String_Node_Str";
  for (  SqlFragment fragment : fragments) {
    result+=fragment.toSql() + separator;
  }
  return removeLast(result,separator);
}
Program: 85697
Project: 85697
Buggy source:
public String toSql(){
  return "String_Node_Str" + field.getName() + order.toSql()+ "String_Node_Str";
}

Fixed version (ground truth):
public String toSql(){
  return "String_Node_Str" + field.getName() + "String_Node_Str"+ order.toSql()+ "String_Node_Str";
}
Program: 85698
Project: 85698
Buggy source:
public <I>I read(Select query,Database.DbReadOp<I,Cursor> readOp){
  SQLiteDatabase db=turtleDatabaseImpl.getReadableDatabase();
  try {
    String[] params=new String[query.getParams().size()];
    int i=0;
    for (    Object param : query.getParams()) {
      params[i++]=param.toString();
    }
    return readOp.read(db.rawQuery(query.toSql(),params));
  }
  finally {
    db.close();
  }
}

Fixed version (ground truth):
public <I>I read(Select query,Database.DbReadOp<I,Cursor> readOp){
  SQLiteDatabase db=turtleDatabaseImpl.getReadableDatabase();
  try {
    String[] params=new String[query.getParams().size()];
    int i=0;
    for (    Object param : query.getParams()) {
      params[i++]=param.toString();
    }
    Cursor cursor=db.rawQuery(query.toSql(),params);
    cursor.moveToFirst();
    return readOp.read(cursor);
  }
  finally {
    db.close();
  }
}
Program: 85701
Project: 85701
Buggy source:
private void UpdateScreenInfo(Track t){
  TextView title=(TextView)findViewById(R.id.trackTitle);
  TextView artist=(TextView)findViewById(R.id.trackArtist);
  title.setVisibility(View.VISIBLE);
  artist.setVisibility(View.VISIBLE);
  duration.setVisibility(View.VISIBLE);
  title.setText(t.GetTitle());
  artist.setText(t.GetArtist());
  if (tp.isInitialised) {
    duration.setText(ConvertToMinutes(tp.mp.getCurrentPosition()) + "String_Node_Str" + ConvertToMinutes(tp.mp.getDuration()));
  }
 else {
    duration.setText("String_Node_Str");
  }
  ImageView iv=(ImageView)findViewById(R.id.albumArt);
  if (t.HasAlbumArt() && t.GetRootSrc() != null) {
    String location=t.GetRootSrc() + "String_Node_Str";
    Bitmap bmp=BitmapFactory.decodeFile(location);
    iv.setImageBitmap(bmp);
  }
 else {
    iv.setImageDrawable(getResources().getDrawable(R.drawable.blank_album_art));
  }
}

Fixed version (ground truth):
private void UpdateScreenInfo(Track t){
  TextView title=(TextView)findViewById(R.id.trackTitle);
  TextView artist=(TextView)findViewById(R.id.trackArtist);
  title.setVisibility(View.VISIBLE);
  artist.setVisibility(View.VISIBLE);
  duration.setVisibility(View.VISIBLE);
  if (tp.isInitialised) {
    title.setText(t.GetTitle());
    artist.setText(t.GetArtist());
    duration.setText(ConvertToMinutes(tp.mp.getCurrentPosition()) + "String_Node_Str" + ConvertToMinutes(tp.mp.getDuration()));
  }
 else {
    title.setText("String_Node_Str");
    artist.setText("String_Node_Str");
    duration.setText("String_Node_Str");
  }
  ImageView iv=(ImageView)findViewById(R.id.albumArt);
  if (t.HasAlbumArt() && t.GetRootSrc() != null) {
    String location=t.GetRootSrc() + "String_Node_Str";
    Bitmap bmp=BitmapFactory.decodeFile(location);
    iv.setImageBitmap(bmp);
  }
 else {
    iv.setImageDrawable(getResources().getDrawable(R.drawable.blank_album_art));
  }
}
Program: 85702
Project: 85702
Buggy source:
@Override public void endUpdatePlaylist(){
  runOnUiThread(new Runnable(){
    @Override public void run(){
      rescanProgressBar.setVisibility(View.GONE);
      rescan.setVisibility(View.VISIBLE);
      if (!tp.playlist.IsEmpty()) {
        SwitchToPlaylistSlide();
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void endUpdatePlaylist(){
  runOnUiThread(new Runnable(){
    @Override public void run(){
      rescanProgressBar.setVisibility(View.GONE);
      rescan.setVisibility(View.VISIBLE);
      if (!tp.playlist.IsEmpty()) {
        ResetFooterButtons();
        trackButton.setImageDrawable(getResources().getDrawable(R.drawable.track48_active));
        SwitchToPlaylistSlide();
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
  }
);
}
Program: 85703
Project: 85703
Buggy source:
/** 
 * Async rescan, returns immediately, use  {@link turtle.player.Playlist.PlaylistObserver} to receive changes
 */
protected void rescan(){
  Stop();
  tp.playlist.DatabaseClear();
  tp.playlist.UpdateList();
}

Fixed version (ground truth):
/** 
 * Async rescan, returns immediately, use  {@link turtle.player.Playlist.PlaylistObserver} to receive changes
 */
protected void rescan(){
  if (tp.isInitialised) {
    Stop();
  }
  tp.playlist.DatabaseClear();
  tp.playlist.UpdateList();
}
Program: 85705
Project: 85705
Buggy source:
private void UpdateScreenInfo(Track t){
  TextView title=(TextView)findViewById(R.id.trackTitle);
  TextView artist=(TextView)findViewById(R.id.trackArtist);
  title.setVisibility(View.VISIBLE);
  artist.setVisibility(View.VISIBLE);
  duration.setVisibility(View.VISIBLE);
  title.setText(t.accept(InstanceFormatter.SHORT));
  artist.setText(t.GetAlbum().accept(InstanceFormatter.SHORT));
  if (tp.isInitialised) {
    duration.setText(ConvertToMinutes(tp.mp.getCurrentPosition()) + "String_Node_Str" + ConvertToMinutes(tp.mp.getDuration()));
  }
 else {
    duration.setText("String_Node_Str");
  }
  ImageView iv=(ImageView)findViewById(R.id.albumArt);
  if (t.HasAlbumArt() && t.GetRootSrc() != null) {
    String location=t.GetRootSrc() + "String_Node_Str";
    Bitmap bmp=BitmapFactory.decodeFile(location);
    iv.setImageBitmap(bmp);
  }
 else {
    iv.setImageDrawable(getResources().getDrawable(R.drawable.blank_album_art));
  }
}

Fixed version (ground truth):
private void UpdateScreenInfo(Track t){
  TextView title=(TextView)findViewById(R.id.trackTitle);
  TextView artist=(TextView)findViewById(R.id.trackArtist);
  title.setVisibility(View.VISIBLE);
  artist.setVisibility(View.VISIBLE);
  duration.setVisibility(View.VISIBLE);
  title.setText(t.accept(InstanceFormatter.SHORT));
  artist.setText(t.GetAlbum().accept(InstanceFormatter.SHORT));
  if (tp.isInitialised) {
    duration.setText(ConvertToMinutes(tp.mp.getCurrentPosition()) + "String_Node_Str" + ConvertToMinutes(tp.mp.getDuration()));
  }
 else {
    title.setText("String_Node_Str");
    artist.setText("String_Node_Str");
    duration.setText("String_Node_Str");
  }
  ImageView iv=(ImageView)findViewById(R.id.albumArt);
  if (t.HasAlbumArt() && t.GetRootSrc() != null) {
    String location=t.GetRootSrc() + "String_Node_Str";
    Bitmap bmp=BitmapFactory.decodeFile(location);
    iv.setImageBitmap(bmp);
  }
 else {
    iv.setImageDrawable(getResources().getDrawable(R.drawable.blank_album_art));
  }
}
Program: 85706
Project: 85706
Buggy source:
/** 
 * Async rescan, returns immediately, use   {@link turtle.player.playlist.Playlist.PlaylistObserver} to receive changes
 */
protected void rescan(){
  Stop();
  tp.playlist.DatabaseClear();
  tp.playlist.UpdateList();
}

Fixed version (ground truth):
/** 
 * Async rescan, returns immediately, use   {@link turtle.player.playlist.Playlist.PlaylistObserver} to receive changes
 */
protected void rescan(){
  if (tp.isInitialised) {
    Stop();
  }
  tp.playlist.DatabaseClear();
  tp.playlist.UpdateList();
}
Program: 85708
Project: 85708
Buggy source:
public synchronized String getOrg(long ipnum){
  int seek_org;
  int record_pointer;
  int str_length=0;
  byte[] buf=new byte[MAX_ORG_RECORD_LENGTH];
  String org_buf;
  try {
    seek_org=seekCountry(ipnum);
    if (seek_org == databaseSegments[0]) {
      return null;
    }
    record_pointer=seek_org + (2 * recordLength - 1) * databaseSegments[0];
    if ((dboptions & GEOIP_MEMORY_CACHE) == 1) {
      System.arraycopy(dbbuffer,record_pointer,buf,0,Math.min(dbbuffer.length - record_pointer,MAX_ORG_RECORD_LENGTH));
    }
 else {
      file.seek(record_pointer);
      file.readFully(buf);
    }
    while (buf[str_length] != '\0') {
      str_length++;
    }
    org_buf=new String(buf,0,str_length,"String_Node_Str");
    return org_buf;
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
    return null;
  }
}

Fixed version (ground truth):
public synchronized String getOrg(long ipnum){
  int seek_org;
  int record_pointer;
  int str_length=0;
  byte[] buf=new byte[MAX_ORG_RECORD_LENGTH];
  String org_buf;
  try {
    seek_org=seekCountry(ipnum);
    if (seek_org == databaseSegments[0]) {
      return null;
    }
    record_pointer=seek_org + (2 * recordLength - 1) * databaseSegments[0];
    if ((dboptions & GEOIP_MEMORY_CACHE) == 1) {
      System.arraycopy(dbbuffer,record_pointer,buf,0,Math.min(dbbuffer.length - record_pointer,MAX_ORG_RECORD_LENGTH));
    }
 else {
      file.seek(record_pointer);
      try {
        file.readFully(buf);
      }
 catch (      IOException e) {
      }
    }
    while (buf[str_length] != '\0') {
      str_length++;
    }
    org_buf=new String(buf,0,str_length,"String_Node_Str");
    return org_buf;
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
    return null;
  }
}
Program: 85710
Project: 85710
Buggy source:
synchronized void _check_mtime(){
  try {
    if ((dboptions & GEOIP_CHECK_CACHE) != 0) {
      long t=databaseFile.lastModified();
      if (t != mtime) {
        System.out.println("String_Node_Str");
        file.close();
        file=new RandomAccessFile(databaseFile,"String_Node_Str");
        mtime=t;
        if ((dboptions & GEOIP_MEMORY_CACHE) != 0) {
          int l=(int)file.length();
          dbbuffer=new byte[l];
          file.seek(0);
          file.read(dbbuffer,0,l);
        }
        if ((dboptions & GEOIP_INDEX_CACHE) != 0) {
          int l=databaseSegments[0] * recordLength * 2;
          index_cache=new byte[l];
          if (index_cache != null) {
            file.seek(0);
            file.read(index_cache,0,l);
          }
        }
      }
    }
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
synchronized void _check_mtime(){
  try {
    if ((dboptions & GEOIP_CHECK_CACHE) != 0) {
      long t=databaseFile.lastModified();
      if (t != mtime) {
        file.close();
        file=new RandomAccessFile(databaseFile,"String_Node_Str");
        init();
      }
    }
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
  }
}
Program: 85711
Project: 85711
Buggy source:
/** 
 * Create a new lookup service using the specified database file.
 * @param databaseFile the database file.
 * @param options database flags to use when opening the databaseGEOIP_STANDARD read database from disk GEOIP_MEMORY_CACHE cache the database in RAM and read it from RAM
 * @throws java.io.IOException if an error occured creating the lookup servicefrom the database file.
 */
public LookupService(File databaseFile,int options) throws IOException {
  this.databaseFile=databaseFile;
  this.file=new RandomAccessFile(databaseFile,"String_Node_Str");
  dboptions=options;
  init();
  if ((dboptions & GEOIP_CHECK_CACHE) != 0) {
    mtime=databaseFile.lastModified();
  }
}

Fixed version (ground truth):
/** 
 * Create a new lookup service using the specified database file.
 * @param databaseFile the database file.
 * @param options database flags to use when opening the databaseGEOIP_STANDARD read database from disk GEOIP_MEMORY_CACHE cache the database in RAM and read it from RAM
 * @throws java.io.IOException if an error occured creating the lookup servicefrom the database file.
 */
public LookupService(File databaseFile,int options) throws IOException {
  this.databaseFile=databaseFile;
  this.file=new RandomAccessFile(databaseFile,"String_Node_Str");
  dboptions=options;
  init();
}
Program: 85712
Project: 85712
Buggy source:
protected String toHex(double color){
  String prefix="String_Node_Str";
  if (color < 16)   prefix="String_Node_Str";
  return prefix + Integer.toHexString((int)Math.round(color));
}

Fixed version (ground truth):
protected String toHex(double color){
  String prefix="String_Node_Str";
  int roundedColor=(int)Math.round(color);
  if (roundedColor < 16)   prefix="String_Node_Str";
  return prefix + Integer.toHexString(roundedColor);
}
Program: 85713
Project: 85713
Buggy source:
public boolean hasAlpha(){
  return true;
}

Fixed version (ground truth):
@Override public boolean hasAlpha(){
  return true;
}
Program: 85714
Project: 85714
Buggy source:
private StyleSheet buildImportedAst(Import node,LessSource source,String content){
  if (astCache.containsKey(source)) {
    return astCache.get(source).clone();
  }
  StyleSheet importedAst=parseContent(node,content,source);
  astCache.put(source,importedAst.clone());
  if (node.hasMediums()) {
    HiddenTokenAwareTree underlyingStructure=node.getUnderlyingStructure();
    StyleSheet result=new StyleSheet(underlyingStructure);
    Media media=new Media(underlyingStructure);
    result.addMember(media);
    media.setParent(result);
    media.setMediums(node.getMediums());
    GeneralBody mediaBody=new GeneralBody(underlyingStructure,importedAst.getMembers());
    media.setBody(mediaBody);
    media.configureParentToAllChilds();
    mediaBody.configureParentToAllChilds();
    return result;
  }
  return importedAst;
}

Fixed version (ground truth):
private StyleSheet buildImportedAst(Import node,LessSource source,String content){
  StyleSheet importedAst=getImportedAst(node,source,content);
  if (node.hasMediums()) {
    HiddenTokenAwareTree underlyingStructure=node.getUnderlyingStructure();
    StyleSheet result=new StyleSheet(underlyingStructure);
    Media media=new Media(underlyingStructure);
    result.addMember(media);
    media.setParent(result);
    media.setMediums(node.getMediums());
    GeneralBody mediaBody=new GeneralBody(underlyingStructure,importedAst.getMembers());
    media.setBody(mediaBody);
    media.configureParentToAllChilds();
    mediaBody.configureParentToAllChilds();
    return result;
  }
  return importedAst;
}
Program: 85715
Project: 85715
Buggy source:
private boolean ifNotDefaultGuardValue(List<GuardValue> guards){
  for (  GuardValue guardValue : guards) {
switch (guardValue) {
case USE:
case USE_IF_NOT_DEFAULT:
      return true;
case DO_NOT_USE:
case USE_IF_DEFAULT:
    return false;
}
}
return false;
}

Fixed version (ground truth):
private boolean ifNotDefaultGuardValue(List<GuardValue> guards){
  for (  GuardValue guardValue : guards) {
switch (guardValue) {
case USE:
case USE_IF_NOT_DEFAULT:
      break;
case DO_NOT_USE:
case USE_IF_DEFAULT:
    return false;
}
}
return true;
}
Program: 85716
Project: 85716
Buggy source:
private boolean ifDefaultGuardValue(List<GuardValue> guards){
  for (  GuardValue guardValue : guards) {
switch (guardValue) {
case USE:
case USE_IF_DEFAULT:
      return true;
case DO_NOT_USE:
case USE_IF_NOT_DEFAULT:
    return false;
}
}
return false;
}

Fixed version (ground truth):
private boolean ifDefaultGuardValue(List<GuardValue> guards){
  for (  GuardValue guardValue : guards) {
switch (guardValue) {
case USE:
case USE_IF_DEFAULT:
      break;
case DO_NOT_USE:
case USE_IF_NOT_DEFAULT:
    return false;
}
}
return true;
}
Program: 85717
Project: 85717
Buggy source:
public ScopeView joinIfIndependentAndPreserveContent(IScope callerScope,IScope bodyScope){
  DebugUtils u=new DebugUtils();
  boolean isLocalImport=isLocallyDefined(callerScope,bodyScope);
  u.scopeTest(callerScope,"String_Node_Str");
  u.scopeTest(bodyScope,"String_Node_Str");
  ScopeView result=null;
  if (isLocalImport) {
    result=ScopeFactory.createSaveableView(bodyScope);
  }
 else {
    result=ScopeFactory.createJoinedScopesView(callerScope,bodyScope);
  }
  result.saveLocalDataForTheWholeWayUp();
  return result;
}

Fixed version (ground truth):
public ScopeView joinIfIndependentAndPreserveContent(IScope callerScope,IScope bodyScope){
  ScopeView result=joinIfIndependent(callerScope,bodyScope);
  result.saveLocalDataForTheWholeWayUp();
  return result;
}
Program: 85718
Project: 85718
Buggy source:
public List<BodyCompilationData> chooseMixinsToBeUsed(List<BodyCompilationData> compiledMixins,final MixinReference reference){
  int normalMixinsCnt=ArraysUtils.count(compiledMixins,GuardValue.USE.filter());
  int ifNotCnt=ArraysUtils.count(compiledMixins,GuardValue.USE_IF_NOT_DEFAULT.filter());
  int ifDefaultCnt=ArraysUtils.count(compiledMixins,GuardValue.USE_IF_DEFAULT.filter());
  if (normalMixinsCnt + ifNotCnt + ifDefaultCnt != compiledMixins.size())   throw new BugHappened("String_Node_Str",reference);
  if (normalMixinsCnt > 0) {
    return keepOnly(compiledMixins,GuardValue.USE,GuardValue.USE_IF_NOT_DEFAULT);
  }
  if (ifDefaultCnt + ifNotCnt > 1) {
    List<BodyCompilationData> errorSet=keepOnly(compiledMixins,GuardValue.USE_IF_DEFAULT,GuardValue.USE_IF_NOT_DEFAULT);
    problemsHandler.ambiguousDefaultSet(reference,extractOriginalMixins(errorSet));
    return Collections.emptyList();
  }
  return keepOnly(compiledMixins,GuardValue.USE_IF_DEFAULT);
}

Fixed version (ground truth):
public List<BodyCompilationData> chooseMixinsToBeUsed(List<BodyCompilationData> compiledMixins,final MixinReference reference){
  int normalMixinsCnt=ArraysUtils.count(compiledMixins,GuardValue.USE.filter());
  int ifNotCnt=ArraysUtils.count(compiledMixins,GuardValue.USE_IF_NOT_DEFAULT.filter());
  int ifDefaultCnt=ArraysUtils.count(compiledMixins,GuardValue.USE_IF_DEFAULT.filter());
  int doNotUse=ArraysUtils.count(compiledMixins,GuardValue.DO_NOT_USE.filter());
  if (normalMixinsCnt + ifNotCnt + ifDefaultCnt+ doNotUse != compiledMixins.size())   throw new BugHappened("String_Node_Str",reference);
  if (normalMixinsCnt > 0) {
    return keepOnly(compiledMixins,GuardValue.USE,GuardValue.USE_IF_NOT_DEFAULT);
  }
  if (ifDefaultCnt + ifNotCnt > 1) {
    List<BodyCompilationData> errorSet=keepOnly(compiledMixins,GuardValue.USE_IF_DEFAULT,GuardValue.USE_IF_NOT_DEFAULT);
    problemsHandler.ambiguousDefaultSet(reference,extractOriginalMixins(errorSet));
    return Collections.emptyList();
  }
  return keepOnly(compiledMixins,GuardValue.USE_IF_DEFAULT);
}
Program: 85719
Project: 85719
Buggy source:
@Override public void run(){
  IScope mixinArguments=data.getMixinArguments();
  ScopeView mixinWorkingScope=data.getMixinWorkingScope();
  mixinWorkingScope.getParent().add(mixinArguments);
  mixinWorkingScope.saveLocalDataForTheWholeWayUp();
  data.setMixinWorkingScope(mixinWorkingScope);
  easilyMoveable(callerScope,compiledMixins,fullMixin,data);
}

Fixed version (ground truth):
@Override public void run(){
  BodyOwner<?> mixin=data.getCompiledBodyOwner();
  IScope mixinArguments=data.getMixinArguments();
  mixinWorkingScope.getParent().add(mixinArguments);
  mixinWorkingScope.saveLocalDataForTheWholeWayUp();
  data.setMixinWorkingScope(mixinWorkingScope);
  GuardValue guardValue2=data.getGuardValue();
  IScope mixinWorkingScope2=data.getMixinWorkingScope();
  if (guardValue2 != GuardValue.DO_NOT_USE) {
    BodyCompilationData compiled=resolveCalledBody(callerScope,mixin,mixinWorkingScope2,ReturnMode.MIXINS_AND_VARIABLES);
    data.setReplacement(compiled.getReplacement());
    data.setReturnValues(compiled.getReturnValues());
  }
}
Program: 85721
Project: 85721
Buggy source:
private BodyCompilationData resolveCalledBody(final IScope callerScope,final BodyOwner<?> bodyOwner,final IScope bodyWorkingScope,final ReturnMode returnMode){
  final ExpressionEvaluator expressionEvaluator=new ExpressionEvaluator(bodyWorkingScope,problemsHandler,configuration);
  final IScope referencedMixinScope=bodyWorkingScope;
  return InScopeSnapshotRunner.runInLocalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationData>(){
    @Override public BodyCompilationData run(){
      List<ASTCssNode> replacement=compileBody(bodyOwner.getBody(),referencedMixinScope);
      IScope returnValues=ScopeFactory.createDummyScope();
      if (returnMode == ReturnMode.MIXINS_AND_VARIABLES) {
        DebugUtils u=new DebugUtils();
        u.scopeTest(callerScope,"String_Node_Str");
        u.scopeTest(referencedMixinScope,"String_Node_Str");
        returnValues.addFilteredVariables(new ImportedScopeFilter(expressionEvaluator,callerScope),referencedMixinScope);
      }
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=scopeManipulation.mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      for (      FullMixinDefinition fullMixinDefinition : allMixinsToImport) {
        if (fullMixinDefinition.getMixin().getNames().get(0).asString().equals("String_Node_Str")) {
          watchedScopeInstance=fullMixinDefinition.getScope();
        }
      }
      return new BodyCompilationData(bodyOwner,replacement,returnValues);
    }
  }
);
}

Fixed version (ground truth):
private BodyCompilationData resolveCalledBody(final IScope callerScope,final BodyOwner<?> bodyOwner,final IScope bodyWorkingScope,final ReturnMode returnMode){
  final ExpressionEvaluator expressionEvaluator=new ExpressionEvaluator(bodyWorkingScope,problemsHandler,configuration);
  final IScope referencedMixinScope=bodyWorkingScope;
  return InScopeSnapshotRunner.runInLocalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationData>(){
    @Override public BodyCompilationData run(){
      List<ASTCssNode> replacement=compileBody(bodyOwner.getBody(),referencedMixinScope);
      IScope returnValues=ScopeFactory.createDummyScope();
      if (returnMode == ReturnMode.MIXINS_AND_VARIABLES) {
        returnValues.addFilteredVariables(new ImportedScopeFilter(expressionEvaluator,callerScope),referencedMixinScope);
      }
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=scopeManipulation.mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      return new BodyCompilationData(bodyOwner,null,replacement,returnValues);
    }
  }
);
}
Program: 85722
Project: 85722
Buggy source:
public void scopeTest(IScope scope,Object id){
  try {
    System.out.println("String_Node_Str" + id + "String_Node_Str"+ scope);
    Expression value=scope.getValue("String_Node_Str");
    if (value == null)     System.out.println("String_Node_Str" + value + "String_Node_Str");
 else     System.out.println("String_Node_Str" + value);
  }
 catch (  Throwable th) {
    th.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Variable name should contain @ too e.g. "@width"
 */
public void scopeTest(IScope scope,Object id,String variableName){
  try {
    System.out.println("String_Node_Str" + id + "String_Node_Str"+ scope);
    Expression value=scope.getValue("String_Node_Str");
    String text=variableName + "String_Node_Str" + value;
    if (value == null) {
      text+="String_Node_Str";
    }
    System.out.println(text);
  }
 catch (  Throwable th) {
    th.printStackTrace();
  }
}
Program: 85724
Project: 85724
Buggy source:
private CompilationResult createCompilationResult(ASTCssNode cssStyleSheet,LessSource lessSource,Configuration options){
  LessSource cssDestination=options == null ? null : options.getCssResultLocation();
  if (cssDestination == null) {
    String guessedCssName=URIUtils.changeSuffix(lessSource.getName(),Constants.CSS_SUFFIX);
    URI guessedURI=URIUtils.changeSuffix(lessSource.getURI(),Constants.CSS_SUFFIX);
    cssDestination=new LessSource.StringSource("String_Node_Str",guessedCssName,guessedURI);
  }
  CssPrinter builder=new CssPrinter(lessSource,cssDestination,options);
  builder.append(cssStyleSheet);
  String css=builder.toCss();
  String sourceMap=builder.toSourceMap();
  CompilationResult compilationResult=new CompilationResult(css,sourceMap,problemsHandler.getWarnings());
  return compilationResult;
}

Fixed version (ground truth):
private CompilationResult createCompilationResult(ASTCssNode cssStyleSheet,LessSource lessSource,Configuration options){
  LessSource cssDestination=options == null ? null : options.getCssResultLocation();
  if (cssDestination == null) {
    String guessedCssName=URIUtils.changeSuffix(lessSource.getName(),Constants.CSS_SUFFIX);
    URI guessedURI=URIUtils.changeSuffix(lessSource.getURI(),Constants.CSS_SUFFIX);
    cssDestination=new LessSource.StringSource("String_Node_Str",guessedCssName,guessedURI);
  }
  CssPrinter builder=new CssPrinter(lessSource,cssDestination,options);
  builder.append(cssStyleSheet);
  StringBuilder css=builder.toCss();
  String sourceMap=builder.toSourceMap();
  handleSourceMapLink(cssStyleSheet,css,options,lessSource,sourceMap);
  CompilationResult compilationResult=new CompilationResult(css.toString(),sourceMap,problemsHandler.getWarnings());
  return compilationResult;
}
Program: 85725
Project: 85725
Buggy source:
public ASTCssNode compileToCss(StyleSheet less,LessSource source,Configuration options){
  resolveImportsAndReferences(less,source);
  evaluateExpressions(less);
  freeNestedRulesetsAndMedia(less);
  solveExtends(less);
  finalMediaMergingAndBubbling(less);
  removeUselessLessElements(less);
  mergeMergingProperties(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  handleSourceMapLink(less,options,source);
  validateFinalCss(less);
  return less;
}

Fixed version (ground truth):
public ASTCssNode compileToCss(StyleSheet less,LessSource source,Configuration options){
  resolveImportsAndReferences(less,source);
  evaluateExpressions(less);
  freeNestedRulesetsAndMedia(less);
  solveExtends(less);
  finalMediaMergingAndBubbling(less);
  removeUselessLessElements(less);
  mergeMergingProperties(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  validateFinalCss(less);
  return less;
}
Program: 85726
Project: 85726
Buggy source:
public String toCss(){
  return cssOnly.toString();
}

Fixed version (ground truth):
public StringBuilder toCss(){
  return cssOnly.toStringBuilder();
}
Program: 85727
Project: 85727
Buggy source:
private Iterable<CssPrinter> collectUniqueBodyMembersStrings(Body body){
  LastOfKindSet<String,CssPrinter> declarationsStrings=new LastOfKindSet<String,CssPrinter>();
  for (  ASTCssNode declaration : body.getMembers()) {
    CssPrinter miniPrinter=new CssPrinter(this);
    miniPrinter.append(declaration);
    miniPrinter.cssOnly.ensureNewLine();
    declarationsStrings.add(miniPrinter.toCss(),miniPrinter);
  }
  return declarationsStrings;
}

Fixed version (ground truth):
private Iterable<CssPrinter> collectUniqueBodyMembersStrings(Body body){
  LastOfKindSet<String,CssPrinter> declarationsStrings=new LastOfKindSet<String,CssPrinter>();
  for (  ASTCssNode declaration : body.getMembers()) {
    CssPrinter miniPrinter=new CssPrinter(this);
    miniPrinter.append(declaration);
    miniPrinter.cssOnly.ensureNewLine();
    declarationsStrings.add(miniPrinter.toCss().toString(),miniPrinter);
  }
  return declarationsStrings;
}
Program: 85728
Project: 85728
Buggy source:
public static String relativizeSourceURIs(LessSource from,LessSource to){
  if (to == null)   return "String_Node_Str";
  URI toURI=to.getURI();
  if (toURI == null)   return to.getName() == null ? "String_Node_Str" : to.getName();
  String toURIAsString=toURI.toString();
  if (from == null)   return toURIAsString;
  URI fromURI=from.getURI();
  if (fromURI == null)   return toURIAsString;
  String fromURIAsString=fromURI.toString();
  return getRelativePath(fromURIAsString,toURIAsString,URIUtils.URI_FILE_SEPARATOR);
}

Fixed version (ground truth):
public static String relativizeSourceURIs(LessSource from,LessSource to){
  if (to == null)   return null;
  URI toURI=to.getURI();
  if (toURI == null)   return to.getName();
  String toURIAsString=toURI.toString();
  if (from == null)   return toURIAsString;
  URI fromURI=from.getURI();
  if (fromURI == null)   return toURIAsString;
  String fromURIAsString=fromURI.toString();
  return getRelativePath(fromURIAsString,toURIAsString,URIUtils.URI_FILE_SEPARATOR);
}