nus-yam/ex-repair huggingface dataset:
Program: 28505
Project: 28505
Buggy source:
/** 
 * @param context
 * @param view
 * @param layout
 * @param data
 * @param fallback
 * @param parent
 * @param dataIndex @return
 */
@NonNull public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewTypeParser fallback,@Nullable ViewGroup parent,int dataIndex){
  if (null != this.parent && fallback == this.parent) {
    return this.parent.createViewManager(context,view,layout,data,this,parent,dataIndex);
  }
 else {
    DataContext dataContext=createScope(layout,data,parent,dataIndex);
    return new ViewManager(context,fallback != null ? fallback : this,view.getAsView(),layout,dataContext);
  }
}

Fixed version (ground truth):
/** 
 * @param context
 * @param view
 * @param layout
 * @param data
 * @param caller
 * @param parent
 * @param dataIndex @return
 */
@NonNull public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewTypeParser caller,@Nullable ViewGroup parent,int dataIndex){
  if (null != this.parent && caller != this.parent) {
    return this.parent.createViewManager(context,view,layout,data,caller,parent,dataIndex);
  }
 else {
    DataContext dataContext=createScope(layout,data,parent,dataIndex);
    return new ViewManager(context,caller != null ? caller : this,view.getAsView(),layout,dataContext);
  }
}
Program: 28506
Project: 28506
Buggy source:
@NonNull @Override public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@NonNull ViewTypeParser fallback,@Nullable ViewGroup parent,int dataIndex){
  DataContext dataContext=createScope(layout,data,parent,dataIndex);
  return new ViewGroupManager(context,this,view.getAsView(),layout,dataContext);
}

Fixed version (ground truth):
@NonNull @Override public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewTypeParser caller,@Nullable ViewGroup parent,int dataIndex){
  DataContext dataContext=createScope(layout,data,parent,dataIndex);
  return new ViewGroupManager(context,null != caller ? caller : this,view.getAsView(),layout,dataContext);
}
Program: 28507
Project: 28507
Buggy source:
private int[][] readStates(String string){
  int[][] states=new int[0][];
  StringTokenizer tokenizer=new StringTokenizer(string,STATE_DELIMITER);
  int index=0;
  while (tokenizer.hasMoreTokens()) {
    Arrays.copyOf(states,states.length + 1);
    states[index]=readColors(tokenizer.nextToken());
    index++;
  }
  return states;
}

Fixed version (ground truth):
private int[][] readStates(String string){
  int[][] states=new int[0][];
  StringTokenizer tokenizer=new StringTokenizer(string,STATE_DELIMITER);
  int index=0;
  while (tokenizer.hasMoreTokens()) {
    states=Arrays.copyOf(states,states.length + 1);
    states[index]=readColors(tokenizer.nextToken());
    index++;
  }
  return states;
}
Program: 28508
Project: 28508
Buggy source:
private int[] readColors(String string){
  int[] colors=new int[0];
  StringTokenizer tokenizer=new StringTokenizer(string,COLOR_DELIMITER);
  int index=0;
  while (tokenizer.hasMoreTokens()) {
    Arrays.copyOf(colors,colors.length + 1);
    colors[index]=Integer.parseInt(tokenizer.nextToken());
    index++;
  }
  return colors;
}

Fixed version (ground truth):
private int[] readColors(String string){
  int[] colors=new int[0];
  StringTokenizer tokenizer=new StringTokenizer(string,COLOR_DELIMITER);
  int index=0;
  while (tokenizer.hasMoreTokens()) {
    colors=Arrays.copyOf(colors,colors.length + 1);
    colors[index]=Integer.parseInt(tokenizer.nextToken());
    index++;
  }
  return colors;
}
Program: 28509
Project: 28509
Buggy source:
private Value[] resolveArguments(Value data,int index){
  Value[] arguments=new Value[this.arguments.length];
  Value argument, resolved;
  for (int i=0; i < this.arguments.length; i++) {
    argument=this.arguments[i];
    if (argument.isBinding()) {
      resolved=argument.getAsBinding().evaluate(data,index);
    }
 else {
      resolved=argument;
    }
    arguments[i]=resolved;
  }
  return arguments;
}

Fixed version (ground truth):
private static Value[] resolveArguments(Value[] in,Value data,int index){
  Value[] out=new Value[in.length];
  Value argument, resolved;
  for (int i=0; i < in.length; i++) {
    argument=in[i];
    if (argument.isBinding()) {
      resolved=argument.getAsBinding().evaluate(data,index);
    }
 else {
      resolved=argument;
    }
    out[i]=resolved;
  }
  return out;
}
Program: 28511
Project: 28511
Buggy source:
/** 
 * @param data
 * @param index @return
 */
public Result evaluate(Value data,int index){
  Result result=resolveData(data,index);
  if (null == this.formatter) {
    return result;
  }
 else {
    Value resolved=this.formatter.format(result.value,index,resolveArguments(data,index));
    return Result.success(resolved);
  }
}

Fixed version (ground truth):
/** 
 * @param data
 * @param index @return
 */
public Result evaluate(Value data,int index){
  Result result=resolveData(tokens,data,index);
  if (null == this.formatter) {
    return result;
  }
 else {
    Value resolved=this.formatter.format(result.value,index,resolveArguments(arguments,data,index));
    return Result.success(resolved);
  }
}
Program: 28512
Project: 28512
Buggy source:
private void handleDataDrivenChildren(ProteusLayoutInflater layoutInflater,ProteusView parent,ProteusViewManager viewManager,ObjectValue children,JsonObject data,Styles styles,int dataIndex){
  String dataPath=children.getAsString(ProteusConstants.DATA).substring(1);
  viewManager.setDataPathForChildren(dataPath);
  Result result=Utils.readJson(dataPath,data,dataIndex);
  JsonElement element=result.isSuccess() ? result.element : null;
  Layout childLayout=children.getAsLayout(ProteusConstants.LAYOUT);
  viewManager.setChildLayout(childLayout);
  if (null == element || element.isJsonNull()) {
    return;
  }
  int length=element.getAsJsonArray().size();
  ProteusView child;
  for (int index=0; index < length; index++) {
    child=layoutInflater.inflate(childLayout,data,(ViewGroup)parent,styles,index);
    if (child != null) {
      this.addView(parent,child);
    }
  }
}

Fixed version (ground truth):
private void handleDataDrivenChildren(ProteusLayoutInflater layoutInflater,ProteusView parent,ProteusViewManager viewManager,ObjectValue children,JsonObject data,Styles styles,int dataIndex){
  String binding=children.getAsString(ProteusConstants.DATA).substring(1);
  viewManager.setDataPathForChildren(binding);
  Result result=Binding.valueOf(binding).getExpression(0).evaluate(data,dataIndex);
  JsonElement element=result.isSuccess() ? result.element : null;
  Layout childLayout=children.getAsLayout(ProteusConstants.LAYOUT);
  viewManager.setChildLayout(childLayout);
  if (null == element || element.isJsonNull()) {
    return;
  }
  int length=element.getAsJsonArray().size();
  ProteusView child;
  for (int index=0; index < length; index++) {
    child=layoutInflater.inflate(childLayout,data,(ViewGroup)parent,styles,index);
    if (child != null) {
      this.addView(parent,child);
    }
  }
}
Program: 28513
Project: 28513
Buggy source:
public static int parseGravity(String value){
  String[] gravities=value.split("String_Node_Str");
  int returnGravity=Gravity.NO_GRAVITY;
  for (  String gravity : gravities) {
    Primitive gravityValue=sGravityMap.get(gravity);
    if (null != gravityValue) {
      returnGravity|=gravityValue.getAsCharacter();
    }
  }
  return returnGravity;
}

Fixed version (ground truth):
public static int parseGravity(String value){
  String[] gravities=value.split("String_Node_Str");
  int returnGravity=Gravity.NO_GRAVITY;
  for (  String gravity : gravities) {
    Primitive gravityValue=sGravityMap.get(gravity);
    if (null != gravityValue) {
      returnGravity|=gravityValue.getAsInt();
    }
  }
  return returnGravity;
}
Program: 28514
Project: 28514
Buggy source:
public static Primitive getGravity(String value){
  return sGravityMap.get(value);
}

Fixed version (ground truth):
public static Primitive getGravity(String value){
  return new Primitive(parseGravity(value));
}
Program: 28516
Project: 28516
Buggy source:
/** 
 * @param value
 * @param context
 * @return
 */
@Override public Value parse(Value value,Context context){
  String string=value.getAsString();
  if (ParseHelper.isLocalResourceAttribute(string)) {
    return Style.valueOf(string);
  }
 else {
    return Dimension.valueOf(value.getAsString(),context);
  }
}

Fixed version (ground truth):
/** 
 * @param value
 * @param context
 * @return
 */
@Override public Value parse(Value value,Context context){
  String string=value.getAsString();
  if (ParseHelper.isLocalResourceAttribute(string)) {
    Style style=Style.valueOf(string);
    return null != style ? style : Dimension.ZERO;
  }
 else {
    return Dimension.valueOf(value.getAsString(),context);
  }
}
Program: 28517
Project: 28517
Buggy source:
@Nullable @Override public ProteusView onUnknownViewType(String type,View parent,JsonObject layout,JsonObject data,int index,Styles styles){
  return null;
}

Fixed version (ground truth):
@Nullable @Override public ProteusView onUnknownViewType(String type,View parent,LayoutParser layout,JsonObject data,Styles styles,int index){
  return null;
}
Program: 28518
Project: 28518
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  gson=new Gson();
  styles=gson.fromJson(getJsonFromFile(R.raw.styles).getAsJsonObject(),Styles.class);
  Map<String,JsonObject> layoutProvider=getProviderFromFile(R.raw.layout_provider);
  pageLayout=getJsonFromFile(R.raw.page_layout).getAsJsonObject();
  data=getJsonFromFile(R.raw.data_init).getAsJsonObject();
  builder=new LayoutBuilderFactory().getDataAndViewParsingLayoutBuilder(layoutProvider);
  builder.setListener(callback);
  builder.setBitmapLoader(bitmapLoader);
  container=new FrameLayout(ProteusActivity.this);
  layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
  super.onCreate(savedInstanceState);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  gson=new Gson();
  styles=gson.fromJson(getJsonFromFile(R.raw.styles).getAsJsonObject(),Styles.class);
  Map<String,Object> layoutProvider=getProviderFromFile(R.raw.layout_provider);
  pageLayout=getJsonFromFile(R.raw.page_layout).getAsJsonObject();
  data=getJsonFromFile(R.raw.data_init).getAsJsonObject();
  builder=new LayoutBuilderFactory().getDataAndViewParsingLayoutBuilder(layoutProvider);
  builder.setListener(callback);
  builder.setBitmapLoader(bitmapLoader);
  container=new FrameLayout(ProteusActivity.this);
  layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
  super.onCreate(savedInstanceState);
}
Program: 28519
Project: 28519
Buggy source:
@Override public void onUnknownAttribute(String attribute,JsonElement value,ProteusView view){
  Log.i("String_Node_Str",attribute + "String_Node_Str" + view.getViewManager().getLayout().toString());
}

Fixed version (ground truth):
@Override public void onUnknownAttribute(ProteusView view,String attribute,LayoutParser parser){
}
Program: 28520
Project: 28520
Buggy source:
@Override public Adapter onAdapterRequired(ProteusView parent,List<ProteusView> children,JsonObject layout){
  return null;
}

Fixed version (ground truth):
@Override public Adapter onAdapterRequired(ProteusView parent,List<ProteusView> children,LayoutParser layout){
  return null;
}
Program: 28521
Project: 28521
Buggy source:
@Override public JsonObject onLayoutRequired(String type,ProteusView parent){
  return null;
}

Fixed version (ground truth):
@Override public JsonObject onLayoutRequired(String type,LayoutParser parent){
  return null;
}
Program: 28522
Project: 28522
Buggy source:
@Override public PagerAdapter onPagerAdapterRequired(ProteusView parent,List<ProteusView> children,JsonObject layout){
  return null;
}

Fixed version (ground truth):
@Override public PagerAdapter onPagerAdapterRequired(ProteusView parent,List<ProteusView> children,LayoutParser layout){
  return null;
}
Program: 28523
Project: 28523
Buggy source:
@Override public void getBitmap(String imageUrl,final ImageLoaderCallback callback,View view,JsonObject layout){
  URL url;
  try {
    url=new URL(imageUrl);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
    return;
  }
  new AsyncTask<URL,Integer,Bitmap>(){
    @Override protected Bitmap doInBackground(    URL... params){
      try {
        return BitmapFactory.decodeStream(params[0].openConnection().getInputStream());
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
      return null;
    }
    protected void onPostExecute(    Bitmap result){
      callback.onResponse(result);
    }
  }
.execute(url);
}

Fixed version (ground truth):
@Override public void getBitmap(ProteusView view,String imageUrl,final ImageLoaderCallback imageLoaderCallback,LayoutParser parser){
  URL url;
  try {
    url=new URL(imageUrl);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
    return;
  }
  new AsyncTask<URL,Integer,Bitmap>(){
    @Override protected Bitmap doInBackground(    URL... params){
      try {
        return BitmapFactory.decodeStream(params[0].openConnection().getInputStream());
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
      return null;
    }
    protected void onPostExecute(    Bitmap result){
      imageLoaderCallback.onResponse(result);
    }
  }
.execute(url);
}
Program: 28524
Project: 28524
Buggy source:
@Override View createAndBindView(){
  proteusView=builder.build(container,pageLayout,data,0,styles);
  return (View)proteusView;
}

Fixed version (ground truth):
@Override View createAndBindView(){
  proteusView=builder.build(container,new JsonLayoutParser(pageLayout),data,styles,-1);
  return (View)proteusView;
}
Program: 28525
Project: 28525
Buggy source:
@Override public View onEvent(ProteusView view,JsonElement value,EventType eventType){
  Log.d("String_Node_Str",value.toString());
  return (View)view;
}

Fixed version (ground truth):
@Override public View onEvent(ProteusView view,EventType eventType,LayoutParser value){
  return null;
}
Program: 28526
Project: 28526
Buggy source:
protected void onPostExecute(Bitmap result){
  callback.onResponse(result);
}

Fixed version (ground truth):
protected void onPostExecute(Bitmap result){
  imageLoaderCallback.onResponse(result);
}
Program: 28527
Project: 28527
Buggy source:
private Map<String,JsonObject> getProviderFromFile(int resId){
  InputStream inputStream=getResources().openRawResource(resId);
  BufferedReader reader=new BufferedReader(new InputStreamReader(inputStream));
  return gson.fromJson(reader,(new TypeToken<Map<String,JsonObject>>(){
  }
).getType());
}

Fixed version (ground truth):
private Map<String,Object> getProviderFromFile(int resId){
  InputStream inputStream=getResources().openRawResource(resId);
  BufferedReader reader=new BufferedReader(new InputStreamReader(inputStream));
  return gson.fromJson(reader,(new TypeToken<Map<String,JsonObject>>(){
  }
).getType());
}
Program: 28528
Project: 28528
Buggy source:
public Layout read(String type,ProteusLayoutInflater inflater,JsonReader in) throws IOException {
  List<Attribute> attributes=new ArrayList<>();
  Map<String,String> scope=null;
  String name;
  while (in.hasNext()) {
    name=in.nextName();
    if (ProteusConstants.SCOPE.equals(name)) {
      scope=readScope(in);
    }
 else {
      int id=inflater.getAttributeId(name,type);
      if (-1 != id) {
        attributes.add(new Attribute(id,VALUE_TYPE_ADAPTER.read(in)));
      }
 else {
      }
    }
  }
  in.endObject();
  return new Layout(type,attributes.size() > 0 ? attributes : null,scope);
}

Fixed version (ground truth):
public Layout read(String type,ProteusLayoutInflater inflater,JsonReader in) throws IOException {
  List<Attribute> attributes=new ArrayList<>();
  Map<String,String> scope=null;
  String name;
  while (in.hasNext()) {
    name=in.nextName();
    if (ProteusConstants.SCOPE.equals(name)) {
      scope=readScope(in);
    }
 else {
      int id=inflater.getAttributeId(name,type);
      if (-1 != id) {
        attributes.add(new Attribute(id,VALUE_TYPE_ADAPTER.read(in)));
      }
 else {
        in.skipValue();
      }
    }
  }
  in.endObject();
  return new Layout(type,attributes.size() > 0 ? attributes : null,scope);
}
Program: 28530
Project: 28530
Buggy source:
private void process(LayoutParser style,LayoutParser layout,ProteusView proteusView,TypeHandler handler,ProteusLayoutInflater builder){
  while (style.hasNext()) {
    style.next();
    style.peek();
    String key=layout.getName();
    if (!layout.isNull(key)) {
      continue;
    }
    builder.handleAttribute(handler,proteusView,key,style);
  }
}

Fixed version (ground truth):
private void process(LayoutParser style,LayoutParser layout,ProteusView proteusView,TypeHandler handler,ProteusLayoutInflater builder){
  while (style.hasNext()) {
    style.next();
    String key=style.getName();
    if (!layout.isNull(key)) {
      continue;
    }
    builder.handleAttribute(handler,proteusView,key,style.peek());
  }
}
Program: 28531
Project: 28531
Buggy source:
@Override protected void prepareHandlers(){
  super.prepareHandlers();
  addHandler(Attributes.ProgressBar.ProgressTint,new AttributeProcessor<T>(){
    @Override public void handle(    T view,    String key,    LayoutParser parser){
      if (!parser.isObject()) {
        return;
      }
      parser.peek();
      int background=Color.TRANSPARENT;
      int progress=Color.TRANSPARENT;
      String value=parser.getString("String_Node_Str");
      if (value != null) {
        background=ParseHelper.parseColor(value);
      }
      value=parser.getString("String_Node_Str");
      if (value != null) {
        progress=ParseHelper.parseColor(value);
      }
      view.setProgressDrawable(getLayerDrawable(progress,background));
    }
  }
);
}

Fixed version (ground truth):
@Override protected void prepareHandlers(){
  super.prepareHandlers();
  addHandler(Attributes.ProgressBar.ProgressTint,new AttributeProcessor<T>(){
    @Override public void handle(    T view,    String key,    LayoutParser parser){
      if (!parser.isObject()) {
        return;
      }
      parser=parser.peek();
      int background=Color.TRANSPARENT;
      int progress=Color.TRANSPARENT;
      String value=parser.getString("String_Node_Str");
      if (value != null) {
        background=ParseHelper.parseColor(value);
      }
      value=parser.getString("String_Node_Str");
      if (value != null) {
        progress=ParseHelper.parseColor(value);
      }
      view.setProgressDrawable(getLayerDrawable(progress,background));
    }
  }
);
}
Program: 28532
Project: 28532
Buggy source:
@Override public void handle(T view,String key,LayoutParser parser){
  if (!parser.isObject()) {
    return;
  }
  parser.peek();
  int background=Color.TRANSPARENT;
  int progress=Color.TRANSPARENT;
  String value=parser.getString("String_Node_Str");
  if (value != null) {
    background=ParseHelper.parseColor(value);
  }
  value=parser.getString("String_Node_Str");
  if (value != null) {
    progress=ParseHelper.parseColor(value);
  }
  view.setProgressDrawable(getLayerDrawable(progress,background));
}

Fixed version (ground truth):
@Override public void handle(T view,String key,LayoutParser parser){
  if (!parser.isObject()) {
    return;
  }
  parser=parser.peek();
  int background=Color.TRANSPARENT;
  int progress=Color.TRANSPARENT;
  String value=parser.getString("String_Node_Str");
  if (value != null) {
    background=ParseHelper.parseColor(value);
  }
  value=parser.getString("String_Node_Str");
  if (value != null) {
    progress=ParseHelper.parseColor(value);
  }
  view.setProgressDrawable(getLayerDrawable(progress,background));
}
Program: 28534
Project: 28534
Buggy source:
@Override public void handle(T view,String key,LayoutParser parser){
  if (!parser.isObject()) {
    return;
  }
  parser.peek();
  int background=Color.TRANSPARENT;
  int progress=Color.TRANSPARENT;
  String value=parser.getString("String_Node_Str");
  if (value != null) {
    background=ParseHelper.parseColor(value);
  }
  value=parser.getString("String_Node_Str");
  if (value != null) {
    progress=ParseHelper.parseColor(value);
  }
  view.setProgressDrawable(getLayerDrawable(progress,background));
}

Fixed version (ground truth):
@Override public void handle(T view,String key,LayoutParser parser){
  if (!parser.isObject()) {
    return;
  }
  parser=parser.peek();
  int background=Color.TRANSPARENT;
  int progress=Color.TRANSPARENT;
  String value=parser.getString("String_Node_Str");
  if (value != null) {
    background=ParseHelper.parseColor(value);
  }
  value=parser.getString("String_Node_Str");
  if (value != null) {
    progress=ParseHelper.parseColor(value);
  }
  view.setProgressDrawable(getLayerDrawable(progress,background));
}
Program: 28536
Project: 28536
Buggy source:
public static GradientDrawable loadGradientDrawable(Context context,LayoutParser parser){
  return null;
}

Fixed version (ground truth):
@Nullable public static GradientDrawable loadGradientDrawable(Context context,LayoutParser parser){
  return null;
}
Program: 28538
Project: 28538
Buggy source:
public static Drawable getBorderDrawable(LayoutParser parser,Context context){
  if (!parser.isObject() || parser.isNull()) {
    return null;
  }
  float cornerRadius=0;
  int borderWidth=0, borderColor=Color.TRANSPARENT, bgColor=Color.TRANSPARENT;
  parser.peek();
  String value=parser.getString(ATTRIBUTE_BG_COLOR);
  if (value != null && !value.equals("String_Node_Str")) {
    bgColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_COLOR);
  if (value != null) {
    borderColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_RADIUS);
  if (value != null) {
    cornerRadius=ParseHelper.parseDimension(value,context);
  }
  value=parser.getString(ATTRIBUTE_BORDER_WIDTH);
  if (value != null) {
    borderWidth=(int)ParseHelper.parseDimension(value,context);
  }
  GradientDrawable border=new GradientDrawable();
  border.setCornerRadius(cornerRadius);
  border.setShape(GradientDrawable.RECTANGLE);
  border.setStroke(borderWidth,borderColor);
  border.setColor(bgColor);
  return border;
}

Fixed version (ground truth):
public static Drawable getBorderDrawable(LayoutParser parser,Context context){
  if (!parser.isObject() || parser.isNull()) {
    return null;
  }
  float cornerRadius=0;
  int borderWidth=0, borderColor=Color.TRANSPARENT, bgColor=Color.TRANSPARENT;
  parser=parser.peek();
  String value=parser.getString(ATTRIBUTE_BG_COLOR);
  if (value != null && !value.equals("String_Node_Str")) {
    bgColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_COLOR);
  if (value != null) {
    borderColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_RADIUS);
  if (value != null) {
    cornerRadius=ParseHelper.parseDimension(value,context);
  }
  value=parser.getString(ATTRIBUTE_BORDER_WIDTH);
  if (value != null) {
    borderWidth=(int)ParseHelper.parseDimension(value,context);
  }
  GradientDrawable border=new GradientDrawable();
  border.setCornerRadius(cornerRadius);
  border.setShape(GradientDrawable.RECTANGLE);
  border.setStroke(borderWidth,borderColor);
  border.setColor(bgColor);
  return border;
}
Program: 28539
Project: 28539
Buggy source:
@Override public double getDouble(String property){
  return ((JsonObject)current).get(property).getAsDouble();
}

Fixed version (ground truth):
@Override public double getDouble(String property){
  return ((JsonObject)current).has(property) ? ((JsonObject)current).get(property).getAsDouble() : 0;
}
Program: 28540
Project: 28540
Buggy source:
@Override public float getFloat(String property){
  return ((JsonObject)current).get(property).getAsFloat();
}

Fixed version (ground truth):
@Override public float getFloat(String property){
  return ((JsonObject)current).has(property) ? ((JsonObject)current).get(property).getAsFloat() : 0;
}
Program: 28541
Project: 28541
Buggy source:
@Override public String getString(String property){
  return ((JsonObject)current).get(property).getAsString();
}

Fixed version (ground truth):
@Override public String getString(String property){
  return ((JsonObject)current).has(property) ? ((JsonObject)current).get(property).getAsString() : null;
}
Program: 28542
Project: 28542
Buggy source:
@Override public long getLong(String property){
  return ((JsonObject)current).get(property).getAsLong();
}

Fixed version (ground truth):
@Override public long getLong(String property){
  return ((JsonObject)current).has(property) ? ((JsonObject)current).get(property).getAsLong() : 0;
}
Program: 28543
Project: 28543
Buggy source:
@Override public int getInt(String property){
  return ((JsonObject)current).get(property).getAsInt();
}

Fixed version (ground truth):
@Override public int getInt(String property){
  return ((JsonObject)current).has(property) ? ((JsonObject)current).get(property).getAsInt() : 0;
}
Program: 28544
Project: 28544
Buggy source:
@Override protected ProteusViewManager createViewManager(TypeHandler handler,View parent,LayoutParser parser,JsonObject data,Styles styles,int index){
  ProteusViewManagerImpl viewManager=new ProteusViewManagerImpl();
  DataContext dataContext, parentDataContext=null;
  Map<String,String> scope=parser.getScope();
  if (parent instanceof ProteusView) {
    parentDataContext=((ProteusView)parent).getViewManager().getDataContext();
  }
  if (scope == null) {
    if (parentDataContext != null) {
      dataContext=new DataContext(parentDataContext);
    }
 else {
      dataContext=new DataContext();
      dataContext.setData(data);
      dataContext.setIndex(index);
    }
  }
 else {
    if (parentDataContext != null) {
      dataContext=parentDataContext.createChildDataContext(scope,index);
    }
 else {
      dataContext=new DataContext();
      dataContext.setData(data);
      dataContext=dataContext.createChildDataContext(scope,index);
    }
  }
  viewManager.setLayoutParser(parser);
  viewManager.setDataContext(dataContext);
  viewManager.setStyles(styles);
  viewManager.setProteusLayoutInflater(this);
  viewManager.setTypeHandler(handler);
  return viewManager;
}

Fixed version (ground truth):
@Override protected ProteusViewManager createViewManager(TypeHandler handler,View parent,LayoutParser parser,JsonObject data,Styles styles,int index){
  ProteusViewManagerImpl viewManager=new ProteusViewManagerImpl();
  DataContext dataContext, parentDataContext=null;
  Map<String,String> scope=parser.getScope();
  if (parent instanceof ProteusView) {
    parentDataContext=((ProteusView)parent).getViewManager().getDataContext();
  }
  if (scope == null) {
    if (parentDataContext != null) {
      dataContext=new DataContext(parentDataContext);
    }
 else {
      dataContext=new DataContext();
      dataContext.setData(data);
      dataContext.setIndex(index);
    }
  }
 else {
    if (parentDataContext != null) {
      dataContext=parentDataContext.createChildDataContext(scope,index);
    }
 else {
      dataContext=new DataContext();
      dataContext.setData(data);
      dataContext=dataContext.createChildDataContext(scope,index);
    }
  }
  viewManager.setLayoutParser(parser.clone());
  viewManager.setDataContext(dataContext);
  viewManager.setStyles(styles);
  viewManager.setProteusLayoutInflater(this);
  viewManager.setTypeHandler(handler);
  return viewManager;
}
Program: 28545
Project: 28545
Buggy source:
@Override @Nullable public ProteusView build(ViewGroup parent,LayoutParser parser,JsonObject data,Styles styles,int index){
  if (!parser.isLayout()) {
    throw new IllegalArgumentException("String_Node_Str" + parser.toString());
  }
  String type=parser.getType();
  TypeHandler handler=layoutHandlers.get(type);
  if (handler == null) {
    return onUnknownViewEncountered(type,parent,parser,data,index,styles);
  }
  final ProteusView view;
  onBeforeCreateView(handler,parent,parser,data,index,styles);
  view=createView(handler,parent,parser,data,index,styles);
  onAfterCreateView(handler,view,parent,parser,data,styles,index);
  ProteusViewManager viewManager=createViewManager(handler,parent,parser,data,styles,index);
  viewManager.setView((View)view);
  view.setViewManager(viewManager);
  while (parser.hasNext()) {
    boolean handled=handleAttribute(handler,view,parser.getName(),parser);
    if (!handled) {
      onUnknownAttributeEncountered(view,parser.getName(),parser);
    }
  }
  handleChildren(handler,parser,view);
  return view;
}

Fixed version (ground truth):
@Override @Nullable public ProteusView build(ViewGroup parent,LayoutParser parser,JsonObject data,Styles styles,int index){
  if (!parser.isLayout()) {
    throw new IllegalArgumentException("String_Node_Str" + parser.toString());
  }
  String type=parser.getType();
  TypeHandler handler=layoutHandlers.get(type);
  if (handler == null) {
    return onUnknownViewEncountered(type,parent,parser,data,index,styles);
  }
  final ProteusView view;
  onBeforeCreateView(handler,parent,parser,data,index,styles);
  view=createView(handler,parent,parser,data,index,styles);
  onAfterCreateView(handler,view,parent,parser,data,styles,index);
  ProteusViewManager viewManager=createViewManager(handler,parent,parser,data,styles,index);
  viewManager.setView((View)view);
  view.setViewManager(viewManager);
  while (parser.hasNext()) {
    parser.next();
    boolean handled=handleAttribute(handler,view,parser.getName(),parser);
    if (!handled) {
      onUnknownAttributeEncountered(view,parser.getName(),parser);
    }
  }
  return view;
}
Program: 28547
Project: 28547
Buggy source:
@Override public void handle(String attributeKey,String attributeValue,T view){
  boolean splitMotionEvents=ParseHelper.parseBoolean(attributeValue);
  view.setMotionEventSplittingEnabled(splitMotionEvents);
}

Fixed version (ground truth):
@Override public void handle(T view,String key,LayoutParser parser){
  handleChildren((ProteusView)view);
}
Program: 28548
Project: 28548
Buggy source:
@Override public boolean handleChildren(ProteusView view){
  ProteusViewManager viewManager=view.getViewManager();
  ProteusLayoutInflater proteusLayoutInflater=viewManager.getProteusLayoutInflater();
  LayoutParser parser=viewManager.getLayoutParser();
  JsonObject data=viewManager.getDataContext().getData();
  ProteusView child;
  if (!parser.isLayout()) {
    throw new IllegalStateException("String_Node_Str" + parser.toString());
  }
  if (parser.isArray(ProteusConstants.CHILDREN)) {
    parser.peek(ProteusConstants.CHILDREN);
    while (parser.hasNext()) {
      parser.next();
      child=proteusLayoutInflater.build((ViewGroup)view,parser,data,view.getViewManager().getStyles(),viewManager.getDataContext().getIndex());
      addView(view,child);
    }
  }
 else   if (parser.isNumber(ProteusConstants.CHILDREN)) {
    int length=parser.getInt(ProteusConstants.CHILDREN);
    LayoutParser childLayoutParser=viewManager.getChildLayoutParser();
    for (int index=0; index < length; index++) {
      child=proteusLayoutInflater.build((ViewGroup)view,childLayoutParser.clone(),viewManager.getDataContext().getData(),viewManager.getStyles(),index);
      if (child != null) {
        this.addView(view,child);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean handleChildren(ProteusView view){
  ProteusViewManager viewManager=view.getViewManager();
  ProteusLayoutInflater proteusLayoutInflater=viewManager.getProteusLayoutInflater();
  LayoutParser parser=viewManager.getLayoutParser();
  JsonObject data=viewManager.getDataContext().getData();
  ProteusView child;
  if (!parser.isLayout()) {
    throw new IllegalStateException("String_Node_Str" + parser.toString());
  }
  if (parser.isArray(ProteusConstants.CHILDREN)) {
    LayoutParser children=parser.peek(ProteusConstants.CHILDREN);
    while (children.hasNext()) {
      children.next();
      child=proteusLayoutInflater.build((ViewGroup)view,children.clone(),data,view.getViewManager().getStyles(),viewManager.getDataContext().getIndex());
      addView(view,child);
    }
  }
 else   if (parser.isNumber(ProteusConstants.CHILDREN)) {
    int length=parser.getInt(ProteusConstants.CHILDREN);
    LayoutParser childLayoutParser=viewManager.getChildLayoutParser();
    for (int index=0; index < length; index++) {
      child=proteusLayoutInflater.build((ViewGroup)view,childLayoutParser.clone(),viewManager.getDataContext().getData(),viewManager.getStyles(),index);
      if (child != null) {
        this.addView(view,child);
      }
    }
  }
  return true;
}
Program: 28549
Project: 28549
Buggy source:
public static Drawable getBorderDrawable(LayoutParser parser,Context context){
  if (!parser.isObject() || parser.isNull()) {
    return null;
  }
  float cornerRadius=0;
  int borderWidth=0, borderColor=Color.TRANSPARENT, bgColor=Color.TRANSPARENT;
  parser=parser.peek();
  String value=parser.getString(ATTRIBUTE_BG_COLOR);
  if (value != null && !value.equals("String_Node_Str")) {
    bgColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_COLOR);
  if (value != null) {
    borderColor=ParseHelper.parseColor(value);
  }
  value=parser.getString(ATTRIBUTE_BORDER_RADIUS);
  if (value != null) {
    cornerRadius=ParseHelper.parseDimension(value,context);
  }
  value=parser.getString(ATTRIBUTE_BORDER_WIDTH);
  if (value != null) {
    borderWidth=(int)ParseHelper.parseDimension(value,context);
  }
  GradientDrawable border=new GradientDrawable();
  border.setCornerRadius(cornerRadius);
  border.setShape(GradientDrawable.RECTANGLE);
  border.setStroke(borderWidth,borderColor);
  border.setColor(bgColor);
  return border;
}

Fixed version (ground truth):
public static Drawable getBorderDrawable(LayoutParser parser,Context context){
  if (!parser.isObject() || parser.isNull()) {
    return null;
  }
  float cornerRadius=0;
  int borderWidth=0, borderColor=Color.TRANSPARENT, bgColor=Color.TRANSPARENT;
  parser=parser.peek();
  String value;
  if (parser.isString(ATTRIBUTE_BG_COLOR)) {
    value=parser.getString(ATTRIBUTE_BG_COLOR);
    if (value != null && !value.equals("String_Node_Str")) {
      bgColor=ParseHelper.parseColor(value);
    }
  }
  if (parser.isString(ATTRIBUTE_BORDER_COLOR)) {
    value=parser.getString(ATTRIBUTE_BORDER_COLOR);
    if (value != null) {
      borderColor=ParseHelper.parseColor(value);
    }
  }
  if (parser.isString(ATTRIBUTE_BORDER_RADIUS)) {
    value=parser.getString(ATTRIBUTE_BORDER_RADIUS);
    if (value != null) {
      cornerRadius=ParseHelper.parseDimension(value,context);
    }
  }
  if (parser.isString(ATTRIBUTE_BORDER_WIDTH)) {
    value=parser.getString(ATTRIBUTE_BORDER_WIDTH);
    if (value != null) {
      borderWidth=(int)ParseHelper.parseDimension(value,context);
    }
  }
  GradientDrawable border=new GradientDrawable();
  border.setCornerRadius(cornerRadius);
  border.setShape(GradientDrawable.RECTANGLE);
  border.setStroke(borderWidth,borderColor);
  border.setColor(bgColor);
  return border;
}
Program: 28550
Project: 28550
Buggy source:
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  return updateDataContext(new DataContext(),dataProvider,scope,childIndex);
}

Fixed version (ground truth):
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  DataContext dataContext=updateDataContext(new DataContext(),dataProvider,scope,childIndex);
  this.addChild(dataContext);
  return dataContext;
}
Program: 28551
Project: 28551
Buggy source:
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
}

Fixed version (ground truth):
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
  this.children=new ArrayList<>();
}
Program: 28552
Project: 28552
Buggy source:
JsonObject onBeforeUpdateData(@Nullable JsonObject data);

Fixed version (ground truth):
JsonObject onBeforeUpdateData(JsonObject data);
Program: 28553
Project: 28553
Buggy source:
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(data);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}

Fixed version (ground truth):
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (data == null) {
    return this.getView();
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(null);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}
Program: 28554
Project: 28554
Buggy source:
JsonObject onAfterDataContext(@Nullable JsonObject data);

Fixed version (ground truth):
JsonObject onAfterDataContext(JsonObject data);
Program: 28556
Project: 28556
Buggy source:
@Override public void handle(ParserContext parserContext,String attributeKey,String attributeValue,V view,ProteusView proteusView,ProteusView parent,JsonObject layout,int index){
  int trueOrFalse=ParseHelper.parseRelativeLayoutBoolean(attributeValue);
  ParseHelper.addRelativeLayoutRule(view,relativeLayoutParams.get(attributeKey),trueOrFalse);
}

Fixed version (ground truth):
@Override public void handle(ParserContext parserContext,String attributeKey,String attributeValue,V view,ProteusView proteusView,ProteusView parent,JsonObject layout,int index){
  int trueOrFalse=ParseHelper.parseRelativeLayoutBoolean(attributeValue);
  Integer rule=relativeLayoutParams.get(attributeKey);
  if (rule != null) {
    ParseHelper.addRelativeLayoutRule(view,rule,trueOrFalse);
  }
}
Program: 28557
Project: 28557
Buggy source:
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  DataContext dataContext=updateDataContext(new DataContext(),dataProvider,scope,childIndex);
  this.addChild(dataContext);
  return dataContext;
}

Fixed version (ground truth):
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  return updateDataContext(new DataContext(),dataProvider,scope,childIndex);
}
Program: 28558
Project: 28558
Buggy source:
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
  this.children=new ArrayList<>();
}

Fixed version (ground truth):
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
}
Program: 28559
Project: 28559
Buggy source:
JsonObject onBeforeUpdateData(JsonObject data);

Fixed version (ground truth):
JsonObject onBeforeUpdateData(@Nullable JsonObject data);
Program: 28560
Project: 28560
Buggy source:
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (data == null) {
    return this.getView();
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(null);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}

Fixed version (ground truth):
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(data);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}
Program: 28561
Project: 28561
Buggy source:
JsonObject onAfterDataContext(JsonObject data);

Fixed version (ground truth):
JsonObject onAfterDataContext(@Nullable JsonObject data);
Program: 28563
Project: 28563
Buggy source:
@Override public void setDimension(ParserContext parserContext,float dimension,T view,String key,JsonElement value,ProteusView proteusView,JsonObject layout,int index){
  view.setTextSize(dimension);
}

Fixed version (ground truth):
@Override public void setDimension(ParserContext parserContext,float dimension,T view,String key,JsonElement value,ProteusView proteusView,JsonObject layout,int index){
  view.setTextSize(TypedValue.COMPLEX_UNIT_PX,dimension);
}
Program: 28564
Project: 28564
Buggy source:
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  DataContext dataContext=updateDataContext(new DataContext(),dataProvider,scope,childIndex);
  this.addChild(dataContext);
  return dataContext;
}

Fixed version (ground truth):
public DataContext createChildDataContext(JsonObject scope,int childIndex){
  return updateDataContext(new DataContext(),dataProvider,scope,childIndex);
}
Program: 28565
Project: 28565
Buggy source:
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
  this.children=new ArrayList<>();
}

Fixed version (ground truth):
public DataContext(){
  this.scope=new JsonObject();
  this.reverseScope=new JsonObject();
}
Program: 28566
Project: 28566
Buggy source:
JsonObject onBeforeUpdateData(JsonObject data);

Fixed version (ground truth):
JsonObject onBeforeUpdateData(@Nullable JsonObject data);
Program: 28567
Project: 28567
Buggy source:
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (data == null) {
    return this.getView();
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(null);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}

Fixed version (ground truth):
@Override protected View updateDataImpl(JsonObject data){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  this.isViewUpdating=true;
  data=onBeforeUpdateData(data);
  if (data != null) {
    updateDataContext(data);
  }
  if (parserContext != null) {
    data=onAfterDataContext(parserContext.getDataContext().getDataProvider().getData().getAsJsonObject());
  }
 else {
    data=onAfterDataContext(null);
  }
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (dataPathForChildren != null) {
    if (children == null) {
      children=new ArrayList<>();
    }
    updateChildrenFromData();
  }
 else   if (children != null) {
    for (    ProteusView proteusView : children) {
      proteusView.updateData(data);
    }
  }
  this.isViewUpdating=false;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + (data != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ Utils.getLayoutIdentifier(layout));
  }
  onUpdateDataComplete();
  return this.getView();
}
Program: 28568
Project: 28568
Buggy source:
JsonObject onAfterDataContext(JsonObject data);

Fixed version (ground truth):
JsonObject onAfterDataContext(@Nullable JsonObject data);
Program: 28570
Project: 28570
Buggy source:
@Override public void setDimension(V view,String attributeKey,int dimension){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    view.setElevation(dimension);
  }
}

Fixed version (ground truth):
@Override public void setDimension(ParserContext parserContext,int dimension,V view,String attributeKey,JsonElement attributeValue,ProteusView proteusView,JsonObject layout,int index){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    view.setElevation(dimension);
  }
}
Program: 28573
Project: 28573
Buggy source:
@Override public void handle(ParserContext parserContext,String attributeKey,String attributeValue,T view,ProteusView proteusView,ProteusView parent,JsonObject layout,int index){
  view.setMinimumHeight(ParseHelper.parseDimension(attributeValue,context));
}

Fixed version (ground truth):
@Override public void handle(ParserContext parserContext,String attributeKey,String attributeValue,T view,ProteusView proteusView,ProteusView parent,JsonObject layout,int index){
  view.setStepSize(ParseHelper.parseFloat(attributeValue));
}