nus-yam/ex-repair huggingface dataset:
Program: 83899
Project: 83899
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.instance != null) {
    this.instance.check(markers,context);
  }
  for (  IValue v : this.arguments) {
    v.check(markers,context);
  }
  if (this.method != null) {
    if (this.method.hasTypeVariables()) {
      this.typeArguments=this.method.getTypeMap(this.instance,this.arguments,this.generics);
    }
    this.method.checkArguments(markers,this.instance,this.arguments,this.typeArguments);
    if (this.method.hasModifier(Modifiers.DEPRECATED)) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
    byte access=context.getAccessibility(this.method);
    if (access == IContext.STATIC) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
 else     if (access == IContext.SEALED) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
 else     if ((access & IContext.READ_ACCESS) == 0) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.instance != null) {
    this.instance.check(markers,context);
  }
  for (  IValue v : this.arguments) {
    v.check(markers,context);
  }
  if (this.method != null) {
    if (this.typeArguments == null && this.method.hasTypeVariables()) {
      this.typeArguments=this.method.getTypeMap(this.instance,this.arguments,this.generics);
    }
    this.method.checkArguments(markers,this.instance,this.arguments,this.typeArguments);
    if (this.method.hasModifier(Modifiers.DEPRECATED)) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
    byte access=context.getAccessibility(this.method);
    if (access == IContext.STATIC) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
 else     if (access == IContext.SEALED) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
 else     if ((access & IContext.READ_ACCESS) == 0) {
      markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    }
  }
}
Program: 83900
Project: 83900
Buggy source:
@Override public boolean isType(IType type){
  if (type == Type.NONE || type == Type.VOID) {
    return true;
  }
  if (this.method == null) {
    return false;
  }
  if (this.type == null) {
    this.type=this.typeArguments != null ? this.method.getType(this.typeArguments) : this.method.getType();
  }
  return Type.isSuperType(type,this.type);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type == Type.NONE || type == Type.VOID) {
    return true;
  }
  if (this.method == null) {
    return false;
  }
  return Type.isSuperType(type,this.getType());
}
Program: 83901
Project: 83901
Buggy source:
@Override public IType getType(){
  if (this.method == null) {
    return Type.NONE;
  }
  if (this.type == null) {
    this.type=this.typeArguments != null ? this.method.getType(this.typeArguments) : this.method.getType();
  }
  return this.type;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.method == null) {
    return Type.NONE;
  }
  if (this.type == null) {
    if (this.method.hasTypeVariables()) {
      if (this.typeArguments == null) {
        this.typeArguments=this.method.getTypeMap(this.instance,this.arguments,this.generics);
      }
      return this.type=this.method.getType(this.typeArguments);
    }
    return this.type=this.method.getType();
  }
  return this.type;
}
Program: 83902
Project: 83902
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.check(markers,context);
    }
  }
  this.value.check(markers,context);
  IValue value1=this.value.withType(this.type);
  if (value1 == null) {
    Marker marker=Markers.create(this.value.getPosition(),"String_Node_Str",this.name);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + this.value.getType());
    markers.add(marker);
  }
 else {
    this.value=value1;
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.check(markers,context);
    }
  }
  IValue value1=this.value.withType(this.type);
  if (value1 == null) {
    Marker marker=Markers.create(this.value.getPosition(),"String_Node_Str",this.name);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + this.value.getType());
    markers.add(marker);
  }
 else {
    this.value=value1;
  }
  this.value.check(markers,context);
}
Program: 83903
Project: 83903
Buggy source:
@Override public Map<String,IType> getTypeMap(IValue instance,List<IValue> arguments,List<IType> typeArguments){
  Map<String,IType> map=new HashMap();
  if (typeArguments != null) {
    int len=Math.min(generics.size(),typeArguments.size());
    for (int i=0; i < len; i++) {
      ITypeVariable var=generics.get(i);
      IType type=typeArguments.get(i);
      map.put(var.getQualifiedName(),type);
    }
  }
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    instance.addGenerics(this.parameters.get(0).type,map);
    len--;
    for (int i=0; i < len; i++) {
      Parameter par=this.parameters.get(i + 1);
      IValue v=arguments.get(i);
      v.addGenerics(par.type,map);
    }
    return map;
  }
  if (instance == null && len == 1 && (this.modifiers & Modifiers.PREFIX) != 0) {
    arguments.get(0).addGenerics(this.parameters.get(0).type,map);
    return map;
  }
  if (instance != null) {
    instance.addGenerics(this.theClass.getThisType(),map);
  }
  for (int i=0; i < len; i++) {
    Parameter par=this.parameters.get(i);
    IValue v=arguments.get(i);
    v.addGenerics(par.type,map);
  }
  return map;
}

Fixed version (ground truth):
@Override public Map<String,IType> getTypeMap(IValue instance,List<IValue> arguments,List<IType> typeArguments){
  Map<String,IType> map=new HashMap();
  if (typeArguments != null) {
    int len=Math.min(generics.size(),typeArguments.size());
    for (int i=0; i < len; i++) {
      ITypeVariable var=generics.get(i);
      IType type=typeArguments.get(i);
      map.put(var.getQualifiedName(),type);
    }
  }
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    instance.addTypeVariables(this.parameters.get(0).type,map);
    len--;
    for (int i=0; i < len; i++) {
      Parameter par=this.parameters.get(i + 1);
      IValue v=arguments.get(i);
      v.addTypeVariables(par.type,map);
    }
    return map;
  }
  if (instance == null && len == 1 && (this.modifiers & Modifiers.PREFIX) != 0) {
    arguments.get(0).addTypeVariables(this.parameters.get(0).type,map);
    return map;
  }
  if (instance != null) {
    instance.addTypeVariables(this.theClass.getThisType(),map);
  }
  for (int i=0; i < len; i++) {
    Parameter par=this.parameters.get(i);
    IValue v=arguments.get(i);
    v.addTypeVariables(par.type,map);
  }
  return map;
}
Program: 83905
Project: 83905
Buggy source:
@Override public void addTypeVariables(Map<String,IType> types){
  List<ITypeVariable> variables=this.theClass.getTypeVariables();
  if (variables != null) {
    int len=Math.min(this.generics.size(),variables.size());
    for (int i=0; i < len; i++) {
      ITypeVariable var=variables.get(i);
      IType type=this.generics.get(i);
      types.put(var.getQualifiedName(),type);
    }
  }
}

Fixed version (ground truth):
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (type instanceof ITypeVariable) {
    if (type.isSuperTypeOf(this)) {
      if (this.arrayDimensions > 0) {
        typeVariables.put(type.getQualifiedName(),this.getArrayType(this.arrayDimensions - type.getArrayDimensions()));
      }
 else {
        typeVariables.put(type.getQualifiedName(),this);
      }
    }
  }
 else   if (type instanceof GenericType) {
    List<IType> types=((GenericType)type).generics;
    int len=Math.min(this.generics.size(),types.size());
    for (int i=0; i < len; i++) {
      IType t1=types.get(i);
      IType t2=this.generics.get(i);
      System.out.println(t1 + "String_Node_Str" + t2);
      t1.addTypeVariables(t2,typeVariables);
      t2.addTypeVariables(t1,typeVariables);
    }
  }
}
Program: 83906
Project: 83906
Buggy source:
public default void addTypeVariables(Map<String,IType> typeVariables){
}

Fixed version (ground truth):
public default void addTypeVariables(IType type,Map<String,IType> typeVariables){
}
Program: 83907
Project: 83907
Buggy source:
public static void findUnits(File source,File output,Package pack){
  if (!source.exists()) {
    logger.warning(source.getPath() + "String_Node_Str");
    return;
  }
 else   if (source.isDirectory()) {
    String name=source.getName();
    for (    String s : source.list()) {
      findUnits(new CodeFile(source,s),new File(output,s),pack.createSubPackage(name));
    }
    return;
  }
 else {
    String fileName=source.getPath();
    if (!config.compileFile(fileName)) {
      return;
    }
    if (fileName.endsWith("String_Node_Str") || fileName.endsWith("String_Node_Str")) {
      return;
    }
 else     if (fileName.endsWith("String_Node_Str")) {
      CompilationUnit unit=new CompilationUnit(pack,(CodeFile)source,output);
      output=unit.outputFile;
      pack.addCompilationUnit(unit);
      units.add(unit);
    }
    files.add(output);
  }
}

Fixed version (ground truth):
public static void findUnits(File source,File output,Package pack){
  if (source.isDirectory()) {
    String name=source.getName();
    for (    String s : source.list()) {
      findUnits(new CodeFile(source,s),new File(output,s),pack.createSubPackage(name));
    }
    return;
  }
  String fileName=source.getPath();
  if (!config.compileFile(fileName)) {
    return;
  }
  if (fileName.endsWith("String_Node_Str") || fileName.endsWith("String_Node_Str")) {
    return;
  }
 else   if (fileName.endsWith("String_Node_Str")) {
    CompilationUnit unit=new CompilationUnit(pack,(CodeFile)source,output);
    output=unit.outputFile;
    pack.addCompilationUnit(unit);
    units.add(unit);
  }
  files.add(output);
}
Program: 83909
Project: 83909
Buggy source:
public static IClass loadClass(BytecodeClass bclass,InputStream is,boolean decompile){
  try {
    jdk.internal.org.objectweb.asm.ClassReader reader=new jdk.internal.org.objectweb.asm.ClassReader(is);
    ClassReader visitor=new ClassReader(bclass);
    reader.accept(visitor,0);
    return bclass;
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public static IClass loadClass(BytecodeClass bclass,InputStream is,boolean decompile){
  try {
    jdk.internal.org.objectweb.asm.ClassReader reader=new jdk.internal.org.objectweb.asm.ClassReader(is);
    ClassReader visitor=new ClassReader(bclass);
    reader.accept(visitor,0);
    return bclass;
  }
 catch (  IOException ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
  return null;
}
Program: 83910
Project: 83910
Buggy source:
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    jdk.internal.org.objectweb.asm.ClassWriter writer=new jdk.internal.org.objectweb.asm.ClassWriter(Opcodes.ASM5);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    jdk.internal.org.objectweb.asm.ClassWriter writer=new jdk.internal.org.objectweb.asm.ClassWriter(Opcodes.ASM5);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83911
Project: 83911
Buggy source:
public void load(){
  try {
    this.code=new String(Files.readAllBytes(this.toPath()));
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
public void load(){
  try {
    this.code=new String(Files.readAllBytes(this.toPath()),StandardCharsets.UTF_8);
  }
 catch (  IOException ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83912
Project: 83912
Buggy source:
protected void parseToken(Parser parser,IToken token) throws SyntaxError {
  boolean parsed;
  try {
    parsed=parser.parse(this,token);
  }
 catch (  SyntaxError error) {
    throw error;
  }
catch (  Exception ex) {
    String message=ex.getMessage();
    if (message == null) {
      message=ex.getClass().getName();
    }
    ex.printStackTrace();
    throw new SyntaxError(token,"String_Node_Str" + token.getText() + "String_Node_Str"+ message);
  }
  if (!parsed) {
    throw new SyntaxError(token,"String_Node_Str" + token.getText() + "String_Node_Str");
  }
}

Fixed version (ground truth):
protected void parseToken(Parser parser,IToken token) throws SyntaxError {
  boolean parsed;
  try {
    parsed=parser.parse(this,token);
  }
 catch (  SyntaxError error) {
    throw error;
  }
catch (  Exception ex) {
    String message=ex.getMessage();
    if (message == null) {
      message=ex.getClass().getName();
    }
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
    throw new SyntaxError(token,"String_Node_Str" + token.getText() + "String_Node_Str"+ message);
  }
  if (!parsed) {
    throw new SyntaxError(token,"String_Node_Str" + token.getText() + "String_Node_Str");
  }
}
Program: 83913
Project: 83913
Buggy source:
public final void parse(CodeFile file,TokenIterator tokens){
  IToken token=null;
  this.tokens=tokens;
  this.file=file;
  try {
    IToken prev=null;
    while (tokens.hasNext()) {
      token=tokens.next();
      if (!this.retainToken((Token)token,prev)) {
        tokens.remove();
      }
      prev=token;
    }
    int index=0;
    tokens.reset();
    while (tokens.hasNext()) {
      token=tokens.next();
      token.setIndex(index);
      token.setPrev(prev);
      index++;
      prev=token;
    }
    tokens.reset();
    while (tokens.hasNext()) {
      token=this.currentToken=tokens.next();
      if (this.skip > 0) {
        this.skip--;
        continue;
      }
      Parser parser=this.currentParser;
      try {
        this.parseToken(parser,token);
      }
 catch (      SyntaxError ex) {
        if (this.jumpBackToken != null) {
          tokens.jump(this.jumpBackToken);
          this.popParser();
          this.jumpBackToken=null;
        }
 else {
          this.file.markers.add(ex);
        }
      }
      if (DyvilCompiler.parseStack) {
        System.out.println(token + "String_Node_Str" + parser.name+ "String_Node_Str"+ parser.mode);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
public final void parse(CodeFile file,TokenIterator tokens){
  IToken token=null;
  this.tokens=tokens;
  this.file=file;
  try {
    IToken prev=null;
    while (tokens.hasNext()) {
      token=tokens.next();
      if (!this.retainToken((Token)token,prev)) {
        tokens.remove();
      }
      prev=token;
    }
    int index=0;
    tokens.reset();
    while (tokens.hasNext()) {
      token=tokens.next();
      token.setIndex(index);
      token.setPrev(prev);
      index++;
      prev=token;
    }
    tokens.reset();
    while (tokens.hasNext()) {
      token=this.currentToken=tokens.next();
      if (this.skip > 0) {
        this.skip--;
        continue;
      }
      Parser parser=this.currentParser;
      try {
        this.parseToken(parser,token);
      }
 catch (      SyntaxError ex) {
        if (this.jumpBackToken != null) {
          tokens.jump(this.jumpBackToken);
          this.popParser();
          this.jumpBackToken=null;
        }
 else {
          this.file.markers.add(ex);
        }
      }
      if (DyvilCompiler.parseStack) {
        System.out.println(token + "String_Node_Str" + parser.name+ "String_Node_Str"+ parser.mode);
      }
    }
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83914
Project: 83914
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.method.writeCall(writer,this.instance,this.arguments);
  if (this.type != null && this.type != this.method.getType()) {
    writer.visitTypeInsn(Opcodes.CHECKCAST,this.type);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.method.writeCall(writer,this.instance,this.arguments);
  if (this.type != null) {
    IType methodType=this.method.getType();
    if (this.type != methodType && !Type.isSuperType(this.type,methodType)) {
      writer.visitTypeInsn(Opcodes.CHECKCAST,this.type);
    }
  }
}
Program: 83915
Project: 83915
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.typesResolved=true;
  if (this.generics != null) {
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
    }
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,context);
    }
  }
  this.body.resolveTypes(markers,this);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(markers,context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(markers,context).getTheClass();
      this.body.addClass(iclass);
    }
    this.innerTypes=null;
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.typesResolved=true;
  if (this.generics != null) {
    GenericType type=new GenericType(this);
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
      type.addType(new WildcardType(null,0,v.getCaptureClass()));
    }
    this.type=type;
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,context);
    }
  }
  this.body.resolveTypes(markers,this);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(markers,context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(markers,context).getTheClass();
      this.body.addClass(iclass);
    }
    this.innerTypes=null;
  }
}
Program: 83916
Project: 83916
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.generics != null) {
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
    }
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,this);
    }
  }
  if (this.body != null) {
    this.body.resolveTypes(markers,this);
    for (    IMethod m : this.body.methods) {
      if (m.isName("String_Node_Str")) {
        return;
      }
    }
  }
  Method constructor=new Method(this);
  constructor.setName("String_Node_Str","String_Node_Str");
  constructor.setType(Type.VOID);
  constructor.setModifiers(Modifiers.PUBLIC | Modifiers.SYNTHETIC);
  this.constructor=constructor;
  if (this.superType != null) {
    MethodMatch match=this.superType.resolveConstructor(Util.EMPTY_VALUES);
    if (match != null) {
      this.superConstructor=match.theMethod;
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.generics != null) {
    GenericType type=new GenericType(this);
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
      type.addType(new WildcardType(null,0,v.getCaptureClass()));
    }
    this.type=type;
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,this);
    }
  }
  if (this.body != null) {
    this.body.resolveTypes(markers,this);
    for (    IMethod m : this.body.methods) {
      if (m.isName("String_Node_Str")) {
        return;
      }
    }
  }
  Method constructor=new Method(this);
  constructor.setName("String_Node_Str","String_Node_Str");
  constructor.setType(Type.VOID);
  constructor.setModifiers(Modifiers.PUBLIC | Modifiers.SYNTHETIC);
  this.constructor=constructor;
  if (this.superType != null) {
    MethodMatch match=this.superType.resolveConstructor(Util.EMPTY_VALUES);
    if (match != null) {
      this.superConstructor=match.theMethod;
    }
  }
}
Program: 83917
Project: 83917
Buggy source:
@Override public Type getThisType(){
  return new Type(this);
}

Fixed version (ground truth):
@Override public Type getThisType(){
  return this.type;
}
Program: 83918
Project: 83918
Buggy source:
public IClass getCaptureClass();

Fixed version (ground truth):
public CaptureClass getCaptureClass();
Program: 83919
Project: 83919
Buggy source:
@Override public IClass getCaptureClass(){
  return this.captureClass;
}

Fixed version (ground truth):
@Override public CaptureClass getCaptureClass(){
  return this.captureClass;
}
Program: 83920
Project: 83920
Buggy source:
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  if (this.name != null) {
    IType t=typeVariables.get(this.name);
    if (t != null) {
      if (this.arrayDimensions > 0) {
        return t.getArrayType(this.arrayDimensions);
      }
      return t;
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  if (this.name != null) {
    IType t=typeVariables.get(this.name);
    if (t != null) {
      if (this.arrayDimensions > 0) {
        return t.getArrayType(this.arrayDimensions);
      }
      return t;
    }
  }
  WildcardType type=new WildcardType(this.position);
  if (this.lowerBound != null) {
    type.lowerBound=this.lowerBound.getConcreteType(typeVariables);
  }
  if (this.upperBound != null) {
    type.upperBound=this.upperBound.getConcreteType(typeVariables);
  }
  if (this.upperBounds != null) {
    int len=this.upperBounds.size();
    if (len > 0) {
      type.upperBounds=new ArrayList(len);
      for (int i=0; i < len; i++) {
        type.upperBounds.add(this.upperBounds.get(i).getConcreteType(typeVariables));
      }
    }
  }
  return type;
}
Program: 83921
Project: 83921
Buggy source:
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (this.name != null && this.isSuperTypeOf(type)) {
    typeVariables.put(this.name,type);
  }
  if (this.upperBound != null) {
    this.upperBound.addTypeVariables(type,typeVariables);
  }
  for (  IType t : this.upperBounds) {
    t.addTypeVariables(type,typeVariables);
  }
}

Fixed version (ground truth):
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (this.name != null) {
    typeVariables.put(this.name,type);
  }
  if (this.upperBound != null) {
    type.addTypeVariables(this.upperBound,typeVariables);
  }
  if (this.upperBounds != null) {
    for (    IType t : this.upperBounds) {
      type.addTypeVariables(t,typeVariables);
    }
  }
}
Program: 83922
Project: 83922
Buggy source:
@Override public String getInternalName(){
  return this.upperBound == null ? "String_Node_Str" : this.upperBound.getInternalName();
}

Fixed version (ground truth):
@Override public String getInternalName(){
  if (this.upperBound != null) {
    return this.upperBound.getInternalName();
  }
  if (this.upperBounds != null && !this.upperBounds.isEmpty()) {
    return this.upperBounds.get(0).getInternalName();
  }
  return "String_Node_Str";
}
Program: 83923
Project: 83923
Buggy source:
@Override public GenericType clone(){
  GenericType t=new GenericType();
  t.theClass=this.theClass;
  t.name=this.name;
  t.qualifiedName=this.qualifiedName;
  t.fullName=this.fullName;
  t.arrayDimensions=this.arrayDimensions;
  t.generics=new ArrayList(this.generics);
  return t;
}

Fixed version (ground truth):
@Override public GenericType clone(){
  GenericType t=new GenericType();
  t.theClass=this.theClass;
  t.name=this.name;
  t.qualifiedName=this.qualifiedName;
  t.fullName=this.fullName;
  t.arrayDimensions=this.arrayDimensions;
  if (this.generics != null) {
    t.generics=new ArrayList(this.generics);
  }
  return t;
}
Program: 83924
Project: 83924
Buggy source:
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  IType t=super.getConcreteType(typeVariables);
  if (t != this) {
    return t;
  }
  GenericType copy=this.clone();
  int len=this.generics.size();
  for (int i=0; i < len; i++) {
    IType t1=this.generics.get(i);
    copy.generics.set(i,t1.getConcreteType(typeVariables));
  }
  return copy;
}

Fixed version (ground truth):
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  IType t=super.getConcreteType(typeVariables);
  if (t != this) {
    return t;
  }
  GenericType copy=this.clone();
  if (this.generics != null) {
    int len=this.generics.size();
    for (int i=0; i < len; i++) {
      IType t1=this.generics.get(i);
      copy.generics.set(i,t1.getConcreteType(typeVariables));
    }
  }
  return copy;
}
Program: 83925
Project: 83925
Buggy source:
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (type instanceof ITypeVariable) {
    if (type.isSuperTypeOf(this)) {
      if (this.arrayDimensions > 0) {
        typeVariables.put(type.getQualifiedName(),this.getArrayType(this.arrayDimensions - type.getArrayDimensions()));
      }
 else {
        typeVariables.put(type.getQualifiedName(),this);
      }
    }
  }
  if (this.generics != null) {
    if (type instanceof GenericType) {
      List<IType> types=((GenericType)type).generics;
      int len=Math.min(this.generics.size(),types.size());
      for (int i=0; i < len; i++) {
        IType t1=types.get(i);
        IType t2=this.generics.get(i);
        t1.addTypeVariables(t2,typeVariables);
        t2.addTypeVariables(t1,typeVariables);
      }
    }
    List<ITypeVariable> variables=this.theClass.getTypeVariables();
    if (variables != null) {
      int len=Math.min(this.generics.size(),variables.size());
      for (int i=0; i < len; i++) {
        ITypeVariable var=variables.get(i);
        IType type1=this.generics.get(i);
        typeVariables.put(var.getQualifiedName(),type);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (this.generics != null) {
    if (type instanceof GenericType) {
      List<IType> types=((GenericType)type).generics;
      int len=Math.min(this.generics.size(),types.size());
      for (int i=0; i < len; i++) {
        IType t1=types.get(i);
        IType t2=this.generics.get(i);
        if (!t2.equals(t1) && !t1.equals(t2)) {
          return;
        }
        t2.addTypeVariables(t1,typeVariables);
      }
      return;
    }
  }
  if (type instanceof ITypeVariable) {
    type.addTypeVariables(this,typeVariables);
  }
}
Program: 83926
Project: 83926
Buggy source:
public boolean equals(IType type){
  if (this.arrayDimensions != type.getArrayDimensions()) {
    return false;
  }
  return this.classEquals(type);
}

Fixed version (ground truth):
@Override public boolean equals(IType type){
  if (this.arrayDimensions != type.getArrayDimensions()) {
    return false;
  }
  return this.theClass == type.getTheClass();
}
Program: 83927
Project: 83927
Buggy source:
public default void addTypeVariables(IType type,Map<String,IType> typeVariables){
  IType t=this.getType();
  type.addTypeVariables(t,typeVariables);
}

Fixed version (ground truth):
public default void addTypeVariables(IType type,Map<String,IType> typeVariables){
  IType t=this.getType();
  if (type.equals(t)) {
    type.addTypeVariables(t,typeVariables);
  }
}
Program: 83928
Project: 83928
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.value.getValueType() == IValue.THIS) {
    markers.add(new SyntaxError(this.position,"String_Node_Str"));
  }
  if (this.field == null) {
    return;
  }
  IType type=this.field.getType();
  IValue value1=this.value.withType(type);
  if (value1 == null) {
    Marker marker=Markers.create(this.value.getPosition(),"String_Node_Str",this.name);
    marker.addInfo("String_Node_Str" + type);
    IType vtype=this.value.getType();
    marker.addInfo("String_Node_Str" + (vtype == null ? "String_Node_Str" : vtype));
    markers.add(marker);
  }
 else {
    this.value=value1;
  }
  if (this.field.hasModifier(Modifiers.FINAL)) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  if (this.field.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  byte access=context.getAccessibility(this.field);
  if (access == IContext.STATIC) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
 else   if (access == IContext.SEALED) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
 else   if ((access & IContext.WRITE_ACCESS) == 0) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.value.getValueType() == IValue.THIS) {
    markers.add(new SyntaxError(this.position,"String_Node_Str"));
  }
  if (this.field == null) {
    return;
  }
  IType type=this.field.getType();
  IValue value1=this.value.withType(type);
  if (value1 == null) {
    Marker marker=Markers.create(this.value.getPosition(),"String_Node_Str",this.name);
    marker.addInfo("String_Node_Str" + type);
    IType vtype=this.value.getType();
    marker.addInfo("String_Node_Str" + (vtype == null ? "String_Node_Str" : vtype));
    markers.add(marker);
  }
 else {
    this.value=value1;
  }
  value1.check(markers,context);
  if (this.field.hasModifier(Modifiers.FINAL)) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  if (this.field.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  byte access=context.getAccessibility(this.field);
  if (access == IContext.STATIC) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
 else   if (access == IContext.SEALED) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
 else   if ((access & IContext.WRITE_ACCESS) == 0) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
}
Program: 83929
Project: 83929
Buggy source:
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  if (this.name != null) {
    IType t=typeVariables.get(this.name);
    if (t != null) {
      if (this.arrayDimensions > 0) {
        return t.getArrayType(this.arrayDimensions);
      }
      return t;
    }
  }
  WildcardType type=new WildcardType(this.position);
  if (this.lowerBound != null) {
    type.lowerBound=this.lowerBound.getConcreteType(typeVariables);
  }
  if (this.upperBound != null) {
    type.upperBound=this.upperBound.getConcreteType(typeVariables);
  }
  if (this.upperBounds != null) {
    int len=this.upperBounds.size();
    if (len > 0) {
      type.upperBounds=new ArrayList(len);
      for (int i=0; i < len; i++) {
        type.upperBounds.add(this.upperBounds.get(i).getConcreteType(typeVariables));
      }
    }
  }
  return type;
}

Fixed version (ground truth):
@Override public IType getConcreteType(Map<String,IType> typeVariables){
  if (this.name != null) {
    IType t=typeVariables.get(this.name);
    if (t != null) {
      if (this.arrayDimensions > 0) {
        return t.getArrayType(this.arrayDimensions);
      }
      return t;
    }
    return this;
  }
  WildcardType type=new WildcardType(this.position);
  if (this.lowerBound != null) {
    type.lowerBound=this.lowerBound.getConcreteType(typeVariables);
  }
  if (this.upperBound != null) {
    type.upperBound=this.upperBound.getConcreteType(typeVariables);
  }
  if (this.upperBounds != null) {
    int len=this.upperBounds.size();
    if (len > 0) {
      type.upperBounds=new ArrayList(len);
      for (int i=0; i < len; i++) {
        type.upperBounds.add(this.upperBounds.get(i).getConcreteType(typeVariables));
      }
    }
  }
  return type;
}
Program: 83930
Project: 83930
Buggy source:
private void writeInvoke(MethodWriter writer,IValue instance,List<IValue> arguments){
  int args=0;
  if (instance != null) {
    instance.writeExpression(writer);
    args=1;
  }
  for (  IValue arg : arguments) {
    arg.writeExpression(writer);
    args++;
  }
  int opcode;
  int modifiers=this.modifiers;
  if ((modifiers & Modifiers.STATIC) != 0) {
    opcode=Opcodes.INVOKESTATIC;
  }
 else   if (this.theClass.hasModifier(Modifiers.INTERFACE_CLASS) && (modifiers & Modifiers.ABSTRACT) != 0) {
    opcode=Opcodes.INVOKEINTERFACE;
  }
 else   if ((modifiers & Modifiers.PRIVATE) == Modifiers.PRIVATE) {
    opcode=Opcodes.INVOKESPECIAL;
  }
 else   if (instance != null && instance.getValueType() == IValue.SUPER) {
    opcode=Opcodes.INVOKESPECIAL;
  }
 else {
    opcode=Opcodes.INVOKEVIRTUAL;
  }
  String owner=this.theClass.getInternalName();
  String name=this.qualifiedName;
  String desc=this.getDescriptor();
  IType type=this.type;
  writer.visitMethodInsn(opcode,owner,name,desc,this.theClass.hasModifier(Modifiers.INTERFACE_CLASS),args,type);
}

Fixed version (ground truth):
private void writeInvoke(MethodWriter writer,IValue instance,List<IValue> arguments){
  int args=0;
  if (instance != null) {
    instance.writeExpression(writer);
    args=1;
  }
  for (  IValue arg : arguments) {
    arg.writeExpression(writer);
    args++;
  }
  int opcode;
  int modifiers=this.modifiers;
  if ((modifiers & Modifiers.STATIC) != 0) {
    opcode=Opcodes.INVOKESTATIC;
  }
 else   if (this.theClass.hasModifier(Modifiers.INTERFACE_CLASS) && this.value == null) {
    opcode=Opcodes.INVOKEINTERFACE;
  }
 else   if ((modifiers & Modifiers.PRIVATE) == Modifiers.PRIVATE) {
    opcode=Opcodes.INVOKESPECIAL;
  }
 else   if (instance != null && instance.getValueType() == IValue.SUPER) {
    opcode=Opcodes.INVOKESPECIAL;
  }
 else {
    opcode=Opcodes.INVOKEVIRTUAL;
  }
  String owner=this.theClass.getInternalName();
  String name=this.qualifiedName;
  String desc=this.getDescriptor();
  IType type=this.type;
  writer.visitMethodInsn(opcode,owner,name,desc,this.theClass.hasModifier(Modifiers.INTERFACE_CLASS),args,type);
}
Program: 83931
Project: 83931
Buggy source:
@Override public Map<String,IType> getTypeMap(IValue instance,List<IValue> arguments,List<IType> typeArguments){
  Map<String,IType> map=new HashMap();
  if (typeArguments != null) {
    int len=Math.min(generics.size(),typeArguments.size());
    for (int i=0; i < len; i++) {
      ITypeVariable var=generics.get(i);
      IType type=typeArguments.get(i);
      map.put(var.getQualifiedName(),type);
    }
  }
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    instance.addTypeVariables(this.parameters.get(0).type,map);
    for (int i=0; i < len; i++) {
      Parameter par=this.parameters.get(i + 1);
      IValue v=arguments.get(i);
      v.addTypeVariables(par.type,map);
    }
    return map;
  }
  if (instance == null && len == 1 && (this.modifiers & Modifiers.PREFIX) != 0) {
    arguments.get(0).addTypeVariables(this.parameters.get(0).type,map);
    return map;
  }
  if (instance != null) {
    instance.addTypeVariables(this.theClass.getThisType(),map);
  }
  for (int i=0; i < len; i++) {
    Parameter par=this.parameters.get(i);
    IValue v=arguments.get(i);
    v.addTypeVariables(par.type,map);
  }
  return map;
}

Fixed version (ground truth):
@Override public Map<String,IType> getTypeMap(IValue instance,List<IValue> arguments,List<IType> typeArguments){
  Map<String,IType> map=new HashMap();
  if (typeArguments != null) {
    int len=Math.min(generics.size(),typeArguments.size());
    for (int i=0; i < len; i++) {
      ITypeVariable var=generics.get(i);
      IType type=typeArguments.get(i);
      map.put(var.getQualifiedName(),type);
    }
  }
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    instance.addTypeVariables(this.parameters.get(0).type,map);
    for (int i=0; i < len; i++) {
      Parameter par=this.parameters.get(i + 1);
      IValue v=arguments.get(i);
      v.addTypeVariables(par.type,map);
    }
    return map;
  }
  if (instance == null && len == 1 && (this.modifiers & Modifiers.PREFIX) != 0) {
    arguments.get(0).addTypeVariables(this.parameters.get(0).type,map);
    return map;
  }
  if (instance != null) {
    instance.addTypeVariables(this.theClass.getThisType(),map);
  }
  len=Math.min(this.parameters.size(),len);
  for (int i=0; i < len; i++) {
    Parameter par=this.parameters.get(i);
    IValue v=arguments.get(i);
    v.addTypeVariables(par.type,map);
  }
  return map;
}
Program: 83932
Project: 83932
Buggy source:
@Override public boolean parse(){
  ParserManager manager=new ParserManager(new CompilationUnitParser(this));
  manager.semicolonInference=true;
  manager.parse(this.inputFile,this.tokens);
  this.tokens=null;
  int size=this.markers.size();
  if (size > 0) {
    StringBuilder buffer=new StringBuilder("String_Node_Str");
    buffer.append(this.inputFile).append("String_Node_Str").append(size).append("String_Node_Str");
    boolean error=false;
    for (    Marker marker : this.markers) {
      marker.log(buffer);
    }
    DyvilCompiler.logger.info(buffer.toString());
    DyvilCompiler.logger.warning(this.name + "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean parse(){
  ParserManager manager=new ParserManager(new CompilationUnitParser(this));
  manager.semicolonInference=true;
  manager.parse(this.inputFile,this.tokens);
  this.tokens=null;
  int size=this.markers.size();
  if (size > 0) {
    StringBuilder buffer=new StringBuilder("String_Node_Str");
    buffer.append(this.inputFile).append("String_Node_Str").append(size).append("String_Node_Str");
    boolean error=false;
    for (    Marker marker : this.markers) {
      marker.log(buffer);
    }
    DyvilCompiler.logger.info(buffer.toString());
    DyvilCompiler.logger.warning(this.name + "String_Node_Str");
    if (DyvilCompiler.states.contains(CompilerState.PRINT)) {
      DyvilCompiler.logger.info("String_Node_Str" + this.toString());
    }
    return false;
  }
  return true;
}
Program: 83933
Project: 83933
Buggy source:
public static void initLogger(){
  try {
    logger.setUseParentHandlers(false);
    Formatter formatter=new Formatter(){
      @Override public String format(      LogRecord record){
        String message=record.getMessage();
        if (message == null || message.isEmpty()) {
          return "String_Node_Str";
        }
        Throwable thrown=record.getThrown();
        StringBuilder builder=new StringBuilder();
        builder.append('[').append(format.format(new Date(record.getMillis()))).append("String_Node_Str");
        builder.append(record.getLevel()).append("String_Node_Str").append(message).append('\n');
        if (thrown != null) {
          thrown.printStackTrace(new AppendableOutputStream(builder));
        }
        return builder.toString();
      }
    }
;
    StreamHandler ch=new StreamHandler(System.out,formatter);
    logger.addHandler(ch);
    if (logFile) {
      String path=new File("String_Node_Str").getAbsolutePath();
      FileHandler fh=new FileHandler(path,true);
      fh.setFormatter(formatter);
      logger.addHandler(fh);
    }
  }
 catch (  Exception ex) {
  }
}

Fixed version (ground truth):
public static void initLogger(){
  try {
    logger.setUseParentHandlers(false);
    logger.setLevel(Level.ALL);
    Formatter formatter=new Formatter(){
      @Override public String format(      LogRecord record){
        String message=record.getMessage();
        if (message == null || message.isEmpty()) {
          return "String_Node_Str";
        }
        Throwable thrown=record.getThrown();
        StringBuilder builder=new StringBuilder();
        builder.append('[').append(format.format(new Date(record.getMillis()))).append("String_Node_Str");
        builder.append(record.getLevel()).append("String_Node_Str").append(message).append('\n');
        if (thrown != null) {
          thrown.printStackTrace(new AppendableOutputStream(builder));
        }
        return builder.toString();
      }
    }
;
    StreamHandler ch=new StreamHandler(System.out,formatter);
    ch.setLevel(Level.ALL);
    logger.addHandler(ch);
    if (logFile) {
      String path=new File("String_Node_Str").getAbsolutePath();
      FileHandler fh=new FileHandler(path,true);
      fh.setLevel(Level.ALL);
      fh.setFormatter(formatter);
      logger.addHandler(fh);
    }
  }
 catch (  Exception ex) {
  }
}
Program: 83934
Project: 83934
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  this.value.check(markers,context);
  if (this.type == Type.VOID) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
  boolean primitiveType=this.type.isPrimitive();
  IType type=this.value.getType();
  if (primitiveType) {
    if (!type.isPrimitive()) {
      markers.add(Markers.create(this.position,"String_Node_Str"));
    }
  }
 else   if (type.isPrimitive()) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
 else   if (this.value.isType(this.type)) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  this.value.check(markers,context);
  if (this.type == Type.VOID) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
  boolean primitiveType=this.type.isPrimitive();
  boolean primitiveValue=this.value.isPrimitive();
  if (primitiveType) {
    if (!primitiveValue) {
      markers.add(Markers.create(this.position,"String_Node_Str"));
    }
  }
 else   if (primitiveValue) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
 else   if (this.value.isType(this.type)) {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
}
Program: 83935
Project: 83935
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.value.writeExpression(writer);
  if (this.type.isPrimitive()) {
    OpcodeUtil.writePrimitiveCast((PrimitiveType)this.value.getType(),(PrimitiveType)this.type,writer);
  }
 else {
    writer.visitTypeInsn(Opcodes.CHECKCAST,this.type);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.value.writeExpression(writer);
  if (this.type.isPrimitive()) {
    OpcodeUtil.writePrimitiveCast(this.value.getType(),(PrimitiveType)this.type,writer);
  }
 else {
    writer.visitTypeInsn(Opcodes.CHECKCAST,this.type);
  }
}
Program: 83936
Project: 83936
Buggy source:
public static void jar(List<File> files,File output,Manifest manifest){
  String outputDir=DyvilCompiler.config.outputDir.getAbsolutePath();
  int len=outputDir.length();
  if (!outputDir.endsWith("String_Node_Str")) {
    len++;
  }
  try (JarOutputStream jos=new JarOutputStream(new FileOutputStream(output),manifest)){
    for (    File file : files) {
      String name=file.getAbsolutePath().substring(len);
      createEntry(file,jos,name);
    }
    jos.flush();
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void jar(List<File> files,File output,Manifest manifest){
  String outputDir=DyvilCompiler.config.outputDir.getAbsolutePath();
  int len=outputDir.length();
  if (!outputDir.endsWith("String_Node_Str")) {
    len++;
  }
  try (JarOutputStream jos=new JarOutputStream(new FileOutputStream(output),manifest)){
    for (    File file : files) {
      if (file.exists()) {
        String name=file.getAbsolutePath().substring(len);
        createEntry(file,jos,name);
      }
    }
    jos.flush();
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83937
Project: 83937
Buggy source:
public static int index(String name){
switch (name) {
case "String_Node_Str":
    return 10;
case "String_Node_Str":
  return 20;
case "String_Node_Str":
return 30;
case "String_Node_Str":
return 40;
case "String_Node_Str":
return 50;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 60;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 70;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 80;
case "String_Node_Str":
case "String_Node_Str":
return 90;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 100;
case "String_Node_Str":
case "String_Node_Str":
return 200;
}
return 0;
}

Fixed version (ground truth):
public static int index(String name){
switch (name) {
case "String_Node_Str":
    return 10;
case "String_Node_Str":
  return 20;
case "String_Node_Str":
return 30;
case "String_Node_Str":
return 40;
case "String_Node_Str":
return 50;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 60;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 70;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 80;
case "String_Node_Str":
case "String_Node_Str":
return 90;
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
return 100;
case "String_Node_Str":
case "String_Node_Str":
return 110;
case "String_Node_Str":
case "String_Node_Str":
return 200;
}
if (name.charAt(name.length() - 1) == '=') {
return 5;
}
return 0;
}