nus-yam/ex-repair huggingface dataset:
Program: 28626
Project: 28626
Buggy source:
private LayoutBuilderCallback createCallback(){
  return new LayoutBuilderCallback(){
    @Override public void onUnknownAttribute(    ParserContext context,    String attribute,    JsonElement element,    JsonObject object,    View view,    int childIndex){
    }
    @Override public ProteusView onUnknownViewType(    ParserContext context,    String viewType,    JsonObject object,    ProteusView parent,    int childIndex){
      return null;
    }
    @Override public JsonObject onChildTypeLayoutRequired(    ParserContext context,    String viewType,    JsonObject parentViewJsonObject,    ProteusView parent){
      return null;
    }
    @Override public void onViewBuiltFromViewProvider(    ProteusView createdView,    String viewType,    ParserContext context,    JsonObject viewJsonObject,    ProteusView parent,    int childIndex){
    }
    @Override public View onEvent(    ParserContext context,    View view,    JsonElement attributeValue,    EventType eventType){
      Log.d("String_Node_Str",attributeValue.toString());
      return view;
    }
    @Override public PagerAdapter onPagerAdapterRequired(    ParserContext parserContext,    ProteusView<View> parent,    List<ProteusView> children,    JsonObject viewLayout){
      return null;
    }
    @Override public Adapter onAdapterRequired(    ParserContext parserContext,    ProteusView<View> parent,    List<ProteusView> children,    JsonObject viewLayout){
      return null;
    }
  }
;
}

Fixed version (ground truth):
private LayoutBuilderCallback createCallback(){
  return new LayoutBuilderCallback(){
    @Override public void onUnknownAttribute(    ParserContext context,    String attribute,    JsonElement element,    JsonObject object,    View view,    int childIndex){
    }
    @Override public ProteusView onUnknownViewType(    ParserContext context,    String viewType,    JsonObject object,    ProteusView parent,    int childIndex){
      return null;
    }
    @Override public JsonObject onChildTypeLayoutRequired(    ParserContext context,    String viewType,    JsonObject parentViewJsonObject,    ProteusView parent){
      return null;
    }
    @Override public void onViewBuiltFromViewProvider(    ProteusView createdView,    String viewType,    ParserContext context,    JsonObject viewJsonObject,    ProteusView parent,    int childIndex){
    }
    @Override public View onEvent(    ParserContext context,    View view,    JsonElement attributeValue,    EventType eventType){
      Log.d("String_Node_Str",attributeValue.toString());
      return view;
    }
    @Override public PagerAdapter onPagerAdapterRequired(    ParserContext parserContext,    ProteusView parent,    List<ProteusView> children,    JsonObject viewLayout){
      return null;
    }
    @Override public Adapter onAdapterRequired(    ParserContext parserContext,    ProteusView parent,    List<ProteusView> children,    JsonObject viewLayout){
      return null;
    }
  }
;
}
Program: 28627
Project: 28627
Buggy source:
@Override protected JsonArray parseChildren(LayoutHandler handler,ParserContext parserContext,JsonElement childrenElement,int childIndex){
  if (childrenElement.isJsonPrimitive()) {
    String attributeValue=childrenElement.getAsString();
    if (attributeValue != null && !"String_Node_Str".equals(attributeValue)) {
      try {
        childrenElement=Utils.getElementFromData(attributeValue,parserContext.getDataContext().getDataProvider(),childIndex);
      }
 catch (      JsonNullException|NoSuchDataPathException|InvalidDataPathException e) {
        Log.e(TAG + "String_Node_Str",e.getMessage());
      }
    }
  }
  return super.parseChildren(handler,parserContext,childrenElement,childIndex);
}

Fixed version (ground truth):
@Override protected JsonArray parseChildren(LayoutHandler handler,ParserContext parserContext,JsonElement childrenElement,int childIndex){
  if (childrenElement.isJsonPrimitive()) {
    String attributeValue=childrenElement.getAsString();
    if (attributeValue != null && !"String_Node_Str".equals(attributeValue)) {
      try {
        childrenElement=Utils.getElementFromData(attributeValue,parserContext.getDataContext().getDataProvider(),childIndex);
      }
 catch (      JsonNullException|NoSuchDataPathException|InvalidDataPathException e) {
        Log.e(TAG + "String_Node_Str",e.getMessage());
        childrenElement=new JsonArray();
      }
    }
  }
  return super.parseChildren(handler,parserContext,childrenElement,childIndex);
}
Program: 28628
Project: 28628
Buggy source:
PagerAdapter onPagerAdapterRequired(ParserContext parserContext,ProteusView<View> parent,final List<ProteusView> children,JsonObject viewLayout);

Fixed version (ground truth):
PagerAdapter onPagerAdapterRequired(ParserContext parserContext,ProteusView parent,final List<ProteusView> children,JsonObject viewLayout);
Program: 28629
Project: 28629
Buggy source:
Adapter onAdapterRequired(ParserContext parserContext,ProteusView<View> parent,final List<ProteusView> children,JsonObject viewLayout);

Fixed version (ground truth):
Adapter onAdapterRequired(ParserContext parserContext,ProteusView parent,final List<ProteusView> children,JsonObject viewLayout);
Program: 28630
Project: 28630
Buggy source:
boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView<E> view,int childIndex);

Fixed version (ground truth):
boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView view,int childIndex);
Program: 28631
Project: 28631
Buggy source:
void addChildren(ParserContext parserContext,ProteusView<View> parent,List<ProteusView> children,JsonObject viewLayout);

Fixed version (ground truth):
void addChildren(ParserContext parserContext,ProteusView parent,List<ProteusView> children,JsonObject viewLayout);
Program: 28632
Project: 28632
Buggy source:
@Override public boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView<T> view,int childIndex){
  AttributeProcessor attributeProcessor=handlers.get(attribute);
  if (attributeProcessor != null) {
    attributeProcessor.handle(context,attribute,element,view.getView());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView view,int childIndex){
  AttributeProcessor attributeProcessor=handlers.get(attribute);
  if (attributeProcessor != null) {
    attributeProcessor.handle(context,attribute,element,view.getView());
    return true;
  }
  return false;
}
Program: 28633
Project: 28633
Buggy source:
/** 
 * This is a base implementation which calls addChild() on the parent.
 * @param parent   The view group into which the child will be added.
 * @param children The List of child views which have to be added.
 */
@Override public void addChildren(ParserContext parserContext,ProteusView<View> parent,List<ProteusView> children,JsonObject viewLayout){
  for (  ProteusView child : children) {
    parent.addChild(child);
  }
}

Fixed version (ground truth):
/** 
 * This is a base implementation which calls addChild() on the parent.
 * @param parent   The view group into which the child will be added.
 * @param children The List of child views which have to be added.
 */
@Override public void addChildren(ParserContext parserContext,ProteusView parent,List<ProteusView> children,JsonObject viewLayout){
  for (  ProteusView child : children) {
    parent.addChild(child);
  }
}
Program: 28634
Project: 28634
Buggy source:
@Override public boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView<T> view,int childIndex){
  boolean handled=super.handleAttribute(context,attribute,jsonObject,element,view,childIndex);
  if (wrappedParser != null && !handled) {
    handled=wrappedParser.handleAttribute(context,attribute,jsonObject,element,view,childIndex);
  }
  return handled;
}

Fixed version (ground truth):
@Override public boolean handleAttribute(ParserContext context,String attribute,JsonObject jsonObject,JsonElement element,ProteusView view,int childIndex){
  boolean handled=super.handleAttribute(context,attribute,jsonObject,element,view,childIndex);
  if (wrappedParser != null && !handled) {
    handled=wrappedParser.handleAttribute(context,attribute,jsonObject,element,view,childIndex);
  }
  return handled;
}
Program: 28635
Project: 28635
Buggy source:
@Override public void addChildren(ParserContext parserContext,ProteusView<View> parent,final List<ProteusView> children,JsonObject viewLayout){
  PagerAdapter adapter=parserContext.getLayoutBuilder().getListener().onPagerAdapterRequired(parserContext,parent,children,viewLayout);
  ((T)parent.getView()).setAdapter(adapter);
}

Fixed version (ground truth):
@Override public void addChildren(ParserContext parserContext,ProteusView parent,final List<ProteusView> children,JsonObject viewLayout){
  PagerAdapter adapter=parserContext.getLayoutBuilder().getListener().onPagerAdapterRequired(parserContext,parent,children,viewLayout);
  ((T)parent.getView()).setAdapter(adapter);
}
Program: 28636
Project: 28636
Buggy source:
/** 
 * @return the list of children.
 */
ArrayList<ProteusView<View>> getChildren();

Fixed version (ground truth):
/** 
 * @return the list of children.
 */
ArrayList<ProteusView> getChildren();
Program: 28637
Project: 28637
Buggy source:
/** 
 * @return reference to the view {@link android.view.View} wrapped by the {@link ProteusView}
 */
T getView();

Fixed version (ground truth):
/** 
 * @return reference to the view {@link android.view.View} wrapped by the {@link ProteusView}
 */
View getView();
Program: 28638
Project: 28638
Buggy source:
@Override public ArrayList<ProteusView<View>> getChildren(){
  return this.children;
}

Fixed version (ground truth):
@Override public ArrayList<ProteusView> getChildren(){
  return this.children;
}
Program: 28639
Project: 28639
Buggy source:
@Override public void addChild(ProteusView view){
  if (view == null) {
    return;
  }
  if (this.children == null) {
    this.children=new ArrayList<>();
  }
  this.children.add(view);
  ((ViewGroup)getView()).addView(view.getView());
}

Fixed version (ground truth):
@Override public void addChild(ProteusView proteusView){
  if (proteusView == null) {
    return;
  }
  if (this.children == null) {
    this.children=new ArrayList<>();
  }
  this.children.add(proteusView);
  if (view != null && proteusView.getView() != null) {
    ((ViewGroup)view).addView(proteusView.getView());
  }
}
Program: 28640
Project: 28640
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  handler=new Handler();
  builder=LayoutBuilderFactory.getSimpleLayoutBuilder(getBaseContext());
  builder.setSynchronousRendering(true);
  startPollingServer(intent);
  return Service.START_STICKY;
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  handler=new Handler();
  builder=new LayoutBuilderFactory().getSimpleLayoutBuilder(getBaseContext());
  builder.setSynchronousRendering(true);
  startPollingServer(intent);
  return Service.START_STICKY;
}
Program: 28641
Project: 28641
Buggy source:
@Override public void addChild(ProteusView view){
  if (this.children == null) {
    this.children=new ArrayList<>();
  }
  this.children.add(view);
  ((ViewGroup)getView()).addView(view.getView());
}

Fixed version (ground truth):
@Override public void addChild(ProteusView view){
  if (view == null) {
    return;
  }
  if (this.children == null) {
    this.children=new ArrayList<>();
  }
  this.children.add(view);
  ((ViewGroup)getView()).addView(view.getView());
}
Program: 28642
Project: 28642
Buggy source:
private JsonElement getFromObject(String path,int childIndex){
  JsonElement root=this.rootElement;
  String[] segments=path.split(DATA_PATH_DELIMITER);
  JsonElement elementToReturn=root;
  JsonElement tempElement=null;
  JsonArray tempArray=null;
  for (  String segment : segments) {
    if (elementToReturn == null) {
      return null;
    }
    if ("String_Node_Str".equals(segment)) {
      continue;
    }
    if (elementToReturn.isJsonArray()) {
      tempArray=elementToReturn.getAsJsonArray();
      if (tempArray != null) {
        if (CHILD_INDEX_REFERENCE.equals(segment)) {
          elementToReturn=tempArray.get(childIndex);
        }
 else {
          int index=Integer.parseInt(segment);
          elementToReturn=tempArray.get(index);
        }
      }
 else {
        elementToReturn=null;
        break;
      }
    }
 else {
      tempElement=elementToReturn.getAsJsonObject().get(segment);
      if (tempElement != null) {
        elementToReturn=tempElement;
      }
 else {
        elementToReturn=null;
        break;
      }
    }
  }
  return elementToReturn;
}

Fixed version (ground truth):
private JsonElement getFromObject(String path,int childIndex){
  JsonElement root=this.rootElement;
  String[] segments=path.split(DATA_PATH_DELIMITER);
  JsonElement elementToReturn=root;
  JsonElement tempElement=null;
  JsonArray tempArray=null;
  for (  String segment : segments) {
    if (elementToReturn == null || elementToReturn.isJsonNull()) {
      return null;
    }
    if ("String_Node_Str".equals(segment)) {
      continue;
    }
    if (elementToReturn.isJsonArray()) {
      tempArray=elementToReturn.getAsJsonArray();
      if (tempArray != null) {
        if (CHILD_INDEX_REFERENCE.equals(segment)) {
          elementToReturn=tempArray.get(childIndex);
        }
 else {
          int index=Integer.parseInt(segment);
          elementToReturn=tempArray.get(index);
        }
      }
 else {
        elementToReturn=null;
        break;
      }
    }
 else {
      tempElement=elementToReturn.getAsJsonObject().get(segment);
      if (tempElement != null) {
        elementToReturn=tempElement;
      }
 else {
        elementToReturn=null;
        break;
      }
    }
  }
  return elementToReturn;
}
Program: 28643
Project: 28643
Buggy source:
public static JsonObject merge(JsonObject x,JsonObject y){
  for (  Map.Entry<String,JsonElement> entry : x.entrySet()) {
    String key=entry.getKey();
    JsonElement newDataElement=y.get(key);
    if (entry.getValue().isJsonObject() && newDataElement != null) {
      newDataElement=merge(entry.getValue().getAsJsonObject(),newDataElement.getAsJsonObject());
    }
    if (newDataElement != null) {
      x.add(key,newDataElement);
    }
  }
  return x;
}

Fixed version (ground truth):
public static JsonObject merge(JsonObject x,JsonObject y){
  for (  Map.Entry<String,JsonElement> entry : y.entrySet()) {
    String key=entry.getKey();
    JsonElement oldDataElement=x.get(key);
    JsonElement newDataElement=y.get(key);
    if (oldDataElement != null && oldDataElement.isJsonObject() && newDataElement != null) {
      newDataElement=merge(entry.getValue().getAsJsonObject(),newDataElement.getAsJsonObject());
    }
    x.add(key,newDataElement);
  }
  return x;
}
Program: 28644
Project: 28644
Buggy source:
@Override protected void prepareView(ProteusView proteusView,Provider dataProvider){
  ((DataProteusView)proteusView).setDataProvider(dataProvider);
}

Fixed version (ground truth):
@Override protected void prepareView(ProteusView proteusView,ParserContext parserContext){
  ((DataProteusView)proteusView).setParserContext(parserContext);
}
Program: 28645
Project: 28645
Buggy source:
protected ParserContext createParserContext(JsonObject data){
  ParserContext parserContext=new ParserContext();
  parserContext.setLayoutBuilder(this);
  if (data != null) {
    parserContext.setDataProvider(new GsonProvider(data));
  }
  return parserContext;
}

Fixed version (ground truth):
protected ParserContext createParserContext(JsonObject data){
  ParserContext parserContext=new ParserContext();
  parserContext.setLayoutBuilder(this);
  return parserContext;
}
Program: 28646
Project: 28646
Buggy source:
protected void prepareView(ProteusView proteusView,Provider dataProvider){
}

Fixed version (ground truth):
protected void prepareView(ProteusView proteusView,ParserContext parserContext){
}
Program: 28648
Project: 28648
Buggy source:
/** 
 * Updates the Binding with new data. It uses a   {@link com.flipkart.layoutengine.binding.Binding}to get the associated   {@link android.view.View},   {@link com.flipkart.layoutengine.builder.LayoutBuilder}, and   {@link com.flipkart.layoutengine.parser.LayoutHandler} to update the value of the boundattribute with the new value fetched from the new data object passed.
 * @param binding The property name to update mapped to its{@link com.flipkart.layoutengine.binding.Binding}
 */
private void handleBinding(Binding binding,JsonObject data){
  ParserContext context=binding.getParserContext();
  int index=binding.getIndex();
  context=setCorrectDataProvider(context,data);
  if (binding.hasRegEx()) {
    binding.getParserContext().getLayoutBuilder().handleAttribute(binding.getLayoutHandler(),context,binding.getAttributeKey(),null,Utils.getStringAsJsonElement(binding.getAttributeValue()),binding.getProteusView(),binding.getParentView(),index);
  }
 else {
    JsonElement dataValue=getElementFromData(binding.getBindingName(),context.getDataProvider(),index);
    binding.getParserContext().getLayoutBuilder().handleAttribute(binding.getLayoutHandler(),context,binding.getAttributeKey(),null,dataValue,binding.getProteusView(),binding.getParentView(),index);
  }
}

Fixed version (ground truth):
/** 
 * Updates the Binding with new data. It uses a   {@link com.flipkart.layoutengine.binding.Binding}to get the associated   {@link android.view.View},   {@link com.flipkart.layoutengine.builder.LayoutBuilder}, and   {@link com.flipkart.layoutengine.parser.LayoutHandler} to update the value of the boundattribute with the new value fetched from the new data object passed.
 * @param binding The property name to update mapped to its{@link com.flipkart.layoutengine.binding.Binding}
 */
private void handleBinding(Binding binding){
  int index=binding.getIndex();
  if (binding.hasRegEx()) {
    parserContext.getLayoutBuilder().handleAttribute(binding.getLayoutHandler(),parserContext,binding.getAttributeKey(),null,Utils.getStringAsJsonElement(binding.getAttributeValue()),binding.getProteusView(),binding.getParentView(),index);
  }
 else {
    JsonElement dataValue=getElementFromData(binding.getBindingName(),parserContext.getDataProvider(),index);
    parserContext.getLayoutBuilder().handleAttribute(binding.getLayoutHandler(),parserContext,binding.getAttributeKey(),null,dataValue,binding.getProteusView(),binding.getParentView(),index);
  }
}
Program: 28649
Project: 28649
Buggy source:
@Override protected View updateDataImpl(JsonObject data){
  this.isViewUpdating=true;
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding,data);
    }
  }
  if (getChildren() != null) {
    for (    ProteusView proteusView : getChildren()) {
      proteusView.updateData(data);
    }
  }
  this.isViewUpdating=false;
  return this.getView();
}

Fixed version (ground truth):
@Override protected View updateDataImpl(JsonObject data){
  this.isViewUpdating=true;
  updateParserContext(data);
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      this.handleBinding(binding);
    }
  }
  if (getChildren() != null) {
    for (    ProteusView proteusView : getChildren()) {
      proteusView.updateData(data);
    }
  }
  this.isViewUpdating=false;
  return this.getView();
}
Program: 28650
Project: 28650
Buggy source:
public DataProteusView(ProteusView proteusView){
  super(proteusView.getView());
  this.children=proteusView.getChildren();
  if (proteusView instanceof DataProteusView) {
    dataProvider=((DataProteusView)proteusView).getDataProvider();
  }
}

Fixed version (ground truth):
public DataProteusView(ProteusView proteusView){
  super(proteusView.getView());
  this.children=proteusView.getChildren();
  if (proteusView instanceof DataProteusView) {
    parserContext=((DataProteusView)proteusView).getParserContext();
  }
}
Program: 28651
Project: 28651
Buggy source:
private void updateView(String dataPath){
  this.isViewUpdating=true;
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      if (binding.getBindingName().equals(dataPath)) {
        this.handleBinding(binding,dataProvider.getRoot().getAsJsonObject());
      }
    }
  }
  if (getChildren() != null) {
    for (    ProteusView proteusView : getChildren()) {
      ((DataProteusView)proteusView).updateView(dataPath);
    }
  }
  this.isViewUpdating=false;
}

Fixed version (ground truth):
private void updateView(String dataPath){
  this.isViewUpdating=true;
  if (this.bindings != null) {
    for (    Binding binding : this.bindings) {
      if (binding.getBindingName().equals(dataPath)) {
        this.handleBinding(binding);
      }
    }
  }
  if (getChildren() != null) {
    for (    ProteusView proteusView : getChildren()) {
      ((DataProteusView)proteusView).updateView(dataPath);
    }
  }
  this.isViewUpdating=false;
}
Program: 28652
Project: 28652
Buggy source:
public JsonElement get(String dataPath,int childIndex){
  return getElementFromData(dataPath,dataProvider,childIndex);
}

Fixed version (ground truth):
public JsonElement get(String dataPath,int childIndex){
  return getElementFromData(dataPath,parserContext.getDataProvider(),childIndex);
}
Program: 28653
Project: 28653
Buggy source:
public void setDataProvider(Provider dataProvider){
  if (dataProvider.getRoot() != null) {
    this.dataProvider.setRoot(dataProvider.getRoot());
  }
}

Fixed version (ground truth):
public void setDataProvider(Provider dataProvider){
  if (dataProvider != null && dataProvider.getRoot() != null) {
    if (this.dataProvider != null) {
      this.dataProvider.setRoot(dataProvider.getRoot());
    }
 else {
      this.dataProvider=dataProvider;
    }
  }
}
Program: 28654
Project: 28654
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.action_refresh) {
    ((DataProteusView)this.proteusView).set("String_Node_Str","String_Node_Str",0);
    return true;
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.action_refresh) {
    ((DataProteusView)this.proteusView).set("String_Node_Str","String_Node_Str",0);
    ((DataProteusView)this.proteusView).set("String_Node_Str","String_Node_Str",0);
    ((DataProteusView)this.proteusView).set("String_Node_Str","String_Node_Str",0);
    return true;
  }
  return super.onOptionsItemSelected(item);
}
Program: 28655
Project: 28655
Buggy source:
private void addBinding(ProteusView associatedProteusView,String bindingName,String attributeName,String attributeValue,ParserContext context,LayoutHandler handler,ViewGroup parent,int childIndex,boolean hasRegEx){
  DataProteusView dataProteusView=(DataProteusView)associatedProteusView;
  if (!dataProteusView.isViewUpdating()) {
    String dataContext=context.getDataContext();
    if (dataContext != null) {
      bindingName=dataContext + "String_Node_Str" + bindingName.substring(1);
    }
    Binding binding=new Binding(context,handler,bindingName,attributeName,attributeValue,dataProteusView,parent,childIndex,hasRegEx);
    dataProteusView.addBinding(binding);
  }
}

Fixed version (ground truth):
private void addBinding(ProteusView associatedProteusView,String bindingName,String attributeName,String attributeValue,ParserContext context,LayoutHandler handler,ViewGroup parent,int childIndex,boolean hasRegEx){
  DataProteusView dataProteusView=(DataProteusView)associatedProteusView;
  if (!dataProteusView.isViewUpdating()) {
    String dataContext=context.getDataContext();
    if (dataContext != null) {
      bindingName=dataContext + "String_Node_Str" + bindingName;
    }
    Binding binding=new Binding(context,handler,bindingName,attributeName,attributeValue,dataProteusView,parent,childIndex,hasRegEx);
    dataProteusView.addBinding(binding);
  }
}
Program: 28656
Project: 28656
Buggy source:
@Override public View onUnknownViewType(ParserContext context,String viewType,JsonObject object,ViewGroup parent,int childIndex){
  return null;
}

Fixed version (ground truth):
@Override public ProteusView onUnknownViewType(ParserContext context,String viewType,JsonObject object,ViewGroup parent,int childIndex){
  return null;
}
Program: 28658
Project: 28658
Buggy source:
@Override public void addChildren(Context context,E parent,List<View> children){
  handler.addChildren(context,parent,children);
}

Fixed version (ground truth):
@Override public void addChildren(Context context,E parent,List<ProteusView> children){
  handler.addChildren(context,parent,children);
}
Program: 28659
Project: 28659
Buggy source:
@Override public void onRequestFinish(final BaseRequest<HomeResponse> request){
  MainActivity.this.getWindow().getDecorView().postDelayed(new Runnable(){
    @Override public void run(){
      HomeResponse response=request.getResponse();
      JsonObject layout=response.getResponse().getLayout();
      long startTimeMillis=System.currentTimeMillis();
      Log.d(TAG,"String_Node_Str" + startTimeMillis);
      LayoutBuilder builder=new DefaultLayoutBuilderFactory().createDataAndViewParsingLayoutBuilder(MainActivity.this,new GsonProvider(response.getResponse().getData()),new GsonProvider(response.getResponse().getViews()));
      builder.setListener(createCallback());
      FrameLayout container=new FrameLayout(MainActivity.this);
      View view=builder.build((ViewGroup)MainActivity.this.getWindow().getDecorView(),layout);
      long endTimeMillis=System.currentTimeMillis();
      Log.d(TAG,"String_Node_Str" + endTimeMillis);
      long timeTaken=endTimeMillis - startTimeMillis;
      Log.d(TAG,"String_Node_Str" + timeTaken + "String_Node_Str");
      Toast.makeText(MainActivity.this,"String_Node_Str" + timeTaken + "String_Node_Str",Toast.LENGTH_SHORT).show();
      ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
      if (view != null) {
        container.addView(view,layoutParams);
      }
      MainActivity.this.setContentView(container);
    }
  }
,0);
}

Fixed version (ground truth):
@Override public void onRequestFinish(final BaseRequest<HomeResponse> request){
  MainActivity.this.getWindow().getDecorView().postDelayed(new Runnable(){
    @Override public void run(){
      HomeResponse response=request.getResponse();
      JsonObject layout=response.getResponse().getLayout();
      long startTimeMillis=System.currentTimeMillis();
      Log.d(TAG,"String_Node_Str" + startTimeMillis);
      LayoutBuilder builder=new DefaultLayoutBuilderFactory().createDataParsingLayoutBuilder(MainActivity.this,new GsonProvider(response.getResponse().getData()));
      builder.setListener(createCallback());
      FrameLayout container=new FrameLayout(MainActivity.this);
      View view=builder.build((ViewGroup)MainActivity.this.getWindow().getDecorView(),layout);
      long endTimeMillis=System.currentTimeMillis();
      Log.d(TAG,"String_Node_Str" + endTimeMillis);
      long timeTaken=endTimeMillis - startTimeMillis;
      Log.d(TAG,"String_Node_Str" + timeTaken + "String_Node_Str");
      Toast.makeText(MainActivity.this,"String_Node_Str" + timeTaken + "String_Node_Str",Toast.LENGTH_SHORT).show();
      ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
      if (view != null) {
        container.addView(view,layoutParams);
      }
      MainActivity.this.setContentView(container);
    }
  }
,0);
}
Program: 28660
Project: 28660
Buggy source:
@Override public void run(){
  HomeResponse response=request.getResponse();
  JsonObject layout=response.getResponse().getLayout();
  long startTimeMillis=System.currentTimeMillis();
  Log.d(TAG,"String_Node_Str" + startTimeMillis);
  LayoutBuilder builder=new DefaultLayoutBuilderFactory().createDataAndViewParsingLayoutBuilder(MainActivity.this,new GsonProvider(response.getResponse().getData()),new GsonProvider(response.getResponse().getViews()));
  builder.setListener(createCallback());
  FrameLayout container=new FrameLayout(MainActivity.this);
  View view=builder.build((ViewGroup)MainActivity.this.getWindow().getDecorView(),layout);
  long endTimeMillis=System.currentTimeMillis();
  Log.d(TAG,"String_Node_Str" + endTimeMillis);
  long timeTaken=endTimeMillis - startTimeMillis;
  Log.d(TAG,"String_Node_Str" + timeTaken + "String_Node_Str");
  Toast.makeText(MainActivity.this,"String_Node_Str" + timeTaken + "String_Node_Str",Toast.LENGTH_SHORT).show();
  ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
  if (view != null) {
    container.addView(view,layoutParams);
  }
  MainActivity.this.setContentView(container);
}

Fixed version (ground truth):
@Override public void run(){
  HomeResponse response=request.getResponse();
  JsonObject layout=response.getResponse().getLayout();
  long startTimeMillis=System.currentTimeMillis();
  Log.d(TAG,"String_Node_Str" + startTimeMillis);
  LayoutBuilder builder=new DefaultLayoutBuilderFactory().createDataParsingLayoutBuilder(MainActivity.this,new GsonProvider(response.getResponse().getData()));
  builder.setListener(createCallback());
  FrameLayout container=new FrameLayout(MainActivity.this);
  View view=builder.build((ViewGroup)MainActivity.this.getWindow().getDecorView(),layout);
  long endTimeMillis=System.currentTimeMillis();
  Log.d(TAG,"String_Node_Str" + endTimeMillis);
  long timeTaken=endTimeMillis - startTimeMillis;
  Log.d(TAG,"String_Node_Str" + timeTaken + "String_Node_Str");
  Toast.makeText(MainActivity.this,"String_Node_Str" + timeTaken + "String_Node_Str",Toast.LENGTH_SHORT).show();
  ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
  if (view != null) {
    container.addView(view,layoutParams);
  }
  MainActivity.this.setContentView(container);
}
Program: 28662
Project: 28662
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  handler=new Handler();
  builder=DefaultLayoutBuilderFactory.createSimpleLayoutBuilder(getBaseContext());
  builder.setSynchronousRendering(true);
  startPollingServer(intent);
  return Service.START_STICKY;
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  handler=new Handler();
  builder=new DefaultLayoutBuilderFactory().createSimpleLayoutBuilder(getBaseContext());
  builder.setSynchronousRendering(true);
  startPollingServer(intent);
  return Service.START_STICKY;
}
Program: 28663
Project: 28663
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_parallax);
  if (savedInstanceState == null) {
    getFragmentManager().beginTransaction().add(R.id.content,new ParallaxFragment()).commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_parallax);
  if (savedInstanceState == null) {
    getSupportFragmentManager().beginTransaction().add(R.id.content,new ParallaxFragment()).commit();
  }
}
Program: 28664
Project: 28664
Buggy source:
@Override public void onClick(View v){
  getFragmentManager().beginTransaction().replace(android.R.id.content,new Fragment()).addToBackStack("String_Node_Str").commit();
}

Fixed version (ground truth):
@Override public void onClick(View v){
  getFragmentManager().beginTransaction().replace(R.id.content,new Fragment()).addToBackStack("String_Node_Str").commit();
}
Program: 28665
Project: 28665
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_parallax,container,false);
  ParallaxContainer parallaxContainer=(ParallaxContainer)view.findViewById(R.id.parallax_container);
  parallaxContainer.setLooping(true);
  parallaxContainer.setupChildren(inflater,R.layout.parallax_view_1,R.layout.parallax_view_2,R.layout.parallax_view_3,R.layout.parallax_view_4);
  view.findViewById(R.id.btn_new_frag).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      getFragmentManager().beginTransaction().replace(android.R.id.content,new Fragment()).addToBackStack("String_Node_Str").commit();
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_parallax,container,false);
  ParallaxContainer parallaxContainer=(ParallaxContainer)view.findViewById(R.id.parallax_container);
  parallaxContainer.setLooping(true);
  parallaxContainer.setupChildren(inflater,R.layout.parallax_view_1,R.layout.parallax_view_2,R.layout.parallax_view_3,R.layout.parallax_view_4);
  view.findViewById(R.id.btn_new_frag).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      getFragmentManager().beginTransaction().replace(R.id.content,new Fragment()).addToBackStack("String_Node_Str").commit();
    }
  }
);
  return view;
}
Program: 28666
Project: 28666
Buggy source:
protected View createViewOrFailQuietly(String name,String prefix,Context context,AttributeSet attrs){
  try {
    if (name.contains("String_Node_Str")) {
      name=FrameLayout.class.getCanonicalName();
    }
 else     if (name.contains("String_Node_Str")) {
      name=LinearLayout.class.getCanonicalName();
    }
 else     if (name.contains("String_Node_Str")) {
      name=ImageView.class.getCanonicalName();
    }
 else     if (name.contains("String_Node_Str")) {
      name=TextView.class.getCanonicalName();
    }
 else     if (name.contains("String_Node_Str")) {
      name=Space.class.getCanonicalName();
    }
    return LayoutInflater.from(context).createView(name,prefix,attrs);
  }
 catch (  Exception ignore) {
    return null;
  }
}

Fixed version (ground truth):
protected View createViewOrFailQuietly(String name,String prefix,Context context,AttributeSet attrs){
  try {
    return LayoutInflater.from(context).createView(name,prefix,attrs);
  }
 catch (  Exception ignore) {
    return null;
  }
}
Program: 28667
Project: 28667
Buggy source:
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mSolo=new Solo(getInstrumentation(),getActivity());
  mContext=getInstrumentation().getContext();
  playButton_=(Button)mSolo.getView(edu.vuum.mocca.R.id.play_button);
  outputTextView_=(TextView)mSolo.getView(edu.vuum.mocca.R.id.pingpong_output);
  getInstrumentation().callActivityOnStart(getActivity());
  getInstrumentation().callActivityOnResume(getActivity());
}

Fixed version (ground truth):
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mSolo=new Solo(getInstrumentation(),getActivity());
  mContext=getInstrumentation().getContext();
  playButton_=(Button)mSolo.getView(edu.vuum.mocca.R.id.play_button);
  outputTextView_=(TextView)mSolo.getView(edu.vuum.mocca.R.id.pingpong_output);
  getInstrumentation().runOnMainSync(new Runnable(){
    @Override public void run(){
      getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
    }
  }
);
  getInstrumentation().callActivityOnStart(getActivity());
  getInstrumentation().callActivityOnResume(getActivity());
}
Program: 28668
Project: 28668
Buggy source:
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mSolo=new Solo(getInstrumentation(),getActivity());
  mContext=getInstrumentation().getContext();
  playButton_=(Button)mSolo.getView(edu.vuum.mocca.R.id.play_button);
  outputTextView_=(TextView)mSolo.getView(edu.vuum.mocca.R.id.pingpong_output);
  getInstrumentation().callActivityOnStart(getActivity());
  getInstrumentation().callActivityOnResume(getActivity());
}

Fixed version (ground truth):
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mSolo=new Solo(getInstrumentation(),getActivity());
  mContext=getInstrumentation().getContext();
  playButton_=(Button)mSolo.getView(edu.vuum.mocca.R.id.play_button);
  outputTextView_=(TextView)mSolo.getView(edu.vuum.mocca.R.id.pingpong_output);
  getInstrumentation().runOnMainSync(new Runnable(){
    @Override public void run(){
      getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
    }
  }
);
  getInstrumentation().callActivityOnStart(getActivity());
  getInstrumentation().callActivityOnResume(getActivity());
}
Program: 28669
Project: 28669
Buggy source:
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mActivity=getActivity();
  mSolo=new Solo(getInstrumentation(),mActivity);
  mContext=getInstrumentation().getContext();
  EditText edit_=(EditText)mSolo.getView(edu.vuum.mocca.R.id.url);
  mSolo.clearEditText(edit_);
  mSolo.enterText(edit_,Options.TEST_URI);
  mExpected=BitmapFactory.decodeResource(mContext.getResources(),R.drawable.dougs);
  getInstrumentation().callActivityOnStart(mActivity);
  getInstrumentation().callActivityOnResume(mActivity);
  Thread.sleep(Options.SHORT_WAIT_TIME);
}

Fixed version (ground truth):
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mActivity=getActivity();
  mSolo=new Solo(getInstrumentation(),mActivity);
  mContext=getInstrumentation().getContext();
  EditText edit_=(EditText)mSolo.getView(edu.vuum.mocca.R.id.url);
  mSolo.clearEditText(edit_);
  mSolo.enterText(edit_,Options.TEST_URI);
  mExpected=BitmapFactory.decodeResource(mContext.getResources(),R.drawable.dougs);
  getInstrumentation().callActivityOnStart(mActivity);
  getInstrumentation().callActivityOnResume(mActivity);
  getInstrumentation().runOnMainSync(new Runnable(){
    @Override public void run(){
      getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
    }
  }
);
  Thread.sleep(Options.SHORT_WAIT_TIME);
}
Program: 28670
Project: 28670
Buggy source:
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mActivity=getActivity();
  mSolo=new Solo(getInstrumentation(),mActivity);
  mContext=getInstrumentation().getContext();
  EditText edit_=(EditText)mSolo.getView(edu.vuum.mocca.R.id.url);
  mSolo.clearEditText(edit_);
  mSolo.enterText(edit_,Options.TEST_URI);
  mExpected=BitmapFactory.decodeResource(mContext.getResources(),R.drawable.dougs);
  getInstrumentation().callActivityOnStart(mActivity);
  getInstrumentation().callActivityOnResume(mActivity);
  Thread.sleep(Options.SHORT_WAIT_TIME);
}

Fixed version (ground truth):
/** 
 * Called before each test is run to perform the initialization.
 */
public void setUp() throws Exception {
  super.setUp();
  mActivity=getActivity();
  mSolo=new Solo(getInstrumentation(),mActivity);
  mContext=getInstrumentation().getContext();
  EditText edit_=(EditText)mSolo.getView(edu.vuum.mocca.R.id.url);
  mSolo.clearEditText(edit_);
  mSolo.enterText(edit_,Options.TEST_URI);
  mExpected=BitmapFactory.decodeResource(mContext.getResources(),R.drawable.dougs);
  getInstrumentation().callActivityOnStart(mActivity);
  getInstrumentation().callActivityOnResume(mActivity);
  getInstrumentation().runOnMainSync(new Runnable(){
    @Override public void run(){
      getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
    }
  }
);
  Thread.sleep(Options.SHORT_WAIT_TIME);
}
Program: 28671
Project: 28671
Buggy source:
/** 
 * Return one permit to the semaphore.
 */
void release(){
}

Fixed version (ground truth):
/** 
 * Return one permit to the semaphore.
 */
public void release(){
}
Program: 28672
Project: 28672
Buggy source:
/** 
 * Download the designated image and reply to the DownloadActivity via the Messenger sent with the Intent.
 */
private void downloadImageAndReply(Intent intent){
  String pathname=downloadImage(DownloadService.this,intent.getData().toString());
  Messenger messenger=(Messenger)intent.getExtras().get("String_Node_Str");
  sendPath(messenger,pathname);
}

Fixed version (ground truth):
/** 
 * Retrieves the designated image and reply to the DownloadActivity via the Messenger sent with the Intent.
 */
private void downloadImageAndReply(Intent intent){
  String pathname=downloadImage(DownloadService.this,intent.getData().toString());
  Messenger messenger=(Messenger)intent.getExtras().get("String_Node_Str");
  sendPath(messenger,pathname);
}
Program: 28673
Project: 28673
Buggy source:
/** 
 * / This hook method is dispatched in response to receiving the pathname back from the DownloadService.
 */
public void handleMessage(Message msg){
  Bundle data=msg.getData();
  String pathname=data.getString("String_Node_Str");
  if (msg.arg1 != RESULT_OK || pathname == null)   showDialog("String_Node_Str");
  dismissDialog();
  displayImage(BitmapFactory.decodeFile(pathname));
}

Fixed version (ground truth):
/** 
 * / This hook method is dispatched in response to receiving the pathname back from the DownloadService.
 */
public void handleMessage(Message msg){
  DownloadActivity activity=mActivity.get();
  Bundle data=msg.getData();
  String pathname=data.getString("String_Node_Str");
  if (msg.arg1 != RESULT_OK || pathname == null)   activity.showDialog("String_Node_Str");
  activity.dismissDialog();
  activity.displayImage(BitmapFactory.decodeFile(pathname));
}
Program: 28674
Project: 28674
Buggy source:
/** 
 * Hook method called when DownloadService is first launched by the Android ActivityManager.
 */
public void onCreate(){
  super.onCreate();
  HandlerThread thread=new HandlerThread("String_Node_Str");
  thread.start();
  mServiceLooper=thread.getLooper();
  mServiceHandler=new ServiceHandler(mServiceLooper,this);
}

Fixed version (ground truth):
/** 
 * Hook method called when DownloadService is first launched by the Android ActivityManager.
 */
public void onCreate(){
  super.onCreate();
  HandlerThread thread=new HandlerThread("String_Node_Str");
  thread.start();
  mServiceLooper=thread.getLooper();
  mServiceHandler=new ServiceHandler(mServiceLooper);
}
Program: 28675
Project: 28675
Buggy source:
/** 
 * Class constructor constructs mActivity as weak reference to the activity
 * @param Looper The Looper that we borrow from HandlerThread.
 * @param service The corresponding service
 */
public ServiceHandler(Looper looper,DownloadService service){
  super(looper);
  mService=new WeakReference<DownloadService>(service);
}

Fixed version (ground truth):
/** 
 * Class constructor initializes the Looper.
 * @param Looper The Looper that we borrow from HandlerThread.
 */
public ServiceHandler(Looper looper){
  super(looper);
}
Program: 28676
Project: 28676
Buggy source:
/** 
 * Process the specified Messages passed to MessageHandler in the UI Thread. These Messages instruct the Handler to start showing the progress dialog, dismiss it, or display the designated bitmap image via the ImageView.
 */
public void handleMessage(Message msg){
  if (mActivity.get() == null)   return;
switch (msg.what) {
case SHOW_DIALOG:
    mActivity.get().showDialog("String_Node_Str");
  break;
case DISMISS_DIALOG:
mActivity.get().dismissDialog();
break;
case DISPLAY_IMAGE:
mActivity.get().displayImage((Bitmap)msg.obj);
break;
}
}

Fixed version (ground truth):
/** 
 * Process the specified Messages passed to MessageHandler in the UI Thread. These Messages instruct the Handler to start showing the progress dialog, dismiss it, or display the designated bitmap image via the ImageView.
 */
public void handleMessage(Message msg){
  ThreadedDownloads activity=mActivity.get();
  if (activity == null)   return;
switch (msg.what) {
case SHOW_DIALOG:
    activity.showDialog("String_Node_Str");
  break;
case DISMISS_DIALOG:
activity.dismissDialog();
break;
case DISPLAY_IMAGE:
activity.displayImage((Bitmap)msg.obj);
break;
}
}
Program: 28677
Project: 28677
Buggy source:
/** 
 * Main entry point method into the test program.
 */
public static void main(String argv[]){
  System.out.println("String_Node_Str");
  int queueSize=SynchronizedQueue.mMaxIterations / 10;
  SynchronizedQueue.mQueue=new QueueAdapter<Integer>(new ArrayBlockingQueue<Integer>(queueSize));
  testQueue("String_Node_Str",SynchronizedQueue.mQueue);
  SynchronizedQueue.mQueue=new QueueAdapter<Integer>(new BuggyBlockingQueue<Integer>(queueSize));
  testQueue("String_Node_Str",SynchronizedQueue.mQueue);
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Main entry point method into the test program.
 */
public static void main(String argv[]){
  System.out.println("String_Node_Str");
  int queueSize=SynchronizedQueue.mMaxIterations / 10;
  QueueAdapter<Integer> queue=new QueueAdapter<Integer>(new ArrayBlockingQueue<Integer>(queueSize));
  testQueue("String_Node_Str",queue);
  queue=new QueueAdapter<Integer>(new BuggyBlockingQueue<Integer>(queueSize));
  testQueue("String_Node_Str",queue);
  System.out.println("String_Node_Str");
}
Program: 28678
Project: 28678
Buggy source:
/** 
 * Run the test for the queue parameter.
 */
@SuppressWarnings("String_Node_Str") public static SynchronizedQueueResult testQueue(QueueAdapter<Integer> queue){
  try {
    Thread consumer=null;
    Thread producer=null;
    Thread.sleep(100);
    if (consumer == null || producer == null)     return SynchronizedQueueResult.THREADS_NEVER_CREATED;
 else     if (consumer.isAlive() || producer.isAlive())     return SynchronizedQueueResult.JOIN_NEVER_CALLED;
 else     if (mConsumerCounter == 0 || mProducerCounter == 0)     return SynchronizedQueueResult.THREADS_NEVER_RAN;
 else     if (mConsumerCounter == mMaxIterations || mProducerCounter == mMaxIterations)     return SynchronizedQueueResult.THREADS_NEVER_INTERUPTED;
 else     if (mConsumerCounter == FAILURE_OCCURRED || mProducerCounter == FAILURE_OCCURRED)     return SynchronizedQueueResult.THREADS_THREW_EXCEPTION;
 else     if (mConsumerCounter == TIMEOUT_OCCURRED || mProducerCounter == TIMEOUT_OCCURRED)     return SynchronizedQueueResult.THREADS_TIMEDOUT;
 else     return SynchronizedQueueResult.RAN_PROPERLY;
  }
 catch (  Exception e) {
    return SynchronizedQueueResult.TESTING_LOGIC_THREW_EXCEPTION;
  }
}

Fixed version (ground truth):
/** 
 * Run the test for the queue parameter.
 */
public static SynchronizedQueueResult testQueue(QueueAdapter<Integer> queue){
  try {
    mQueue=queue;
    Thread consumer=null;
    Thread producer=null;
    Thread.sleep(100);
    if (consumer == null || producer == null)     return SynchronizedQueueResult.THREADS_NEVER_CREATED;
 else     if (consumer.isAlive() || producer.isAlive())     return SynchronizedQueueResult.JOIN_NEVER_CALLED;
 else     if (mConsumerCounter == 0 || mProducerCounter == 0)     return SynchronizedQueueResult.THREADS_NEVER_RAN;
 else     if (mConsumerCounter == mMaxIterations || mProducerCounter == mMaxIterations)     return SynchronizedQueueResult.THREADS_NEVER_INTERUPTED;
 else     if (mConsumerCounter == FAILURE_OCCURRED || mProducerCounter == FAILURE_OCCURRED)     return SynchronizedQueueResult.THREADS_THREW_EXCEPTION;
 else     if (mConsumerCounter == TIMEOUT_OCCURRED || mProducerCounter == TIMEOUT_OCCURRED)     return SynchronizedQueueResult.THREADS_TIMEDOUT;
 else     return SynchronizedQueueResult.RAN_PROPERLY;
  }
 catch (  Exception e) {
    return SynchronizedQueueResult.TESTING_LOGIC_THREW_EXCEPTION;
  }
}