nus-yam/ex-repair huggingface dataset:
Program: 84101
Project: 84101
Buggy source:
public List<Parameter> getParameters();

Fixed version (ground truth):
public Map<String,Parameter> getParameters();
Program: 84102
Project: 84102
Buggy source:
public Map<String,Parameter> getParameters(){
  return this.parameters;
}

Fixed version (ground truth):
@Override public Map<String,Parameter> getParameters(){
  return this.parameters;
}
Program: 84103
Project: 84103
Buggy source:
public List<ThrowsDecl> getThrowsDecl(){
  return this.throwsDecl;
}

Fixed version (ground truth):
public List<ThrowsDecl> getThrowsDecl(){
  return this.throwsDeclarations;
}
Program: 84104
Project: 84104
Buggy source:
@Override public boolean addThrowsDecl(ThrowsDecl throwsDecl){
  return this.throwsDecl.add(throwsDecl);
}

Fixed version (ground truth):
@Override public boolean addThrowsDecl(ThrowsDecl throwsDecl){
  return this.throwsDeclarations.add(throwsDecl);
}
Program: 84105
Project: 84105
Buggy source:
public void setException(String exception) throws SyntaxException {
  if (this.exception != null) {
    throw new SyntaxException("String_Node_Str",exception);
  }
  this.exception=exception;
}

Fixed version (ground truth):
public void setException(String exception){
  this.exception=exception;
}
Program: 84106
Project: 84106
Buggy source:
@Override public void parse(ParserManager jcp,String value,IToken token) throws SyntaxException {
switch (value) {
case "String_Node_Str":
    this.mode=NAME;
  this.theClassDecl=new dyvil.tools.compiler.ast.classes.Class();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new Interface();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new dyvil.tools.compiler.ast.classes.Enum();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new AnnotationClass();
return;
case "String_Node_Str":
this.mode=SUPERCLASSES;
return;
case "String_Node_Str":
this.theClassDecl.setModifiers(this.modifiers);
jcp.pushParser(new ClassBodyParser());
return;
}
switch (this.mode) {
case NAME:
this.theClassDecl.setName(value);
case SUPERCLASSES:
this.theClassDecl.addSuperClass(value);
}
}

Fixed version (ground truth):
@Override public void parse(ParserManager jcp,String value,IToken token) throws SyntaxException {
switch (value) {
case "String_Node_Str":
    this.mode=NAME;
  this.theClassDecl=new dyvil.tools.compiler.ast.classes.Class();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new Interface();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new dyvil.tools.compiler.ast.classes.Enum();
return;
case "String_Node_Str":
this.mode=NAME;
this.theClassDecl=new AnnotationClass();
return;
case "String_Node_Str":
this.mode=SUPERCLASSES;
return;
case "String_Node_Str":
this.theClassDecl.setModifiers(this.modifiers);
jcp.pushParser(new ClassBodyParser(this.theClassDecl));
return;
}
switch (this.mode) {
case NAME:
this.theClassDecl.setName(value);
case SUPERCLASSES:
this.theClassDecl.addSuperClass(value);
}
}
Program: 84107
Project: 84107
Buggy source:
public Template(DyvilCompiler compiler,Package pack,File input,File output){
  super(compiler,pack,input,output);
  this.markers=new MarkerList(I18n.INSTANCE);
}

Fixed version (ground truth):
public Template(DyvilCompiler compiler,Package pack,File input,File output){
  super(compiler,pack,input,output);
  this.markers=new MarkerList(I18n.SYNTAX);
}
Program: 84108
Project: 84108
Buggy source:
public ScopeDirective(){
}

Fixed version (ground truth):
public ScopeDirective(){
  this.value=new StringInterpolationExpr();
}
Program: 84109
Project: 84109
Buggy source:
@Override public void writeExpression(MethodWriter writer,IType type) throws BytecodeException {
  super.writeExpression(writer,type);
  if (this.block != null) {
    this.block.writeExpression(writer,Types.VOID);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer,IType type) throws BytecodeException {
  if (this.getValue() != null) {
    super.writeExpression(writer,type);
  }
  if (this.block != null) {
    this.block.writeExpression(writer,Types.VOID);
  }
}
Program: 84110
Project: 84110
Buggy source:
private void parseDyvilArguments(){
  final DyvilLexer sublexer=new DyvilLexer(this.markers,GenSrcSymbols.INSTANCE);
  sublexer.setInterpolationEnd();
  this.useSubLexer(sublexer);
}

Fixed version (ground truth):
private void parseDyvilArguments(){
  final DyvilLexer sublexer=new DyvilLexer(this.markers,DyvilSymbols.INSTANCE);
  sublexer.setInterpolationEnd();
  this.useSubLexer(sublexer);
}
Program: 84111
Project: 84111
Buggy source:
@Override public void parse(IParserManager pm,IToken token){
  final int type=token.type();
switch (this.mode) {
case ELEMENT:
switch (type) {
case BaseSymbols.CLOSE_CURLY_BRACKET:
      pm.popParser(true);
    return;
case Tokens.EOF:
  return;
case Tokens.STRING:
this.directives.add(new ProcessedText(token.stringValue()));
return;
case BaseSymbols.HASH:
this.mode=DIRECTIVE_NAME;
return;
}
return;
case DIRECTIVE_NAME:
switch (type) {
case GenSrcSymbols.TEMPLATE:
pm.pushParser(new TemplateDirectiveParser(this.template),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.IMPORT:
pm.pushParser(new ImportDirectiveParser(this.template),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.IF:
pm.pushParser(new IfDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.FOR:
pm.pushParser(new ForDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.VAR:
case GenSrcSymbols.LET:
case GenSrcSymbols.CONST:
pm.pushParser(new VarDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.FUNC:
pm.pushParser(new FuncDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case BaseSymbols.OPEN_PARENTHESIS:
case BaseSymbols.OPEN_CURLY_BRACKET:
pm.pushParser(new ScopeDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
}
if (Tokens.isIdentifier(type)) {
pm.pushParser(new CallDirectiveParser(this.directives),true);
return;
}
pm.report(token,"String_Node_Str");
}
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token){
  final int type=token.type();
switch (this.mode) {
case ELEMENT:
switch (type) {
case BaseSymbols.CLOSE_CURLY_BRACKET:
      pm.popParser(true);
    return;
case Tokens.EOF:
  return;
case Tokens.STRING:
this.directives.add(new ProcessedText(token.stringValue()));
return;
case BaseSymbols.HASH:
this.mode=DIRECTIVE_NAME;
return;
}
return;
case DIRECTIVE_NAME:
switch (type) {
case GenSrcSymbols.TEMPLATE:
pm.pushParser(new TemplateDirectiveParser(this.template),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.IMPORT:
pm.pushParser(new ImportDirectiveParser(this.template),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.IF:
pm.pushParser(new IfDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.FOR:
pm.pushParser(new ForDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.VAR:
case GenSrcSymbols.LET:
case GenSrcSymbols.CONST:
pm.pushParser(new VarDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case GenSrcSymbols.FUNC:
pm.pushParser(new FuncDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
case BaseSymbols.OPEN_PARENTHESIS:
case BaseSymbols.OPEN_CURLY_BRACKET:
pm.pushParser(new ScopeDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
}
if (Tokens.isIdentifier(type)) {
pm.pushParser(new CallDirectiveParser(this.directives),true);
this.mode=ELEMENT;
return;
}
pm.report(token,"String_Node_Str");
}
}
Program: 84112
Project: 84112
Buggy source:
public static <T extends Enum<T>>T getEnumValue(ArgumentList arguments,IParameter parameter,Class<T> type){
  IValue value=arguments.get(parameter);
  if (value == null) {
    value=parameter.getValue();
  }
switch (value.valueTag()) {
case IValue.ENUM_ACCESS:
    return Enum.valueOf(type,((EnumValue)value).getInternalName());
case IValue.FIELD_ACCESS:
  if (Types.isSameType(parameter.getCovariantType(),value.getType())) {
    return Enum.valueOf(type,((FieldAccess)value).getName().qualified);
  }
break;
}
return null;
}

Fixed version (ground truth):
public static <T extends Enum<T>>T getEnumValue(ArgumentList arguments,IParameter parameter,Class<T> type){
  IValue value=arguments.get(parameter);
  if (value == null) {
    value=parameter.getValue();
  }
  try {
switch (value.valueTag()) {
case IValue.ENUM_ACCESS:
      return Enum.valueOf(type,((EnumValue)value).getInternalName());
case IValue.FIELD_ACCESS:
    if (Types.isSameType(parameter.getCovariantType(),value.getType())) {
      return Enum.valueOf(type,((FieldAccess)value).getName().qualified);
    }
}
}
 catch (IllegalArgumentException ignored) {
}
return null;
}
Program: 84113
Project: 84113
Buggy source:
public static String getStringValue(ArgumentList arguments,IParameter parameter){
  IValue value=arguments.get(parameter);
  if (value == null) {
    value=parameter.getValue();
  }
  if (value.valueTag() == IValue.STRING) {
    return value.stringValue();
  }
  return null;
}

Fixed version (ground truth):
public static String getStringValue(ArgumentList arguments,IParameter parameter){
  IValue value=arguments.get(parameter);
  if (value == null) {
    value=parameter.getValue();
  }
  return value.stringValue();
}
Program: 84114
Project: 84114
Buggy source:
private static String replaceMember(IMember member,String value){
  return value.replace("String_Node_Str",Markers.getSemantic("String_Node_Str" + member.getKind().getName())).replace("String_Node_Str",member.getName().toString());
}

Fixed version (ground truth):
private static String replaceMember(IMember member,String value){
  if (value == null) {
    return null;
  }
  return value.replace("String_Node_Str",Markers.getSemantic("String_Node_Str" + member.getKind().getName())).replace("String_Node_Str",member.getName().toString());
}
Program: 84115
Project: 84115
Buggy source:
@Override public boolean isResolved(){
  return this.method != null;
}

Fixed version (ground truth):
@Override public boolean isResolved(){
  return this.method != null && this.method.getType().isResolved();
}
Program: 84116
Project: 84116
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.receiver != null) {
    this.receiver.check(markers,context);
  }
  if (this.method != null) {
    this.method.checkCall(markers,this.position,context,this.receiver,this.arguments,this.getGenericData());
  }
  this.arguments.check(markers,context);
  if (this.genericData != null) {
    this.genericData.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if (this.receiver != null) {
    this.receiver.check(markers,context);
  }
  if (this.method != null) {
    this.method.checkCall(markers,this.position,context,this.receiver,this.arguments,this.getGenericData());
    if (!this.method.getType().isResolved()) {
      markers.add(Markers.semanticError(this.position,"String_Node_Str",this.getName()));
    }
  }
  this.arguments.check(markers,context);
  if (this.genericData != null) {
    this.genericData.check(markers,context);
  }
}
Program: 84117
Project: 84117
Buggy source:
@Override public boolean isResolved(){
  return this.field != null;
}

Fixed version (ground truth):
@Override public boolean isResolved(){
  return this.field != null && this.field.getType().isResolved();
}
Program: 84118
Project: 84118
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.receiver != null) {
    this.receiver.check(markers,context);
  }
  if (this.value != null) {
    this.value.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.value != null) {
    this.value.check(markers,context);
  }
}
Program: 84119
Project: 84119
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.receiver != null) {
    this.receiver.resolveTypes(markers,context);
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  super.resolveTypes(markers,context);
  if (this.value != null) {
    this.value.resolveTypes(markers,context);
  }
}
Program: 84121
Project: 84121
Buggy source:
protected void writeArguments(MethodWriter writer,IValue receiver,ArgumentList arguments) throws BytecodeException {
  if (receiver != null && !receiver.isIgnoredClassAccess() && this.hasModifier(Modifiers.INFIX)) {
    arguments.writeValues(writer,this.parameters,1);
    return;
  }
  arguments.writeValues(writer,this.parameters,0);
}

Fixed version (ground truth):
protected void writeArguments(MethodWriter writer,IValue receiver,ArgumentList arguments) throws BytecodeException {
  if (receiver != null && !receiver.isIgnoredClassAccess() && this.hasModifier(Modifiers.INFIX) && !this.parameters.isEmpty()) {
    arguments.writeValues(writer,this.parameters,1);
    return;
  }
  arguments.writeValues(writer,this.parameters,0);
}
Program: 84122
Project: 84122
Buggy source:
protected void writeReceiver(MethodWriter writer,IValue receiver) throws BytecodeException {
  if (receiver == null) {
    return;
  }
  final int modifiers=this.attributes.flags();
  if ((modifiers & Modifiers.INFIX) == Modifiers.INFIX) {
    receiver.writeExpression(writer,this.parameters.get(0).getCovariantType());
    return;
  }
  final IType receiverType=this.enclosingClass.getReceiverType();
  if ((modifiers & Modifiers.STATIC) == 0) {
    receiver.writeNullCheckedExpression(writer,receiverType);
  }
 else {
    receiver.writeExpression(writer,receiverType);
  }
  if (receiver.isIgnoredClassAccess()) {
    final IType type=receiver.getType();
    if (type.hasTag(IType.TYPE_VAR)) {
      type.writeClassExpression(writer,true);
    }
  }
}

Fixed version (ground truth):
protected void writeReceiver(MethodWriter writer,IValue receiver) throws BytecodeException {
  if (receiver == null) {
    return;
  }
  if (this.hasModifier(Modifiers.INFIX) && !this.parameters.isEmpty()) {
    receiver.writeExpression(writer,this.parameters.get(0).getCovariantType());
    return;
  }
  final IType receiverType=this.enclosingClass.getReceiverType();
  if (!this.isStatic()) {
    receiver.writeNullCheckedExpression(writer,receiverType);
  }
 else {
    receiver.writeExpression(writer,receiverType);
  }
  if (receiver.isIgnoredClassAccess()) {
    final IType type=receiver.getType();
    if (type.hasTag(IType.TYPE_VAR)) {
      type.writeClassExpression(writer,true);
    }
  }
}
Program: 84124
Project: 84124
Buggy source:
@Override public void writeExpression(MethodWriter writer,IType type) throws BytecodeException {
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer,IType type) throws BytecodeException {
  if (this.writer != null) {
    this.writer.accept(writer,type);
  }
}
Program: 84126
Project: 84126
Buggy source:
protected static IValue resolveMissing(IParameter param,GenericData genericData,SourcePosition position,MarkerList markers,IContext context){
  if (param.isVarargs()) {
    return convertValue(new ArrayExpr(position,EMPTY),param,genericData,markers,context);
  }
  if (param.hasModifier(Modifiers.IMPLICIT)) {
    final IValue implicit=context.resolveImplicit(param.getCovariantType());
    if (implicit != null) {
      return implicit;
    }
  }
  if (param.isDefault()) {
    return new DummyValue(param.getCovariantType(),(writer,type) -> param.writeGetDefaultValue(writer));
  }
  return null;
}

Fixed version (ground truth):
protected static IValue resolveMissing(IParameter param,GenericData genericData,SourcePosition position,MarkerList markers,IContext context){
  if (param.isVarargs()) {
    return convertValue(new ArrayExpr(position,EMPTY),param,genericData,markers,context);
  }
  if (param.isImplicit()) {
    final IValue implicit=context.resolveImplicit(param.getCovariantType().getConcreteType(genericData));
    if (implicit != null) {
      return implicit;
    }
  }
  if (param.isDefault()) {
    return new DummyValue(param.getCovariantType(),(writer,type) -> param.writeGetDefaultValue(writer));
  }
  return null;
}
Program: 84127
Project: 84127
Buggy source:
@Override public IValue resolveImplicit(IType type){
  return type == null ? this.implicitValue : null;
}

Fixed version (ground truth):
@Override public IValue resolveImplicit(IType type){
  return type == null ? this.implicitValue : super.resolveImplicit(type);
}
Program: 84128
Project: 84128
Buggy source:
private void readTargets(){
  final IAnnotation target=this.theClass.getAnnotation(Annotation.LazyFields.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=EnumSet.noneOf(ElementType.class);
  final ArrayExpr arrayExpr=(ArrayExpr)target.getArguments().get(0,Names.value);
  if (arrayExpr == null) {
    return;
  }
  final ArgumentList values=arrayExpr.getValues();
  final int size=values.size();
  for (int i=0; i < size; i++) {
    final INamed value=(INamed)values.get(i);
    try {
      this.targets.add(ElementType.valueOf(value.getName().qualified));
    }
 catch (    IllegalArgumentException ignored) {
    }
  }
}

Fixed version (ground truth):
private void readTargets(){
  final IAnnotation target=this.theClass.getAnnotation(Annotation.LazyFields.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=EnumSet.noneOf(ElementType.class);
  final IValue argument=target.getArguments().get(0,Names.value);
  if (!(argument instanceof ArrayExpr)) {
    return;
  }
  final ArgumentList values=((ArrayExpr)argument).getValues();
  final int size=values.size();
  for (int i=0; i < size; i++) {
    final INamed value=(INamed)values.get(i);
    try {
      this.targets.add(ElementType.valueOf(value.getName().qualified));
    }
 catch (    IllegalArgumentException ignored) {
    }
  }
}
Program: 84129
Project: 84129
Buggy source:
@Override public void resolveTypesGenerate(MarkerList markers,IContext context){
  final ClassBody body=this.theClass.getBody();
  final IType classType=this.theClass.getClassType();
  final IType arrayType=new ArrayType(classType,Mutability.IMMUTABLE);
  this.initValuesField(body,arrayType);
  this.initValuesMethod(classType,arrayType);
  this.updateConstructors(classType);
}

Fixed version (ground truth):
@Override public void resolveTypesGenerate(MarkerList markers,IContext context){
  final ClassBody body=this.theClass.getBody();
  final IType classType=this.theClass.getClassType();
  final IType arrayType=new ArrayType(classType,Mutability.IMMUTABLE);
  this.initValuesField(body,arrayType);
  this.initValuesMethod(arrayType);
  this.updateConstructors(classType);
}
Program: 84130
Project: 84130
Buggy source:
protected void initValuesMethod(IType classType,IType arrayType){
  this.valuesMethod=new CodeMethod(this.theClass,Names.values,arrayType,new FlagModifierSet(Modifiers.PUBLIC | Modifiers.STATIC));
  final IValue valuesFieldAccess=new FieldAccess(this.valuesField);
  final IMethod cloneMethod=IContext.resolveMethod(arrayType,valuesFieldAccess,Name.fromRaw("String_Node_Str"),ArgumentList.EMPTY);
  final MethodCall cloneCall=new MethodCall(null,valuesFieldAccess,cloneMethod,ArgumentList.EMPTY);
  cloneCall.setGenericData(new GenericData(cloneMethod,classType));
  this.valuesMethod.setValue(cloneCall);
}

Fixed version (ground truth):
protected void initValuesMethod(IType arrayType){
  this.valuesMethod=new CodeMethod(this.theClass,Names.values,arrayType,new FlagModifierSet(Modifiers.PUBLIC | Modifiers.STATIC));
}
Program: 84131
Project: 84131
Buggy source:
@Override public void addOverride(IMethod method){
}

Fixed version (ground truth):
@Override public void addOverride(IMethod method){
  if (!this.enclosingClass.isSubClassOf(method.getEnclosingClass().getClassType())) {
    return;
  }
  if (this.overrideMethods == null) {
    this.overrideMethods=new IdentityHashSet<>();
  }
  this.overrideMethods.add(method);
}
Program: 84132
Project: 84132
Buggy source:
@Override public boolean overrides(IMethod candidate,ITypeContext typeContext){
  if (candidate.getName() != this.name || this.typeArity() != candidate.typeArity() || candidate.hasModifier(Modifiers.STATIC_FINAL)) {
    return false;
  }
  final ParameterList candidateParameters=candidate.getParameters();
  if (candidateParameters.size() != this.parameters.size()) {
    return false;
  }
  if (this.checkOverride0(candidate)) {
    return true;
  }
  for (int i=0, count=this.parameters.size(); i < count; i++) {
    final IType parType=this.parameters.get(i).getCovariantType().getConcreteType(typeContext);
    final IType candidateParType=candidateParameters.get(i).getCovariantType().getConcreteType(typeContext);
    if (!Types.isSameType(parType,candidateParType)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean overrides(IMethod candidate,ITypeContext typeContext){
  if (candidate.getName() != this.name || this.typeArity() != candidate.typeArity() || candidate.hasModifier(Modifiers.STATIC_FINAL)) {
    return false;
  }
  final ParameterList thisParameters=this.getParameters();
  final ParameterList candidateParameters=candidate.getParameters();
  if (candidateParameters.size() != thisParameters.size()) {
    return false;
  }
  if (this.overrideMethods != null && this.overrideMethods.contains(candidate)) {
    return true;
  }
  for (int i=0, count=thisParameters.size(); i < count; i++) {
    final IType parType=thisParameters.get(i).getCovariantType().getConcreteType(typeContext);
    final IType candidateParType=candidateParameters.get(i).getCovariantType().getConcreteType(typeContext);
    if (!Types.isSameType(parType,candidateParType)) {
      return false;
    }
  }
  return true;
}
Program: 84133
Project: 84133
Buggy source:
@Override public void writeAnnotations(TypeAnnotatableVisitor visitor,int typeRef,String typePath){
  this.type.writeAnnotations(visitor,typeRef,typePath + '*');
}

Fixed version (ground truth):
@Override public void writeAnnotations(TypeAnnotatableVisitor visitor,int typeRef,String typePath){
  IType.writeAnnotations(this.type,visitor,typeRef,typePath + '*');
}
Program: 84134
Project: 84134
Buggy source:
private void printMarkers(GenSrc gensrc,MarkerList markers,Specialization spec){
  final StringBuilder builder=new StringBuilder();
  if (spec == null) {
    builder.append(I18n.get("String_Node_Str",this.sourceFile.getInputFile()));
  }
 else {
    builder.append(I18n.get("String_Node_Str",this.sourceFile.getInputFile(),spec.getFileName()));
  }
  builder.append('\n').append('\n');
  final boolean colors=gensrc.useAnsiColors();
  for (  Marker marker : markers) {
    marker.log(this.sourceFile,builder,colors);
  }
  gensrc.getOutput().println(builder);
}

Fixed version (ground truth):
private void printMarkers(GenSrc gensrc,MarkerList markers,Specialization spec){
  final StringBuilder builder=new StringBuilder();
  if (spec == null) {
    builder.append(I18n.get("String_Node_Str",this.sourceFile.getInputFile()));
  }
 else {
    builder.append(I18n.get("String_Node_Str",this.sourceFile.getInputFile(),spec.getFileName()));
  }
  builder.append('\n').append('\n');
  final boolean colors=gensrc.useAnsiColors();
  markers.log(this.sourceFile,builder,colors);
  gensrc.getOutput().println(builder);
}
Program: 84135
Project: 84135
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.type.check(markers,context);
  if (!this.type.isResolved()) {
    return;
  }
  this.checkSuperType(markers,context);
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.type.check(markers,context);
}
Program: 84136
Project: 84136
Buggy source:
private void checkSuperType(MarkerList markers,IContext context){
  final IClass superClass=this.type.getTheClass();
  final IClass enclosingClass=context.getThisClass();
  final IType enclosingType=enclosingClass.getClassType();
  final String message;
  boolean indirectSuperInterface=false;
  if (superClass == enclosingClass) {
    message="String_Node_Str";
  }
 else   if (!Types.isSuperType(this.type,enclosingType)) {
    message="String_Node_Str";
  }
 else {
    if (enclosingClass.getSuperType().isSameClass(this.type)) {
      return;
    }
    if (superClass.isInterface()) {
      for (int i=0, count=enclosingClass.interfaceCount(); i < count; i++) {
        if (enclosingClass.getInterface(i).isSameClass(this.type)) {
          return;
        }
      }
      indirectSuperInterface=true;
    }
    message="String_Node_Str";
  }
  final Marker marker=Markers.semanticError(this.type.getPosition(),message);
  if (indirectSuperInterface) {
    marker.addInfo(Markers.getSemantic("String_Node_Str",this.type,enclosingClass.getName()));
  }
  marker.addInfo(Markers.getSemantic("String_Node_Str",enclosingType));
  marker.addInfo(Markers.getSemantic("String_Node_Str",this.type));
  markers.add(marker);
}

Fixed version (ground truth):
private void checkSuperType(MarkerList markers,IContext context){
  final IClass superClass=this.type.getTheClass();
  final IClass enclosingClass=context.getThisClass();
  final IType enclosingType=enclosingClass.getClassType();
  final String message;
  boolean indirectSuperInterface=false;
  if (superClass == enclosingClass) {
    message="String_Node_Str";
  }
 else   if (!Types.isSuperType(this.type,enclosingType)) {
    message="String_Node_Str";
  }
 else {
    final IType superType=enclosingClass.getSuperType();
    if (superType.isSameClass(this.type)) {
      this.type=superType;
      return;
    }
    if (superClass.isInterface()) {
      for (int i=0, count=enclosingClass.interfaceCount(); i < count; i++) {
        final IType interfaceType=enclosingClass.getInterface(i);
        if (interfaceType.isSameClass(this.type)) {
          this.type=interfaceType;
          return;
        }
      }
      indirectSuperInterface=true;
    }
    message="String_Node_Str";
  }
  final Marker marker=Markers.semanticError(this.type.getPosition(),message);
  if (indirectSuperInterface) {
    marker.addInfo(Markers.getSemantic("String_Node_Str",this.type,enclosingClass.getName()));
  }
  marker.addInfo(Markers.getSemantic("String_Node_Str",enclosingType));
  marker.addInfo(Markers.getSemantic("String_Node_Str",this.type));
  markers.add(marker);
}
Program: 84137
Project: 84137
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (context.isStatic()) {
    markers.add(Markers.semantic(this.position,"String_Node_Str"));
    return;
  }
  if (this.type != Types.UNKNOWN) {
    this.type=this.type.resolveType(markers,context);
    return;
  }
  final IClass enclosingClass=context.getThisClass();
  final IType superType=enclosingClass.getSuperType();
  if (superType == null) {
    final Marker marker=Markers.semantic(this.position,"String_Node_Str");
    marker.addInfo(Markers.getSemantic("String_Node_Str",enclosingClass.getClassType()));
    markers.add(marker);
    return;
  }
  this.type=superType;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (context.isStatic()) {
    markers.add(Markers.semantic(this.position,"String_Node_Str"));
    return;
  }
  if (this.type != Types.UNKNOWN) {
    this.type=this.type.resolveType(markers,context);
    if (this.type.isResolved()) {
      this.checkSuperType(markers,context);
    }
    return;
  }
  final IClass enclosingClass=context.getThisClass();
  final IType superType=enclosingClass.getSuperType();
  if (superType == null) {
    final Marker marker=Markers.semanticError(this.position,"String_Node_Str");
    marker.addInfo(Markers.getSemantic("String_Node_Str",enclosingClass.getClassType()));
    markers.add(marker);
    return;
  }
  this.type=superType;
}
Program: 84138
Project: 84138
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type != Types.UNKNOWN) {
    this.type=this.type.resolveType(markers,context);
    return;
  }
  final IType thisType=context.getThisType();
  if (thisType != null) {
    this.type=thisType;
  }
 else {
    markers.add(Markers.semanticError(this.position,"String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type != Types.UNKNOWN) {
    this.type=this.type.resolveType(markers,context);
    final IClass iclass=this.type.getTheClass();
    if (iclass != null) {
      this.type=iclass.getThisType();
    }
    return;
  }
  final IType thisType=context.getThisType();
  if (thisType != null) {
    this.type=thisType;
  }
 else {
    markers.add(Markers.semanticError(this.position,"String_Node_Str"));
  }
}
Program: 84139
Project: 84139
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.annotations != null) {
    this.annotations.resolveTypes(markers,context,this);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolveType(markers,context);
  }
  if (this.upperBound == null) {
    this.upperBound=DEFAULT_BOUND;
  }
  this.upperBound=this.upperBound.resolveType(markers,context);
  this.upperBounds=getUpperBounds(this.upperBound);
  IType type=this.upperBounds[0];
  IClass typeClass=type.getTheClass();
  if (typeClass != null && !typeClass.isInterface()) {
    this.erasure=type;
  }
  for (int i=1, count=this.upperBounds.length; i < count; i++) {
    type=this.upperBounds[i];
    typeClass=type.getTheClass();
    if (typeClass != null && !typeClass.hasModifier(Modifiers.INTERFACE_CLASS)) {
      final Marker marker=Markers.semanticError(type.getPosition(),"String_Node_Str");
      marker.addInfo(Markers.getSemantic("String_Node_Str",Util.classSignatureToString(typeClass)));
      markers.add(marker);
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.annotations != null) {
    this.annotations.resolveTypes(markers,context,this);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolveType(markers,context);
  }
  if (this.upperBound == null) {
    this.upperBound=Types.NULLABLE_ANY;
  }
  this.upperBound=this.upperBound.resolveType(markers,context);
  this.upperBounds=getUpperBounds(this.upperBound);
  IType type=this.upperBounds[0];
  IClass typeClass=type.getTheClass();
  if (typeClass != null && !typeClass.isInterface()) {
    this.erasure=type;
  }
  for (int i=1, count=this.upperBounds.length; i < count; i++) {
    type=this.upperBounds[i];
    typeClass=type.getTheClass();
    if (typeClass != null && !typeClass.hasModifier(Modifiers.INTERFACE_CLASS)) {
      final Marker marker=Markers.semanticError(type.getPosition(),"String_Node_Str");
      marker.addInfo(Markers.getSemantic("String_Node_Str",Util.classSignatureToString(typeClass)));
      markers.add(marker);
    }
  }
}
Program: 84140
Project: 84140
Buggy source:
@Override public boolean isSuperTypeOf(IType subType){
  if (!isSuperType(this.getUpperBound(),subType)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  if (lowerBound != null) {
    if (!isSuperType(subType,lowerBound)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isSuperTypeOf(IType subType){
  if (!isSuperType(this.getSafeUpperBound(),subType)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || isSuperType(subType,lowerBound);
}
Program: 84141
Project: 84141
Buggy source:
@Override public boolean isSuperClassOf(IType subType){
  if (!isSuperClass(this.getUpperBound(),subType)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || isSuperClass(subType,lowerBound);
}

Fixed version (ground truth):
@Override public boolean isSuperClassOf(IType subType){
  if (!isSuperClass(this.getSafeUpperBound(),subType)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || isSuperClass(subType,lowerBound);
}
Program: 84142
Project: 84142
Buggy source:
@Override public boolean isAssignableFrom(IType type,ITypeContext typeContext){
  if (!Types.isSuperType(this.getUpperBound().getConcreteType(typeContext),type)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isSuperType(type,lowerBound.getConcreteType(typeContext));
}

Fixed version (ground truth):
@Override public boolean isAssignableFrom(IType type,ITypeContext typeContext){
  if (!Types.isSuperType(this.getSafeUpperBound().getConcreteType(typeContext),type)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isSuperType(type,lowerBound.getConcreteType(typeContext));
}
Program: 84143
Project: 84143
Buggy source:
@Override public boolean isSameType(IType type){
  if (Types.isSameType(type,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound != null && Types.isSameType(lowerBound,type);
}

Fixed version (ground truth):
@Override public boolean isSameType(IType type){
  if (Types.isSameType(type,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isSameType(lowerBound,type);
}
Program: 84144
Project: 84144
Buggy source:
@Override public IClass getTheClass(){
  return this.getUpperBound().getTheClass();
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return this.getSafeUpperBound().getTheClass();
}
Program: 84145
Project: 84145
Buggy source:
@Override public void getImplicitMatches(MatchList<IMethod> list,IValue value,IType targetType){
  this.getUpperBound().getImplicitMatches(list,value,targetType);
}

Fixed version (ground truth):
@Override public void getImplicitMatches(MatchList<IMethod> list,IValue value,IType targetType){
  this.getSafeUpperBound().getImplicitMatches(list,value,targetType);
}
Program: 84146
Project: 84146
Buggy source:
@Override public boolean isSubClassOf(IType superType){
  if (isSuperClass(superType,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound != null && isSuperClass(lowerBound,superType) || Types.isSameClass(superType,Types.OBJECT);
}

Fixed version (ground truth):
@Override public boolean isSubClassOf(IType superType){
  return isSuperClass(superType,this.getUpperBound());
}
Program: 84147
Project: 84147
Buggy source:
@Override public IDataMember resolveField(Name name){
  return this.getUpperBound().resolveField(name);
}

Fixed version (ground truth):
@Override public IDataMember resolveField(Name name){
  return this.getSafeUpperBound().resolveField(name);
}
Program: 84148
Project: 84148
Buggy source:
@Override public void getMethodMatches(MatchList<IMethod> list,IValue instance,Name name,IArguments arguments){
  this.getUpperBound().getMethodMatches(list,instance,name,arguments);
}

Fixed version (ground truth):
@Override public void getMethodMatches(MatchList<IMethod> list,IValue instance,Name name,IArguments arguments){
  this.getSafeUpperBound().getMethodMatches(list,instance,name,arguments);
}
Program: 84149
Project: 84149
Buggy source:
@Override public boolean isSameClass(IType type){
  if (Types.isSameClass(type,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound != null && Types.isSameClass(lowerBound,type);
}

Fixed version (ground truth):
@Override public boolean isSameClass(IType type){
  if (Types.isSameClass(type,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isSameClass(lowerBound,type);
}
Program: 84150
Project: 84150
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.annotations != null) {
    for (int i=0, size=this.annotations.annotationCount(); i < size; i++) {
      this.annotations.getAnnotation(i).toString(prefix,buffer);
      buffer.append(' ');
    }
  }
  buffer.append("String_Node_Str");
  this.variance.appendPrefix(buffer);
  buffer.append(this.name);
  final IType upperBound=this.getUpperBound();
  if (upperBound != null) {
    buffer.append("String_Node_Str");
    upperBound.toString(prefix,buffer);
  }
  final IType lowerBound=this.getLowerBound();
  if (lowerBound != null) {
    buffer.append("String_Node_Str");
    lowerBound.toString(prefix,buffer);
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.annotations != null) {
    for (int i=0, size=this.annotations.annotationCount(); i < size; i++) {
      this.annotations.getAnnotation(i).toString(prefix,buffer);
      buffer.append(' ');
    }
  }
  buffer.append("String_Node_Str");
  this.variance.appendPrefix(buffer);
  buffer.append(this.name);
  final IType upperBound=this.getSafeUpperBound();
  if (upperBound != null) {
    buffer.append("String_Node_Str");
    upperBound.toString(prefix,buffer);
  }
  final IType lowerBound=this.getLowerBound();
  if (lowerBound != null) {
    buffer.append("String_Node_Str");
    lowerBound.toString(prefix,buffer);
  }
}
Program: 84151
Project: 84151
Buggy source:
@Override public boolean isSubTypeOf(IType superType){
  if (isSuperType(superType,this.getUpperBound())) {
    return true;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound != null && isSuperType(lowerBound,superType) || Types.isExactType(superType,Types.OBJECT);
}

Fixed version (ground truth):
@Override public boolean isSubTypeOf(IType superType){
  return isSuperType(superType,this.getUpperBound());
}
Program: 84152
Project: 84152
Buggy source:
@Override public boolean isSuperTypeOf(IType subType){
  if (subType.hasTag(IType.NULL)) {
    return true;
  }
  final NullableType nullable=subType.extract(NullableType.class);
  return Types.isSuperType(this.type,nullable != null ? nullable.getElementType() : subType);
}

Fixed version (ground truth):
@Override public boolean isSuperTypeOf(IType subType){
  if (subType.hasTag(IType.NULL)) {
    return true;
  }
  final NullableType nullable=subType.extract(NullableType.class);
  if (nullable != null) {
    return Types.isSuperType(this,nullable.getElementType());
  }
  return Types.isSuperType(this.type,subType);
}
Program: 84153
Project: 84153
Buggy source:
@Override public void checkType(MarkerList markers,IContext context,int position){
  ModifierUtil.checkVisibility(this.theClass,this.position,markers,context);
  final int count=Math.min(this.typeArgumentCount,this.theClass.typeParameterCount());
  for (int i=0; i < count; i++) {
    final ITypeParameter typeVariable=this.theClass.getTypeParameter(i);
    final IType type=this.typeArguments[i];
    if (type.isResolved() && !typeVariable.isSuperTypeOf(type)) {
      final Marker marker=Markers.semanticError(type.getPosition(),"String_Node_Str",typeVariable.getName().qualified,this.theClass.getFullName());
      marker.addInfo(Markers.getSemantic("String_Node_Str",type));
      marker.addInfo(Markers.getSemantic("String_Node_Str",typeVariable));
      markers.add(marker);
    }
  }
  if ((position & TypePosition.GENERIC_FLAG) == 0) {
    markers.add(Markers.semanticError(this.position,"String_Node_Str"));
  }
  super.checkType(markers,context,position);
}

Fixed version (ground truth):
@Override public void checkType(MarkerList markers,IContext context,int position){
  ModifierUtil.checkVisibility(this.theClass,this.position,markers,context);
  final int count=Math.min(this.typeArgumentCount,this.theClass.typeParameterCount());
  for (int i=0; i < count; i++) {
    final ITypeParameter typeVariable=this.theClass.getTypeParameter(i);
    final IType typeArgument=this.typeArguments[i];
    if (typeArgument.isResolved() && !Variance.checkCompatible(Variance.COVARIANT,typeVariable.getCovariantType(),typeArgument)) {
      final Marker marker=Markers.semanticError(typeArgument.getPosition(),"String_Node_Str",typeVariable.getName().qualified,this.theClass.getFullName());
      marker.addInfo(Markers.getSemantic("String_Node_Str",typeArgument));
      marker.addInfo(Markers.getSemantic("String_Node_Str",typeVariable));
      markers.add(marker);
    }
  }
  if ((position & TypePosition.GENERIC_FLAG) == 0) {
    markers.add(Markers.semanticError(this.position,"String_Node_Str"));
  }
  super.checkType(markers,context,position);
}
Program: 84154
Project: 84154
Buggy source:
@Override public boolean isSuperTypeOf(IType subType){
  return this.typeParameter.isAssignableFrom(subType,ITypeContext.COVARIANT);
}

Fixed version (ground truth):
@Override public boolean isSuperTypeOf(IType subType){
  return this.backReference || this.typeParameter.isAssignableFrom(subType,ITypeContext.COVARIANT);
}
Program: 84155
Project: 84155
Buggy source:
@Override public boolean isSameType(IType type){
  return this.typeParameter.isSuperTypeOf(type);
}

Fixed version (ground truth):
@Override public boolean isSameType(IType type){
  return this.backReference || this.typeParameter.isSuperTypeOf(type);
}
Program: 84156
Project: 84156
Buggy source:
public CovariantTypeVarType(ITypeParameter typeVariable){
  super(typeVariable);
}

Fixed version (ground truth):
public CovariantTypeVarType(ITypeParameter typeParameter,boolean backReference){
  super(typeParameter);
  this.backReference=backReference;
}
Program: 84157
Project: 84157
Buggy source:
@Override public boolean isSubTypeOf(IType superType){
  return this.typeParameter.isSuperTypeOf(superType);
}

Fixed version (ground truth):
@Override public boolean isSubTypeOf(IType superType){
  return this.backReference || this.typeParameter.isSuperTypeOf(superType);
}
Program: 84158
Project: 84158
Buggy source:
@Override public IType getConcreteType(ITypeContext context){
  IType type=super.getConcreteType(context);
  final TypeVarType typeVar=type.extract(TypeVarType.class);
  return typeVar != null && typeVar.getTypeVariable() == this.typeParameter ? this : type;
}

Fixed version (ground truth):
@Override public IType getConcreteType(ITypeContext context){
  final IType type=super.getConcreteType(context);
  final TypeVarType typeVar=type.extract(TypeVarType.class);
  return typeVar != null && typeVar.getTypeVariable() == this.typeParameter ? this : type;
}
Program: 84159
Project: 84159
Buggy source:
public CodeTypeParameter(ICodePosition position,ITypeParametric generic,Name name,Variance variance){
  super(generic,name,variance);
  this.position=position;
  this.upperBound=Types.OBJECT;
}

Fixed version (ground truth):
public CodeTypeParameter(ICodePosition position,ITypeParametric generic,Name name,Variance variance){
  super(generic,name,variance);
  this.position=position;
}
Program: 84160
Project: 84160
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.annotations != null) {
    this.annotations.resolveTypes(markers,context,this);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolveType(markers,context);
  }
  if (this.upperBound == null) {
    return;
  }
  this.upperBound=this.upperBound.resolveType(markers,context);
  this.upperBounds=getUpperBounds(this.upperBound);
  IType type=this.upperBounds[0];
  IClass typeClass=type.getTheClass();
  if (typeClass != null && !typeClass.isInterface()) {
    this.erasure=type;
  }
  for (int i=1, count=this.upperBounds.length; i < count; i++) {
    type=this.upperBounds[i];
    typeClass=type.getTheClass();
    if (typeClass != null && !typeClass.hasModifier(Modifiers.INTERFACE_CLASS)) {
      final Marker marker=Markers.semanticError(type.getPosition(),"String_Node_Str");
      marker.addInfo(Markers.getSemantic("String_Node_Str",Util.classSignatureToString(typeClass)));
      markers.add(marker);
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.annotations != null) {
    this.annotations.resolveTypes(markers,context,this);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolveType(markers,context);
  }
  if (this.upperBound == null) {
    this.upperBound=DEFAULT_BOUND;
  }
  this.upperBound=this.upperBound.resolveType(markers,context);
  this.upperBounds=getUpperBounds(this.upperBound);
  IType type=this.upperBounds[0];
  IClass typeClass=type.getTheClass();
  if (typeClass != null && !typeClass.isInterface()) {
    this.erasure=type;
  }
  for (int i=1, count=this.upperBounds.length; i < count; i++) {
    type=this.upperBounds[i];
    typeClass=type.getTheClass();
    if (typeClass != null && !typeClass.hasModifier(Modifiers.INTERFACE_CLASS)) {
      final Marker marker=Markers.semanticError(type.getPosition(),"String_Node_Str");
      marker.addInfo(Markers.getSemantic("String_Node_Str",Util.classSignatureToString(typeClass)));
      markers.add(marker);
    }
  }
}
Program: 84161
Project: 84161
Buggy source:
@Override public boolean isAssignableFrom(IType type,ITypeContext typeContext){
  if (!Types.isAssignable(this.getUpperBound().getConcreteType(typeContext),type)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isAssignable(type,lowerBound.getConcreteType(typeContext));
}

Fixed version (ground truth):
@Override public boolean isAssignableFrom(IType type,ITypeContext typeContext){
  if (!Types.isSuperType(this.getUpperBound().getConcreteType(typeContext),type)) {
    return false;
  }
  final IType lowerBound=this.getLowerBound();
  return lowerBound == null || Types.isSuperType(type,lowerBound.getConcreteType(typeContext));
}
Program: 84162
Project: 84162
Buggy source:
@Override public IValue convertValueTo(IValue value,IType targetType,ITypeContext typeContext,MarkerList markers,IContext context){
  if (!this.isConvertibleTo(targetType)) {
    return null;
  }
  final LiteralConversion conversion=new LiteralConversion(value,LazyTypes.UNWRAP);
  conversion.setType(targetType);
  return conversion;
}

Fixed version (ground truth):
@Override public IValue convertValueTo(IValue value,IType targetType,ITypeContext typeContext,MarkerList markers,IContext context){
  if (!this.isConvertibleTo(targetType)) {
    return null;
  }
  final LiteralConversion conversion=new LiteralConversion(value,LazyTypes.UNWRAP);
  conversion.setType(this.type);
  return conversion;
}
Program: 84164
Project: 84164
Buggy source:
protected void addVariable(FieldInitializer initializer,MarkerList markers,IContext context){
  final IVariable variable=initializer.variable;
  final Name variableName=variable.getName();
  if (variable.getValue() == null) {
    variable.setValue(variable.getType().getDefaultValue());
    markers.add(Markers.semanticError(this.position,"String_Node_Str",variableName));
  }
  final IDataMember dataMember=context.resolveField(variableName);
  if (dataMember != null && dataMember.isVariable()) {
    markers.add(Markers.semantic(initializer.getPosition(),"String_Node_Str",variableName));
  }
  if (this.variables == null) {
    this.variables=new ArrayList<>();
  }
  this.variables.add(variable);
}

Fixed version (ground truth):
protected void addVariable(FieldInitializer initializer,MarkerList markers,IContext context){
  final IVariable variable=initializer.variable;
  final Name variableName=variable.getName();
  if (variable.getValue() == null) {
    variable.setValue(variable.getType().getDefaultValue());
    markers.add(Markers.semanticError(variable.getPosition(),"String_Node_Str",variableName));
  }
  final IDataMember dataMember=context.resolveField(variableName);
  if (dataMember != null && dataMember.isVariable()) {
    markers.add(Markers.semantic(initializer.getPosition(),"String_Node_Str",variableName));
  }
  if (this.variables == null) {
    this.variables=new ArrayList<>();
  }
  this.variables.add(variable);
}