nus-yam/ex-repair huggingface dataset:
Program: 143580
Project: 143580
Buggy source:
@SuppressWarnings("String_Node_Str") protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean hasHtmlOrImage=hasHtmlOrImage();
  String cssid=hasHtmlOrImage ? getMarkupId() + "String_Node_Str" : null;
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  int anchor=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str")) ? anchors : 0;
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(this,bodyText,halign,valign,hasHtmlOrImage,border,null,cssid,(char)getDisplayedMnemonic(),getMarkupId(),WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,false,anchor));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean hasHtmlOrImage=hasHtmlOrImage();
  String cssid=hasHtmlOrImage ? getMarkupId() + "String_Node_Str" : null;
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  int anchor=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str")) ? anchors : 0;
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtmlOrImage,border,null,cssid,(char)getDisplayedMnemonic(),getMarkupId(),WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,false,anchor));
}
Program: 143581
Project: 143581
Buggy source:
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean hasHtmlOrImage=hasHtmlOrImage();
  String cssid=getCSSId();
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  int anchor=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str")) ? anchors : 0;
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(this,bodyText,halign,valign,hasHtmlOrImage,border,margin,cssid,(char)getDisplayedMnemonic(),getMarkupId(),WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,isAnchored(),anchor));
}

Fixed version (ground truth):
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean hasHtmlOrImage=hasHtmlOrImage();
  String cssid=getCSSId();
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  int anchor=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str")) ? anchors : 0;
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtmlOrImage,border,margin,cssid,(char)getDisplayedMnemonic(),getMarkupId(),WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,isAnchored(),anchor));
}
Program: 143582
Project: 143582
Buggy source:
@Override protected void destroySolutionSettings(){
  super.destroySolutionSettings();
  Session.get().setMetaData(Session.PAGEMAP_ACCESS_MDK,null);
}

Fixed version (ground truth):
@Override protected void destroySolutionSettings(){
  super.destroySolutionSettings();
  if (RequestCycle.get() != null)   Session.get().setMetaData(Session.PAGEMAP_ACCESS_MDK,null);
}
Program: 143583
Project: 143583
Buggy source:
public void destroy(){
  getListModelWrapper().deregister();
  removeKeyListener(navigationKeyListener);
}

Fixed version (ground truth):
public void destroy(){
  getListModelWrapper().deregister();
}
Program: 143586
Project: 143586
Buggy source:
/** 
 * Overwritten for handling statefull dates. So we can merge dates from the selected element in the list with the orignal date
 */
@Override public void setSelectedIndex(int anIndex){
  int size=dataModel.getSize();
  if (anIndex == -1) {
    setSelectedItem(null);
  }
 else   if (anIndex >= size) {
    throw new IllegalArgumentException("String_Node_Str" + anIndex + "String_Node_Str");
  }
 else {
    Object value=dataModel.getElementAt(anIndex);
    if (IValueList.SEPARATOR.equals(value)) {
      boolean found=false;
      int i=1;
      while (!found && (anIndex + i < size || anIndex - i >= 0)) {
        if (anIndex + i < size && !IValueList.SEPARATOR.equals(dataModel.getElementAt(anIndex + i))) {
          found=true;
          setSelectedIndex(anIndex + i);
        }
 else         if (anIndex - i >= 0 && !IValueList.SEPARATOR.equals(dataModel.getElementAt(anIndex - i))) {
          found=true;
          setSelectedIndex(anIndex - i);
        }
        i++;
      }
      if (!found) {
        setSelectedItem(-1);
      }
    }
 else {
      if (value instanceof Date && format instanceof StateFullSimpleDateFormat) {
        StateFullSimpleDateFormat sfsd=(StateFullSimpleDateFormat)format;
        String stringRep=sfsd.format(value);
        try {
          sfsd.parse(stringRep);
          value=sfsd.getMergedDate();
        }
 catch (        ParseException e) {
          Debug.error(e);
        }
      }
      setSelectedItem(value);
    }
  }
}

Fixed version (ground truth):
/** 
 * Overwritten for handling statefull dates. So we can merge dates from the selected element in the list with the orignal date
 */
@Override public void setSelectedIndex(int anIndex){
  int size=dataModel.getSize();
  if (anIndex == -1) {
    setSelectedItem(null);
  }
 else   if (anIndex >= size) {
    throw new IllegalArgumentException("String_Node_Str" + anIndex + "String_Node_Str");
  }
 else {
    Object value=dataModel.getElementAt(anIndex);
    if (value instanceof Date && format instanceof StateFullSimpleDateFormat) {
      StateFullSimpleDateFormat sfsd=(StateFullSimpleDateFormat)format;
      String stringRep=sfsd.format(value);
      try {
        sfsd.parse(stringRep);
        value=sfsd.getMergedDate();
      }
 catch (      ParseException e) {
        Debug.error(e);
      }
    }
    setSelectedItem(value);
  }
}
Program: 143587
Project: 143587
Buggy source:
@Override public void setSelectionInterval(int index0,int index1){
  int leftInd=index0;
  int rightInd=index1;
  if (isNavigationKeyOn) {
    Object x=getListModelWrapper().get(index0);
    if (x == IValueList.SEPARATOR) {
      int index=getMinSelectionIndex();
      if (index < index0) {
        leftInd++;
        rightInd++;
      }
 else {
        leftInd--;
        rightInd--;
      }
    }
  }
  super.setSelectionInterval(leftInd,rightInd);
}

Fixed version (ground truth):
@Override public void setSelectionInterval(int index0,int index1){
  int leftInd=index0;
  int rightInd=index1;
  Object x=getListModelWrapper().get(index0);
  if (x == IValueList.SEPARATOR) {
    if (lastPopupHighlightRequested != index0) {
      int index=getMinSelectionIndex();
      if (index < index0) {
        leftInd++;
        rightInd++;
      }
 else {
        leftInd--;
        rightInd--;
      }
      super.setSelectionInterval(leftInd,rightInd);
    }
  }
 else   super.setSelectionInterval(leftInd,rightInd);
  lastPopupHighlightRequested=index0;
}
Program: 143588
Project: 143588
Buggy source:
/** 
 * @see com.servoy.j2db.util.ITabPaneAlike#insertTab(java.lang.String,java.lang.String,javax.swing.Icon,java.awt.Component,java.lang.String,int)
 */
public void insertTab(String name,String text,Icon icon,Component flp,String tooltip,int index){
  setTitleAt(index,text);
  add(flp,Integer.toString(index),index);
  if (flp instanceof JComponent) {
    JComponent jFLP=(JComponent)flp;
    jFLP.setOpaque(isOpaque());
  }
  if (selectedTab == -1) {
    setSelectedIndex(0);
  }
  if (tooltip != null) {
    ((JComponent)flp).setToolTipText(tooltip);
  }
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      getParent().validate();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see com.servoy.j2db.util.ITabPaneAlike#insertTab(java.lang.String,java.lang.String,javax.swing.Icon,java.awt.Component,java.lang.String,int)
 */
public void insertTab(String name,String text,Icon icon,Component flp,String tooltip,int index){
  setTitleAt(index,text);
  ArrayList<Component> nextComponents=new ArrayList<Component>();
  nextComponents.add(flp);
  int componentCount=getComponentCount();
  for (int i=index; i < componentCount; i++) {
    nextComponents.add(getComponent(index));
    remove(index);
  }
  for (  Component c : nextComponents)   add(c,((IFormLookupPanel)c).getFormName() + "String_Node_Str" + System.currentTimeMillis());
  if (flp instanceof JComponent) {
    JComponent jFLP=(JComponent)flp;
    jFLP.setOpaque(isOpaque());
  }
  if (selectedTab == -1) {
    setSelectedIndex(0);
  }
  if (tooltip != null) {
    ((JComponent)flp).setToolTipText(tooltip);
  }
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      getParent().validate();
    }
  }
);
}
Program: 143589
Project: 143589
Buggy source:
/** 
 * @return true if it was triggered by initial show, in which case the callbacks shouldn't be called.
 */
protected boolean move(AjaxRequestTarget target){
  Request request=RequestCycle.get().getRequest();
  bounds.x=Integer.parseInt(request.getParameter("String_Node_Str"));
  bounds.y=Integer.parseInt(request.getParameter("String_Node_Str"));
  return "String_Node_Str".equals(request.getParameter("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * @return true if it was not triggered by initial show or other operations for which the callback shouldn't be called.
 */
protected boolean move(AjaxRequestTarget target){
  Request request=RequestCycle.get().getRequest();
  bounds.x=Integer.parseInt(request.getParameter("String_Node_Str"));
  bounds.y=Integer.parseInt(request.getParameter("String_Node_Str"));
  return !("String_Node_Str".equals(request.getParameter("String_Node_Str")));
}
Program: 143590
Project: 143590
Buggy source:
public void setBounds(AjaxRequestTarget target,int x,int y,int width,int height){
  target.appendJavascript(getActionJavascript("String_Node_Str",((x >= 0) ? ("String_Node_Str" + x + "String_Node_Str") : "String_Node_Str") + "String_Node_Str" + ((y >= 0) ? ("String_Node_Str" + y + "String_Node_Str") : "String_Node_Str")+ "String_Node_Str"+ ((width >= 0) ? ("String_Node_Str" + width + "String_Node_Str") : "String_Node_Str")+ "String_Node_Str"+ ((height >= 0) ? ("String_Node_Str" + height + "String_Node_Str") : "String_Node_Str")));
}

Fixed version (ground truth):
public void setBounds(AjaxRequestTarget target,int x,int y,int width,int height){
  target.appendJavascript(getActionJavascript("String_Node_Str",((x >= 0) ? ("String_Node_Str" + x + "String_Node_Str") : "String_Node_Str") + "String_Node_Str" + ((y >= 0) ? ("String_Node_Str" + y + "String_Node_Str") : "String_Node_Str")+ "String_Node_Str"+ ((width >= 0) ? ("String_Node_Str" + width + "String_Node_Str") : "String_Node_Str")+ "String_Node_Str"+ ((height >= 0) ? ("String_Node_Str" + height + "String_Node_Str") : "String_Node_Str")));
  bounds.x=x;
  bounds.y=y;
  bounds.width=width;
  bounds.height=height;
}
Program: 143591
Project: 143591
Buggy source:
/** 
 * @return true if it was triggered by initial show, in which case the callbacks shouldn't be called.
 */
protected boolean resize(AjaxRequestTarget target){
  Request request=RequestCycle.get().getRequest();
  bounds.width=Integer.parseInt(request.getParameter("String_Node_Str"));
  bounds.height=Integer.parseInt(request.getParameter("String_Node_Str"));
  return "String_Node_Str".equals(request.getParameter("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * @return true if it was not triggered by initial show or other operations for which the callback shouldn't be called.
 */
protected boolean resize(AjaxRequestTarget target){
  Request request=RequestCycle.get().getRequest();
  bounds.width=Integer.parseInt(request.getParameter("String_Node_Str"));
  bounds.height=Integer.parseInt(request.getParameter("String_Node_Str"));
  return !("String_Node_Str".equals(request.getParameter("String_Node_Str")));
}
Program: 143594
Project: 143594
Buggy source:
/** 
 * @see com.servoy.j2db.smart.J2DBClient#shutDown(boolean)
 */
@Override public void shutDown(boolean force){
  shutDown=true;
  try {
    Solution solution=getSolution();
    if (solution != null) {
      if (!closeSolution(force,null) && !force) {
        shutDown=false;
        return;
      }
    }
    logout(null);
    if (unitTestsRunning) {
      repository=null;
      applicationServerAccess=null;
    }
  }
 catch (  Exception ex) {
    Debug.error(ex);
  }
  getMainApplicationFrame().setVisible(false);
  saveSettings();
}

Fixed version (ground truth):
/** 
 * @see com.servoy.j2db.smart.J2DBClient#shutDown(boolean)
 */
@Override public void shutDown(boolean force){
  shutDown=true;
  try {
    Solution solution=getSolution();
    if (solution != null) {
      if (!closeSolution(force,null) && !force) {
        shutDown=false;
        return;
      }
    }
    logout(null);
    if (unitTestsRunning) {
      repository=null;
      applicationServerAccess=null;
    }
  }
 catch (  Exception ex) {
    Debug.error(ex);
  }
  Window[] ownedWindows=getMainApplicationFrame().getOwnedWindows();
  if (ownedWindows != null) {
    for (    Window w : ownedWindows)     w.dispose();
  }
  getMainApplicationFrame().setVisible(false);
  saveSettings();
}
Program: 143596
Project: 143596
Buggy source:
/** 
 * @param message
 * @param errorDetail
 */
@SuppressWarnings("String_Node_Str") private void errorToDebugger(String message,Object errorDetail){
  Object detail=errorDetail;
  RemoteDebugScriptEngine engine=(RemoteDebugScriptEngine)getScriptEngine();
  if (engine != null) {
    DBGPDebugger debugger=engine.getDebugger();
    if (debugger != null) {
      RhinoException rhinoException=null;
      if (detail instanceof Exception) {
        Throwable exception=(Exception)detail;
        while (exception != null) {
          if (exception instanceof RhinoException) {
            rhinoException=(RhinoException)exception;
            break;
          }
          exception=exception.getCause();
        }
      }
      String msg=message;
      if (rhinoException != null) {
        if (msg == null) {
          msg=rhinoException.getLocalizedMessage();
        }
 else         msg+='\n' + rhinoException.getLocalizedMessage();
        msg+='\n' + rhinoException.getScriptStackTrace();
      }
 else       if (detail instanceof Exception) {
        Object e=((Exception)detail).getCause();
        if (e != null) {
          detail=e;
        }
        msg+="String_Node_Str" + detail.toString();
      }
 else       if (detail != null) {
        msg+="String_Node_Str" + detail;
      }
      debugger.outputStdErr(msg.toString() + '\n');
    }
  }
}

Fixed version (ground truth):
/** 
 * @param message
 * @param errorDetail
 */
@SuppressWarnings("String_Node_Str") protected void errorToDebugger(String message,Object errorDetail){
  Object detail=errorDetail;
  RemoteDebugScriptEngine engine=(RemoteDebugScriptEngine)getScriptEngine();
  if (engine != null) {
    DBGPDebugger debugger=engine.getDebugger();
    if (debugger != null) {
      RhinoException rhinoException=null;
      if (detail instanceof Exception) {
        Throwable exception=(Exception)detail;
        while (exception != null) {
          if (exception instanceof RhinoException) {
            rhinoException=(RhinoException)exception;
            break;
          }
          exception=exception.getCause();
        }
      }
      String msg=message;
      if (rhinoException != null) {
        if (msg == null) {
          msg=rhinoException.getLocalizedMessage();
        }
 else         msg+='\n' + rhinoException.getLocalizedMessage();
        msg+='\n' + rhinoException.getScriptStackTrace();
      }
 else       if (detail instanceof Exception) {
        Object e=((Exception)detail).getCause();
        if (e != null) {
          detail=e;
        }
        msg+="String_Node_Str" + detail.toString();
      }
 else       if (detail != null) {
        msg+="String_Node_Str" + detail;
      }
      debugger.outputStdErr(msg.toString() + '\n');
    }
  }
}
Program: 143597
Project: 143597
Buggy source:
public String getFullSignature(boolean withNames,boolean withTypes,Map<String,String> typeTranslationMap);

Fixed version (ground truth):
public String getFullSignature(boolean withNames,boolean withTypes);
Program: 143598
Project: 143598
Buggy source:
String getType();

Fixed version (ground truth):
/** 
 * Get the java-script type name. It is constructed based on a tranlation to documented java class combined with on ServoyDocumented annotation public name or simple class name.<br> For example int => type = Number, IRuntimeComponent.class realType => RuntimeComponent, Foundset.class => JSFoundset, JSDataSet.class => JSDataSet, boolean[] => Boolean[] and so on.
 */
String getType();
Program: 143601
Project: 143601
Buggy source:
public void setToolTipText(String tooltip){
  if (!properties.containsKey(PROPERTY.TOOLTIP)) {
    properties.put(PROPERTY.TOOLTIP,renderable.getToolTipText());
  }
  renderable.setToolTipText(tooltip);
}

Fixed version (ground truth):
public void setToolTipText(String tooltip){
  if (!properties.containsKey(PROPERTY_TOOLTIP)) {
    properties.put(PROPERTY_TOOLTIP,renderable.getToolTipText());
  }
  renderable.setToolTipText(tooltip);
}
Program: 143602
Project: 143602
Buggy source:
public void setTransparent(boolean b){
  if (!properties.containsKey(PROPERTY.TRANSPARENT)) {
    properties.put(PROPERTY.TRANSPARENT,Boolean.valueOf(renderable.isTransparent()));
  }
  renderable.setTransparent(b);
}

Fixed version (ground truth):
public void setTransparent(boolean b){
  if (!properties.containsKey(PROPERTY_TRANSPARENT)) {
    properties.put(PROPERTY_TRANSPARENT,Boolean.valueOf(renderable.isTransparent()));
  }
  renderable.setTransparent(b);
}
Program: 143603
Project: 143603
Buggy source:
/** 
 * IMPORTANT: This method should only be called while onRender is being fired. See SVY-2571.
 */
void resetProperties(){
  Iterator<PROPERTY> propertiesIte=properties.keySet().iterator();
  while (propertiesIte.hasNext()) {
switch (propertiesIte.next()) {
case BGCOLOR:
      renderable.setBgcolor((String)properties.get(PROPERTY.BGCOLOR));
    break;
case BORDER:
  renderable.setBorder((String)properties.get(PROPERTY.BORDER));
break;
case ENABLED:
renderable.setEnabled(((Boolean)properties.get(PROPERTY.ENABLED)).booleanValue());
break;
case FGCOLOR:
renderable.setFgcolor((String)properties.get(PROPERTY.FGCOLOR));
break;
case FONT:
renderable.setFont((String)properties.get(PROPERTY.FONT));
break;
case TOOLTIP:
renderable.setToolTipText((String)properties.get(PROPERTY.TOOLTIP));
break;
case TRANSPARENT:
renderable.setTransparent(((Boolean)properties.get(PROPERTY.TRANSPARENT)).booleanValue());
break;
case VISIBLE:
renderable.setVisible(((Boolean)properties.get(PROPERTY.VISIBLE)).booleanValue());
break;
case FORMAT:
if (renderable instanceof HasRuntimeFormat) {
((HasRuntimeFormat)renderable).setFormat((String)properties.get(PROPERTY.FORMAT));
}
break;
}
}
properties.clear();
}

Fixed version (ground truth):
/** 
 * IMPORTANT: This method should only be called while onRender is being fired. See SVY-2571.
 */
void resetProperties(){
  Iterator<String> propertiesIte=properties.keySet().iterator();
  String property;
  while (propertiesIte.hasNext()) {
    property=propertiesIte.next();
    if (PROPERTY_BGCOLOR.equals(property)) {
      renderable.setBgcolor((String)properties.get(PROPERTY_BGCOLOR));
    }
 else     if (PROPERTY_BORDER.equals(property)) {
      renderable.setBorder((String)properties.get(PROPERTY_BORDER));
    }
 else     if (PROPERTY_ENABLED.equals(property)) {
      renderable.setEnabled(((Boolean)properties.get(PROPERTY_ENABLED)).booleanValue());
    }
 else     if (PROPERTY_FGCOLOR.equals(property)) {
      renderable.setFgcolor((String)properties.get(PROPERTY_FGCOLOR));
    }
 else     if (PROPERTY_FONT.equals(property)) {
      renderable.setFont((String)properties.get(PROPERTY_FONT));
    }
 else     if (PROPERTY_TOOLTIP.equals(property)) {
      renderable.setToolTipText((String)properties.get(PROPERTY_TOOLTIP));
    }
 else     if (PROPERTY_TRANSPARENT.equals(property)) {
      renderable.setTransparent(((Boolean)properties.get(PROPERTY_TRANSPARENT)).booleanValue());
    }
 else     if (PROPERTY_VISIBLE.equals(property)) {
      renderable.setVisible(((Boolean)properties.get(PROPERTY_VISIBLE)).booleanValue());
    }
 else     if (PROPERTY_FORMAT.equals(property)) {
      if (renderable instanceof HasRuntimeFormat) {
        ((HasRuntimeFormat)renderable).setFormat((String)properties.get(PROPERTY_FORMAT));
      }
    }
  }
  properties.clear();
}
Program: 143604
Project: 143604
Buggy source:
public void clearProperty(RenderableWrapper.PROPERTY property){
  properties.remove(property);
}

Fixed version (ground truth):
public void clearProperty(String property){
  properties.remove(property);
}
Program: 143605
Project: 143605
Buggy source:
public void setFormat(String format){
  if (renderable instanceof HasRuntimeFormat) {
    if (!properties.containsKey(PROPERTY.FORMAT)) {
      properties.put(PROPERTY.FORMAT,((HasRuntimeFormat)renderable).getFormat());
    }
    ((HasRuntimeFormat)renderable).setFormat(format);
  }
}

Fixed version (ground truth):
public void setFormat(String format){
  if (renderable instanceof HasRuntimeFormat) {
    if (!properties.containsKey(PROPERTY_FORMAT)) {
      properties.put(PROPERTY_FORMAT,((HasRuntimeFormat)renderable).getFormat());
    }
    ((HasRuntimeFormat)renderable).setFormat(format);
  }
}
Program: 143606
Project: 143606
Buggy source:
public void setFont(String spec){
  if (!properties.containsKey(PROPERTY.FONT)) {
    properties.put(PROPERTY.FONT,renderable.getFont());
  }
  renderable.setFont(spec);
}

Fixed version (ground truth):
public void setFont(String spec){
  if (!properties.containsKey(PROPERTY_FONT)) {
    properties.put(PROPERTY_FONT,renderable.getFont());
  }
  renderable.setFont(spec);
}
Program: 143607
Project: 143607
Buggy source:
public void setVisible(boolean b){
  if (!properties.containsKey(PROPERTY.VISIBLE)) {
    properties.put(PROPERTY.VISIBLE,Boolean.valueOf(renderable.isVisible()));
  }
  renderable.setVisible(b);
}

Fixed version (ground truth):
public void setVisible(boolean b){
  if (!properties.containsKey(PROPERTY_VISIBLE)) {
    properties.put(PROPERTY_VISIBLE,Boolean.valueOf(renderable.isVisible()));
  }
  renderable.setVisible(b);
}
Program: 143608
Project: 143608
Buggy source:
public void setFgcolor(String clr){
  if (!properties.containsKey(PROPERTY.FGCOLOR)) {
    properties.put(PROPERTY.FGCOLOR,renderable.getFgcolor());
  }
  renderable.setFgcolor(clr);
}

Fixed version (ground truth):
public void setFgcolor(String clr){
  if (!properties.containsKey(PROPERTY_FGCOLOR)) {
    properties.put(PROPERTY_FGCOLOR,renderable.getFgcolor());
  }
  renderable.setFgcolor(clr);
}
Program: 143609
Project: 143609
Buggy source:
public void setEnabled(boolean b){
  if (!properties.containsKey(PROPERTY.ENABLED)) {
    properties.put(PROPERTY.ENABLED,Boolean.valueOf(renderable.isEnabled()));
  }
  renderable.setEnabled(b);
}

Fixed version (ground truth):
public void setEnabled(boolean b){
  if (!properties.containsKey(PROPERTY_ENABLED)) {
    properties.put(PROPERTY_ENABLED,Boolean.valueOf(renderable.isEnabled()));
  }
  renderable.setEnabled(b);
}
Program: 143610
Project: 143610
Buggy source:
public void setBorder(String spec){
  if (!properties.containsKey(PROPERTY.BORDER)) {
    properties.put(PROPERTY.BORDER,renderable.getBorder());
  }
  renderable.setBorder(spec);
}

Fixed version (ground truth):
public void setBorder(String spec){
  if (!properties.containsKey(PROPERTY_BORDER)) {
    properties.put(PROPERTY_BORDER,renderable.getBorder());
  }
  renderable.setBorder(spec);
}
Program: 143611
Project: 143611
Buggy source:
public void setBgcolor(String clr){
  if (!properties.containsKey(PROPERTY.BGCOLOR)) {
    properties.put(PROPERTY.BGCOLOR,renderable.getBgcolor());
  }
  renderable.setBgcolor(clr);
}

Fixed version (ground truth):
public void setBgcolor(String clr){
  if (!properties.containsKey(PROPERTY_BGCOLOR)) {
    properties.put(PROPERTY_BGCOLOR,renderable.getBgcolor());
  }
  renderable.setBgcolor(clr);
}
Program: 143612
Project: 143612
Buggy source:
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    fireOnRender();
  }
}

Fixed version (ground truth):
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    RenderEventExecutor renderEventExecutor=getRenderEventExecutor();
    IScriptRenderMethods renderable=getRenderable();
    if (renderEventExecutor != null && !renderEventExecutor.isOnRenderExecuting() && renderable instanceof RenderableWrapper) {
      ((RenderableWrapper)renderable).clearProperty(RenderableWrapper.PROPERTY_FORMAT);
    }
    fireOnRender();
  }
}
Program: 143613
Project: 143613
Buggy source:
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    fireOnRender();
  }
}

Fixed version (ground truth):
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    RenderEventExecutor renderEventExecutor=getRenderEventExecutor();
    IScriptRenderMethods renderable=getRenderable();
    if (renderEventExecutor != null && !renderEventExecutor.isOnRenderExecuting() && renderable instanceof RenderableWrapper) {
      ((RenderableWrapper)renderable).clearProperty(RenderableWrapper.PROPERTY_FORMAT);
    }
    fireOnRender();
  }
}
Program: 143614
Project: 143614
Buggy source:
@Override protected void propertyChanged(String propertyName,Object newValue,Object oldValue){
  if (propertiesToListenTo.contains(propertyName)) {
    fireOnRender();
  }
}

Fixed version (ground truth):
@Override protected void propertyChanged(String propertyName,Object newValue,Object oldValue){
  if (propertiesToListenTo.contains(propertyName)) {
    if (!renderEventExecutor.isOnRenderExecuting())     renderable.clearProperty(propertyName);
    fireOnRender();
  }
}
Program: 143615
Project: 143615
Buggy source:
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    fireOnRender();
  }
}

Fixed version (ground truth):
public void setFormat(String formatString){
  if (!Utils.safeEquals(formatString,getFormat())) {
    setComponentFormat(new ComponentFormat(FormatParser.parseFormatString(application.getI18NMessageIfPrefixed(formatString),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterName(),componentFormat == null ? null : componentFormat.parsedFormat.getUIConverterProperties()),componentFormat == null ? IColumnTypes.TEXT : componentFormat.dpType,componentFormat == null ? IColumnTypes.TEXT : componentFormat.uiType));
    getChangesRecorder().setChanged();
    RenderEventExecutor renderEventExecutor=getRenderEventExecutor();
    IScriptRenderMethods renderable=getRenderable();
    if (renderEventExecutor != null && !renderEventExecutor.isOnRenderExecuting() && renderable instanceof RenderableWrapper) {
      ((RenderableWrapper)renderable).clearProperty(RenderableWrapper.PROPERTY_FORMAT);
    }
    fireOnRender();
  }
}
Program: 143617
Project: 143617
Buggy source:
/** 
 * The name of the scope.
 */
public String getScopeName(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_SCOPENAME);
}

Fixed version (ground truth):
/** 
 * The name of the scope.
 */
public String getScopeName(){
  String value=getTypedProperty(StaticContentSpecLoader.PROPERTY_SCOPENAME);
  if (value == null && getParent() instanceof Solution) {
    value=ScriptVariable.GLOBAL_SCOPE;
    setScopeName(value);
  }
  return value;
}
Program: 143618
Project: 143618
Buggy source:
/** 
 * The name of the scope.
 */
public String getScopeName(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_SCOPENAME);
}

Fixed version (ground truth):
/** 
 * The name of the scope.
 */
public String getScopeName(){
  String value=getTypedProperty(StaticContentSpecLoader.PROPERTY_SCOPENAME);
  if (value == null && getParent() instanceof Solution) {
    value=ScriptVariable.GLOBAL_SCOPE;
    setScopeName(value);
  }
  return value;
}
Program: 143619
Project: 143619
Buggy source:
public void clearProperty(String propertyName){
  if (!propertiesMap.containsKey(propertyName)) {
    return;
  }
  isChanged=true;
  Element element=StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(),propertyName);
  setProperty(propertyName,element == null ? null : element.getDefaultClassValue());
  propertiesMap.remove(propertyName);
}

Fixed version (ground truth):
public void clearProperty(String propertyName){
  if (!propertiesMap.containsKey(propertyName)) {
    return;
  }
  isChanged=true;
  Element element=StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(),propertyName);
  setProperty(propertyName,element == null ? null : element.getDefaultClassValue());
  propertiesMap.remove(propertyName);
  if (bufferPropertiesMap != null) {
    bufferPropertiesMap.remove(propertyName);
  }
}
Program: 143620
Project: 143620
Buggy source:
/** 
 * @see com.servoy.j2db.scripting.ScriptEngine#destroy()
 */
@Override public void destroy(){
  if (debugger != null) {
    List<Context> list=contexts.remove(application);
    if (list.size() > 0) {
      Context[] array;
synchronized (list) {
        array=list.toArray(new Context[list.size()]);
        list.clear();
      }
      for (      Context cx : array) {
        DBGPStackManager manager=DBGPStackManager.removeManager(cx);
        if (manager != null) {
          manager.stop();
        }
      }
    }
    debugger.removeTerminationListener(this);
  }
  super.destroy();
}

Fixed version (ground truth):
/** 
 * @see com.servoy.j2db.scripting.ScriptEngine#destroy()
 */
@Override public void destroy(){
  if (debugger != null) {
    List<Context> list=contexts.remove(application);
    if (list != null && list.size() > 0) {
      Context[] array;
synchronized (list) {
        array=list.toArray(new Context[list.size()]);
        list.clear();
      }
      for (      Context cx : array) {
        DBGPStackManager manager=DBGPStackManager.removeManager(cx);
        if (manager != null) {
          manager.stop();
        }
      }
    }
    debugger.removeTerminationListener(this);
  }
  super.destroy();
}
Program: 143626
Project: 143626
Buggy source:
public Insets getPadding(Border border,Insets margin){
  Insets borderMargin=margin;
  if (border != null) {
    if (border instanceof CompoundBorder) {
      Insets marginInside=((CompoundBorder)border).getInsideBorder().getBorderInsets(null);
      borderMargin=TemplateGenerator.sumInsets(borderMargin,marginInside);
    }
  }
  return (borderMargin == null ? defaultPadding : borderMargin);
}

Fixed version (ground truth):
public Insets getPadding(Border border,Insets margin){
  Insets borderMargin=margin;
  if (border != null) {
    if (border instanceof CompoundBorder) {
      Insets marginInside=ComponentFactoryHelper.getBorderInsetsForNoComponent(((CompoundBorder)border).getInsideBorder());
      borderMargin=TemplateGenerator.sumInsets(borderMargin,marginInside);
    }
  }
  return (borderMargin == null ? defaultPadding : borderMargin);
}
Program: 143629
Project: 143629
Buggy source:
/** 
 * @see com.servoy.j2db.ui.ISupportWebBounds#getPaddingAndBorder()
 */
public Insets getPaddingAndBorder(){
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=b.getBorderInsets(null);
    b=null;
  }
  return ((ChangesRecorder)scriptable.getChangesRecorder()).getPaddingAndBorder(size.height,b,m,getFontSize(),null,false,valign);
}

Fixed version (ground truth):
/** 
 * @see com.servoy.j2db.ui.ISupportWebBounds#getPaddingAndBorder()
 */
public Insets getPaddingAndBorder(){
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=ComponentFactoryHelper.getBorderInsetsForNoComponent(b);
    b=null;
  }
  return ((ChangesRecorder)scriptable.getChangesRecorder()).getPaddingAndBorder(size.height,b,m,getFontSize(),null,false,valign);
}
Program: 143630
Project: 143630
Buggy source:
public Rectangle getWebBounds(){
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=b.getBorderInsets(null);
    b=null;
  }
  Dimension d=((ChangesRecorder)scriptable.getChangesRecorder()).calculateWebSize(size.width,size.height,b,m,getFontSize(),null,false,valign);
  return new Rectangle(location,d);
}

Fixed version (ground truth):
public Rectangle getWebBounds(){
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=ComponentFactoryHelper.getBorderInsetsForNoComponent(b);
    b=null;
  }
  Dimension d=((ChangesRecorder)scriptable.getChangesRecorder()).calculateWebSize(size.width,size.height,b,m,getFontSize(),null,false,valign);
  return new Rectangle(location,d);
}
Program: 143632
Project: 143632
Buggy source:
public void setSize(int x,int y){
  setComponentSize(x,y);
  Border b=getComponent().getBorder();
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=b.getBorderInsets(null);
    b=null;
  }
  getChangesRecorder().setSize(x,y,b,m,getComponent().getFontSize(),false,getComponent().getVerticalAlignment());
}

Fixed version (ground truth):
public void setSize(int x,int y){
  setComponentSize(x,y);
  Border b=getComponent().getBorder();
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=ComponentFactoryHelper.getBorderInsetsForNoComponent(b);
    b=null;
  }
  getChangesRecorder().setSize(x,y,b,m,getComponent().getFontSize(),false,getComponent().getVerticalAlignment());
}
Program: 143633
Project: 143633
Buggy source:
@Override public void setBorder(String spec){
  Border border=ComponentFactoryHelper.createBorder(spec);
  Border oldBorder=getComponent().getBorder();
  if (getComponent() instanceof Component && oldBorder instanceof CompoundBorder && ((CompoundBorder)oldBorder).getInsideBorder() != null) {
    Insets insets=((CompoundBorder)oldBorder).getInsideBorder().getBorderInsets((Component)getComponent());
    getComponent().setBorder(BorderFactory.createCompoundBorder(border,BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right)));
  }
 else {
    getComponent().setBorder(border);
  }
  getChangesRecorder().setBorder(spec);
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=b.getBorderInsets(null);
    b=null;
  }
  getChangesRecorder().setSize(getComponent().getSize().width,getComponent().getSize().height,b,m,getComponent().getFontSize(),false,getComponent().getVerticalAlignment());
}

Fixed version (ground truth):
@Override public void setBorder(String spec){
  Border border=ComponentFactoryHelper.createBorder(spec);
  Border oldBorder=getComponent().getBorder();
  if (getComponent() instanceof Component && oldBorder instanceof CompoundBorder && ((CompoundBorder)oldBorder).getInsideBorder() != null) {
    Insets insets=((CompoundBorder)oldBorder).getInsideBorder().getBorderInsets((Component)getComponent());
    getComponent().setBorder(BorderFactory.createCompoundBorder(border,BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right)));
  }
 else {
    getComponent().setBorder(border);
  }
  getChangesRecorder().setBorder(spec);
  Border b=border;
  Insets m=null;
  if (b instanceof EmptyBorder) {
    m=ComponentFactoryHelper.getBorderInsetsForNoComponent(b);
    b=null;
  }
  getChangesRecorder().setSize(getComponent().getSize().width,getComponent().getSize().height,b,m,getComponent().getFontSize(),false,getComponent().getVerticalAlignment());
}
Program: 143635
Project: 143635
Buggy source:
public Insets getCustomBorderInsets(){
  if (customBorderInsets != null) {
    return customBorderInsets;
  }
  return getBorderInsets(null);
}

Fixed version (ground truth):
public Insets getCustomBorderInsets(){
  if (customBorderInsets != null) {
    return customBorderInsets;
  }
  return ComponentFactoryHelper.getBorderInsetsForNoComponent(this);
}
Program: 143636
Project: 143636
Buggy source:
public Insets getCustomBorderInsets(){
  if (customBorderInsets != null) {
    return customBorderInsets;
  }
  return getBorderInsets(null);
}

Fixed version (ground truth):
public Insets getCustomBorderInsets(){
  if (customBorderInsets != null) {
    return customBorderInsets;
  }
  return ComponentFactoryHelper.getBorderInsetsForNoComponent(this);
}
Program: 143638
Project: 143638
Buggy source:
public CopyZipEntryImporter(File expFile,File installDir,String extensionID){
  this.expFile=expFile;
  this.installDir=installDir;
  screenshotsFolder=new File(installDir,"String_Node_Str");
  developerFolder=new File(installDir,"String_Node_Str");
  docsFolder=new File(installDir,"String_Node_Str" + extensionID);
}

Fixed version (ground truth):
public CopyZipEntryImporter(File expFile,File installDir,String extensionID,String version){
  this.expFile=expFile;
  this.installDir=installDir;
  this.version=version;
  this.extensionID=extensionID;
  screenshotsFolder=new File(installDir,"String_Node_Str");
  developerFolder=new File(installDir,"String_Node_Str");
  docsFolder=new File(installDir,"String_Node_Str" + extensionID);
}
Program: 143639
Project: 143639
Buggy source:
protected void handleExpFile(){
  File expCopy=new File(installDir + File.separator + EXPFILES_FOLDER,expFile.getName());
  InputStream stream=null;
  try {
    stream=new BufferedInputStream(new FileInputStream(expFile));
    copyFile(expCopy,stream,true);
  }
 catch (  IOException ex) {
    String tmp="String_Node_Str" + expFile;
    messages.addError(tmp);
    Debug.error(tmp,ex);
  }
 finally {
    Utils.closeInputStream(stream);
  }
}

Fixed version (ground truth):
protected void handleExpFile(){
  String generatedName=extensionID + "String_Node_Str" + version+ "String_Node_Str";
  File expCopy=new File(installDir + File.separator + EXPFILES_FOLDER,generatedName);
  InputStream stream=null;
  try {
    stream=new BufferedInputStream(new FileInputStream(expFile));
    copyFile(expCopy,stream,false);
  }
 catch (  IOException ex) {
    String tmp="String_Node_Str" + expFile;
    messages.addError(tmp);
    Debug.error(tmp,ex);
  }
 finally {
    Utils.closeInputStream(stream);
  }
}
Program: 143640
Project: 143640
Buggy source:
public UninstallZipEntries(File expFile,File installDir,String extensionID){
  super(expFile,installDir,extensionID);
}

Fixed version (ground truth):
public UninstallZipEntries(File expFile,File installDir,String extensionID,String version){
  super(expFile,installDir,extensionID,version);
}
Program: 143641
Project: 143641
Buggy source:
private static int compareBlocks(String compareBlock1,String compareBlock2){
  Integer i1=null, i2=null;
  try {
    i1=Integer.valueOf(Integer.parseInt(compareBlock1));
  }
 catch (  NumberFormatException e) {
  }
  try {
    i2=Integer.valueOf(Integer.parseInt(compareBlock2));
  }
 catch (  NumberFormatException e) {
  }
  if (i1 == null && i2 != null) {
    return INTERMEDIATE.equalsIgnoreCase(compareBlock1) ? 1 : -1;
  }
 else   if (i1 != null && i2 == null) {
    return INTERMEDIATE.equals(compareBlock2) ? -1 : 1;
  }
 else   if (i1 == null) {
    if (INTERMEDIATE.equalsIgnoreCase(compareBlock1) && !INTERMEDIATE.equalsIgnoreCase(compareBlock2))     return 1;
    if (!INTERMEDIATE.equalsIgnoreCase(compareBlock1) && INTERMEDIATE.equalsIgnoreCase(compareBlock2))     return -1;
    return compareBlock1.compareToIgnoreCase(compareBlock2);
  }
 else {
    return i1.intValue() - i2.intValue();
  }
}

Fixed version (ground truth):
private static int compareBlocks(String compareBlock1,String compareBlock2){
  Integer i1=getInteger(compareBlock1);
  Integer i2=getInteger(compareBlock2);
  if (i1 == null && i2 != null) {
    return INTERMEDIATE.equalsIgnoreCase(compareBlock1) ? 1 : -1;
  }
 else   if (i1 != null && i2 == null) {
    return INTERMEDIATE.equals(compareBlock2) ? -1 : 1;
  }
 else   if (i1 == null) {
    if (INTERMEDIATE.equalsIgnoreCase(compareBlock1) && !INTERMEDIATE.equalsIgnoreCase(compareBlock2))     return 1;
    if (!INTERMEDIATE.equalsIgnoreCase(compareBlock1) && INTERMEDIATE.equalsIgnoreCase(compareBlock2))     return -1;
    return compareBlock1.compareToIgnoreCase(compareBlock2);
  }
 else {
    return i1.intValue() - i2.intValue();
  }
}
Program: 143642
Project: 143642
Buggy source:
/** 
 * Compares two version strings.<br><br> NOTE: Version strings MUST already be valid as checked by   {@link #checkVersionPattern(String)}. If an exclusive version is given it is treated as an non-exclusive one when comparing.
 * @return < 0 if ver1 < ver2, == 0 if the two versions are the same, > 0 if ver1 > ver2.
 */
public static int compareVersions(String ver1,String ver2){
  Matcher ver1Matcher=NUMBER_PATTERN.matcher(ver1);
  Matcher ver2Matcher=NUMBER_PATTERN.matcher(ver2);
  String compareBlock1;
  String compareBlock2;
  int result=0;
  do {
    compareBlock1=getNextBlock(ver1Matcher);
    compareBlock2=getNextBlock(ver2Matcher);
    result=compareBlocks(compareBlock1 == null ? "String_Node_Str" : compareBlock1,compareBlock2 == null ? "String_Node_Str" : compareBlock2);
  }
 while (result == 0 && (compareBlock1 != null || compareBlock2 != null));
  return result;
}

Fixed version (ground truth):
/** 
 * Compares two version strings.<br><br> NOTE: Version strings MUST already be valid as checked by   {@link #checkVersionPattern(String)}. If an exclusive version is given it is treated as an non-exclusive one when comparing.
 * @return < 0 if ver1 < ver2, == 0 if the two versions are the same, > 0 if ver1 > ver2.
 */
public static int compareVersions(String ver1,String ver2){
  Matcher ver1Matcher=NUMBER_PATTERN.matcher(ver1);
  Matcher ver2Matcher=NUMBER_PATTERN.matcher(ver2);
  String compareBlock1;
  String compareBlock2;
  int result=0;
  do {
    compareBlock1=getNextBlock(ver1Matcher);
    compareBlock2=getNextBlock(ver2Matcher);
    if (getInteger(compareBlock1) == null) {
      Integer i=getInteger(compareBlock2);
      while (i != null && i.intValue() == 0) {
        compareBlock2=getNextBlock(ver2Matcher);
        i=getInteger(compareBlock2);
      }
    }
 else     if (getInteger(compareBlock2) == null) {
      Integer i=getInteger(compareBlock1);
      while (i != null && i.intValue() == 0) {
        compareBlock1=getNextBlock(ver1Matcher);
        i=getInteger(compareBlock1);
      }
    }
    result=compareBlocks(compareBlock1 == null ? "String_Node_Str" : compareBlock1,compareBlock2 == null ? "String_Node_Str" : compareBlock2);
  }
 while (result == 0 && (compareBlock1 != null || compareBlock2 != null));
  return result;
}
Program: 143645
Project: 143645
Buggy source:
protected boolean handleDependencies(DependencyMetadata extension,int[] pops){
  boolean ok=false;
  boolean dependenciesOKForNow;
  dependenciesOKForNow=checkNoLibConflicts(extension.libDependencies,visitedLibs);
  if (dependenciesOKForNow) {
    if (extension.extensionDependencies != null && extension.extensionDependencies.length > 0) {
      for (int i=extension.extensionDependencies.length - 1; dependenciesOKForNow && (i >= 0); i--) {
        DependencyMetadata[] availableDependencyVersions=extensionProvider.getDependencyMetadata(extension.extensionDependencies[i]);
        if (availableDependencyVersions != null && availableDependencyVersions.length > 0) {
          stillToResolve.push(availableDependencyVersions);
          pops[0]++;
        }
 else {
          reasons.add("String_Node_Str" + extension.extensionDependencies[i] + "String_Node_Str");
          dependenciesOKForNow=false;
        }
      }
      ok=dependenciesOKForNow;
    }
 else {
      ok=true;
    }
  }
  return ok;
}

Fixed version (ground truth):
protected boolean handleDependencies(DependencyMetadata extension,int[] pops){
  boolean ok=false;
  boolean dependenciesOKForNow;
  dependenciesOKForNow=checkNoLibConflicts(extension.libDependencies,visitedLibs);
  if (dependenciesOKForNow) {
    if (extension.extensionDependencies != null && extension.extensionDependencies.length > 0) {
      for (int i=extension.extensionDependencies.length - 1; dependenciesOKForNow && (i >= 0); i--) {
        DependencyMetadata[] availableDependencyVersions=extensionProvider.getDependencyMetadata(extension.extensionDependencies[i]);
        DependencyMetadata installedExtDep=allInstalledExtensions.get(extension.extensionDependencies[i].id);
        if (installedExtDep != null) {
          boolean foundInProvider=false;
          if (availableDependencyVersions != null && availableDependencyVersions.length > 0) {
            for (            DependencyMetadata dmd : availableDependencyVersions) {
              if (dmd.id.equals(installedExtDep.id) && dmd.version.equals(installedExtDep.version)) {
                foundInProvider=true;
                break;
              }
            }
          }
          if (!foundInProvider)           availableDependencyVersions=Utils.arrayAdd(availableDependencyVersions,installedExtDep,false);
        }
        if (availableDependencyVersions != null && availableDependencyVersions.length > 0) {
          stillToResolve.push(availableDependencyVersions);
          pops[0]++;
        }
 else {
          reasons.add("String_Node_Str" + extension.extensionDependencies[i] + "String_Node_Str");
          dependenciesOKForNow=false;
        }
      }
      ok=dependenciesOKForNow;
    }
 else {
      ok=true;
    }
  }
  return ok;
}