nus-yam/ex-repair huggingface dataset:
Program: 39676
Project: 39676
Buggy source:
@Nullable @Override protected ReactElement<?,?> renderAsElement(){
  final Props props=props();
  final boolean completed=props.todo.isCompleted();
  return li(new HtmlProps().className(classesFor(completed,isTodoBeingEdited())),div(new HtmlProps().className("String_Node_Str"),input(new InputProps().className("String_Node_Str").type(InputType.checkbox).checked(completed).onChange(_onToggle(this))),label(new LabelProps().OnDoubleClick(_onEdit(this)),props.todo.getTitle()),button(new BtnProps().className("String_Node_Str").onClick(_onDestroy(this)))),input(new InputProps().ref("String_Node_Str").className("String_Node_Str").defaultValue(state().editText).onBlur(_onSubmitTodo(this)).onChange(_handleChange(this)).onKeyDown(_handleKeyDown(this))));
}

Fixed version (ground truth):
@Nullable @Override protected ReactElement<?,?> renderAsElement(){
  final Props props=props();
  final boolean completed=props.todo.isCompleted();
  return li(new HtmlProps().className(classesFor(completed,isTodoBeingEdited())),div(new HtmlProps().className("String_Node_Str"),input(new InputProps().className("String_Node_Str").type(InputType.checkbox).checked(completed).onChange(_onToggle(this))),label(new LabelProps().onDoubleClick(_onEdit(this)),props.todo.getTitle()),button(new BtnProps().className("String_Node_Str").onClick(_onDestroy(this)))),input(new InputProps().ref("String_Node_Str").className("String_Node_Str").defaultValue(state().editText).onBlur(_onSubmitTodo(this)).onChange(_handleChange(this)).onKeyDown(_handleKeyDown(this))));
}
Program: 39677
Project: 39677
Buggy source:
@Observable public boolean shouldLoadEmployeeData(){
  return _loadEmployeeData;
}

Fixed version (ground truth):
@Observable(name="String_Node_Str") public boolean shouldLoadEmployeeData(){
  return _loadEmployeeData;
}
Program: 39678
Project: 39678
Buggy source:
private void onRenderDepsChanged(){
  _renderDepsChanged=true;
  component().setState((s,p) -> s);
}

Fixed version (ground truth):
private void onRenderDepsChanged(){
  _renderDepsChanged=true;
  component().setState(Js.<S>cast(JsPropertyMap.of()));
}
Program: 39679
Project: 39679
Buggy source:
@Nullable S onSetState(@Nonnull S previousState,@Nonnull P currentProps);

Fixed version (ground truth):
@Nullable S onSetState(@Nullable S previousState,@Nonnull P currentProps);
Program: 39680
Project: 39680
Buggy source:
private static void editChatLineList(List<ChatLine> lineList,Function<Message,Boolean> toReplace,Message... replacements){
  ListIterator<ChatLine> chatLineIterator=lineList.listIterator();
  while (chatLineIterator.hasNext()) {
    ChatLine chatLine=chatLineIterator.next();
    boolean result=toReplace.apply(new Message(chatLine.getChatComponent()));
    if (!result) {
      continue;
    }
    chatLineIterator.remove();
    for (    Message message : replacements) {
      int lineId=message.getChatLineId() == -1 ? 0 : message.getChatLineId();
      ChatLine newChatLine=new ChatLine(chatLine.getUpdatedCounter(),message.getChatMessage(),lineId);
      chatLineIterator.add(newChatLine);
    }
  }
}

Fixed version (ground truth):
private static void editChatLineList(List<ChatLine> lineList,Function<Message,Boolean> toReplace,Message... replacements){
  ListIterator<ChatLine> chatLineIterator=lineList.listIterator();
  while (chatLineIterator.hasNext()) {
    ChatLine chatLine=chatLineIterator.next();
    boolean result=toReplace.apply(new Message(chatLine.getChatComponent()).setChatLineId(chatLine.getChatLineID()));
    if (!result) {
      continue;
    }
    chatLineIterator.remove();
    for (    Message message : replacements) {
      int lineId=message.getChatLineId() == -1 ? 0 : message.getChatLineId();
      ChatLine newChatLine=new ChatLine(chatLine.getUpdatedCounter(),message.getChatMessage(),lineId);
      chatLineIterator.add(newChatLine);
    }
  }
}
Program: 39681
Project: 39681
Buggy source:
/** 
 * Gets every entity loaded in the world of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public static List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getClass().equals(clazz)).collect(Collectors.toList());
}

Fixed version (ground truth):
/** 
 * Gets every entity loaded in the world of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public static List<Entity> getAllEntitiesOfType(Class clazz){
  System.out.println(clazz);
  return getAllEntities().stream().filter(entity -> entity.getEntity().getClass().equals(clazz)).collect(Collectors.toList());
}
Program: 39682
Project: 39682
Buggy source:
/** 
 * Gets every entity in this chunk of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getClass().equals(clazz)).collect(Collectors.toList());
}

Fixed version (ground truth):
/** 
 * Gets every entity in this chunk of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getEntity().getClass().equals(clazz)).collect(Collectors.toList());
}
Program: 39683
Project: 39683
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: 39684
Project: 39684
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: 39685
Project: 39685
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: 39687
Project: 39687
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: 39688
Project: 39688
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: 39689
Project: 39689
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: 39690
Project: 39690
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: 39691
Project: 39691
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: 39692
Project: 39692
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: 39693
Project: 39693
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: 39694
Project: 39694
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: 39695
Project: 39695
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: 39696
Project: 39696
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: 39697
Project: 39697
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: 39698
Project: 39698
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: 39699
Project: 39699
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: 39700
Project: 39700
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: 39701
Project: 39701
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: 39702
Project: 39702
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: 39703
Project: 39703
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: 39704
Project: 39704
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: 39705
Project: 39705
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: 39706
Project: 39706
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: 39707
Project: 39707
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: 39708
Project: 39708
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: 39709
Project: 39709
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: 39710
Project: 39710
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: 39711
Project: 39711
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: 39712
Project: 39712
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: 39713
Project: 39713
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: 39714
Project: 39714
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: 39715
Project: 39715
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: 39716
Project: 39716
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: 39717
Project: 39717
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);
      }
    }
  }
;
}