nus-yam/ex-repair huggingface dataset:
Program: 39025
Project: 39025
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + EntityList.getEntityString(this.entity) + "String_Node_Str"+ getX()+ "String_Node_Str"+ getY()+ "String_Node_Str"+ getZ()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  String name=EntityList.getEntityString(this.entity);
  return "String_Node_Str" + (name == null ? "String_Node_Str" : name) + "String_Node_Str"+ getX()+ "String_Node_Str"+ getY()+ "String_Node_Str"+ getZ()+ "String_Node_Str";
}
Program: 39026
Project: 39026
Buggy source:
/** 
 * Creates an Item object from a   {@link Block} object input.
 * @param block the {@link Block}
 */
public Item(Block block){
  this.item=net.minecraft.item.Item.getItemFromBlock(block.getBlock());
  this.itemStack=new ItemStack(this.item);
}

Fixed version (ground truth):
/** 
 * Created an Item object from an Entity. Has to be wrapping an EntityItem.
 * @param entity the Entity
 */
public Item(Entity entity){
  if (entity.getEntity() instanceof EntityItem) {
    this.item=((EntityItem)entity.getEntity()).getEntityItem().getItem();
    this.itemStack=((EntityItem)entity.getEntity()).getEntityItem();
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 39027
Project: 39027
Buggy source:
private HashMap<String,List<String>> getAllFiles(File dir,ArrayList<String> ignored) throws IOException {
  List<File> files=Files.find(dir.toPath(),5,(path,basicFileAttributes) -> path.toString().toLowerCase().endsWith("String_Node_Str")).map(Path::toFile).filter(file -> {
    if (ignored == null)     return true;
    for (    String ignore : ignored) {
      if (file.getPath().contains(ignore)) {
        return false;
      }
    }
    return true;
  }
).collect(Collectors.toList());
  HashMap<String,List<String>> allFiles=new HashMap<>();
  for (  File file : files) {
    try {
      allFiles.put(file.getName(),FileUtils.readLines(file));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  return allFiles;
}

Fixed version (ground truth):
private HashMap<String,List<String>> getAllFiles(File dir,ArrayList<String> ignored) throws IOException {
  HashMap<String,List<String>> allFiles=new HashMap<>();
  for (  File file : getScriptFiles(dir,ignored)) {
    try {
      allFiles.put(file.getName(),FileUtils.readLines(file));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  return allFiles;
}
Program: 39029
Project: 39029
Buggy source:
/** 
 * Compiles all text from multiple files into a singular string for loading.
 * @param dir the directory where the scripts to be compiled are
 * @return the string after compilation
 * @throws IOException thrown if a file doesn't exist
 */
public String compileScripts(File dir,ArrayList<String> ignored) throws IOException {
  List<File> files=Files.find(dir.toPath(),5,(path,basicFileAttributes) -> path.toString().toLowerCase().endsWith("String_Node_Str")).map(Path::toFile).filter(file -> {
    if (ignored == null)     return true;
    for (    String ignore : ignored) {
      if (file.getPath().contains(ignore)) {
        return false;
      }
    }
    return true;
  }
).collect(Collectors.toList());
  StringBuilder compiledScript=new StringBuilder();
  for (  File file : files) {
    BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(file),"String_Node_Str"));
    String line;
    parseScript:     while ((line=br.readLine()) != null) {
      for (      String illegalLine : getIllegalLines()) {
        if (line.contains(illegalLine))         continue parseScript;
      }
      compiledScript.append(line).append("String_Node_Str");
    }
  }
  return compiledScript.toString();
}

Fixed version (ground truth):
/** 
 * Compiles all text from multiple files into a singular string for loading.
 * @param dir the directory where the scripts to be compiled are
 * @return the string after compilation
 * @throws IOException thrown if a file doesn't exist
 */
public String compileScripts(File dir,ArrayList<String> ignored) throws IOException {
  List<File> files=getScriptFiles(dir,ignored);
  StringBuilder compiledScript=new StringBuilder();
  for (  File file : files) {
    BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(file),"String_Node_Str"));
    String line;
    parseScript:     while ((line=br.readLine()) != null) {
      for (      String illegalLine : getIllegalLines()) {
        if (line.contains(illegalLine))         continue parseScript;
      }
      compiledScript.append(line).append("String_Node_Str");
    }
  }
  return compiledScript.toString();
}
Program: 39030
Project: 39030
Buggy source:
public Module(String name,HashMap<String,List<String>> files,ModuleMetadata metadata){
  this.name=name;
  this.files=files;
  this.metadata=metadata == null ? new ModuleMetadata() : metadata;
}

Fixed version (ground truth):
public Module(String name,HashMap<String,List<String>> files,ModuleMetadata metadata){
  this.name=name;
  this.files=files;
  this.metadata=metadata;
}
Program: 39031
Project: 39031
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  File pictures=new File(event.getModConfigurationDirectory(),"String_Node_Str");
  pictures.mkdirs();
  assetsDir=pictures;
  new Console();
  Sentry.init(Reference.SENTRYDSN);
  Sentry.getContext().setUser(new UserBuilder().setUsername(Player.getName()).setId(Player.getUUID()).build());
  String sha256uuid=DigestUtils.sha256Hex(Player.getUUID());
  FileLib.getUrlContent("String_Node_Str" + sha256uuid);
  this.injectResourcePack(event.getModConfigurationDirectory().toString());
  this.configLocation=event.getModConfigurationDirectory();
  setupConfig();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  File pictures=new File(event.getModConfigurationDirectory(),"String_Node_Str");
  pictures.mkdirs();
  assetsDir=pictures;
  new Console();
  Sentry.init(Reference.SENTRYDSN);
  Sentry.getContext().setUser(new UserBuilder().setUsername(Player.getName()).setId(Player.getUUID()).build());
  String sha256uuid=DigestUtils.sha256Hex(Player.getUUID());
  FileLib.getUrlContent("String_Node_Str" + sha256uuid);
  this.configLocation=event.getModConfigurationDirectory();
  setupConfig();
}
Program: 39032
Project: 39032
Buggy source:
/** 
 * Downloads an image to store at the resource name location.
 * @param url          The url to download the image from
 * @return The Image object to allow for method chaining
 */
public static Image load(String name,String url){
  File resourceFile=new File(CTJS.getInstance().getAssetsDir(),name);
  try {
    if (resourceFile.exists()) {
      return new Image(ImageIO.read(resourceFile));
    }
    BufferedImage image=ImageIO.read(new URL(url));
    ImageIO.write(image,"String_Node_Str",resourceFile);
    return new Image(image);
  }
 catch (  Exception e) {
    Console.getConsole().out.println("String_Node_Str" + name + "String_Node_Str"+ url);
    Console.getConsole().printStackTrace(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Downloads an image to store at the resource name location.
 * @param url          The url to download the image from
 * @return The Image object to allow for method chaining
 */
public static Image load(String name,String url){
  File resourceFile=new File(CTJS.getInstance().getAssetsDir(),name);
  try {
    if (resourceFile.exists()) {
      return new Image(ImageIO.read(resourceFile));
    }
    BufferedImage image=ImageIO.read(new URL(url));
    ImageIO.write(image,"String_Node_Str",resourceFile);
    return new Image(image);
  }
 catch (  Exception e) {
    Console.getInstance().out.println("String_Node_Str" + name + "String_Node_Str"+ url);
    Console.getInstance().printStackTrace(e);
  }
  return null;
}
Program: 39033
Project: 39033
Buggy source:
private void dropShadow(){
  if (!dropShadow)   return;
  drawRect(this.shadowColor,this.x + this.shadowOffsetX,this.y + this.height,this.width,this.shadowOffsetY);
  drawRect(this.shadowColor,this.x + this.width,this.y + this.shadowOffsetY,this.shadowOffsetX,this.height - this.shadowOffsetY);
}

Fixed version (ground truth):
private void dropShadow(){
  if (!shadow)   return;
  drawRect(this.shadowColor,this.x + this.shadowOffsetX,this.y + this.height,this.width,this.shadowOffsetY);
  drawRect(this.shadowColor,this.x + this.width,this.y + this.shadowOffsetY,this.shadowOffsetX,this.height - this.shadowOffsetY);
}
Program: 39034
Project: 39034
Buggy source:
/** 
 * Sets the drop shadow of the rectangle.
 * @param color   The {@link Renderer#color(int,int,int,int)} of the drop shadow
 * @param offsetX The x offset of the drop shadow
 * @param offsetY The y offset of the drop shadow
 * @return The rectangle to allow for method chaining
 */
public Rectangle setShadow(int color,float offsetX,float offsetY){
  setDropShadow(true);
  setShadowColor(color);
  setShadowOffsetX(offsetX);
  setShadowOffsetY(offsetY);
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the drop shadow of the rectangle.
 * @param color   The {@link Renderer#color(int,int,int,int)} of the drop shadow
 * @param offsetX The x offset of the drop shadow
 * @param offsetY The y offset of the drop shadow
 * @return The rectangle to allow for method chaining
 */
public Rectangle setShadow(int color,float offsetX,float offsetY){
  setShadow(true);
  setShadowColor(color);
  setShadowOffsetX(offsetX);
  setShadowOffsetY(offsetY);
  return this;
}
Program: 39035
Project: 39035
Buggy source:
Rectangle(int color,float x,float y,float width,float height){
  this.color=color;
  this.x=x;
  this.y=y;
  this.width=width;
  this.height=height;
  this.dropShadow=false;
  this.outline=false;
}

Fixed version (ground truth):
Rectangle(int color,float x,float y,float width,float height){
  this.color=color;
  this.x=x;
  this.y=y;
  this.width=width;
  this.height=height;
  this.shadow=false;
  this.outline=false;
}
Program: 39036
Project: 39036
Buggy source:
Text(String text,float x,float y){
  this.string=text;
  this.x=x;
  this.y=y;
  this.width=0;
  this.maxLines=0;
  this.color=0xffffffff;
  this.scale=1;
  this.dropShadow=false;
}

Fixed version (ground truth):
Text(String text,float x,float y){
  this.string=text;
  this.x=x;
  this.y=y;
  this.width=0;
  this.maxLines=0;
  this.color=0xffffffff;
  this.scale=1;
  this.shadow=false;
  this.align="String_Node_Str";
}
Program: 39037
Project: 39037
Buggy source:
/** 
 * Draws the text onto the client's overlay.
 * @return The text to allow for method chaining
 */
public Text draw(){
  GlStateManager.pushMatrix();
  GlStateManager.enableBlend();
  GlStateManager.scale(this.scale,this.scale,this.scale);
  if (this.width > 0) {
    float maxLinesHolder=this.maxLines;
    float yHolder=this.y;
    for (    String line : Renderer.getFontRenderer().listFormattedStringToWidth(this.string,this.width)) {
      Renderer.getFontRenderer().drawString(line,this.x / this.scale,yHolder / this.scale,this.color,this.dropShadow);
      yHolder+=9;
      maxLinesHolder--;
      if (maxLinesHolder == 0)       break;
    }
  }
 else {
    Renderer.getFontRenderer().drawString(this.string,this.x / this.scale,this.y / this.scale,this.color,this.dropShadow);
  }
  GlStateManager.disableBlend();
  GlStateManager.popMatrix();
  return this;
}

Fixed version (ground truth):
/** 
 * Draws the text onto the client's overlay.
 * @return The text to allow for method chaining
 */
public Text draw(){
  GlStateManager.pushMatrix();
  GlStateManager.enableBlend();
  GlStateManager.scale(this.scale,this.scale,this.scale);
  if (this.width > 0) {
    float maxLinesHolder=this.maxLines;
    float yHolder=this.y;
    for (    String line : Renderer.getFontRenderer().listFormattedStringToWidth(this.string,this.width)) {
      Renderer.getFontRenderer().drawString(line,getXAlign(line),yHolder / this.scale,this.color,this.shadow);
      yHolder+=9;
      maxLinesHolder--;
      if (maxLinesHolder == 0)       break;
    }
  }
 else {
    Renderer.getFontRenderer().drawString(this.string,getXAlign(this.string),this.y / this.scale,this.color,this.shadow);
  }
  GlStateManager.disableBlend();
  GlStateManager.popMatrix();
  return this;
}
Program: 39038
Project: 39038
Buggy source:
public void drawCenter(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - maxWidth / 2 - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x - this.textWidth / 2;
  if (this.align == DisplayHandler.Align.LEFT) {
    xOff=x - maxWidth / 2;
  }
 else   if (this.align == DisplayHandler.Align.RIGHT) {
    xOff=x + maxWidth / 2 - this.textWidth;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setDropShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}

Fixed version (ground truth):
public void drawCenter(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - maxWidth / 2 - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x - this.textWidth / 2;
  if (this.align == DisplayHandler.Align.LEFT) {
    xOff=x - maxWidth / 2;
  }
 else   if (this.align == DisplayHandler.Align.RIGHT) {
    xOff=x + maxWidth / 2 - this.textWidth;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}
Program: 39039
Project: 39039
Buggy source:
public void drawLeft(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x;
  if (this.align == DisplayHandler.Align.RIGHT) {
    xOff=x - this.textWidth + maxWidth;
  }
 else   if (this.align == DisplayHandler.Align.CENTER) {
    xOff=x - this.textWidth / 2 + maxWidth / 2;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setDropShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}

Fixed version (ground truth):
public void drawLeft(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x;
  if (this.align == DisplayHandler.Align.RIGHT) {
    xOff=x - this.textWidth + maxWidth;
  }
 else   if (this.align == DisplayHandler.Align.CENTER) {
    xOff=x - this.textWidth / 2 + maxWidth / 2;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}
Program: 39040
Project: 39040
Buggy source:
public void drawRight(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - maxWidth - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x - this.textWidth;
  if (this.align == DisplayHandler.Align.LEFT) {
    xOff=x - maxWidth;
  }
 else   if (this.align == DisplayHandler.Align.CENTER) {
    xOff=x - this.textWidth / 2 - maxWidth / 2;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setDropShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}

Fixed version (ground truth):
public void drawRight(float x,float y,float maxWidth,DisplayHandler.Background background,int backgroundColor,int textColor){
  DisplayHandler.Background bg=background;
  int bgColor=backgroundColor;
  int textCol=textColor;
  if (this.backgroundColor != null)   bgColor=this.backgroundColor;
  if (this.background != DisplayHandler.Background.NONE)   bg=this.background;
  if (this.textColor != null)   textCol=this.textColor;
  drawFullBG(bg,bgColor,x - maxWidth - 1,y - 1,maxWidth + 2,10 * this.scale);
  if (this.text.equals("String_Node_Str"))   return;
  float xOff=x - this.textWidth;
  if (this.align == DisplayHandler.Align.LEFT) {
    xOff=x - maxWidth;
  }
 else   if (this.align == DisplayHandler.Align.CENTER) {
    xOff=x - this.textWidth / 2 - maxWidth / 2;
  }
  drawPerLineBG(bg,bgColor,xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
  Renderer.text(this.text,xOff,y).setScale(this.scale).setColor(textCol).setShadow(this.shadow).draw();
  handleInput(xOff - 1,y - 1,this.textWidth + 2,10 * this.scale);
}
Program: 39041
Project: 39041
Buggy source:
private int drawFile(Map.Entry<String,List<String>> file,int fileOffset){
  Renderer.rectangle(0x80000000,20,infoHeight + fileOffset - scrolled,width,file.getValue().size() * 9 + 12).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + file.getKey(),22,infoHeight + fileOffset - scrolled + 2).setDropShadow(true).draw();
  int i=0;
  for (  String line : file.getValue()) {
    Renderer.text(colorLine(line).replace("String_Node_Str","String_Node_Str"),22,i * 9 + infoHeight + fileOffset - scrolled + 12).setDropShadow(true).draw();
    i++;
  }
  return file.getValue().size() * 9 + 30;
}

Fixed version (ground truth):
private int drawFile(Map.Entry<String,List<String>> file,int fileOffset){
  Renderer.rectangle(0x80000000,20,infoHeight + fileOffset - scrolled,width,file.getValue().size() * 9 + 12).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + file.getKey(),22,infoHeight + fileOffset - scrolled + 2).setShadow(true).draw();
  int i=0;
  for (  String line : file.getValue()) {
    Renderer.text(colorLine(line).replace("String_Node_Str","String_Node_Str"),22,i * 9 + infoHeight + fileOffset - scrolled + 12).setShadow(true).draw();
    i++;
  }
  return file.getValue().size() * 9 + 30;
}
Program: 39042
Project: 39042
Buggy source:
private void drawJump(){
  if (scrolled > infoHeight) {
    Renderer.rectangle(0x80000000,width + 20,height - 20,20,20).draw();
    Renderer.text("String_Node_Str",width + 31 - Renderer.getStringWidth("String_Node_Str") / 2,height - 12).setDropShadow(true).draw();
  }
}

Fixed version (ground truth):
private void drawJump(){
  if (scrolled > infoHeight) {
    Renderer.rectangle(0x80000000,width + 20,height - 20,20,20).draw();
    Renderer.text("String_Node_Str",width + 31 - Renderer.getStringWidth("String_Node_Str") / 2,height - 12).setShadow(true).draw();
  }
}
Program: 39043
Project: 39043
Buggy source:
ModuleGui(Module module){
  this.module=module;
  this.scrolled=0;
  String preDescription=module.getMetadata().getDescription() == null ? "String_Node_Str" : module.getMetadata().getDescription();
  this.description=Renderer.text(preDescription,22,30).setDropShadow(true);
  updateScaling(0,0,0);
  isHovered=false;
  name=ChatLib.addColor(this.module.getMetadata().getDisplayName() == null ? this.module.getName() : this.module.getMetadata().getDisplayName());
  version=this.module.getMetadata().getVersion() == null ? "String_Node_Str" : "String_Node_Str" + this.module.getMetadata().getVersion();
  coloredFiles=new HashMap<>();
  for (  Map.Entry<String,List<String>> file : this.module.getFiles().entrySet()) {
    List<String> lines=new ArrayList<>();
    for (    String line : file.getValue()) {
      lines.add(colorLine(line));
    }
    coloredFiles.put(file.getKey(),lines);
  }
}

Fixed version (ground truth):
ModuleGui(Module module){
  this.module=module;
  this.scrolled=0;
  String preDescription=module.getMetadata().getDescription() == null ? "String_Node_Str" : module.getMetadata().getDescription();
  this.description=Renderer.text(preDescription,22,30).setShadow(true);
  updateScaling(0,0,0);
  isHovered=false;
  name=ChatLib.addColor(this.module.getMetadata().getDisplayName() == null ? this.module.getName() : this.module.getMetadata().getDisplayName());
  version=this.module.getMetadata().getVersion() == null ? "String_Node_Str" : "String_Node_Str" + this.module.getMetadata().getVersion();
  coloredFiles=new HashMap<>();
  for (  Map.Entry<String,List<String>> file : this.module.getFiles().entrySet()) {
    List<String> lines=new ArrayList<>();
    for (    String line : file.getValue()) {
      lines.add(colorLine(line));
    }
    coloredFiles.put(file.getKey(),lines);
  }
}
Program: 39044
Project: 39044
Buggy source:
private void drawBack(){
  String back=isHovered ? "String_Node_Str" : "String_Node_Str";
  Renderer.text(ChatLib.addColor(back),20 + width - Renderer.getStringWidth("String_Node_Str") - 2,infoHeight - scrolled).setDropShadow(true).draw();
}

Fixed version (ground truth):
private void drawBack(){
  String back=isHovered ? "String_Node_Str" : "String_Node_Str";
  Renderer.text(ChatLib.addColor(back),20 + width - Renderer.getStringWidth("String_Node_Str") - 2,infoHeight - scrolled).setShadow(true).draw();
}
Program: 39045
Project: 39045
Buggy source:
private int drawRequires(){
  if (this.module.getMetadata().getRequires() == null)   return 0;
  Renderer.text("String_Node_Str" + this.module.getMetadata().getRequires(),22,infoHeight - scrolled + 20).setDropShadow(true).draw();
  return 20;
}

Fixed version (ground truth):
private int drawRequires(){
  if (this.module.getMetadata().getRequires() == null)   return 0;
  Renderer.text("String_Node_Str" + this.module.getMetadata().getRequires(),22,infoHeight - scrolled + 20).setShadow(true).draw();
  return 20;
}
Program: 39046
Project: 39046
Buggy source:
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  super.drawScreen(mouseX,mouseY,partialTicks);
  drawBackground(0);
  drawScroll();
  Renderer.rectangle(0x80000000,20,10 - scrolled,width,infoHeight).draw();
  Renderer.text(name,22,12 - scrolled).setDropShadow(true).draw();
  Renderer.text(ChatFormatting.GRAY + version,width - Renderer.getStringWidth(version) + 18,12 - scrolled).setDropShadow(true).draw();
  Renderer.rectangle(0xa0000000,22,22 - scrolled,width - 4,2).draw();
  description.setY(30 - this.scrolled).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + CTJS.getInstance().getConfig().getModulesFolder().value + this.module.getName()+ "String_Node_Str",22,infoHeight - scrolled).setDropShadow(true).draw();
  drawBack();
  int fileOffset=20 + drawRequires();
  for (  Map.Entry<String,List<String>> file : coloredFiles.entrySet()) {
    fileOffset+=drawFile(file,fileOffset);
  }
  drawJump();
  updateScaling(mouseX,mouseY,fileOffset);
}

Fixed version (ground truth):
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  super.drawScreen(mouseX,mouseY,partialTicks);
  drawBackground(0);
  drawScroll();
  Renderer.rectangle(0x80000000,20,10 - scrolled,width,infoHeight).draw();
  Renderer.text(name,22,12 - scrolled).setShadow(true).draw();
  Renderer.text(ChatFormatting.GRAY + version,width - Renderer.getStringWidth(version) + 18,12 - scrolled).setShadow(true).draw();
  Renderer.rectangle(0xa0000000,22,22 - scrolled,width - 4,2).draw();
  description.setY(30 - this.scrolled).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + CTJS.getInstance().getConfig().getModulesFolder().value + this.module.getName()+ "String_Node_Str",22,infoHeight - scrolled).setShadow(true).draw();
  drawBack();
  int fileOffset=20 + drawRequires();
  for (  Map.Entry<String,List<String>> file : coloredFiles.entrySet()) {
    fileOffset+=drawFile(file,fileOffset);
  }
  drawJump();
  updateScaling(mouseX,mouseY,fileOffset);
}
Program: 39047
Project: 39047
Buggy source:
private void draw(){
  x=20;
  y=getY(i);
  int width=Renderer.screen.getWidth() - 40;
  int height=105;
  Renderer.rectangle(0x80000000,x,y,width,height).draw();
  Renderer.text(name,x + 2,y + 2).setDropShadow(true).draw();
  if (this.module.getMetadata().getVersion() != null) {
    String version=ChatFormatting.GRAY + "String_Node_Str" + this.module.getMetadata().getVersion();
    Renderer.text(version,x + width - Renderer.getStringWidth(version) - 2,y + 2).setDropShadow(true).draw();
  }
  Renderer.rectangle(0xa0000000,x + 2,y + 12,width - 4,2).draw();
  String description=(this.module.getMetadata().getDescription() == null) ? "String_Node_Str" : this.module.getMetadata().getDescription();
  Text desc=Renderer.text(description,x + 2,y + 20).setWidth(width - 5).setMaxLines(6).draw();
  if (desc.exceedsMaxLines())   Renderer.text("String_Node_Str",x + 2,y + 73).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + CTJS.getInstance().getConfig().getModulesFolder().value + this.module.getName()+ "String_Node_Str",x + 2,y + height - 12).setDropShadow(true).draw();
  String finalShowCode=isHovered ? "String_Node_Str" : "String_Node_Str";
  Renderer.text(ChatLib.addColor(finalShowCode),x + width - Renderer.getStringWidth("String_Node_Str") - 2,y + height - 12).setDropShadow(true).draw();
}

Fixed version (ground truth):
private void draw(){
  x=20;
  y=getY(i);
  int width=Renderer.screen.getWidth() - 40;
  int height=105;
  Renderer.rectangle(0x80000000,x,y,width,height).draw();
  Renderer.text(name,x + 2,y + 2).setShadow(true).draw();
  if (this.module.getMetadata().getVersion() != null) {
    String version=ChatFormatting.GRAY + "String_Node_Str" + this.module.getMetadata().getVersion();
    Renderer.text(version,x + width - Renderer.getStringWidth(version) - 2,y + 2).setShadow(true).draw();
  }
  Renderer.rectangle(0xa0000000,x + 2,y + 12,width - 4,2).draw();
  String description=(this.module.getMetadata().getDescription() == null) ? "String_Node_Str" : this.module.getMetadata().getDescription();
  Text desc=Renderer.text(description,x + 2,y + 20).setWidth(width - 5).setMaxLines(6).draw();
  if (desc.exceedsMaxLines())   Renderer.text("String_Node_Str",x + 2,y + 73).draw();
  Renderer.text(ChatFormatting.DARK_GRAY + CTJS.getInstance().getConfig().getModulesFolder().value + this.module.getName()+ "String_Node_Str",x + 2,y + height - 12).setShadow(true).draw();
  String finalShowCode=isHovered ? "String_Node_Str" : "String_Node_Str";
  Renderer.text(ChatLib.addColor(finalShowCode),x + width - Renderer.getStringWidth("String_Node_Str") - 2,y + height - 12).setShadow(true).draw();
}
Program: 39048
Project: 39048
Buggy source:
public void draw(int mouseX,int mouseY){
  this.resetButton.xPosition=Renderer.screen.getWidth() / 2 - 100 + this.x + 185;
  this.resetButton.drawButton(Client.getMinecraft(),mouseX,mouseY);
  Renderer.text("String_Node_Str",Renderer.screen.getWidth() / 2 - 100 + this.x + 189,this.y - 4).setScale(2).setColor(0xffffffff).setDropShadow(true).draw();
}

Fixed version (ground truth):
public void draw(int mouseX,int mouseY){
  this.resetButton.xPosition=Renderer.screen.getWidth() / 2 - 100 + this.x + 185;
  this.resetButton.drawButton(Client.getMinecraft(),mouseX,mouseY);
  Renderer.text("String_Node_Str",Renderer.screen.getWidth() / 2 - 100 + this.x + 189,this.y - 4).setScale(2).setColor(0xffffffff).setShadow(true).draw();
}
Program: 39049
Project: 39049
Buggy source:
/** 
 * Gets a color int based on 0-255 rgba values. This can be used in settings background and text color.
 * @param red   value between 0 and 255
 * @param green value between 0 and 255
 * @param blue  value between 0 and 255
 * @param alpha value between 0 and 255
 * @return integer color
 */
public static int color(int red,int green,int blue,int alpha){
  return (limit255(alpha) * 0x1000000) + (limit255(red) * 0x10000) + (limit255(green) * 0x100)+ blue;
}

Fixed version (ground truth):
/** 
 * Gets a color int based on 0-255 rgb values.
 * @param red   red value
 * @param green green value
 * @param blue  blue value
 * @return integer color
 */
public static int color(int red,int green,int blue){
  return color(red,green,blue,255);
}
Program: 39050
Project: 39050
Buggy source:
public static int limit255(int a){
  return (a > 255) ? 255 : (a < 0 ? 0 : a);
}

Fixed version (ground truth):
/** 
 * Limits a number between 0 and 255 for use with   {@link Renderer#color(int,int,int,int)}.
 * @param number the number to limit
 * @return the limited number
 */
public static int limit255(int number){
  return (number > 255) ? 255 : (number < 0 ? 0 : number);
}
Program: 39051
Project: 39051
Buggy source:
@EventHandler public void init(FMLInitializationEvent event){
  instance=this;
  this.displayHandler=new DisplayHandler();
  this.guiHandler=new GuiHandler();
  this.commandHandler=new CommandHandler();
  this.chatListener=new ChatListener();
  this.moduleManager=new ModuleManager();
  this.cps=new CPS();
  registerListeners();
  registerHooks();
  moduleManager.load(true);
}

Fixed version (ground truth):
@EventHandler public void init(FMLInitializationEvent event){
  this.displayHandler=new DisplayHandler();
  this.guiHandler=new GuiHandler();
  this.commandHandler=new CommandHandler();
  this.chatListener=new ChatListener();
  this.moduleManager=new ModuleManager();
  this.cps=new CPS();
  registerListeners();
  registerHooks();
  moduleManager.load(true);
}
Program: 39052
Project: 39052
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  this.console=new Console();
  Sentry.init(Reference.SENTRYDSN);
  Sentry.getContext().setUser(new UserBuilder().setUsername(Player.getName()).setId(Player.getUUID()).build());
  this.injectResourcePack(event.getModConfigurationDirectory().toString());
  this.config=new Config();
  this.config.setConfigFile(new File(event.getModConfigurationDirectory().toString(),"String_Node_Str"));
  this.config.save();
  this.config.load();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  instance=this;
  this.console=new Console();
  Sentry.init(Reference.SENTRYDSN);
  Sentry.getContext().setUser(new UserBuilder().setUsername(Player.getName()).setId(Player.getUUID()).build());
  this.injectResourcePack(event.getModConfigurationDirectory().toString());
  this.config=new Config();
  this.config.setConfigFile(new File(event.getModConfigurationDirectory().toString(),"String_Node_Str"));
  this.config.save();
  this.config.load();
}
Program: 39053
Project: 39053
Buggy source:
private void dumpChat(int ammount){
  clearOldDump();
  ArrayList<String> messages=CTJS.getInstance().getChatListener().getChatHistory();
  if (ammount > messages.size())   ammount=messages.size();
  ChatLib.chat("String_Node_Str" + ChatLib.getChatBreak("String_Node_Str"),idFixed);
  String msg;
  for (int i=0; i < ammount; i++) {
    msg=ChatLib.replaceFormatting(messages.get(messages.size() - ammount + i));
    ChatComponentText cct=new ChatComponentText(msg);
    cct.setChatStyle(new ChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.getValueByCanonicalName("String_Node_Str"),"String_Node_Str" + msg)).setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ChatComponentText("String_Node_Str"))));
    ChatLib.chat(new Message(cct).setChatLineId(idFixed + i + 1));
  }
  ChatLib.chat("String_Node_Str" + ChatLib.getChatBreak("String_Node_Str"),idFixed + ammount + 1);
  idFixedOffset=idFixed + ammount + 1;
}

Fixed version (ground truth):
private void dumpChat(int amount){
  clearOldDump();
  ArrayList<String> messages=CTJS.getInstance().getChatListener().getChatHistory();
  if (amount > messages.size())   amount=messages.size();
  ChatLib.chat("String_Node_Str" + ChatLib.getChatBreak("String_Node_Str"),idFixed);
  String msg;
  for (int i=0; i < amount; i++) {
    msg=ChatLib.replaceFormatting(messages.get(messages.size() - amount + i));
    ChatComponentText cct=new ChatComponentText(msg);
    cct.setChatStyle(new ChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.getValueByCanonicalName("String_Node_Str"),"String_Node_Str" + msg)).setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ChatComponentText("String_Node_Str"))));
    ChatLib.chat(new Message(cct).setChatLineId(idFixed + i + 1));
  }
  ChatLib.chat("String_Node_Str" + ChatLib.getChatBreak("String_Node_Str"),idFixed + amount + 1);
  idFixedOffset=idFixed + amount + 1;
}
Program: 39054
Project: 39054
Buggy source:
/** 
 * Registers a method to be ran while gui is open. Registered method runs on draw.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerDraw(String methodName){
  return onDraw=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Integer && args[1] instanceof Integer && args[2] instanceof Float)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      float partialTicks=(float)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,partialTicks);
      }
 catch (      ScriptException|NoSuchMethodException e) {
        onDraw=null;
        e.printStackTrace();
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Registers a method to be ran while gui is open. Registered method runs on draw.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerDraw(String methodName){
  return onDraw=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Integer && args[1] instanceof Integer && args[2] instanceof Float)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      float partialTicks=(float)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,partialTicks);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onDraw=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}
Program: 39055
Project: 39055
Buggy source:
@Override public void trigger(Object... args){
  if (!(args[0] instanceof Character && args[1] instanceof Integer)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  char typedChar=(char)args[0];
  int keyCode=(int)args[1];
  try {
    CTJS.getInstance().getModuleManager().invokeFunction(methodName,typedChar,keyCode);
  }
 catch (  ScriptException|NoSuchMethodException e) {
    Console.getConsole().printStackTrace(e);
    onKeyTyped=null;
  }
}

Fixed version (ground truth):
@Override public void trigger(Object... args){
  if (!(args[0] instanceof Character && args[1] instanceof Integer)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  char typedChar=(char)args[0];
  int keyCode=(int)args[1];
  try {
    CTJS.getInstance().getModuleManager().invokeFunction(methodName,typedChar,keyCode);
  }
 catch (  ScriptException|NoSuchMethodException exception) {
    onKeyTyped=null;
    Console.getConsole().printStackTrace(exception);
  }
}
Program: 39056
Project: 39056
Buggy source:
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerKeyTyped(String methodName){
  return onKeyTyped=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Character && args[1] instanceof Integer)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      char typedChar=(char)args[0];
      int keyCode=(int)args[1];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,typedChar,keyCode);
      }
 catch (      ScriptException|NoSuchMethodException e) {
        Console.getConsole().printStackTrace(e);
        onKeyTyped=null;
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerKeyTyped(String methodName){
  return onKeyTyped=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Character && args[1] instanceof Integer)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      char typedChar=(char)args[0];
      int keyCode=(int)args[1];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,typedChar,keyCode);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onKeyTyped=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}
Program: 39057
Project: 39057
Buggy source:
/** 
 * Registers a method to be ran while gui is open. Registered method runs on mouse click.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerClicked(String methodName){
  return onClick=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Integer && args[1] instanceof Integer && args[2] instanceof Integer)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int button=(int)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,button);
      }
 catch (      ScriptException|NoSuchMethodException e) {
        onClick=null;
        e.printStackTrace();
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Registers a method to be ran while gui is open. Registered method runs on mouse click.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerClicked(String methodName){
  return onClick=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      if (!(args[0] instanceof Integer && args[1] instanceof Integer && args[2] instanceof Integer)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int button=(int)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,button);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onClick=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}
Program: 39058
Project: 39058
Buggy source:
@Override public void trigger(Object... args){
  int mouseX=(int)args[0];
  int mouseY=(int)args[1];
  int state=(int)args[2];
  try {
    CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,state);
  }
 catch (  ScriptException|NoSuchMethodException exception) {
    onKeyTyped=null;
    Console.getConsole().printStackTrace(exception);
  }
}

Fixed version (ground truth):
@Override public void trigger(Object... args){
  int mouseX=(int)args[0];
  int mouseY=(int)args[1];
  int state=(int)args[2];
  try {
    CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,state);
  }
 catch (  ScriptException|NoSuchMethodException exception) {
    onMouseReleased=null;
    Console.getConsole().printStackTrace(exception);
  }
}
Program: 39059
Project: 39059
Buggy source:
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerMouseReleased(String methodName){
  return onMouseReleased=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int state=(int)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,state);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onKeyTyped=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerMouseReleased(String methodName){
  return onMouseReleased=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int state=(int)args[2];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,state);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onMouseReleased=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}
Program: 39060
Project: 39060
Buggy source:
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerMouseDragged(String methodName){
  return onMouseDragged=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int clickedMouseButton=(int)args[2];
      long timeSinceLastClick=(long)args[3];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,clickedMouseButton,timeSinceLastClick);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onKeyTyped=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Registers a method to be ran while gui is open. Registered method runs on key input.
 * @param methodName the method to run
 * @return the trigger
 */
public OnTrigger registerMouseDragged(String methodName){
  return onMouseDragged=new OnTrigger(methodName,TriggerType.OTHER){
    @Override public void trigger(    Object... args){
      int mouseX=(int)args[0];
      int mouseY=(int)args[1];
      int clickedMouseButton=(int)args[2];
      long timeSinceLastClick=(long)args[3];
      try {
        CTJS.getInstance().getModuleManager().invokeFunction(methodName,mouseX,mouseY,clickedMouseButton,timeSinceLastClick);
      }
 catch (      ScriptException|NoSuchMethodException exception) {
        onMouseDragged=null;
        Console.getConsole().printStackTrace(exception);
      }
    }
  }
;
}
Program: 39061
Project: 39061
Buggy source:
private void simulateChat(String[] args){
  StringBuilder toSend=new StringBuilder();
  for (int i=1; i < args.length; i++) {
    toSend.append(args[i]).append("String_Node_Str");
  }
  ClientChatReceivedEvent event=new ClientChatReceivedEvent((byte)0,new ChatComponentText(toSend.toString()));
  CTJS.getInstance().getChatListener().onReceiveChat(event);
  if (!event.isCanceled()) {
    ChatLib.chat(event.message.getFormattedText());
  }
}

Fixed version (ground truth):
private void simulateChat(String[] args){
  StringBuilder toSend=new StringBuilder();
  for (int i=1; i < args.length; i++) {
    toSend.append(args[i]);
    if (i != args.length - 1)     toSend.append("String_Node_Str");
  }
  ClientChatReceivedEvent event=new ClientChatReceivedEvent((byte)0,new ChatComponentText(toSend.toString()));
  CTJS.getInstance().getChatListener().onReceiveChat(event);
  if (!event.isCanceled()) {
    ChatLib.chat(event.message.getFormattedText());
  }
}
Program: 39062
Project: 39062
Buggy source:
private void injectResourcePack(String path){
  try {
    File pictures=new File(path,"String_Node_Str");
    Field field=FMLClientHandler.class.getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    List<IResourcePack> packs=(List<IResourcePack>)field.get(FMLClientHandler.instance());
    packs.add(imagesPack=new ImagesPack(pictures));
    pictures.mkdirs();
    assetsDir=pictures;
  }
 catch (  Exception e) {
    Console.getConsole().printStackTrace(e);
  }
}

Fixed version (ground truth):
private void injectResourcePack(String path){
  try {
    File pictures=new File(path,"String_Node_Str");
    Field field=FMLClientHandler.class.getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    List<IResourcePack> packs=(List<IResourcePack>)field.get(FMLClientHandler.instance());
    packs.add(imagesPack=new ImagesPack(pictures));
    pictures.mkdirs();
    assetsDir=pictures;
  }
 catch (  Exception exception) {
    exception.printStackTrace();
  }
}
Program: 39063
Project: 39063
Buggy source:
private Object extractGenotypeValues(Object genotypeAttribute,VariantPropertyType type){
  Object defaultValue=null;
switch (type) {
case NUMERIC_COLLECTION:
case STRING_COLLECTION:
    defaultValue=new ArrayList<>();
  break;
case STRING:
defaultValue="String_Node_Str";
}
if (genotypeAttribute == null) {
return defaultValue;
}
if (type == VariantPropertyType.STRING) {
return genotypeAttribute.toString();
}
if (type == VariantPropertyType.NUMERIC) {
String value=genotypeAttribute.toString();
if ("String_Node_Str".equals(value)) {
return null;
}
return Double.parseDouble(value);
}
String[] splitValues=((String)genotypeAttribute).split("String_Node_Str");
if (type == VariantPropertyType.STRING_COLLECTION) {
return new ArrayList<>(Arrays.asList(splitValues));
}
if (type == VariantPropertyType.NUMERIC_COLLECTION) {
List<Double> parsed=Arrays.stream(splitValues).map((str) -> "String_Node_Str".equals(str) ? null : Double.parseDouble(str)).collect(Collectors.toList());
return parsed;
}
throw new IllegalStateException("String_Node_Str" + type + "String_Node_Str");
}

Fixed version (ground truth):
private Object extractGenotypeValues(Object genotypeAttribute,VariantPropertyType type){
  Object defaultValue=null;
switch (type) {
case NUMERIC_COLLECTION:
case STRING_COLLECTION:
    defaultValue=new ArrayList<>();
  break;
case STRING:
defaultValue="String_Node_Str";
}
if (genotypeAttribute == null) {
return defaultValue;
}
if (type == VariantPropertyType.STRING) {
return genotypeAttribute.toString();
}
if (type == VariantPropertyType.NUMERIC) {
String value=genotypeAttribute.toString();
if ("String_Node_Str".equals(value)) {
return null;
}
return Double.parseDouble(value);
}
List splitValues=genotypeAttribute instanceof List ? (List)genotypeAttribute : Arrays.asList(genotypeAttribute.toString().split("String_Node_Str"));
if (type == VariantPropertyType.STRING_COLLECTION) {
return new ArrayList<>(splitValues);
}
if (type == VariantPropertyType.NUMERIC_COLLECTION) {
List<Double> parsed=(List<Double>)splitValues.stream().map((str) -> "String_Node_Str".equals(str.toString()) ? null : Double.parseDouble(str.toString())).collect(Collectors.toList());
return parsed;
}
throw new IllegalStateException("String_Node_Str" + type + "String_Node_Str");
}