nus-yam/ex-repair huggingface dataset:
Program: 13514
Project: 13514
Buggy source:
public static void refreshCartridges(){
  Logger.w(TAG,"String_Node_Str" + (MainActivity.selectedFile == null));
  File[] files=FileSystem.getFiles(FileSystem.ROOT,"String_Node_Str");
  cartridgeFiles=new Vector<CartridgeFile>();
  ArrayList<Waypoint> wpts=new ArrayList<Waypoint>();
  File actualFile=null;
  if (files != null) {
    for (    File file : files) {
      try {
        actualFile=file;
        CartridgeFile cart=CartridgeFile.read(new WSeekableFile(file),new WSaveFile(file));
        if (cart != null) {
          cart.filename=file.getAbsolutePath();
          Location loc=new Location(TAG);
          loc.setLatitude(cart.latitude);
          loc.setLongitude(cart.longitude);
          Waypoint waypoint=new Waypoint(cart.name,loc);
          cartridgeFiles.add(cart);
          wpts.add(waypoint);
        }
      }
 catch (      Exception e) {
        Logger.w(TAG,"String_Node_Str" + actualFile + "String_Node_Str"+ e.toString());
        ManagerNotify.toastShortMessage(Locale.getString(R.string.invalid_cartridge,actualFile.getName()));
      }
    }
  }
  if (wpts.size() > 0) {
  }
}

Fixed version (ground truth):
public static void refreshCartridges(){
  Logger.w(TAG,"String_Node_Str" + (MainActivity.selectedFile == null));
  File[] files=FileSystem.getFiles(FileSystem.ROOT,"String_Node_Str");
  cartridgeFiles=new Vector<>();
  ArrayList<Waypoint> wpts=new ArrayList<>();
  File actualFile=null;
  if (files != null) {
    for (    File file : files) {
      try {
        actualFile=file;
        CartridgeFile cart=CartridgeFile.read(new WSeekableFile(file),new WSaveFile(file));
        if (cart != null) {
          cart.filename=file.getAbsolutePath();
          Location loc=new Location(TAG);
          loc.setLatitude(cart.latitude);
          loc.setLongitude(cart.longitude);
          Waypoint waypoint=new Waypoint(cart.name,loc);
          cartridgeFiles.add(cart);
          wpts.add(waypoint);
        }
      }
 catch (      Exception e) {
        Logger.w(TAG,"String_Node_Str" + actualFile + "String_Node_Str"+ e.toString());
        ManagerNotify.toastShortMessage(Locale.getString(R.string.invalid_cartridge,actualFile.getName()));
      }
    }
  }
  if (wpts.size() > 0) {
  }
}
Program: 13515
Project: 13515
Buggy source:
public static File getSaveFile() throws IOException {
  try {
    File file=new File(selectedFile.substring(0,selectedFile.length() - 3) + "String_Node_Str");
    return file;
  }
 catch (  SecurityException e) {
    Logger.e(TAG,"String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public static File getSaveFile() throws IOException {
  try {
    return new File(selectedFile.substring(0,selectedFile.length() - 3) + "String_Node_Str");
  }
 catch (  SecurityException e) {
    Logger.e(TAG,"String_Node_Str",e);
    return null;
  }
}
Program: 13516
Project: 13516
Buggy source:
public static File getLogFile() throws IOException {
  try {
    File file=new File(selectedFile.substring(0,selectedFile.length() - 3) + "String_Node_Str");
    return file;
  }
 catch (  SecurityException e) {
    Logger.e(TAG,"String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public static File getLogFile() throws IOException {
  try {
    return new File(selectedFile.substring(0,selectedFile.length() - 3) + "String_Node_Str");
  }
 catch (  SecurityException e) {
    Logger.e(TAG,"String_Node_Str",e);
    return null;
  }
}
Program: 13517
Project: 13517
Buggy source:
public static void restoreCartridge(OutputStream log){
  try {
    WUI.startProgressDialog();
    Engine.newInstance(cartridgeFile,log,wui,wLocationService).restore();
  }
 catch (  Throwable t) {
  }
}

Fixed version (ground truth):
private static void restoreCartridge(OutputStream log){
  try {
    WUI.startProgressDialog();
    Engine.newInstance(cartridgeFile,log,wui,wLocationService).restore();
  }
 catch (  Throwable t) {
  }
}
Program: 13518
Project: 13518
Buggy source:
public static void loadCartridge(OutputStream log){
  try {
    WUI.startProgressDialog();
    Engine.newInstance(cartridgeFile,log,wui,wLocationService).start();
  }
 catch (  Throwable t) {
  }
}

Fixed version (ground truth):
private static void loadCartridge(OutputStream log){
  try {
    WUI.startProgressDialog();
    Engine.newInstance(cartridgeFile,log,wui,wLocationService).start();
  }
 catch (  Throwable t) {
  }
}
Program: 13519
Project: 13519
Buggy source:
@Override public void run(){
  String provider=location.getProvider();
  if (provider.equals(LocationManager.GPS_PROVIDER)) {
    provider=getString(R.string.provider_gps);
  }
 else   if (provider.equals(LocationManager.NETWORK_PROVIDER)) {
    provider=getString(R.string.provider_network);
  }
 else {
    provider=getString(R.string.provider_passive);
  }
  ((TextView)findViewById(R.id.text_view_provider)).setText(provider);
  ((TextView)findViewById(R.id.text_view_latitude)).setText(UtilsFormat.formatLatitude(location.getLatitude()));
  ((TextView)findViewById(R.id.text_view_longitude)).setText(UtilsFormat.formatLongitude(location.getLongitude()));
  ((TextView)findViewById(R.id.text_view_altitude)).setText(UtilsFormat.formatAltitude(location.getAltitude(),true));
  ((TextView)findViewById(R.id.text_view_accuracy)).setText(UtilsFormat.formatDistance(location.getAccuracy(),false));
  ((TextView)findViewById(R.id.text_view_speed)).setText(UtilsFormat.formatSpeed(location.getSpeed(),false));
  ((TextView)findViewById(R.id.text_view_declination)).setText(UtilsFormat.formatAngle(Orientation.getDeclination()));
  long lastFix=LocationState.getLastFixTime();
  if (lastFix > 0) {
    ((TextView)findViewById(R.id.text_view_time_gps)).setText(UtilsFormat.formatTime(lastFix));
  }
 else {
    ((TextView)findViewById(R.id.text_view_time_gps)).setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  String provider=location.getProvider();
switch (provider) {
case LocationManager.GPS_PROVIDER:
    provider=getString(R.string.provider_gps);
  break;
case LocationManager.NETWORK_PROVIDER:
provider=getString(R.string.provider_network);
break;
default :
provider=getString(R.string.provider_passive);
break;
}
((TextView)findViewById(R.id.text_view_provider)).setText(provider);
((TextView)findViewById(R.id.text_view_latitude)).setText(UtilsFormat.formatLatitude(location.getLatitude()));
((TextView)findViewById(R.id.text_view_longitude)).setText(UtilsFormat.formatLongitude(location.getLongitude()));
((TextView)findViewById(R.id.text_view_altitude)).setText(UtilsFormat.formatAltitude(location.getAltitude(),true));
((TextView)findViewById(R.id.text_view_accuracy)).setText(UtilsFormat.formatDistance(location.getAccuracy(),false));
((TextView)findViewById(R.id.text_view_speed)).setText(UtilsFormat.formatSpeed(location.getSpeed(),false));
((TextView)findViewById(R.id.text_view_declination)).setText(UtilsFormat.formatAngle(Orientation.getDeclination()));
long lastFix=LocationState.getLastFixTime();
if (lastFix > 0) {
((TextView)findViewById(R.id.text_view_time_gps)).setText(UtilsFormat.formatTime(lastFix));
}
 else {
((TextView)findViewById(R.id.text_view_time_gps)).setText("String_Node_Str");
}
}
Program: 13520
Project: 13520
Buggy source:
public void onLocationChanged(final Location location){
  runOnUiThread(new Runnable(){
    @Override public void run(){
      String provider=location.getProvider();
      if (provider.equals(LocationManager.GPS_PROVIDER)) {
        provider=getString(R.string.provider_gps);
      }
 else       if (provider.equals(LocationManager.NETWORK_PROVIDER)) {
        provider=getString(R.string.provider_network);
      }
 else {
        provider=getString(R.string.provider_passive);
      }
      ((TextView)findViewById(R.id.text_view_provider)).setText(provider);
      ((TextView)findViewById(R.id.text_view_latitude)).setText(UtilsFormat.formatLatitude(location.getLatitude()));
      ((TextView)findViewById(R.id.text_view_longitude)).setText(UtilsFormat.formatLongitude(location.getLongitude()));
      ((TextView)findViewById(R.id.text_view_altitude)).setText(UtilsFormat.formatAltitude(location.getAltitude(),true));
      ((TextView)findViewById(R.id.text_view_accuracy)).setText(UtilsFormat.formatDistance(location.getAccuracy(),false));
      ((TextView)findViewById(R.id.text_view_speed)).setText(UtilsFormat.formatSpeed(location.getSpeed(),false));
      ((TextView)findViewById(R.id.text_view_declination)).setText(UtilsFormat.formatAngle(Orientation.getDeclination()));
      long lastFix=LocationState.getLastFixTime();
      if (lastFix > 0) {
        ((TextView)findViewById(R.id.text_view_time_gps)).setText(UtilsFormat.formatTime(lastFix));
      }
 else {
        ((TextView)findViewById(R.id.text_view_time_gps)).setText("String_Node_Str");
      }
    }
  }
);
}

Fixed version (ground truth):
public void onLocationChanged(final Location location){
  runOnUiThread(new Runnable(){
    @Override public void run(){
      String provider=location.getProvider();
switch (provider) {
case LocationManager.GPS_PROVIDER:
        provider=getString(R.string.provider_gps);
      break;
case LocationManager.NETWORK_PROVIDER:
    provider=getString(R.string.provider_network);
  break;
default :
provider=getString(R.string.provider_passive);
break;
}
((TextView)findViewById(R.id.text_view_provider)).setText(provider);
((TextView)findViewById(R.id.text_view_latitude)).setText(UtilsFormat.formatLatitude(location.getLatitude()));
((TextView)findViewById(R.id.text_view_longitude)).setText(UtilsFormat.formatLongitude(location.getLongitude()));
((TextView)findViewById(R.id.text_view_altitude)).setText(UtilsFormat.formatAltitude(location.getAltitude(),true));
((TextView)findViewById(R.id.text_view_accuracy)).setText(UtilsFormat.formatDistance(location.getAccuracy(),false));
((TextView)findViewById(R.id.text_view_speed)).setText(UtilsFormat.formatSpeed(location.getSpeed(),false));
((TextView)findViewById(R.id.text_view_declination)).setText(UtilsFormat.formatAngle(Orientation.getDeclination()));
long lastFix=LocationState.getLastFixTime();
if (lastFix > 0) {
((TextView)findViewById(R.id.text_view_time_gps)).setText(UtilsFormat.formatTime(lastFix));
}
 else {
((TextView)findViewById(R.id.text_view_time_gps)).setText("String_Node_Str");
}
}
}
);
}
Program: 13522
Project: 13522
Buggy source:
public static Vector<Object> getValidActions(Thing thing){
  Vector<Object> newActions=new Vector<Object>();
  for (int i=0; i < thing.actions.size(); i++)   newActions.add(thing.actions.get(i));
  for (int i=0; i < newActions.size(); i++) {
    Action a=(Action)newActions.elementAt(i);
    if (!a.isEnabled() || !a.getActor().visibleToPlayer()) {
      newActions.removeElementAt(i--);
    }
  }
  return newActions;
}

Fixed version (ground truth):
public static Vector<Object> getValidActions(Thing thing){
  Vector<Object> newActions=new Vector<>();
  for (int i=0; i < thing.actions.size(); i++)   newActions.add(thing.actions.get(i));
  for (int i=0; i < newActions.size(); i++) {
    Action a=(Action)newActions.elementAt(i);
    if (!a.isEnabled() || !a.getActor().visibleToPlayer()) {
      newActions.removeElementAt(i--);
    }
  }
  return newActions;
}
Program: 13523
Project: 13523
Buggy source:
private static void makeValidStuff(){
  LuaTable current=Engine.instance.cartridge.currentThings();
  validStuff=new Vector<Object>();
  Object key=null;
  while ((key=current.next(key)) != null)   validStuff.addElement(current.rawget(key));
  while ((key=Engine.instance.player.inventory.next(key)) != null)   validStuff.addElement(Engine.instance.player.inventory.rawget(key));
  for (int i=0; i < validStuff.size(); i++) {
    Thing t=(Thing)validStuff.elementAt(i);
    if (!t.isVisible() || !action.isTarget(t)) {
      validStuff.removeElementAt(i--);
    }
  }
}

Fixed version (ground truth):
private static void makeValidStuff(){
  LuaTable current=Engine.instance.cartridge.currentThings();
  validStuff=new Vector<>();
  Object key=null;
  while ((key=current.next(key)) != null)   validStuff.addElement(current.rawget(key));
  while ((key=Engine.instance.player.inventory.next(key)) != null)   validStuff.addElement(Engine.instance.player.inventory.rawget(key));
  for (int i=0; i < validStuff.size(); i++) {
    Thing t=(Thing)validStuff.elementAt(i);
    if (!t.isVisible() || !action.isTarget(t)) {
      validStuff.removeElementAt(i--);
    }
  }
}
Program: 13524
Project: 13524
Buggy source:
@Override protected Vector<Object> getValidStuff(){
  Vector<Object> newtasks=new Vector<Object>();
  for (int i=0; i < Engine.instance.cartridge.tasks.size(); i++) {
    Task t=(Task)Engine.instance.cartridge.tasks.get(i);
    if (t.isVisible())     newtasks.add(t);
  }
  return newtasks;
}

Fixed version (ground truth):
@Override protected Vector<Object> getValidStuff(){
  Vector<Object> newtasks=new Vector<>();
  for (int i=0; i < Engine.instance.cartridge.tasks.size(); i++) {
    Task t=(Task)Engine.instance.cartridge.tasks.get(i);
    if (t.isVisible())     newtasks.add(t);
  }
  return newtasks;
}
Program: 13525
Project: 13525
Buggy source:
public static void refreshCartridges(){
  Logger.w(TAG,"String_Node_Str" + (MainActivity.selectedFile == null));
  if (MainActivity.selectedFile != null)   return;
  File[] files=FileSystem.getFiles(FileSystem.ROOT,"String_Node_Str");
  cartridgeFiles=new Vector<CartridgeFile>();
  ArrayList<Waypoint> wpts=new ArrayList<Waypoint>();
  File actualFile=null;
  if (files != null) {
    for (    File file : files) {
      try {
        actualFile=file;
        CartridgeFile cart=CartridgeFile.read(new WSeekableFile(file),new WSaveFile(file));
        if (cart != null) {
          cart.filename=file.getAbsolutePath();
          Location loc=new Location(TAG);
          loc.setLatitude(cart.latitude);
          loc.setLongitude(cart.longitude);
          Waypoint waypoint=new Waypoint(cart.name,loc);
          cartridgeFiles.add(cart);
          wpts.add(waypoint);
        }
      }
 catch (      Exception e) {
        Logger.w(TAG,"String_Node_Str" + actualFile + "String_Node_Str"+ e.toString());
        ManagerNotify.toastShortMessage(Locale.getString(R.string.invalid_cartridge,actualFile.getName()));
      }
    }
  }
  if (wpts.size() > 0) {
  }
}

Fixed version (ground truth):
public static void refreshCartridges(){
  Logger.w(TAG,"String_Node_Str" + (MainActivity.selectedFile == null));
  File[] files=FileSystem.getFiles(FileSystem.ROOT,"String_Node_Str");
  cartridgeFiles=new Vector<CartridgeFile>();
  ArrayList<Waypoint> wpts=new ArrayList<Waypoint>();
  File actualFile=null;
  if (files != null) {
    for (    File file : files) {
      try {
        actualFile=file;
        CartridgeFile cart=CartridgeFile.read(new WSeekableFile(file),new WSaveFile(file));
        if (cart != null) {
          cart.filename=file.getAbsolutePath();
          Location loc=new Location(TAG);
          loc.setLatitude(cart.latitude);
          loc.setLongitude(cart.longitude);
          Waypoint waypoint=new Waypoint(cart.name,loc);
          cartridgeFiles.add(cart);
          wpts.add(waypoint);
        }
      }
 catch (      Exception e) {
        Logger.w(TAG,"String_Node_Str" + actualFile + "String_Node_Str"+ e.toString());
        ManagerNotify.toastShortMessage(Locale.getString(R.string.invalid_cartridge,actualFile.getName()));
      }
    }
  }
  if (wpts.size() > 0) {
  }
}
Program: 13526
Project: 13526
Buggy source:
@Override public void writeToParcel(Parcel p,int arg1){
  p.writeString(name);
  p.writeString(description);
  p.writeDouble(latitude);
  p.writeDouble(longitude);
  p.writeByte((byte)(target ? 1 : 0));
}

Fixed version (ground truth):
@Override public void writeToParcel(Parcel p,int arg1){
  p.writeString(name);
  p.writeString(description);
  p.writeDouble(latitude);
  p.writeDouble(longitude);
  p.writeByte((byte)(target ? 1 : 0));
  p.writeString(data);
}
Program: 13527
Project: 13527
Buggy source:
@Override public void onTap(final PointOverlay pointOverlay){
  if (pointOverlay.getPoint() == null)   return;
  new AlertDialog.Builder(MapsforgeActivity.this).setTitle(pointOverlay.getLabel()).setMessage(UtilsFormat.formatGeoPoint(pointOverlay.getGeoPoint()) + "String_Node_Str" + Html.fromHtml(pointOverlay.getDescription(),null,null)).setNegativeButton(getString(R.string.close),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
      dialog.dismiss();
    }
  }
).show();
}

Fixed version (ground truth):
@Override public void onTap(final PointOverlay pointOverlay){
  if (pointOverlay.getPoint() == null)   return;
  AlertDialog.Builder builder=new AlertDialog.Builder(MapsforgeActivity.this).setTitle(pointOverlay.getLabel()).setMessage(UtilsFormat.formatGeoPoint(pointOverlay.getGeoPoint()) + "String_Node_Str" + Html.fromHtml(pointOverlay.getDescription(),null,null)).setNegativeButton(R.string.close,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
      dialog.dismiss();
    }
  }
);
  final String cguid=pointOverlay.getPoint().getData();
  if (cguid != null)   builder.setPositiveButton(R.string.start,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      Intent intent=new Intent(MapsforgeActivity.this,MainActivity.class);
      intent.putExtra("String_Node_Str",cguid);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivity(intent);
      dialog.dismiss();
      MapsforgeActivity.this.finish();
    }
  }
);
  builder.show();
}
Program: 13528
Project: 13528
Buggy source:
public void addCartridges(Vector<CartridgeFile> cartridges){
  if (cartridges == null)   return;
  MapPointPack pack=new MapPointPack(false,R.drawable.marker_wherigo);
  for (  CartridgeFile cartridge : cartridges) {
    if (cartridge.latitude % 360.0 == 0 && cartridge.longitude % 360.0 == 0) {
      continue;
    }
    MapPoint pt=new MapPoint(cartridge.name,cartridge.description,cartridge.latitude,cartridge.longitude);
    try {
      byte[] iconData=cartridge.getFile(cartridge.iconId);
      Bitmap icon=BitmapFactory.decodeByteArray(iconData,0,iconData.length);
      MapPointPack iconPack=new MapPointPack(false,icon);
      iconPack.getPoints().add(pt);
      items.add(iconPack);
    }
 catch (    Exception e) {
      pack.getPoints().add(pt);
    }
  }
  items.add(pack);
}

Fixed version (ground truth):
public void addCartridges(Vector<CartridgeFile> cartridges){
  if (cartridges == null)   return;
  MapPointPack pack=new MapPointPack(false,R.drawable.marker_wherigo);
  for (  CartridgeFile cartridge : cartridges) {
    if (cartridge.latitude % 360.0 == 0 && cartridge.longitude % 360.0 == 0) {
      continue;
    }
    MapPoint pt=new MapPoint(cartridge.name,cartridge.description,cartridge.latitude,cartridge.longitude);
    if (MainActivity.cartridgeFile == null && Engine.instance == null)     pt.setData(new File(cartridge.filename).getName());
    try {
      byte[] iconData=cartridge.getFile(cartridge.iconId);
      Bitmap icon=BitmapFactory.decodeByteArray(iconData,0,iconData.length);
      MapPointPack iconPack=new MapPointPack(false,icon);
      iconPack.getPoints().add(pt);
      items.add(iconPack);
    }
 catch (    Exception e) {
      pack.getPoints().add(pt);
    }
  }
  items.add(pack);
}
Program: 13529
Project: 13529
Buggy source:
private boolean restoreInstance(Bundle bundle){
  if (bundle == null) {
    return false;
  }
  String saveFileName=getArguments().getString(SAVE_FILE);
  if (saveFileName == null) {
    return false;
  }
  saveFile=new File(saveFileName);
  return true;
}

Fixed version (ground truth):
private boolean restoreInstance(Bundle bundle){
  if (bundle == null) {
    return false;
  }
  String saveFileName=bundle.getString(SAVE_FILE);
  if (saveFileName == null) {
    return false;
  }
  saveFile=new File(saveFileName);
  return true;
}
Program: 13530
Project: 13530
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  Log.d(TAG,"String_Node_Str");
  Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler());
  PreferenceManager.setDefaultValues(this,R.xml.whereyougo_preferences,false);
  Preferences.init(this);
  Configuration config=getBaseContext().getResources().getConfiguration();
  String lang=PreferenceValues.getPrefString(R.string.pref_KEY_S_LANGUAGE,R.string.pref_DEFAULT_LANGUAGE);
  if (lang.equals("String_Node_Str")) {
    lang=this.getString(R.string.pref_language_id_cz);
    PreferenceValues.setPrefString(R.string.pref_KEY_S_LANGUAGE,lang);
  }
  if (!lang.equals(getString(R.string.pref_language_id_default)) && !config.locale.getLanguage().equals(lang)) {
    ArrayList<String> loc=StringToken.parse(lang,"String_Node_Str");
    if (loc.size() == 1) {
      locale=new Locale(lang);
    }
 else {
      locale=new Locale(loc.get(0),loc.get(1));
    }
    Locale.setDefault(locale);
    config.locale=locale;
    getBaseContext().getResources().updateConfiguration(config,getBaseContext().getResources().getDisplayMetrics());
  }
  initCore();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  Log.d(TAG,"String_Node_Str");
  Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler());
  PreferenceManager.setDefaultValues(this,R.xml.whereyougo_preferences,false);
  Preferences.init(this);
  Configuration config=getBaseContext().getResources().getConfiguration();
  String lang=PreferenceValues.getPrefString(this,R.string.pref_KEY_S_LANGUAGE,R.string.pref_DEFAULT_LANGUAGE);
  if (lang.equals("String_Node_Str")) {
    lang=this.getString(R.string.pref_language_id_cz);
    PreferenceValues.setPrefString(R.string.pref_KEY_S_LANGUAGE,lang);
  }
  if (!lang.equals(getString(R.string.pref_language_id_default)) && !config.locale.getLanguage().equals(lang)) {
    ArrayList<String> loc=StringToken.parse(lang,"String_Node_Str");
    if (loc.size() == 1) {
      locale=new Locale(lang);
    }
 else {
      locale=new Locale(loc.get(0),loc.get(1));
    }
    Locale.setDefault(locale);
    config.locale=locale;
    getBaseContext().getResources().updateConfiguration(config,getBaseContext().getResources().getDisplayMetrics());
  }
  initCore();
}
Program: 13532
Project: 13532
Buggy source:
public void render(){
  if (!isStatic) {
    matrix.setIdentity();
    matrix.translate(translation);
    Matrix4f.mul(matrix,rotate(rotation),matrix);
    matrix.scale(scale);
    matrix.store(fb);
  }
  GlStateManager.pushMatrix();
  GlStateManager.multMatrix(fb);
  if (mesh != null) {
    mesh.render();
  }
  for (  Node node : children) {
    node.render();
  }
  GlStateManager.popMatrix();
}

Fixed version (ground truth):
public void render(){
  if (!isStatic) {
    matrix.setIdentity();
    matrix.translate(translation);
    Matrix4f.mul(matrix,rotate(rotation),matrix);
    matrix.scale(scale);
    matrix.store(fb);
    fb.rewind();
  }
  GlStateManager.pushMatrix();
  GlStateManager.multMatrix(fb);
  if (mesh != null) {
    mesh.render();
  }
  for (  Node node : children) {
    node.render();
  }
  GlStateManager.popMatrix();
}
Program: 13533
Project: 13533
Buggy source:
/** 
 * Renders the entire queue of parts
 */
public void doRender(){
  GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX,modelViewMatrixWorld);
  shader.use();
  for (  HashMap.Entry<OutfitPart,FloatBuffer> entry : renders.entrySet()) {
    Model model=PartRegistry.getModel(entry.getKey().basePart);
    GL11.glLoadMatrix(entry.getValue());
    if (model != null) {
      model.render();
    }
  }
  renders.clear();
  GL11.glLoadMatrix(modelViewMatrixWorld);
  OpenGlHelper.glUseProgram(0);
  checkError();
}

Fixed version (ground truth):
/** 
 * Renders the entire queue of parts
 */
public void doRender(){
  GlStateManager.getFloat(GL11.GL_MODELVIEW_MATRIX,modelViewMatrixWorld);
  shader.use();
  for (  HashMap.Entry<OutfitPart,FloatBuffer> entry : renders.entrySet()) {
    Part part=entry.getKey().getPart();
    if (part == null)     continue;
    Model model=part.getModel();
    if (model == null)     continue;
    GL11.glLoadMatrix(entry.getValue());
    model.render();
  }
  renders.clear();
  GL11.glLoadMatrix(modelViewMatrixWorld);
  OpenGlHelper.glUseProgram(0);
  checkError();
}
Program: 13534
Project: 13534
Buggy source:
private void renderPart(int x,int y,int z,int scale,OutfitPart part){
  Model model=PartRegistry.getModel(part.basePart);
  GlStateManager.pushMatrix();
  GlStateManager.translate(x,y,z);
  GlStateManager.scale(-scale,scale,1F);
  RenderHelper.enableStandardItemLighting();
  Minecraft.getMinecraft().getRenderManager().playerViewY=180.0F;
  if (model != null) {
    model.render();
  }
 else {
  }
  RenderHelper.disableStandardItemLighting();
  OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
  OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
  GlStateManager.popMatrix();
}

Fixed version (ground truth):
private void renderPart(int x,int y,int z,int scale,OutfitPart part){
  Part basePart=part.getPart();
  if (basePart == null)   return;
  Model model=basePart.getModel();
  GlStateManager.pushMatrix();
  GlStateManager.translate(x,y,z);
  GlStateManager.scale(-scale,scale,1F);
  RenderHelper.enableStandardItemLighting();
  Minecraft.getMinecraft().getRenderManager().playerViewY=180.0F;
  if (model != null) {
    model.render();
  }
 else {
  }
  RenderHelper.disableStandardItemLighting();
  OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
  OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
  GlStateManager.popMatrix();
}
Program: 13535
Project: 13535
Buggy source:
public Shader(String vertShader,String fragShader){
  Minecraft mc=Minecraft.getMinecraft();
  ResourceLocation vertRes=new ResourceLocation(Tails.MOD_ID,"String_Node_Str" + vertShader + "String_Node_Str");
  ResourceLocation fragRes=new ResourceLocation(Tails.MOD_ID,"String_Node_Str" + fragShader + "String_Node_Str");
  ByteBuffer vertSrc, fragSrc;
  try (InputStream is=mc.getResourceManager().getResource(vertRes).getInputStream()){
    byte[] bytes=IOUtils.toByteArray(is);
    vertSrc=ByteBuffer.wrap(bytes);
  }
 catch (  IOException e) {
    Tails.logger.error("String_Node_Str" + vertShader,e);
    return;
  }
  try (InputStream is=mc.getResourceManager().getResource(fragRes).getInputStream()){
    byte[] bytes=IOUtils.toByteArray(is);
    fragSrc=ByteBuffer.wrap(bytes);
  }
 catch (  IOException e) {
    Tails.logger.error("String_Node_Str" + vertShader,e);
    return;
  }
  int vert, frag;
  vert=GL20.glCreateShader(GL20.GL_VERTEX_SHADER);
  GL20.glShaderSource(vert,vertSrc);
  GL20.glCompileShader(vert);
  checkShaderCompile(vert);
  frag=GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);
  GL20.glShaderSource(frag,fragSrc);
  GL20.glCompileShader(frag);
  checkShaderCompile(frag);
  program=GL20.glCreateProgram();
  GL20.glAttachShader(program,vert);
  GL20.glAttachShader(program,frag);
  GL20.glLinkProgram(program);
  GL20.glDeleteShader(vert);
  GL20.glDeleteShader(frag);
}

Fixed version (ground truth):
public Shader(String vertShader,String fragShader){
  Minecraft mc=Minecraft.getMinecraft();
  ResourceLocation vertRes=new ResourceLocation(Tails.MOD_ID,"String_Node_Str" + vertShader + "String_Node_Str");
  ResourceLocation fragRes=new ResourceLocation(Tails.MOD_ID,"String_Node_Str" + fragShader + "String_Node_Str");
  uniforms=new HashMap<>();
  ByteBuffer vertSrc, fragSrc;
  try (InputStream is=mc.getResourceManager().getResource(vertRes).getInputStream()){
    byte[] bytes=IOUtils.toByteArray(is);
    vertSrc=ByteBuffer.allocateDirect(bytes.length);
    vertSrc.put(bytes);
  }
 catch (  IOException e) {
    Tails.logger.error("String_Node_Str" + vertShader,e);
    return;
  }
  try (InputStream is=mc.getResourceManager().getResource(fragRes).getInputStream()){
    byte[] bytes=IOUtils.toByteArray(is);
    fragSrc=ByteBuffer.allocateDirect(bytes.length);
    fragSrc.put(bytes);
  }
 catch (  IOException e) {
    Tails.logger.error("String_Node_Str" + vertShader,e);
    return;
  }
  int vert, frag;
  vert=GL20.glCreateShader(GL20.GL_VERTEX_SHADER);
  GL20.glShaderSource(vert,vertSrc);
  GL20.glCompileShader(vert);
  checkShaderCompile(vert);
  frag=GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);
  GL20.glShaderSource(frag,fragSrc);
  GL20.glCompileShader(frag);
  checkShaderCompile(frag);
  program=GL20.glCreateProgram();
  GL20.glAttachShader(program,vert);
  GL20.glAttachShader(program,frag);
  GL20.glLinkProgram(program);
  GL20.glDeleteShader(vert);
  GL20.glDeleteShader(frag);
}
Program: 13536
Project: 13536
Buggy source:
@Override public void doRenderLayer(@Nonnull AbstractClientPlayer entity,float limbSwing,float limbSwingAmount,float partialTicks,float ageInTicks,float netHeadYaw,float headPitch,float scale){
  if (entity.isInvisible())   return;
  UUID uuid=EntityPlayer.getUUID(entity.getGameProfile());
  if (Tails.proxy.hasPartsData(uuid)) {
    PartsData partsData=Tails.proxy.getPartsData(uuid);
    if (partsData.hasPartInfo(partType)) {
      PartInfo tailInfo=partsData.getPartInfo(partType);
      GlStateManager.pushMatrix();
      modelRenderer.postRender(0.0625F);
      if (partType == PartsData.PartType.EARS || partType == PartsData.PartType.MUZZLE) {
        if (entity.isSneaking()) {
          GlStateManager.translate(0f,0.2F,0f);
        }
        if (mpmCompat) {
          GlStateManager.rotate(netHeadYaw,0f,1f,0f);
          GlStateManager.rotate(headPitch,1f,0f,0f);
        }
 else {
          GlStateManager.rotate(headPitch * 0.017453292F,1f,0f,0f);
          GlStateManager.rotate(netHeadYaw * 0.017453292F,0f,1f,0f);
        }
      }
      PartRegistry.getRenderPart(tailInfo.partType,tailInfo.typeid).render(entity,tailInfo,0,0,0,partialTicks);
      GlStateManager.popMatrix();
    }
  }
}

Fixed version (ground truth):
@Override public void doRenderLayer(@Nonnull AbstractClientPlayer entity,float limbSwing,float limbSwingAmount,float partialTicks,float ageInTicks,float netHeadYaw,float headPitch,float scale){
  if (entity.isInvisible())   return;
  UUID uuid=EntityPlayer.getUUID(entity.getGameProfile());
  if (Tails.proxy.hasPartsData(uuid)) {
    PartsData partsData=Tails.proxy.getPartsData(uuid);
    if (partsData.hasPartInfo(partType)) {
      PartInfo tailInfo=partsData.getPartInfo(partType);
      GlStateManager.pushMatrix();
      if (partType == PartsData.PartType.EARS || partType == PartsData.PartType.MUZZLE) {
        if (entity.isSneaking()) {
          GlStateManager.translate(0f,0.2F,0f);
        }
        if (mpmCompat) {
          GlStateManager.rotate(netHeadYaw,0f,1f,0f);
          GlStateManager.rotate(headPitch,1f,0f,0f);
        }
 else {
          GlStateManager.rotate(headPitch * 0.017453292F,1f,0f,0f);
          GlStateManager.rotate(netHeadYaw * 0.017453292F,0f,1f,0f);
        }
      }
      modelRenderer.postRender(0.0625F);
      PartRegistry.getRenderPart(tailInfo.partType,tailInfo.typeid).render(entity,tailInfo,0,0,0,partialTicks);
      GlStateManager.popMatrix();
    }
  }
}
Program: 13537
Project: 13537
Buggy source:
@Override protected void actionPerformed(GuiButton button){
  Outfit outfit=parent.getOutfit();
  if (button.id == 0) {
    boolean libraryMode=button.displayString.equals(I18n.format("String_Node_Str"));
    parent.partsPanel.enabled=!libraryMode;
    parent.tintPanel.enabled=!libraryMode;
    parent.libraryInfoPanel.enabled=libraryMode;
    parent.libraryPanel.enabled=libraryMode;
    parent.libraryImportPanel.enabled=libraryMode;
    parent.partsPanel.selectDefaultListEntry();
    parent.libraryPanel.initList();
    parent.libraryInfoPanel.setEntry(null);
    parent.clearCurrTintEdit();
    parent.refreshTintPane();
    if (!libraryMode) {
      Tails.setLocalOutfit(outfit);
    }
    parent.setOutfit(Tails.localOutfit);
    button.displayString=(libraryMode ? I18n.format("String_Node_Str") : I18n.format("String_Node_Str"));
  }
 else   if (button.id == 1) {
    parent.partsPanel.selectDefaultListEntry();
    parent.libraryPanel.initList();
    parent.libraryInfoPanel.setEntry(null);
    parent.clearCurrTintEdit();
    parent.refreshTintPane();
    parent.setOutfitPart(null);
  }
 else   if (button.id == 2) {
    Tails.setLocalOutfit(outfit);
    Tails.proxy.setActiveOutfit(mc.player.getPersistentID(),outfit);
    Tails.networkWrapper.sendToServer(new PlayerDataMessage(mc.getSession().getProfile().getId(),outfit,false));
    ToastManager.INSTANCE.createCenteredToast(parent.width / 2,parent.height - 40,100,TextFormatting.GREEN + "String_Node_Str");
    this.mc.displayGuiScreen(null);
  }
}

Fixed version (ground truth):
@Override protected void actionPerformed(GuiButton button){
  Outfit outfit=parent.getOutfit();
  if (button.id == 0) {
    boolean libraryMode=button.displayString.equals(I18n.format("String_Node_Str"));
    parent.partsPanel.enabled=!libraryMode;
    parent.tintPanel.enabled=!libraryMode;
    parent.libraryInfoPanel.enabled=libraryMode;
    parent.libraryPanel.enabled=libraryMode;
    parent.libraryImportPanel.enabled=libraryMode;
    parent.partsPanel.selectDefaultListEntry();
    parent.libraryPanel.initList();
    parent.libraryInfoPanel.setEntry(null);
    parent.clearCurrTintEdit();
    parent.refreshTintPane();
    if (!libraryMode) {
      Tails.setLocalOutfit(outfit);
    }
    parent.setOutfit(Tails.localOutfit);
    button.displayString=(libraryMode ? I18n.format("String_Node_Str") : I18n.format("String_Node_Str"));
  }
 else   if (button.id == 1) {
    parent.partsPanel.selectDefaultListEntry();
    parent.libraryPanel.initList();
    parent.libraryInfoPanel.setEntry(null);
    parent.clearCurrTintEdit();
    parent.refreshTintPane();
    parent.setActiveOutfitPart(null);
  }
 else   if (button.id == 2) {
    Tails.setLocalOutfit(outfit);
    Tails.proxy.setActiveOutfit(mc.player.getPersistentID(),outfit);
    Tails.networkWrapper.sendToServer(new PlayerDataMessage(mc.getSession().getProfile().getId(),outfit,false));
    ToastManager.INSTANCE.createCenteredToast(parent.width / 2,parent.height - 40,100,TextFormatting.GREEN + "String_Node_Str");
    this.mc.displayGuiScreen(null);
  }
}
Program: 13538
Project: 13538
Buggy source:
void addOutfitPart(OutfitPart outfitPart){
  outfit.parts.add(outfitPart);
  setOutfitPart(outfitPart);
}

Fixed version (ground truth):
/** 
 * Adds a new OutfitPart to the Outfit and sets it to the current edited one
 * @param outfitPart
 */
void addOutfitPart(OutfitPart outfitPart){
  outfit.parts.add(outfitPart);
  setActiveOutfitPart(outfitPart);
}
Program: 13539
Project: 13539
Buggy source:
void refreshTintPane(){
  hexText.setTextColor(currTintColour);
  Color c=new Color(currTintColour);
  rgbSliders[0].setValue(c.getRed() / 255F);
  rgbSliders[1].setValue(c.getGreen() / 255F);
  rgbSliders[2].setValue(c.getBlue() / 255F);
  float[] hsbvals=Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),null);
  hsbSliders[0].setValue(hsbvals[0]);
  hsbSliders[1].setValue(hsbvals[1]);
  hsbSliders[2].setValue(hsbvals[2]);
  hsbSliders[1].setHue((float)hsbSliders[0].getValue());
  hsbSliders[1].setBrightness((float)hsbSliders[2].getValue());
  if (this.currTintEdit > 0) {
    rgbSliders[0].visible=rgbSliders[1].visible=rgbSliders[2].visible=true;
    hsbSliders[0].visible=hsbSliders[1].visible=hsbSliders[2].visible=true;
    tintReset.visible=true;
    colourPicker.visible=true;
  }
 else {
    rgbSliders[0].visible=rgbSliders[1].visible=rgbSliders[2].visible=false;
    hsbSliders[0].visible=hsbSliders[1].visible=hsbSliders[2].visible=false;
    tintReset.visible=false;
    colourPicker.visible=false;
  }
  tintReset.enabled=true;
  if (currTintEdit > 0)   parent.getCurrentOutfitPart().tints[currTintEdit - 1]=currTintColour | 0xFF << 24;
  parent.setOutfitPart(parent.getCurrentOutfitPart());
}

Fixed version (ground truth):
void refreshTintPane(){
  hexText.setTextColor(currTintColour);
  Color c=new Color(currTintColour);
  rgbSliders[0].setValue(c.getRed() / 255F);
  rgbSliders[1].setValue(c.getGreen() / 255F);
  rgbSliders[2].setValue(c.getBlue() / 255F);
  float[] hsbvals=Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),null);
  hsbSliders[0].setValue(hsbvals[0]);
  hsbSliders[1].setValue(hsbvals[1]);
  hsbSliders[2].setValue(hsbvals[2]);
  hsbSliders[1].setHue((float)hsbSliders[0].getValue());
  hsbSliders[1].setBrightness((float)hsbSliders[2].getValue());
  if (this.currTintEdit > 0) {
    rgbSliders[0].visible=rgbSliders[1].visible=rgbSliders[2].visible=true;
    hsbSliders[0].visible=hsbSliders[1].visible=hsbSliders[2].visible=true;
    tintReset.visible=true;
    colourPicker.visible=true;
  }
 else {
    rgbSliders[0].visible=rgbSliders[1].visible=rgbSliders[2].visible=false;
    hsbSliders[0].visible=hsbSliders[1].visible=hsbSliders[2].visible=false;
    tintReset.visible=false;
    colourPicker.visible=false;
  }
  tintReset.enabled=true;
  if (currTintEdit > 0)   parent.getCurrentOutfitPart().tints[currTintEdit - 1]=currTintColour | 0xFF << 24;
  parent.setActiveOutfitPart(parent.getCurrentOutfitPart());
}
Program: 13540
Project: 13540
Buggy source:
public static ResourceLocation generateTexture(OutfitPart part){
  String texturePath="String_Node_Str" + part.basePart + "String_Node_Str";
  ResourceLocation texture=new ResourceLocation("String_Node_Str" + part.basePart + "String_Node_Str"+ part.tints[0]+ "String_Node_Str"+ part.tints[1]+ "String_Node_Str"+ part.tints[2]);
  Minecraft.getMinecraft().getTextureManager().loadTexture(texture,new TripleTintTexture("String_Node_Str",texturePath,part.tints[0],part.tints[1],part.tints[2]));
  return texture;
}

Fixed version (ground truth):
public static ResourceLocation generateTexture(OutfitPart part){
  String texturePath="String_Node_Str" + part.basePart + "String_Node_Str";
  ResourceLocation texture=new ResourceLocation(Tails.MOD_ID,"String_Node_Str" + part.basePart + "String_Node_Str"+ part.tints[0]+ "String_Node_Str"+ part.tints[1]+ "String_Node_Str"+ part.tints[2]+ "String_Node_Str"+ UUID.randomUUID());
  Minecraft.getMinecraft().getTextureManager().loadTexture(texture,new TripleTintTexture(Tails.MOD_ID,texturePath,part.tints[0],part.tints[1],part.tints[2]));
  return texture;
}
Program: 13541
Project: 13541
Buggy source:
@Override public void loadTexture(IResourceManager p_110551_1_) throws IOException {
  this.deleteGlTexture();
  BufferedImage texture;
  try {
    if (texturename != null) {
      InputStream inputstream=p_110551_1_.getResource(new ResourceLocation(namespace,texturename)).getInputStream();
      texture=ImageIO.read(inputstream);
      int w=texture.getWidth();
      int h=texture.getHeight();
      int length=w * h;
      int[] pixeldata=new int[w * h];
      texture.getRGB(0,0,w,h,pixeldata,0,w);
      int c, r, g, b, a;
      for (int i=0; i < length; i++) {
        c=pixeldata[i];
        a=alpha(c);
        r=red(c);
        g=green(c);
        b=blue(c);
        pixeldata[i]=colourise(r,this.tint1,g,this.tint2,b,this.tint3,a);
      }
      texture.setRGB(0,0,w,h,pixeldata,0,w);
      TextureUtil.uploadTextureImage(this.getGlTextureId(),texture);
    }
  }
 catch (  IOException ioexception) {
    LogManager.getLogger().error("String_Node_Str",ioexception);
  }
}

Fixed version (ground truth):
@Override public void loadTexture(IResourceManager resourceManager) throws IOException {
  this.deleteGlTexture();
  BufferedImage texture;
  try {
    InputStream inputstream=resourceManager.getResource(new ResourceLocation(namespace,texturename)).getInputStream();
    texture=ImageIO.read(inputstream);
    int w=texture.getWidth();
    int h=texture.getHeight();
    int length=w * h;
    int[] pixeldata=new int[w * h];
    texture.getRGB(0,0,w,h,pixeldata,0,w);
    int c, r, g, b, a;
    for (int i=0; i < length; i++) {
      c=pixeldata[i];
      a=alpha(c);
      r=red(c);
      g=green(c);
      b=blue(c);
      pixeldata[i]=colourise(r,this.tint1,g,this.tint2,b,this.tint3,a);
    }
    texture.setRGB(0,0,w,h,pixeldata,0,w);
    TextureUtil.uploadTextureImage(getGlTextureId(),texture);
  }
 catch (  IOException ioexception) {
    Tails.logger.error("String_Node_Str",ioexception);
  }
}
Program: 13542
Project: 13542
Buggy source:
@NetworkCheckHandler public boolean checkRemoteVersions(Map<String,String> versions,Side side){
  if (versions.containsKey(MOD_ID)) {
    String clientVer=Loader.instance().getReversedModObjectList().get(this).getVersion();
    if (VersionParser.parseRange("String_Node_Str" + clientVer + "String_Node_Str").containsVersion(new DefaultArtifactVersion(versions.get(MOD_ID)))) {
      logger.warn(String.format("String_Node_Str",side.toString(),clientVer,versions.get(MOD_ID)));
    }
 else {
      logger.debug(String.format("String_Node_Str",side.toString(),clientVer,versions.get(MOD_ID)));
      hasRemote=true;
    }
  }
  return true;
}

Fixed version (ground truth):
@NetworkCheckHandler public boolean checkRemoteVersions(Map<String,String> versions,Side side){
  if (versions.containsKey(MOD_ID)) {
    String clientVer=Loader.instance().getReversedModObjectList().get(this).getVersion();
    if (!VersionParser.parseRange("String_Node_Str" + clientVer + "String_Node_Str").containsVersion(new DefaultArtifactVersion(versions.get(MOD_ID)))) {
      logger.warn(String.format("String_Node_Str",clientVer,side.toString(),versions.get(MOD_ID)));
    }
 else {
      logger.debug(String.format("String_Node_Str",clientVer,side.toString(),versions.get(MOD_ID)));
      hasRemote=true;
    }
  }
  return true;
}
Program: 13543
Project: 13543
Buggy source:
public void setPartsInfo(PartInfo newPartInfo){
  editingPartInfo.setTexture(null);
  editingPartInfo=newPartInfo;
  if (editingPartInfo.hasPart)   editingPartInfo.setTexture(TextureHelper.generateTexture(editingPartInfo));
  partsData.setPartInfo(partType,editingPartInfo);
  setPartsData(partsData);
}

Fixed version (ground truth):
public void setPartsInfo(PartInfo newPartInfo){
  editingPartInfo=newPartInfo;
  if (editingPartInfo.hasPart)   editingPartInfo.setTexture(TextureHelper.generateTexture(editingPartInfo));
  partsData.setPartInfo(partType,editingPartInfo);
  setPartsData(partsData);
}
Program: 13545
Project: 13545
Buggy source:
@Override public void render(EntityLivingBase theEntity,int subtype,float partialTicks){
  this.setRotationAngles(0,0,0,0,subtype,partialTicks,theEntity);
  this.tailBase.render(0.0625F);
  if (subtype == 1) {
    GL11.glDisable(GL11.GL_CULL_FACE);
    this.tailSubBase.render(0.0625F);
    GL11.glEnable(GL11.GL_CULL_FACE);
  }
}

Fixed version (ground truth):
@Override public void render(EntityLivingBase theEntity,int subtype,float partialTicks){
  this.setRotationAngles(0,0,0,0,subtype,partialTicks,theEntity);
  this.tailBase.render(0.0625F);
  if (subtype == 1) {
    this.tailSubBase.render(0.0625F);
  }
}
Program: 13546
Project: 13546
Buggy source:
public void setTexture(ResourceLocation texture){
  if (this.texture == null || !this.texture.equals(texture)) {
    try {
      Minecraft.getMinecraft().renderEngine.deleteTexture(this.texture);
    }
 catch (    Exception ignored) {
    }
    this.needsTextureCompile=true;
  }
  this.texture=texture;
}

Fixed version (ground truth):
public void setTexture(ResourceLocation texture){
  if (texture == null || (this.texture != null && !this.texture.equals(texture))) {
    try {
      Minecraft.getMinecraft().renderEngine.deleteTexture(this.texture);
    }
 catch (    Exception ignored) {
    }
    this.needsTextureCompile=true;
  }
 else {
    this.needsTextureCompile=false;
  }
  this.texture=texture;
}
Program: 13547
Project: 13547
Buggy source:
public void setPartsData(PartsData newPartsData){
  partsData=newPartsData;
  Tails.proxy.addPartsData(mc.thePlayer.getPersistentID(),partsData);
}

Fixed version (ground truth):
public void setPartsData(PartsData newPartsData){
  partsData=newPartsData;
  Tails.proxy.addPartsData(Minecraft.getMinecraft().thePlayer.getGameProfile().getId(),partsData);
}
Program: 13548
Project: 13548
Buggy source:
public GuiEditor(){
  PartInfo partInfo;
  if (Tails.localPartsData == null) {
    Tails.setLocalPartsData(new PartsData());
  }
  partType=PartsData.PartType.TAIL;
  for (  PartsData.PartType partType : PartsData.PartType.values()) {
    if (!Tails.localPartsData.hasPartInfo(partType)) {
      Tails.localPartsData.setPartInfo(partType,new PartInfo(false,0,0,0,0xFFFF0000,0xFF00FF00,0xFF0000FF,null,partType));
    }
  }
  partInfo=Tails.localPartsData.getPartInfo(partType);
  originalPartInfo=partInfo.deepCopy();
  partsData=Tails.localPartsData.deepCopy();
  this.partInfo=originalPartInfo.deepCopy();
}

Fixed version (ground truth):
public GuiEditor(){
  PartInfo partInfo;
  if (Tails.localPartsData == null) {
    Tails.setLocalPartsData(new PartsData());
  }
  partType=PartsData.PartType.TAIL;
  for (  PartsData.PartType partType : PartsData.PartType.values()) {
    if (!Tails.localPartsData.hasPartInfo(partType)) {
      Tails.localPartsData.setPartInfo(partType,new PartInfo(false,0,0,0,0xFFFF0000,0xFF00FF00,0xFF0000FF,null,partType));
    }
  }
  partInfo=Tails.localPartsData.getPartInfo(partType);
  originalPartInfo=partInfo.deepCopy();
  setPartsData(Tails.localPartsData.deepCopy());
  this.partInfo=originalPartInfo.deepCopy();
}
Program: 13549
Project: 13549
Buggy source:
@Override public void fromBytes(ByteBuf buf){
  String dataJson=ByteBufUtils.readUTF8String(buf);
  System.out.println(dataJson);
  try {
    entries=Tails.gson.fromJson(dataJson,new TypeToken<List<LibraryEntryData>>(){
    }
.getType());
  }
 catch (  JsonParseException e) {
    e.printStackTrace();
  }
  delete=buf.readBoolean();
}

Fixed version (ground truth):
@Override public void fromBytes(ByteBuf buf){
  String dataJson=ByteBufUtils.readUTF8String(buf);
  try {
    entries=Tails.gson.fromJson(dataJson,new TypeToken<List<LibraryEntryData>>(){
    }
.getType());
  }
 catch (  JsonParseException e) {
    e.printStackTrace();
  }
  delete=buf.readBoolean();
}
Program: 13550
Project: 13550
Buggy source:
public PlayerDataMessage(UUID uuid,PartsData partsData,boolean shouldRemove){
  System.out.println(uuid + "String_Node_Str" + FMLCommonHandler.instance().getSide());
  this.uuid=uuid;
  this.partsData=partsData;
  this.shouldRemove=shouldRemove;
}

Fixed version (ground truth):
public PlayerDataMessage(UUID uuid,PartsData partsData,boolean shouldRemove){
  this.uuid=uuid;
  this.partsData=partsData;
  this.shouldRemove=shouldRemove;
}
Program: 13551
Project: 13551
Buggy source:
@SubscribeEvent(priority=EventPriority.LOWEST) public void onPlayerRenderTick(RenderPlayerEvent.Pre e){
  UUID uuid=e.entityPlayer.getGameProfile().getId();
  if (Tails.proxy.hasPartsData(uuid) && !e.entityPlayer.isInvisible()) {
    PartsData data=Tails.proxy.getPartsData(uuid);
    if (!flag) {
      e.renderer.modelBipedMain.bipedBody.addChild(new ModelRenderer2(e.renderer.modelBipedMain,PartsData.PartType.TAIL));
      e.renderer.modelBipedMain.bipedBody.addChild(new ModelRenderer2(e.renderer.modelBipedMain,PartsData.PartType.WINGS));
      e.renderer.modelBipedMain.bipedHead.addChild(new ModelRenderer2(e.renderer.modelBipedMain,PartsData.PartType.EARS));
      flag=true;
    }
    currentPartsData=data;
    currentPlayerTexture=((AbstractClientPlayer)e.entityPlayer).getLocationSkin();
    currentEvent=e;
  }
}

Fixed version (ground truth):
@SubscribeEvent(priority=EventPriority.LOWEST) public void onPlayerRenderTick(RenderPlayerEvent.Pre e){
  UUID uuid=e.entityPlayer.getGameProfile().getId();
  if (Tails.proxy.hasPartsData(uuid) && !e.entityPlayer.isInvisible()) {
    PartsData data=Tails.proxy.getPartsData(uuid);
    if (!flag) {
      e.renderer.modelBipedMain.bipedBody.addChild(new ModelRendererWrapper(e.renderer.modelBipedMain,PartsData.PartType.TAIL));
      e.renderer.modelBipedMain.bipedBody.addChild(new ModelRendererWrapper(e.renderer.modelBipedMain,PartsData.PartType.WINGS));
      e.renderer.modelBipedMain.bipedHead.addChild(new ModelRendererWrapper(e.renderer.modelBipedMain,PartsData.PartType.EARS));
      flag=true;
    }
    currentPartsData=data;
    currentPlayerTexture=((AbstractClientPlayer)e.entityPlayer).getLocationSkin();
    currentEvent=e;
  }
}