nus-yam/ex-repair huggingface dataset:
Program: 186355
Project: 186355
Buggy source:
public void visitTypeInsn(int opcode,String type){
  super.visitTypeInsn(opcode,main.srg.getClassName(type));
}

Fixed version (ground truth):
public void visitTypeInsn(int opcode,String type){
  String deobf=type.charAt(0) == '[' ? main.deobfTypeDescriptor(type) : main.srg.getClassName(type);
  super.visitTypeInsn(opcode,deobf);
}
Program: 186356
Project: 186356
Buggy source:
public void visitFieldInsn(int opcode,String owner,String name,String desc){
  String deobfOwner=main.srg.getClassName(owner);
  String seargeName=main.srg.getFieldName(owner,name);
  String deobfName=main.fields.get(seargeName);
  String deobfDesc=main.deobfTypeDescriptor(desc);
  super.visitFieldInsn(opcode,deobfOwner,deobfName,deobfDesc);
}

Fixed version (ground truth):
public void visitFieldInsn(int opcode,String owner,String name,String desc){
  String deobfOwner=main.srg.getClassName(owner);
  String seargeName=main.lookupInheritedField(owner,name);
  String deobfName=main.fields.get(seargeName);
  String deobfDesc=main.deobfTypeDescriptor(desc);
  super.visitFieldInsn(opcode,deobfOwner,deobfName,deobfDesc);
}
Program: 186357
Project: 186357
Buggy source:
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  String seargeName=main.srg.getFieldName(obfname,name);
  String deobfName=main.fields.get(seargeName);
  return super.visitField(access,deobfName,main.deobfTypeDescriptor(desc),signature,value);
}

Fixed version (ground truth):
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  String seargeName=main.srg.getFieldName(obfname,name);
  String deobfName=seargeName == null ? name : main.fields.get(seargeName);
  return super.visitField(access,deobfName,main.deobfTypeDescriptor(desc),signature,value);
}
Program: 186358
Project: 186358
Buggy source:
@Override public MethodVisitor visitMethod(int access,String name,String desc,String signature,String[] exceptions){
  SrgFile.MethodInfo smi=main.srg.getMethod(obfname,name,desc);
  String deobfName=main.methods.get(smi.name);
  desc=main.deobfMethodDescriptor(desc);
  if (exceptions == null)   exceptions=new String[0];
  String[] addExceptions=main.exc.getExceptionClasses(obfname,name,desc);
  List<String> newExceptions=new LinkedList<String>(Arrays.asList(exceptions));
  newExceptions.addAll(Arrays.asList(addExceptions));
  return new DeobfuscateMethodVisitor(super.visitMethod(access,deobfName,desc,signature,(String[])newExceptions.toArray(new String[newExceptions.size()])),main);
}

Fixed version (ground truth):
@Override public MethodVisitor visitMethod(int access,String name,String desc,String signature,String[] exceptions){
  String seargeName=main.lookupInheritedMethod(obfname,name,desc);
  String deobfName=main.methods.get(seargeName);
  desc=main.deobfMethodDescriptor(desc);
  if (exceptions == null)   exceptions=new String[0];
  String[] addExceptions=main.exc.getExceptionClasses(obfname,name,desc);
  List<String> newExceptions=new LinkedList<String>(Arrays.asList(exceptions));
  newExceptions.addAll(Arrays.asList(addExceptions));
  return new DeobfuscateMethodVisitor(super.visitMethod(access,deobfName,desc,signature,(String[])newExceptions.toArray(new String[newExceptions.size()])),main);
}
Program: 186359
Project: 186359
Buggy source:
public void run() throws IOException {
  ZipInputStream inZip=new ZipInputStream(new FileInputStream(input));
  ZipOutputStream outZip=new ZipOutputStream(new FileOutputStream(output));
  while (true) {
    ZipEntry inEntry=inZip.getNextEntry();
    if (inEntry == null)     break;
    if (!inEntry.getName().endsWith("String_Node_Str")) {
      ZipEntry outEntry=new ZipEntry(inEntry.getName());
      outZip.putNextEntry(outEntry);
      byte[] buf=new byte[1048576];
      int len=0;
      do {
        len=inZip.read(buf);
        if (len > 0)         outZip.write(buf,0,len);
      }
 while (len > 0);
      inZip.closeEntry();
      outZip.closeEntry();
      continue;
    }
    String oldName=fileToClass(inEntry.getName());
    String newName=srg.getClassName(oldName);
    System.out.println(oldName + "String_Node_Str" + newName);
    try {
      ClassReader cr=new ClassReader(inZip);
      inZip.closeEntry();
      ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
      cr.accept(new DeobfuscateVisitor(cw,this),0);
      ZipEntry outEntry=new ZipEntry(classToFile(newName));
      outZip.putNextEntry(outEntry);
      outZip.write(cw.toByteArray());
      outZip.closeEntry();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + oldName + "String_Node_Str"+ newName);
      throw new RuntimeException(e);
    }
  }
  inZip.close();
  outZip.close();
}

Fixed version (ground truth):
public void run() throws IOException {
  ZipInputStream inZip;
  ZipOutputStream outZip=new ZipOutputStream(new FileOutputStream(output));
  for (  String xpath : xpathlist)   getParents(new File(xpath));
  getParents(input);
  inZip=new ZipInputStream(new FileInputStream(input));
  while (true) {
    ZipEntry inEntry=inZip.getNextEntry();
    if (inEntry == null)     break;
    if (!inEntry.getName().endsWith("String_Node_Str")) {
      ZipEntry outEntry=new ZipEntry(inEntry.getName());
      outZip.putNextEntry(outEntry);
      byte[] buf=new byte[1048576];
      int len=0;
      do {
        len=inZip.read(buf);
        if (len > 0)         outZip.write(buf,0,len);
      }
 while (len > 0);
      inZip.closeEntry();
      outZip.closeEntry();
      continue;
    }
    String oldName=fileToClass(inEntry.getName());
    String newName=srg.getClassName(oldName);
    try {
      ClassReader cr=new ClassReader(inZip);
      ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
      cr.accept(new DeobfuscateVisitor(cw,this),0);
      inZip.closeEntry();
      ZipEntry outEntry=new ZipEntry(classToFile(newName));
      outZip.putNextEntry(outEntry);
      outZip.write(cw.toByteArray());
      outZip.closeEntry();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + oldName + "String_Node_Str"+ newName);
      throw new RuntimeException(e);
    }
  }
  inZip.close();
  outZip.close();
}
Program: 186360
Project: 186360
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.exc=new ExcFile(new File(m.base,"String_Node_Str"));
    m.srg=new SrgFile(new File(m.base,"String_Node_Str"));
    m.fields=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.methods=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.run();
  }
 else {
    if (args.length != 8 || (!args[7].equals("String_Node_Str") && !args[7].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[7].equals("String_Node_Str");
    if (reob)     System.err.println("String_Node_Str");
    int side=Integer.parseInt(args[6]);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(args[0]);
    m.output=new File(args[1]);
    m.exc=new ExcFile(new File(args[2]));
    m.srg=new SrgFile(new File(args[3]));
    m.fields=new CsvFile(new File(args[4]),side,reob);
    m.methods=new CsvFile(new File(args[5]),side,reob);
    m.run();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.exc=new ExcFile(new File(m.base,"String_Node_Str"));
    m.srg=new SrgFile(new File(m.base,"String_Node_Str"),m);
    m.fields=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.methods=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.xpathlist=new String[]{"String_Node_Str"};
    m.run();
  }
 else {
    if ((args.length != 8 && args.length != 9) || (!args[7].equals("String_Node_Str") && !args[7].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      System.err.println("String_Node_Str" + File.pathSeparator + "String_Node_Str");
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[7].equals("String_Node_Str");
    if (reob)     System.err.println("String_Node_Str");
    int side=Integer.parseInt(args[6]);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(args[0]);
    m.output=new File(args[1]);
    m.exc=new ExcFile(new File(args[2]));
    m.srg=new SrgFile(new File(args[3]),m);
    m.fields=new CsvFile(new File(args[4]),side,reob);
    m.methods=new CsvFile(new File(args[5]),side,reob);
    m.xpathlist=(args.length < 9 ? "String_Node_Str" : args[8]).split(File.pathSeparator);
    m.run();
  }
}
Program: 186361
Project: 186361
Buggy source:
public String getClassName(String obf){
  if (obf == null)   return null;
  String r=classes.get(obf);
  if (r != null)   return r;
  if (!obf.contains("String_Node_Str") || obf.startsWith("String_Node_Str"))   return "String_Node_Str" + obf;
  return obf;
}

Fixed version (ground truth):
public String getClassName(String obf){
  if (obf == null)   return null;
  if (obf.charAt(0) == '[')   return main.deobfTypeDescriptor(obf);
  String r=classes.get(obf);
  if (r != null)   return r;
  if (!obf.contains("String_Node_Str") || obf.startsWith("String_Node_Str"))   return "String_Node_Str" + obf;
  return obf;
}
Program: 186362
Project: 186362
Buggy source:
public MethodInfo getMethod(String clazz,String obf,String desc){
  MethodInfo r=methods.get(clazz + "String_Node_Str" + obf+ desc);
  if (r == null) {
    r=new MethodInfo();
    r.name=obf;
    r.desc=desc;
  }
  return r;
}

Fixed version (ground truth):
public String getMethod(String clazz,String obf,String desc){
  return methods.get(clazz + "String_Node_Str" + obf+ desc);
}
Program: 186363
Project: 186363
Buggy source:
public String getFieldName(String clazz,String obf){
  String r=fields.get(clazz + "String_Node_Str" + obf);
  return r == null ? obf : r;
}

Fixed version (ground truth):
public String getFieldName(String clazz,String obf){
  return fields.get(clazz + "String_Node_Str" + obf);
}
Program: 186364
Project: 186364
Buggy source:
public SrgFile(File f) throws IOException {
  Scanner in=new Scanner(f);
  try {
    while (in.hasNextLine()) {
      if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String deobf=in.next();
        classes.put(obf,deobf);
      }
 else       if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String deobf=in.next();
        fields.put(obf,getLastComponent(deobf));
      }
 else       if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String obfdesc=in.next();
        String deobf=in.next();
        String deobfdesc=in.next();
        MethodInfo mi=new MethodInfo();
        mi.desc=deobfdesc;
        mi.name=getLastComponent(deobf);
        methods.put(obf + obfdesc,mi);
      }
 else {
        in.nextLine();
      }
    }
  }
  finally {
    in.close();
  }
}

Fixed version (ground truth):
public SrgFile(File f,Main m) throws IOException {
  this.main=m;
  Scanner in=new Scanner(f);
  try {
    while (in.hasNextLine()) {
      if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String deobf=in.next();
        classes.put(obf,deobf);
      }
 else       if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String deobf=in.next();
        fields.put(obf,getLastComponent(deobf));
      }
 else       if (in.hasNext("String_Node_Str")) {
        in.next();
        String obf=in.next();
        String obfdesc=in.next();
        String deobf=in.next();
        String deobfdesc=in.next();
        methods.put(obf + obfdesc,getLastComponent(deobf));
      }
 else {
        in.nextLine();
      }
    }
  }
  finally {
    in.close();
  }
}
Program: 186365
Project: 186365
Buggy source:
public void visitMethodInsn(int opcode,String owner,String name,String desc){
  if (main.map.getClass(owner).contains("String_Node_Str"))   throw new RuntimeException("String_Node_Str" + owner + "String_Node_Str"+ main.map.getClass(owner)+ "String_Node_Str");
  super.visitMethodInsn(opcode,main.map.getClass(owner),main.lookupInheritedMethod(owner,name,desc),main.deobfMethodDescriptor(desc));
}

Fixed version (ground truth):
public void visitMethodInsn(int opcode,String owner,String name,String desc){
  super.visitMethodInsn(opcode,main.map.getClass(owner),main.lookupInheritedMethod(owner,name,desc),main.deobfMethodDescriptor(desc));
}
Program: 186366
Project: 186366
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.xpathlist=new String[]{"String_Node_Str"};
    m.run();
  }
 else {
    if ((args.length != 5 && args.length != 6) || (!args[4].equals("String_Node_Str") && !args[4].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      System.err.println("String_Node_Str" + File.pathSeparator + "String_Node_Str");
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[4].equals("String_Node_Str");
    File confDir=new File(args[2]);
    if (!confDir.isDirectory()) {
      System.err.println(args[2] + "String_Node_Str");
      return;
    }
    Side side=Side.fromString(args[3]);
    if (side == null) {
      System.err.println(args[3] + "String_Node_Str");
      return;
    }
    McpMapping mcp=new McpBukkitMapping(confDir,side,reob);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(args[0]);
    m.output=new File(args[1]);
    m.map=mcp.getMapping();
    m.xpathlist=(args.length < 6 ? new String[0] : args[8].split(File.pathSeparator));
    m.run();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.xpathlist=new String[]{"String_Node_Str"};
    m.run();
  }
 else {
    if ((args.length != 5 && args.length != 6) || (!args[4].equals("String_Node_Str") && !args[4].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      System.err.println("String_Node_Str" + File.pathSeparator + "String_Node_Str");
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[4].equals("String_Node_Str");
    File confDir=new File(args[2]);
    if (!confDir.isDirectory()) {
      System.err.println(args[2] + "String_Node_Str");
      return;
    }
    Side side=Side.fromString(args[3]);
    if (side == null) {
      System.err.println(args[3] + "String_Node_Str");
      return;
    }
    McpMapping mcp=new McpBukkitMapping(confDir,side,reob);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(args[0]);
    m.output=new File(args[1]);
    m.map=mcp.getMapping();
    m.xpathlist=(args.length < 6 ? new String[0] : args[5].split(File.pathSeparator));
    m.run();
  }
}
Program: 186367
Project: 186367
Buggy source:
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  String deobfName=main.deobfField(inClassName,name);
  return super.visitField(access,deobfName,main.deobfTypeDescriptor(desc),signature,value);
}

Fixed version (ground truth):
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  String deobfName=main.lookupInheritedField(inClassName,name);
  return super.visitField(access,deobfName,main.deobfTypeDescriptor(desc),signature,value);
}
Program: 186368
Project: 186368
Buggy source:
public void visitLdcInsn(Object cst){
  super.visitLdcInsn(cst);
}

Fixed version (ground truth):
public void visitLdcInsn(Object cst){
  if (cst instanceof Type) {
    String desc=((Type)cst).getDescriptor();
    if (desc.charAt(0) == 'L' && desc.charAt(desc.length() - 1) == ';')     cst=Type.getType("String_Node_Str" + main.srg.getClassName(desc.substring(1,desc.length() - 1)) + "String_Node_Str");
  }
  super.visitLdcInsn(cst);
}
Program: 186369
Project: 186369
Buggy source:
public void run() throws IOException {
  ZipInputStream inZip=new ZipInputStream(new FileInputStream(input));
  ZipOutputStream outZip=new ZipOutputStream(new FileOutputStream(output));
  while (true) {
    ZipEntry inEntry=inZip.getNextEntry();
    if (inEntry == null)     break;
    if (!inEntry.getName().endsWith("String_Node_Str")) {
      ZipEntry outEntry=new ZipEntry(inEntry.getName());
      outZip.putNextEntry(outEntry);
      byte[] buf=new byte[1048576];
      int len=0;
      do {
        len=inZip.read(buf);
        if (len > 0)         outZip.write(buf,0,len);
      }
 while (len > 0);
      inZip.closeEntry();
      outZip.closeEntry();
      continue;
    }
    String oldName=fileToClass(inEntry.getName());
    String newName=srg.getClassName(oldName);
    try {
      ClassReader cr=new ClassReader(inZip);
      inZip.closeEntry();
      ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
      cr.accept(new DeobfuscateVisitor(cw,this),0);
      ZipEntry outEntry=new ZipEntry(classToFile(newName));
      outZip.putNextEntry(outEntry);
      outZip.write(cw.toByteArray());
      outZip.closeEntry();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + oldName + "String_Node_Str"+ newName);
      throw new RuntimeException(e);
    }
  }
  inZip.close();
  outZip.close();
}

Fixed version (ground truth):
public void run() throws IOException {
  ZipInputStream inZip=new ZipInputStream(new FileInputStream(input));
  ZipOutputStream outZip=new ZipOutputStream(new FileOutputStream(output));
  while (true) {
    ZipEntry inEntry=inZip.getNextEntry();
    if (inEntry == null)     break;
    if (!inEntry.getName().endsWith("String_Node_Str")) {
      ZipEntry outEntry=new ZipEntry(inEntry.getName());
      outZip.putNextEntry(outEntry);
      byte[] buf=new byte[1048576];
      int len=0;
      do {
        len=inZip.read(buf);
        if (len > 0)         outZip.write(buf,0,len);
      }
 while (len > 0);
      inZip.closeEntry();
      outZip.closeEntry();
      continue;
    }
    String oldName=fileToClass(inEntry.getName());
    String newName=srg.getClassName(oldName);
    System.out.println(oldName + "String_Node_Str" + newName);
    try {
      ClassReader cr=new ClassReader(inZip);
      inZip.closeEntry();
      ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
      cr.accept(new DeobfuscateVisitor(cw,this),0);
      ZipEntry outEntry=new ZipEntry(classToFile(newName));
      outZip.putNextEntry(outEntry);
      outZip.write(cw.toByteArray());
      outZip.closeEntry();
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + oldName + "String_Node_Str"+ newName);
      throw new RuntimeException(e);
    }
  }
  inZip.close();
  outZip.close();
}
Program: 186370
Project: 186370
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.exc=new ExcFile(new File(m.base,"String_Node_Str"));
    m.srg=new SrgFile(new File(m.base,"String_Node_Str"));
    m.fields=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.methods=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.run();
  }
 else {
    if (args.length != 8 || (!args[7].equals("String_Node_Str") && !args[7].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[7].equals("String_Node_Str");
    if (reob)     System.err.println("String_Node_Str");
    int side=Integer.parseInt(args[6]);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(m.base,args[0]);
    m.output=new File(args[1]);
    m.exc=new ExcFile(new File(m.base,args[2]));
    m.srg=new SrgFile(new File(m.base,args[3]));
    m.fields=new CsvFile(new File(m.base,args[4]),side,reob);
    m.methods=new CsvFile(new File(m.base,args[5]),side,reob);
    m.run();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length == 1 && args[0].equals("String_Node_Str")) {
    Main m=new Main();
    m.base=new File(MCP_BASE);
    m.input=new File("String_Node_Str");
    m.output=new File("String_Node_Str");
    m.exc=new ExcFile(new File(m.base,"String_Node_Str"));
    m.srg=new SrgFile(new File(m.base,"String_Node_Str"));
    m.fields=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.methods=new CsvFile(new File(m.base,"String_Node_Str"),CLIENT,false);
    m.run();
  }
 else {
    if (args.length != 8 || (!args[7].equals("String_Node_Str") && !args[7].equals("String_Node_Str"))) {
      System.err.println("String_Node_Str");
      return;
    }
    boolean reob=args[7].equals("String_Node_Str");
    if (reob)     System.err.println("String_Node_Str");
    int side=Integer.parseInt(args[6]);
    Main m=new Main();
    m.base=new File("String_Node_Str");
    m.input=new File(args[0]);
    m.output=new File(args[1]);
    m.exc=new ExcFile(new File(args[2]));
    m.srg=new SrgFile(new File(args[3]));
    m.fields=new CsvFile(new File(args[4]),side,reob);
    m.methods=new CsvFile(new File(args[5]),side,reob);
    m.run();
  }
}
Program: 186371
Project: 186371
Buggy source:
public String getClassName(String obf){
  String r=classes.get(obf);
  return r == null ? obf : r;
}

Fixed version (ground truth):
public String getClassName(String obf){
  if (obf == null)   return null;
  String r=classes.get(obf);
  if (r != null)   return r;
  if (!obf.contains("String_Node_Str") || obf.startsWith("String_Node_Str"))   return "String_Node_Str" + obf;
  return obf;
}
Program: 186372
Project: 186372
Buggy source:
public HttpWebRequest(String urlString){
  try {
    url=new URL(urlString);
  }
 catch (  MalformedURLException e) {
    throw new RuntimeMalformedURLException(e);
  }
}

Fixed version (ground truth):
HttpWebRequest(URL url){
  super(url);
}
Program: 186373
Project: 186373
Buggy source:
public abstract WebResponse getResponse();

Fixed version (ground truth):
public WebResponse getResponse(){
  try {
    URLConnection connection;
    if (proxy == null) {
      connection=url.openConnection();
    }
 else {
      connection=url.openConnection(proxy);
    }
    if (timeout != 0) {
      connection.setConnectTimeout(timeout);
    }
    configureConnection(connection);
    connection.connect();
    return new WebResponse(connection);
  }
 catch (  IOException e) {
    throw new RuntimeIOException(e);
  }
}
Program: 186374
Project: 186374
Buggy source:
public static WebRequest create(String requestUriString){
  return new HttpWebRequest(requestUriString);
}

Fixed version (ground truth):
private static WebRequest create(URL url){
  String protocol=url.getProtocol();
  if ("String_Node_Str".equals(protocol) || "String_Node_Str".equals(protocol)) {
    return new HttpWebRequest(url);
  }
 else   if ("String_Node_Str".equals(protocol)) {
    return new FtpWebRequest(url);
  }
 else   if ("String_Node_Str".equals(protocol)) {
    return new FileWebRequest(url);
  }
 else {
    return new UnknownWebRequest(url);
  }
}
Program: 186375
Project: 186375
Buggy source:
public WebResponse(HttpURLConnection connection){
  this.connection=connection;
}

Fixed version (ground truth):
public WebResponse(URLConnection connection){
  this.connection=connection;
}
Program: 186376
Project: 186376
Buggy source:
public static void assertNotEqual(String message,Object expected,Object actual){
  assertThat(message,actual,is(not(equalTo(expected))));
}

Fixed version (ground truth):
public static void assertNotEqual(String message,Object expected,Object actual){
  assertThat(message,actual,not(equalTo(expected)));
}
Program: 186377
Project: 186377
Buggy source:
public static <T extends Comparable<T>>void assertLess(T a,T b){
  assertThat(a,is(lessThan(b)));
}

Fixed version (ground truth):
public static <T extends Comparable<T>>void assertLess(T a,T b){
  assertThat(a,lessThan(b));
}
Program: 186378
Project: 186378
Buggy source:
public static void assertIsEmpty(String str){
  assertThat(str,is(EmptyStringMatcher.instance));
}

Fixed version (ground truth):
public static void assertIsEmpty(String str){
  assertThat(str,isEmptyString());
}
Program: 186379
Project: 186379
Buggy source:
public static <T extends Comparable<T>>void assertGreater(T a,T b){
  assertThat(a,is(greaterThan(b)));
}

Fixed version (ground truth):
public static <T extends Comparable<T>>void assertGreater(T a,T b){
  assertThat(a,greaterThan(b));
}
Program: 186380
Project: 186380
Buggy source:
/** 
 * Sets component size to cca 80% of screen size and centers window.
 * @param component
 */
public static void resizeAndCenter(final Component component){
  final Dimension screenSize=component.getToolkit().getScreenSize();
  component.setSize((int)(screenSize.width * 0.8),(int)(screenSize.height * 0.8));
  center(component);
}

Fixed version (ground truth):
/** 
 * Sets component size to cca 80% of screen size and centers window.
 * @param component
 */
public static void resizeAndCenter(final Component component){
  final GraphicsDevice gd=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
  final int screenWidth=gd.getDisplayMode().getWidth();
  final int screenHeight=gd.getDisplayMode().getHeight();
  component.setSize((int)(screenWidth * 0.8),(int)(screenHeight * 0.8));
  center(component);
}
Program: 186381
Project: 186381
Buggy source:
/** 
 * Locates the given component on the screen's center.
 * @param component the component to be centered
 */
public static void center(final Component component){
  final Dimension paneSize=component.getSize();
  final Dimension screenSize=component.getToolkit().getScreenSize();
  component.setLocation((screenSize.width - paneSize.width) / 2,(int)((screenSize.height - paneSize.height) * 0.45));
}

Fixed version (ground truth):
/** 
 * Locates the given component on the screen's center.
 * @param component the component to be centered
 */
public static void center(final Component component){
  final GraphicsDevice gd=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
  final int screenWidth=gd.getDisplayMode().getWidth();
  final int screenHeight=gd.getDisplayMode().getHeight();
  final Dimension paneSize=component.getSize();
  component.setLocation((screenWidth - paneSize.width) / 2,(int)((screenHeight - paneSize.height) * 0.45));
}
Program: 186383
Project: 186383
Buggy source:
/** 
 * Loads properties saved by previous run of application
 */
private void updateFromOptions(){
  tfPage.setText(ConvertUtils.toString(options.getPage()));
  tfPosLLX.setText(ConvertUtils.toString(options.getPositionLLX()));
  tfPosLLX.setText(ConvertUtils.toString(options.getPositionLLY()));
  tfPosURX.setText(ConvertUtils.toString(options.getPositionURX()));
  tfPosURY.setText(ConvertUtils.toString(options.getPositionURY()));
  tfBgImgScale.setText(ConvertUtils.toString(options.getBgImgScale()));
  cbDisplayMode.setSelectedItem(options.getRenderMode());
  tfL2Text.setText(options.getL2Text());
  chkbL2TextDefault.setSelected(options.getL2Text() == null);
  tfL4Text.setText(options.getL4Text());
  chkbL4TextDefault.setSelected(options.getL4Text() == null);
  tfImgPath.setText(options.getImgPath());
  tfBgImgPath.setText(options.getBgImgPath());
  chkbL2TextDefaultActionPerformed(null);
  chkbL4TextDefaultActionPerformed(null);
}

Fixed version (ground truth):
/** 
 * Loads properties saved by previous run of application
 */
private void updateFromOptions(){
  tfPage.setText(ConvertUtils.toString(options.getPage()));
  tfPosLLX.setText(ConvertUtils.toString(options.getPositionLLX()));
  tfPosLLY.setText(ConvertUtils.toString(options.getPositionLLY()));
  tfPosURX.setText(ConvertUtils.toString(options.getPositionURX()));
  tfPosURY.setText(ConvertUtils.toString(options.getPositionURY()));
  tfBgImgScale.setText(ConvertUtils.toString(options.getBgImgScale()));
  cbDisplayMode.setSelectedItem(options.getRenderMode());
  tfL2Text.setText(options.getL2Text());
  chkbL2TextDefault.setSelected(options.getL2Text() == null);
  tfL4Text.setText(options.getL4Text());
  chkbL4TextDefault.setSelected(options.getL4Text() == null);
  tfImgPath.setText(options.getImgPath());
  tfBgImgPath.setText(options.getBgImgPath());
  chkbL2TextDefaultActionPerformed(null);
  chkbL4TextDefaultActionPerformed(null);
}
Program: 186384
Project: 186384
Buggy source:
/** 
 * Creates a new Thread and sets its UncaughtExceptionHandler. The Thread is not started autmatically.
 */
public final static Thread newThread(final Runnable r,final String name){
  final Thread t=new Thread(r,name);
  t.setUncaughtExceptionHandler(UEH);
  return t;
}

Fixed version (ground truth):
/** 
 * Creates a new Thread and sets its UncaughtExceptionHandler. The Thread is not started automatically.
 */
public final static Thread newThread(final Runnable r,final String name){
  final Thread t=new Thread(r,name);
  t.setUncaughtExceptionHandler(UEH);
  return t;
}
Program: 186385
Project: 186385
Buggy source:
/** 
 * @return Whether deserialisation must be done on Bukkit's main thread. You must override and use {@link #deserialize(Fields)} if this method returns true!
 */
public abstract boolean mustSyncDeserialization();

Fixed version (ground truth):
/** 
 * Not currently used (everything happens on Bukkit's main thread).
 * @return Whether deserialisation must be done on Bukkit's main thread.
 */
public abstract boolean mustSyncDeserialization();
Program: 186386
Project: 186386
Buggy source:
@Override public boolean canBeInstantiated(final Class<? extends T> c){
}

Fixed version (ground truth):
/** 
 * You must override and use   {@link #deserialize(Fields)} if this method returns false.
 */
@Override public abstract boolean canBeInstantiated(final Class<? extends T> c);
Program: 186387
Project: 186387
Buggy source:
/** 
 * For testing
 * @param s
 * @param fileName
 * @param simple
 * @param allowEmptySections
 * @param defaultSeparator
 * @throws IOException
 */
public Config(final String s,final String fileName,final boolean simple,final boolean allowEmptySections,final String defaultSeparator) throws IOException {
  this(new ByteArrayInputStream(s.getBytes("String_Node_Str")),fileName,simple,allowEmptySections,defaultSeparator);
}

Fixed version (ground truth):
/** 
 * For testing
 * @param s
 * @param fileName
 * @param simple
 * @param allowEmptySections
 * @param defaultSeparator
 * @throws IOException
 */
public Config(final String s,final String fileName,final boolean simple,final boolean allowEmptySections,final String defaultSeparator) throws IOException {
  this(new ByteArrayInputStream(s.getBytes(StandardCharsets.UTF_8)),fileName,simple,allowEmptySections,defaultSeparator);
}
Program: 186388
Project: 186388
Buggy source:
/** 
 * Splits a line into value and comment. <p> Whitespace is preserved (whitespace in front of the comment is added to the value), and any ## in the value are replaced by a single #. The comment is returned with a leading #, except if there is no comment in which case it will be the empty string.
 * @param line
 * @return A pair (value, comment).
 */
public final static NonNullPair<String,String> splitLine(final String line){
  final Matcher m=linePattern.matcher(line);
  if (m.find())   return new NonNullPair<String,String>("String_Node_Str" + m.group(1).replace("String_Node_Str","String_Node_Str"),"String_Node_Str" + m.group(2));
  return new NonNullPair<String,String>(line,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Splits a line into value and comment. <p> Whitespace is preserved (whitespace in front of the comment is added to the value), and any ## in the value are replaced by a single #. The comment is returned with a leading #, except if there is no comment in which case it will be the empty string.
 * @param line
 * @return A pair (value, comment).
 */
public final static NonNullPair<String,String> splitLine(final String line){
  final Matcher m=linePattern.matcher(line);
  if (m.matches())   return new NonNullPair<String,String>("String_Node_Str" + m.group(1).replace("String_Node_Str","String_Node_Str"),"String_Node_Str" + m.group(2));
  return new NonNullPair<String,String>("String_Node_Str" + line.replace("String_Node_Str","String_Node_Str"),"String_Node_Str");
}
Program: 186389
Project: 186389
Buggy source:
private final void setIndex(final Event e,final String index,final @Nullable Object value){
  assert list;
  final String s=name.toString(e).toLowerCase(Locale.ENGLISH);
  Variables.setVariable(s.substring(0,s.length() - 1) + index.toLowerCase(Locale.ENGLISH),value,e,local);
}

Fixed version (ground truth):
private final void setIndex(final Event e,final String index,final @Nullable Object value){
}
Program: 186390
Project: 186390
Buggy source:
@Override public boolean log(final LogEntry entry){
  return false;
}

Fixed version (ground truth):
@Override public LogResult log(final LogEntry entry){
  return LogResult.DONT_LOG;
}
Program: 186391
Project: 186391
Buggy source:
@Override public boolean log(final LogEntry entry){
  if (entry.level.intValue() >= minimum)   count++;
  return true;
}

Fixed version (ground truth):
@Override public LogResult log(final LogEntry entry){
  if (entry.level.intValue() >= minimum)   count++;
  return LogResult.LOG;
}
Program: 186392
Project: 186392
Buggy source:
@Override public boolean log(final LogEntry entry){
  if (!hadError && entry.getLevel() == Level.SEVERE) {
    hadError=true;
    beforeErrors();
  }
  return true;
}

Fixed version (ground truth):
@Override public LogResult log(final LogEntry entry){
  if (!hadError && entry.getLevel() == Level.SEVERE) {
    hadError=true;
    beforeErrors();
  }
  return LogResult.LOG;
}
Program: 186393
Project: 186393
Buggy source:
@Override public boolean log(final LogEntry entry){
  return entry.level.intValue() >= minimum;
}

Fixed version (ground truth):
@Override public LogResult log(final LogEntry entry){
  return entry.level.intValue() >= minimum ? LogResult.LOG : LogResult.DONT_LOG;
}
Program: 186394
Project: 186394
Buggy source:
/** 
 * Creates a new SkriptCommand.<br/> No parameters may be null except for permission & permissionMessage.
 * @param name /name
 * @param pattern
 * @param arguments the list of Arguments this command takes
 * @param description description to display in /help
 * @param usage message to display if the command was used incorrectly
 * @param aliases /alias1, /alias2, ...
 * @param permission permission or null if none
 * @param permissionMessage message to display if the player doesn't have the given permission
 * @param items trigger to execute
 */
public ScriptCommand(final File script,final String name,final String pattern,final List<Argument<?>> arguments,final String description,final String usage,final List<String> aliases,final String permission,final String permissionMessage,final int executableBy,final List<TriggerItem> items){
  Validate.notNull(name,pattern,arguments,description,usage,aliases,items);
  this.name=name;
  label=name.toLowerCase();
  this.permission=permission;
  this.permissionMessage=permissionMessage == null ? Language.get("String_Node_Str") : permissionMessage;
  this.aliases=aliases;
  activeAliases=new ArrayList<String>(aliases);
  this.description=Utils.replaceChatStyles(description);
  this.usage=Utils.replaceChatStyles(usage);
  this.executableBy=executableBy;
  this.pattern=pattern;
  this.arguments=arguments;
  trigger=new Trigger(script,"String_Node_Str" + name,new SimpleEvent(),items);
  setupBukkitCommand();
}

Fixed version (ground truth):
/** 
 * Creates a new SkriptCommand.<br/> No parameters may be null except for permission & permissionMessage.
 * @param name /name
 * @param pattern
 * @param arguments the list of Arguments this command takes
 * @param description description to display in /help
 * @param usage message to display if the command was used incorrectly
 * @param aliases /alias1, /alias2, ...
 * @param permission permission or null if none
 * @param permissionMessage message to display if the player doesn't have the given permission
 * @param items trigger to execute
 */
public ScriptCommand(final File script,final String name,final String pattern,final List<Argument<?>> arguments,final String description,final String usage,final List<String> aliases,final String permission,final String permissionMessage,final int executableBy,final List<TriggerItem> items){
  Validate.notNull(name,pattern,arguments,description,usage,aliases,items);
  this.name=name;
  label=name.toLowerCase();
  this.permission=permission;
  this.permissionMessage=permissionMessage == null ? Language.get("String_Node_Str") : permissionMessage;
  this.aliases=aliases;
  activeAliases=new ArrayList<String>(aliases);
  this.description=Utils.replaceEnglishChatStyles(description);
  this.usage=Utils.replaceEnglishChatStyles(usage);
  this.executableBy=executableBy;
  this.pattern=pattern;
  this.arguments=arguments;
  trigger=new Trigger(script,"String_Node_Str" + name,new SimpleEvent(),items);
  setupBukkitCommand();
}
Program: 186395
Project: 186395
Buggy source:
public boolean execute(final CommandSender sender,@SuppressWarnings("String_Node_Str") final String commandLabel,final String rest){
  if (!sender.hasPermission(permission)) {
    sender.sendMessage(permissionMessage);
    return false;
  }
  String[] args=rest.split("String_Node_Str");
  if (args.length == 1 && args[0].isEmpty())   args=new String[0];
  final SkriptCommandEvent event=new SkriptCommandEvent(this,sender,args);
  for (int i=0; i < arguments.size(); i++) {
    final Argument<?> a=arguments.get(i);
    if (i < args.length) {
      if (a.isSingle()) {
        if (!a.parse(args[i],sender)) {
          return false;
        }
      }
 else {
        if (!a.parse(args,i,sender)) {
          return false;
        }
      }
    }
 else {
      a.setToDefault(event);
    }
  }
  if (Skript.log(Verbosity.VERY_HIGH))   Skript.info("String_Node_Str" + name + "String_Node_Str"+ Utils.join(args,"String_Node_Str"));
  final long startTrigger=System.nanoTime();
  trigger.run(event);
  if (Skript.log(Verbosity.VERY_HIGH))   Skript.info("String_Node_Str" + name + "String_Node_Str"+ 1. * (System.nanoTime() - startTrigger) / 1000000. + "String_Node_Str");
  return true;
}

Fixed version (ground truth):
public boolean execute(final CommandSender sender,@SuppressWarnings("String_Node_Str") final String commandLabel,final String rest){
  if (permission != null && !sender.hasPermission(permission)) {
    sender.sendMessage(permissionMessage);
    return false;
  }
  String[] args=rest.split("String_Node_Str");
  if (args.length == 1 && args[0].isEmpty())   args=new String[0];
  final SkriptCommandEvent event=new SkriptCommandEvent(this,sender,args);
  for (int i=0; i < arguments.size(); i++) {
    final Argument<?> a=arguments.get(i);
    if (i < args.length) {
      if (a.isSingle()) {
        if (!a.parse(args[i],sender)) {
          return false;
        }
      }
 else {
        if (!a.parse(args,i,sender)) {
          return false;
        }
      }
    }
 else {
      a.setToDefault(event);
    }
  }
  if (Skript.log(Verbosity.VERY_HIGH))   Skript.info("String_Node_Str" + name + "String_Node_Str"+ Utils.join(args,"String_Node_Str"));
  final long startTrigger=System.nanoTime();
  trigger.run(event);
  if (Skript.log(Verbosity.VERY_HIGH))   Skript.info("String_Node_Str" + name + "String_Node_Str"+ 1. * (System.nanoTime() - startTrigger) / 1000000. + "String_Node_Str");
  return true;
}
Program: 186396
Project: 186396
Buggy source:
@Override protected Iterator<?> iterator(final Event e){
  if (arg.getCurrent().length == 0)   return null;
  if (!isContainer) {
    return new ArrayIterator<Object>(arg.getCurrent());
  }
  final Object[] os=arg.getCurrent();
  return new Iterator<Object>(){
    private int i=0;
    private Iterator<?> current=((Container<?>)os[i]).containerIterator();
    @Override public boolean hasNext(){
      while (i < os.length && !current.hasNext())       current=((Container<?>)os[++i]).containerIterator();
      return i < os.length || current.hasNext();
    }
    @Override public Object next(){
      return current.next();
    }
    @Override public void remove(){
    }
  }
;
}

Fixed version (ground truth):
@Override protected Iterator<?> iterator(final Event e){
  if (arg.getCurrent().length == 0)   return null;
  if (!isContainer) {
    return new ArrayIterator<Object>(arg.getCurrent());
  }
  final Object[] os=arg.getCurrent();
  return new Iterator<Object>(){
    private int i=0;
    private Iterator<?> current=((Container<?>)os[i]).containerIterator();
    @Override public boolean hasNext(){
      while (i < os.length - 1 && !current.hasNext())       current=((Container<?>)os[++i]).containerIterator();
      return i < os.length - 1 || current.hasNext();
    }
    @Override public Object next(){
      return current.next();
    }
    @Override public void remove(){
    }
  }
;
}
Program: 186397
Project: 186397
Buggy source:
@Override public boolean hasNext(){
  while (i < os.length && !current.hasNext())   current=((Container<?>)os[++i]).containerIterator();
  return i < os.length || current.hasNext();
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  while (i < os.length - 1 && !current.hasNext())   current=((Container<?>)os[++i]).containerIterator();
  return i < os.length - 1 || current.hasNext();
}
Program: 186398
Project: 186398
Buggy source:
public static VariableString newInstance(final String s){
  final ArrayList<Object> string=new ArrayList<Object>();
  if (!s.contains("String_Node_Str")) {
    return new VariableString(s);
  }
  int c=s.indexOf('%');
  string.add(s.substring(0,c));
  while (c != s.length()) {
    final int c2=s.indexOf('%',c + 1);
    if (c2 == -1) {
      Skript.error("String_Node_Str");
      return null;
    }
    if (c + 1 == c2) {
      string.add("String_Node_Str");
    }
 else {
      final Variable<?> var=(Variable<?>)ExprParser.parse(s.substring(c + 1,c2),Skript.getVariables().iterator(),false,"String_Node_Str" + s.substring(c + 1,c2) + "String_Node_Str");
      if (var == null) {
        return null;
      }
 else {
        string.add(var);
      }
    }
    c=s.indexOf('%',c2 + 1);
    if (c == -1)     c=s.length();
    string.add(s.substring(c2 + 1,c));
  }
  return new VariableString(string);
}

Fixed version (ground truth):
/** 
 * @param s unquoted string
 * @return
 */
public static VariableString newInstance(final String s){
  final ArrayList<Object> string=new ArrayList<Object>();
  if (!s.contains("String_Node_Str")) {
    return new VariableString(s);
  }
  int c=s.indexOf('%');
  string.add(s.substring(0,c));
  while (c != s.length()) {
    final int c2=s.indexOf('%',c + 1);
    if (c2 == -1) {
      Skript.error("String_Node_Str");
      return null;
    }
    if (c + 1 == c2) {
      string.add("String_Node_Str");
    }
 else {
      final Variable<?> var=(Variable<?>)ExprParser.parse(s.substring(c + 1,c2),Skript.getVariables().iterator(),false,"String_Node_Str" + s.substring(c + 1,c2) + "String_Node_Str");
      if (var == null) {
        return null;
      }
 else {
        string.add(var);
      }
    }
    c=s.indexOf('%',c2 + 1);
    if (c == -1)     c=s.length();
    string.add(s.substring(c2 + 1,c));
  }
  return new VariableString(string);
}
Program: 186399
Project: 186399
Buggy source:
@Override protected Object decode(ChannelHandlerContext ctx,Channel ch,ChannelBuffer cb) throws Exception {
  ChannelBuffer buffer=(ChannelBuffer)super.decode(ctx,ch,cb);
  ProtocolCoder coder=GameBoss.getInstance().getProtocolCoder();
  if (coder != null) {
    byte[] decodebytes=coder.decode(buffer.array());
    return ChannelBuffers.wrappedBuffer(decodebytes);
  }
  return buffer;
}

Fixed version (ground truth):
@Override protected Object decode(ChannelHandlerContext ctx,Channel ch,ChannelBuffer cb) throws Exception {
  ChannelBuffer buffer=(ChannelBuffer)super.decode(ctx,ch,cb);
  ProtocolCoder coder=GameBoss.getInstance().getProtocolCoder();
  if (coder != null && buffer != null) {
    byte[] decodebytes=coder.decode(buffer.array());
    return ChannelBuffers.wrappedBuffer(decodebytes);
  }
  return buffer;
}
Program: 186400
Project: 186400
Buggy source:
public void broadcast(GameDownBuffer buffer) throws Exception {
  if (buffer.getChannelBuffer().writable()) {
    throw new IllegalStateException("String_Node_Str" + buffer.getChannelBuffer().getShort(2));
  }
  channel.write(buffer.getChannelBuffer());
}

Fixed version (ground truth):
public void broadcast(GameDownBuffer buffer) throws Exception {
  if (buffer.getChannelBuffer().writable()) {
    throw new IllegalStateException("String_Node_Str" + buffer.getChannelBuffer().getShort(2));
  }
  ProtocolCoder coder=GameBoss.getInstance().getProtocolCoder();
  if (coder != null) {
    coder.encode(buffer.getChannelBuffer().array(),GameBoss.getInstance().getWriteHeaderSize());
  }
  channel.write(buffer.getChannelBuffer());
}
Program: 186401
Project: 186401
Buggy source:
@Override protected Object encode(ChannelHandlerContext ctx,Channel ch,Object obj) throws Exception {
  ChannelBuffer buffer=(ChannelBuffer)obj;
  ProtocolCoder coder=GameBoss.getInstance().getProtocolCoder();
  if (coder != null) {
    byte[] encodebytes=coder.encode(buffer.array(),GameBoss.getInstance().getWriteHeaderSize());
    return ChannelBuffers.wrappedBuffer(encodebytes);
  }
  return buffer;
}

Fixed version (ground truth):
@Override protected Object encode(ChannelHandlerContext ctx,Channel ch,Object obj) throws Exception {
  ChannelBuffer buffer=(ChannelBuffer)obj;
  return buffer;
}
Program: 186402
Project: 186402
Buggy source:
public void sendGameDownBuffer(GameDownBuffer gameBuffer) throws IllegalStateException {
  final Channel channel=ctx.getChannel();
  ChannelBuffer channelBuffer=gameBuffer.getChannelBuffer();
  if (channelBuffer.writable()) {
    throw new IllegalStateException("String_Node_Str" + channelBuffer.getShort(2));
  }
  channel.write(gameBuffer.getChannelBuffer());
}

Fixed version (ground truth):
public void sendGameDownBuffer(GameDownBuffer gameBuffer) throws IllegalStateException {
  final Channel channel=ctx.getChannel();
  ChannelBuffer channelBuffer=gameBuffer.getChannelBuffer();
  if (channelBuffer.writable()) {
    throw new IllegalStateException("String_Node_Str" + channelBuffer.getShort(2));
  }
  ProtocolCoder coder=GameBoss.getInstance().getProtocolCoder();
  if (coder != null) {
    coder.encode(channelBuffer.array(),GameBoss.getInstance().getWriteHeaderSize());
  }
  channel.write(gameBuffer.getChannelBuffer());
}