nus-yam/ex-repair huggingface dataset:
Program: 60171
Project: 60171
Buggy source:
/** 
 * Apply background horizontal positon.
 * @param binfo the binfo
 * @param xposition the xposition
 */
private void applyBackgroundHorizontalPositon(BackgroundInfo binfo,String xposition){
  if (xposition.endsWith("String_Node_Str")) {
    binfo.setBackgroundXPositionAbsolute(false);
    try {
      binfo.setBackgroundXPosition((int)Double.parseDouble(xposition.substring(0,xposition.length() - 1).trim()));
    }
 catch (    NumberFormatException nfe) {
      binfo.setBackgroundXPosition(0);
    }
  }
 else {
switch (xposition) {
case CENTER:
      binfo.setBackgroundXPositionAbsolute(false);
    binfo.setBackgroundXPosition(50);
case RIGHT:
  binfo.setBackgroundXPositionAbsolute(false);
binfo.setBackgroundXPosition(100);
case LEFT:
binfo.setBackgroundXPositionAbsolute(false);
binfo.setBackgroundXPosition(0);
case BOTTOM:
binfo.setBackgroundYPositionAbsolute(false);
binfo.setBackgroundYPosition(100);
case TOP:
binfo.setBackgroundYPositionAbsolute(false);
binfo.setBackgroundYPosition(0);
case INHERIT:
BackgroundInfo bi=this.getPreviousRenderState().getBackgroundInfo();
binfo.setBackgroundYPositionAbsolute(bi.isBackgroundYPositionAbsolute());
binfo.setBackgroundYPosition(bi.getBackgroundYPosition());
case INITIAL:
binfo.setBackgroundXPositionAbsolute(true);
binfo.setBackgroundXPosition(HtmlValues.getPixelSize(xposition,this,0));
default :
binfo.setBackgroundXPositionAbsolute(true);
binfo.setBackgroundXPosition(HtmlValues.getPixelSize(xposition,this,0));
}
}
}

Fixed version (ground truth):
/** 
 * Apply background horizontal positon.
 * @param binfo the binfo
 * @param xposition the xposition
 */
private void applyBackgroundHorizontalPositon(BackgroundInfo binfo,String xposition){
  if (xposition.endsWith("String_Node_Str")) {
    binfo.setBackgroundXPositionAbsolute(false);
    try {
      binfo.setBackgroundXPosition((int)Double.parseDouble(xposition.substring(0,xposition.length() - 1).trim()));
    }
 catch (    NumberFormatException nfe) {
      binfo.setBackgroundXPosition(0);
    }
  }
 else {
switch (xposition) {
case CENTER:
      binfo.setBackgroundXPositionAbsolute(false);
    binfo.setBackgroundXPosition(50);
case RIGHT:
  binfo.setBackgroundXPositionAbsolute(false);
binfo.setBackgroundXPosition(100);
case LEFT:
binfo.setBackgroundXPositionAbsolute(false);
binfo.setBackgroundXPosition(0);
case BOTTOM:
binfo.setBackgroundYPositionAbsolute(false);
binfo.setBackgroundYPosition(100);
case TOP:
binfo.setBackgroundYPositionAbsolute(false);
binfo.setBackgroundYPosition(0);
case INHERIT:
BackgroundInfo bi=this.getPreviousRenderState().getBackgroundInfo();
if (bi != null) {
binfo.setBackgroundXPositionAbsolute(bi.isBackgroundXPositionAbsolute());
binfo.setBackgroundXPosition(bi.getBackgroundXPosition());
}
case INITIAL:
binfo.setBackgroundXPositionAbsolute(true);
binfo.setBackgroundXPosition(HtmlValues.getPixelSize(xposition,this,0));
default :
binfo.setBackgroundXPositionAbsolute(true);
binfo.setBackgroundXPosition(HtmlValues.getPixelSize(xposition,this,0));
}
}
}
Program: 60172
Project: 60172
Buggy source:
@Override public BackgroundInfo getBackgroundInfo(){
  BackgroundInfo binfo=this.iBackgroundInfo;
  if (binfo != INVALID_BACKGROUND_INFO) {
    return binfo;
  }
  AbstractCSS2Properties props=this.getCssProperties();
  if (props != null) {
    String backgroundColorText=props.getBackgroundColor();
    if (backgroundColorText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      binfo.setBackgroundColor(ColorFactory.getInstance().getColor(backgroundColorText));
    }
    String backgroundImageText=props.getBackgroundImage();
    if ((backgroundImageText != null) && (backgroundImageText.length() > 0)) {
      URL backgroundImage=HtmlValues.getURIFromStyleValue(backgroundImageText);
      if (backgroundImage != null) {
        if (binfo == null) {
          binfo=new BackgroundInfo();
        }
        binfo.setBackgroundImage(backgroundImage);
      }
    }
    String backgroundRepeatText=props.getBackgroundRepeat();
    if (backgroundRepeatText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      this.applyBackgroundRepeat(binfo,backgroundRepeatText);
    }
    String backgroundPositionText=props.getBackgroundPosition();
    if (backgroundPositionText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      this.applyBackgroundPosition(binfo,backgroundPositionText);
    }
  }
  this.iBackgroundInfo=binfo;
  return binfo;
}

Fixed version (ground truth):
@Override public BackgroundInfo getBackgroundInfo(){
  BackgroundInfo binfo=this.iBackgroundInfo;
  if (binfo != INVALID_BACKGROUND_INFO) {
    return binfo;
  }
  if (element != null && !"String_Node_Str".equals(element.getNodeName())) {
    binfo=null;
  }
  AbstractCSS2Properties props=this.getCssProperties();
  if (props != null) {
    String backgroundColorText=props.getBackgroundColor();
    if (backgroundColorText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      binfo.setBackgroundColor(ColorFactory.getInstance().getColor(backgroundColorText));
    }
    String backgroundImageText=props.getBackgroundImage();
    if ((backgroundImageText != null) && (backgroundImageText.length() > 0)) {
      URL backgroundImage=HtmlValues.getURIFromStyleValue(backgroundImageText);
      if (backgroundImage != null) {
        if (binfo == null) {
          binfo=new BackgroundInfo();
        }
        binfo.setBackgroundImage(backgroundImage);
      }
    }
    String backgroundRepeatText=props.getBackgroundRepeat();
    if (backgroundRepeatText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      this.applyBackgroundRepeat(binfo,backgroundRepeatText);
    }
    String backgroundPositionText=props.getBackgroundPosition();
    if (backgroundPositionText != null) {
      if (binfo == null) {
        binfo=new BackgroundInfo();
      }
      this.applyBackgroundPosition(binfo,backgroundPositionText);
    }
  }
  this.iBackgroundInfo=binfo;
  return binfo;
}
Program: 60173
Project: 60173
Buggy source:
/** 
 * Layout children.
 * @param node the node
 */
public void layoutChildren(DOMNodeImpl node){
  DOMNodeImpl[] childrenArray=node.getChildrenArray();
  if (childrenArray != null) {
    int length=childrenArray.length;
    for (int i=0; i < length; i++) {
      DOMNodeImpl child=childrenArray[i];
      short nodeType=child.getNodeType();
      if (nodeType == Node.TEXT_NODE) {
        this.layoutText(child);
      }
 else       if (nodeType == Node.ELEMENT_NODE) {
        this.currentLine.addStyleChanger(new RStyleChanger(child));
        String nodeName=child.getNodeName().toUpperCase();
        MarkupLayout ml=(MarkupLayout)elementLayout.get(nodeName);
        if (ml == null) {
          ml=miscLayout;
        }
        ml.layoutMarkup(this,(HTMLElementImpl)child);
        this.currentLine.addStyleChanger(new RStyleChanger(node));
      }
 else       if ((nodeType == Node.COMMENT_NODE) || (nodeType == Node.PROCESSING_INSTRUCTION_NODE)) {
      }
 else {
        throw new IllegalStateException("String_Node_Str" + child);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Layout children.
 * @param node the node
 */
public void layoutChildren(DOMNodeImpl node){
  DOMNodeImpl[] childrenArray=node.getChildrenArray();
  if (childrenArray != null) {
    int length=childrenArray.length;
    for (int i=0; i < length; i++) {
      DOMNodeImpl child=childrenArray[i];
      short nodeType=child.getNodeType();
      if (nodeType == Node.TEXT_NODE) {
        this.layoutText(child);
      }
 else       if (nodeType == Node.ELEMENT_NODE) {
        this.currentLine.addStyleChanger(new RStyleChanger(child));
        String nodeName=child.getNodeName().toUpperCase();
        MarkupLayout ml=(MarkupLayout)elementLayout.get(nodeName);
        if (ml == null) {
          ml=miscLayout;
        }
        ml.layoutMarkup(this,(HTMLElementImpl)child);
        this.currentLine.addStyleChanger(new RStyleChanger(node));
      }
    }
  }
}
Program: 60174
Project: 60174
Buggy source:
/** 
 * Perform file actions.
 */
private void performFileActions(){
  try {
    File userHome=new File(System.getProperty("String_Node_Str"));
    File loboHome=new File(userHome,"String_Node_Str");
    File cacheHome=new File(loboHome,"String_Node_Str");
    this.deleteDecorationFiles(cacheHome);
  }
 catch (  Exception err) {
    logger.log(Level.ERROR,"String_Node_Str",err);
  }
}

Fixed version (ground truth):
/** 
 * Perform file actions.
 */
private void performFileActions(){
  try {
    File userHome=new File(System.getProperty("String_Node_Str"));
    File loboHome=new File(userHome,"String_Node_Str");
    File cacheHome=new File(loboHome,"String_Node_Str");
    this.deleteDecorationFiles(cacheHome);
  }
 catch (  Exception err) {
    err.printStackTrace();
  }
}
Program: 60177
Project: 60177
Buggy source:
private boolean match(String value,String strPattern){
  if (value != null && value.length() > 0) {
    Pattern pattern=Pattern.compile(strPattern);
    Matcher matcher=pattern.matcher(value);
    return matcher.matches();
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
private boolean match(String value,String strPattern){
  if (value != null && value.length() > 0 && strPattern != null && strPattern.length() > 0) {
    Pattern pattern=Pattern.compile(strPattern);
    Matcher matcher=pattern.matcher(value);
    return matcher.matches();
  }
 else {
    return true;
  }
}
Program: 60178
Project: 60178
Buggy source:
/** 
 * Load background image.
 * @param imageURL the image url
 */
protected void loadBackgroundImage(final URL imageURL){
  Image image=null;
  String url=imageURL.toString();
  try {
    SSLCertificate.setCertificate();
    if (url.endsWith("String_Node_Str")) {
      SVGRasterizer r=new SVGRasterizer(imageURL);
      image=r.bufferedImageToImage();
    }
 else     if (url.startsWith("String_Node_Str")) {
      image=Toolkit.getDefaultToolkit().createImage(ImageIO.read(imageURL).getSource());
    }
 else     if (url.endsWith("String_Node_Str")) {
      image=new ImageIcon(imageURL).getImage();
    }
 else     if (url.endsWith("String_Node_Str")) {
      image=ImageIO.read(imageURL);
    }
    BaseElementRenderable.this.backgroundImage=image;
    int w=image.getWidth(BaseElementRenderable.this);
    int h=image.getHeight(BaseElementRenderable.this);
    if ((w != -1) && (h != -1)) {
      BaseElementRenderable.this.repaint();
    }
  }
 catch (  IOException|TranscoderException thrown) {
    logger.log(Level.WARNING,"String_Node_Str",thrown);
  }
}

Fixed version (ground truth):
/** 
 * Load background image.
 * @param imageURL the image url
 */
protected void loadBackgroundImage(final URL imageURL){
  Image image=null;
  String url=imageURL.toString();
  try {
    SSLCertificate.setCertificate();
    if (url.endsWith("String_Node_Str")) {
      SVGRasterizer r=new SVGRasterizer(imageURL);
      image=r.bufferedImageToImage();
    }
 else     if (url.startsWith("String_Node_Str")) {
      image=Toolkit.getDefaultToolkit().createImage(ImageIO.read(imageURL).getSource());
    }
 else     if (url.endsWith("String_Node_Str")) {
      image=new ImageIcon(imageURL).getImage();
    }
 else     if (url.endsWith("String_Node_Str")) {
      image=ImageIO.read(imageURL);
    }
 else {
      image=ImageIO.read(imageURL);
    }
    BaseElementRenderable.this.backgroundImage=image;
    int w=image.getWidth(BaseElementRenderable.this);
    int h=image.getHeight(BaseElementRenderable.this);
    if ((w != -1) && (h != -1)) {
      BaseElementRenderable.this.repaint();
    }
  }
 catch (  IOException|TranscoderException thrown) {
    logger.log(Level.WARNING,"String_Node_Str",thrown);
  }
catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 60179
Project: 60179
Buggy source:
/** 
 * @return the lineWidth
 */
public int getLineWidth(){
  return lineWidth;
}

Fixed version (ground truth):
/** 
 * @return the lineWidth
 */
public int getLineWidth(){
  return canvasInfo.getLineWidth();
}
Program: 60180
Project: 60180
Buggy source:
/** 
 * Instantiates a new HTML canvas element impl.
 * @param name the name
 */
public HTMLCanvasElementImpl(String name){
  super(name);
  lineWidth=1;
  globalAlpha=1.0;
  rotate=0.0;
  scaleX=1;
  scaleY=1;
  translateX=0;
  translateY=0;
  color=Color.BLACK;
  font=DEFAULT_FONT;
  if (listRectValues == null) {
    listRectValues=new ArrayList<CanvasInfo>();
  }
  if (listStrokeRectValues == null) {
    listStrokeRectValues=new ArrayList<CanvasInfo>();
  }
  if (listTextValues == null) {
    listTextValues=new ArrayList<CanvasInfo>();
  }
  if (listStrokeTextValues == null) {
    listStrokeTextValues=new ArrayList<CanvasInfo>();
  }
  if (linearValues == null) {
    linearValues=new CanvasInfo();
  }
  if (canvasInfo == null) {
    canvasInfo=new CanvasInfo();
  }
  if (path == null) {
    path=new GeneralPath();
  }
  if (fractions == null) {
    fractions=new ArrayList<Float>();
  }
  if (colors == null) {
    colors=new ArrayList<Color>();
  }
}

Fixed version (ground truth):
/** 
 * Instantiates a new HTML canvas element impl.
 * @param name the name
 */
public HTMLCanvasElementImpl(String name){
  super(name);
  globalAlpha=1.0;
  rotate=0.0;
  scaleX=1;
  scaleY=1;
  translateX=0;
  translateY=0;
  color=Color.BLACK;
  font=DEFAULT_FONT;
  if (listRectValues == null) {
    listRectValues=new ArrayList<CanvasInfo>();
  }
  if (listStrokeRectValues == null) {
    listStrokeRectValues=new ArrayList<CanvasInfo>();
  }
  if (listTextValues == null) {
    listTextValues=new ArrayList<CanvasInfo>();
  }
  if (listStrokeTextValues == null) {
    listStrokeTextValues=new ArrayList<CanvasInfo>();
  }
  if (linearValues == null) {
    linearValues=new CanvasInfo();
  }
  if (canvasInfo == null) {
    canvasInfo=new CanvasInfo();
  }
  if (path == null) {
    path=new GeneralPath();
  }
  if (fractions == null) {
    fractions=new ArrayList<Float>();
  }
  if (colors == null) {
    colors=new ArrayList<Color>();
  }
}
Program: 60181
Project: 60181
Buggy source:
/** 
 * @param lineWidth the lineWidth to set
 */
public void setLineWidth(int lineWidth){
  this.lineWidth=lineWidth;
}

Fixed version (ground truth):
/** 
 * @param lineWidth the lineWidth to set
 */
public void setLineWidth(int lineWidth){
  canvasInfo.setLineWidth(lineWidth);
}
Program: 60182
Project: 60182
Buggy source:
@Override public void fillText(String text,int x,int y,int maxWidth){
  CanvasInfo ci=new CanvasInfo();
  ci.setText(text);
  ci.setX(x);
  ci.setY(y);
  ci.setMaxWidth(maxWidth);
  ci.setFillStyle(getFillStyle());
  ci.setScaleX(scaleX);
  ci.setScaleY(scaleY);
  ci.setTranslateX(translateX);
  ci.setTranslateY(translateY);
  ci.setFont(font);
  listTextValues.add(ci);
  setMethod(HTMLCanvasElement.FILL_TEXT);
}

Fixed version (ground truth):
@Override public void fillText(String text,int x,int y,int maxWidth){
  CanvasInfo ci=new CanvasInfo();
  ci.setText(text);
  ci.setX(x);
  ci.setY(y);
  ci.setMaxWidth(maxWidth);
  ci.setFillStyle(getFillStyle());
  ci.setRotate(rotate);
  ci.setScaleX(scaleX);
  ci.setScaleY(scaleY);
  ci.setTranslateX(translateX);
  ci.setTranslateY(translateY);
  ci.setFont(font);
  listTextValues.add(ci);
  setMethod(HTMLCanvasElement.FILL_TEXT);
}
Program: 60188
Project: 60188
Buggy source:
/** 
 * Instantiates a new img control.
 * @param modelNode the model node
 * @throws IOException
 */
public ImgControl(HTMLImageElementImpl modelNode){
  super(modelNode);
  align=modelNode.getAlign();
  alt=modelNode.getAlt() != null ? modelNode.getAlt() : "String_Node_Str";
  modelNode.addImageListener(this);
  this.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      mouseBeingPressed=true;
      repaint();
    }
    @Override public void mouseReleased(    MouseEvent e){
      mouseBeingPressed=false;
      repaint();
      HtmlController.getInstance().onPressed(modelNode,e,e.getX(),e.getY());
    }
  }
);
  try {
    URL url=new URL(modelNode.getSrc());
    image=ImageIO.read(url);
    if (modelNode.getHeight() > 0) {
      imageHeight=modelNode.getHeight();
    }
 else {
      imageHeight=image.getHeight(this);
    }
    if (modelNode.getWidth() > 0) {
      imageWidth=modelNode.getWidth();
    }
 else {
      imageWidth=image.getWidth(this);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Instantiates a new img control.
 * @param modelNode the model node
 * @throws IOException
 */
public ImgControl(HTMLImageElementImpl modelNode){
  super(modelNode);
  align=modelNode.getAlign();
  alt=modelNode.getAlt() != null ? modelNode.getAlt() : "String_Node_Str";
  modelNode.addImageListener(this);
  this.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      mouseBeingPressed=true;
      repaint();
    }
    @Override public void mouseReleased(    MouseEvent e){
      mouseBeingPressed=false;
      repaint();
      HtmlController.getInstance().onPressed(modelNode,e,e.getX(),e.getY());
    }
  }
);
  if (modelNode.getHeight() > 0) {
    imageHeight=modelNode.getHeight();
  }
 else {
    imageHeight=image.getHeight(this);
  }
  if (modelNode.getWidth() > 0) {
    imageWidth=modelNode.getWidth();
  }
 else {
    imageWidth=image.getWidth(this);
  }
}
Program: 60189
Project: 60189
Buggy source:
/** 
 * Instantiates a new back action.
 * @param componentSource the component source
 * @param window the window
 */
public BackAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.window=window;
  this.action=action;
}

Fixed version (ground truth):
/** 
 * Instantiates a new back action.
 * @param componentSource the component source
 * @param window the window
 * @param action the action
 */
public BackAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.window=window;
  this.action=action;
}
Program: 60190
Project: 60190
Buggy source:
/** 
 * Instantiates a new back more action.
 * @param componentSource the component source
 * @param window the window
 */
public BackMoreAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.action=action;
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new back more action.
 * @param componentSource the component source
 * @param window the window
 * @param action the action
 */
public BackMoreAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.action=action;
  this.window=window;
}
Program: 60191
Project: 60191
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public Abs(){
  super("String_Node_Str",1);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public Abs(){
  super("String_Node_Str",1);
}
Program: 60192
Project: 60192
Buggy source:
protected String getStringParam(Object o) throws XPathFunctionException {
  String output=null;
  if (o instanceof String)   output=(String)o;
 else   if (o instanceof Boolean)   output=o.toString();
 else   if (o instanceof Double)   output=o.toString();
 else   if (o instanceof NodeList) {
    NodeList list=(NodeList)o;
    Node node=list.item(0);
    output=node.getTextContent();
  }
 else {
    throw new XPathFunctionException("String_Node_Str");
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Gets the string param.
 * @param o the o
 * @return the string param
 * @throws XPathFunctionException the x path function exception
 */
protected String getStringParam(Object o) throws XPathFunctionException {
  String output=null;
  if (o instanceof String)   output=(String)o;
 else   if (o instanceof Boolean)   output=o.toString();
 else   if (o instanceof Double)   output=o.toString();
 else   if (o instanceof NodeList) {
    NodeList list=(NodeList)o;
    Node node=list.item(0);
    output=node.getTextContent();
  }
 else {
    throw new XPathFunctionException("String_Node_Str");
  }
  return output;
}
Program: 60193
Project: 60193
Buggy source:
public final String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * Gets the name.
 * @return the name
 */
public final String getName(){
  return name;
}
Program: 60194
Project: 60194
Buggy source:
protected AbstractFunction(String name,int arity){
  if (name == null) {
    throw new NullPointerException();
  }
  if (arity < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.arity=arity;
  this.name=name;
}

Fixed version (ground truth):
/** 
 * Instantiates a new abstract function.
 * @param name the name
 * @param arity the arity
 */
protected AbstractFunction(String name,int arity){
  if (name == null) {
    throw new NullPointerException();
  }
  if (arity < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.arity=arity;
  this.name=name;
}
Program: 60195
Project: 60195
Buggy source:
protected Number getNumberParam(Object o) throws XPathFunctionException {
  Number output=null;
  try {
    if (o instanceof String)     output=Double.parseDouble((String)o);
 else     if (o instanceof Double)     output=(Double)o;
 else     if (o instanceof NodeList) {
      NodeList list=(NodeList)o;
      Node node=list.item(0);
      output=Double.parseDouble(node.getTextContent());
    }
 else {
      throw new XPathFunctionException("String_Node_Str");
    }
  }
 catch (  NumberFormatException ex) {
    throw new XPathFunctionException(ex);
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Gets the number param.
 * @param o the o
 * @return the number param
 * @throws XPathFunctionException the x path function exception
 */
protected Number getNumberParam(Object o) throws XPathFunctionException {
  Number output=null;
  try {
    if (o instanceof String)     output=Double.parseDouble((String)o);
 else     if (o instanceof Double)     output=(Double)o;
 else     if (o instanceof NodeList) {
      NodeList list=(NodeList)o;
      Node node=list.item(0);
      output=Double.parseDouble(node.getTextContent());
    }
 else {
      throw new XPathFunctionException("String_Node_Str");
    }
  }
 catch (  NumberFormatException ex) {
    throw new XPathFunctionException(ex);
  }
  return output;
}
Program: 60196
Project: 60196
Buggy source:
public final int getArity(){
  return arity;
}

Fixed version (ground truth):
/** 
 * Gets the arity.
 * @return the arity
 */
public final int getArity(){
  return arity;
}
Program: 60197
Project: 60197
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public EndsWith(){
  super("String_Node_Str",2);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public EndsWith(){
  super("String_Node_Str",2);
}
Program: 60198
Project: 60198
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public EqualsIgnoreCase(){
  super("String_Node_Str",2);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public EqualsIgnoreCase(){
  super("String_Node_Str",2);
}
Program: 60199
Project: 60199
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public EscapeUri(){
  super("String_Node_Str",2);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public EscapeUri(){
  super("String_Node_Str",2);
}
Program: 60200
Project: 60200
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public LowerCase(){
  super("String_Node_Str",1);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public LowerCase(){
  super("String_Node_Str",1);
}
Program: 60201
Project: 60201
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public Matches(){
  super("String_Node_Str",2);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public Matches(){
  super("String_Node_Str",2);
}
Program: 60202
Project: 60202
Buggy source:
/** 
 * Creates a new instance of EndsWith 
 */
public Replace(){
  super("String_Node_Str",3);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of EndsWith.
 */
public Replace(){
  super("String_Node_Str",3);
}
Program: 60203
Project: 60203
Buggy source:
@Override public void updateEnabling(){
  this.setEnabled(window.canBack());
}

Fixed version (ground truth):
@Override public void updateEnabling(){
  action.setEnabled(window.canBack());
}
Program: 60204
Project: 60204
Buggy source:
/** 
 * Instantiates a new back action.
 * @param componentSource the component source
 * @param window the window
 */
public BackAction(ComponentSource componentSource,NavigatorWindow window){
  super(componentSource,window);
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new back action.
 * @param componentSource the component source
 * @param window the window
 */
public BackAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.window=window;
  this.action=action;
}
Program: 60205
Project: 60205
Buggy source:
/** 
 * Instantiates a new back more action.
 * @param componentSource the component source
 * @param window the window
 */
public BackMoreAction(ComponentSource componentSource,NavigatorWindow window){
  super(componentSource,window);
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new back more action.
 * @param componentSource the component source
 * @param window the window
 */
public BackMoreAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.action=action;
  this.window=window;
}
Program: 60206
Project: 60206
Buggy source:
@Override public void updateEnabling(){
  this.setEnabled(window.canBack());
}

Fixed version (ground truth):
@Override public void updateEnabling(){
  action.setEnabled(window.canBack());
}
Program: 60207
Project: 60207
Buggy source:
@Override public void updateEnabling(){
  NavigationEntry entry=window.getCurrentNavigationEntry();
  this.setEnabled(entry != null && entry.getMethod().equals("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void updateEnabling(){
  NavigationEntry entry=window.getCurrentNavigationEntry();
  action.setEnabled(entry != null && entry.getMethod().equals("String_Node_Str"));
}
Program: 60208
Project: 60208
Buggy source:
/** 
 * Instantiates a new cloned window action.
 * @param componentSource the component source
 * @param window the window
 */
public ClonedWindowAction(ComponentSource componentSource,NavigatorWindow window){
  super(componentSource,window);
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new cloned window action.
 * @param componentSource the component source
 * @param window the window
 */
public ClonedWindowAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.action=action;
  this.window=window;
}
Program: 60209
Project: 60209
Buggy source:
/** 
 * Instantiates a new copy action.
 * @param componentSource the component source
 * @param window the window
 */
public CopyAction(ComponentSource componentSource,NavigatorWindow window){
  super(componentSource,window);
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new copy action.
 * @param componentSource the component source
 * @param window the window
 */
public CopyAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.action=action;
  this.window=window;
}
Program: 60210
Project: 60210
Buggy source:
@Override public void updateEnabling(){
  this.setEnabled(window.canCopy());
}

Fixed version (ground truth):
@Override public void updateEnabling(){
  action.setEnabled(window.canCopy());
}
Program: 60211
Project: 60211
Buggy source:
/** 
 * Instantiates a new forward action.
 * @param componentSource the component source
 * @param window the window
 */
public ForwardAction(ComponentSource componentSource,NavigatorWindow window){
  super(componentSource,window);
  this.window=window;
}

Fixed version (ground truth):
/** 
 * Instantiates a new forward action.
 * @param componentSource the component source
 * @param window the window
 */
public ForwardAction(ComponentSource componentSource,NavigatorWindow window,ActionPool action){
  this.window=window;
  this.action=action;
}
Program: 60212
Project: 60212
Buggy source:
@Override public void updateEnabling(){
  this.setEnabled(window.canForward());
}

Fixed version (ground truth):
@Override public void updateEnabling(){
  action.setEnabled(window.canForward());
}
Program: 60214
Project: 60214
Buggy source:
public void addDelayedPair(DelayedPair pair){
  Collection<DelayedPair> gc=this.delayedPairs;
  if (gc == null) {
    gc=new java.util.LinkedList();
    this.delayedPairs=gc;
  }
  gc.add(pair);
}

Fixed version (ground truth):
public void addDelayedPair(DelayedPair pair){
  Collection<DelayedPair> gc=this.delayedPairs;
  if (gc == null) {
    gc=new LinkedList();
    this.delayedPairs=gc;
  }
  gc.add(pair);
}
Program: 60216
Project: 60216
Buggy source:
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.fontMetrics=fm;
  wi.ascentPlusLeading=fm.getAscent() + fm.getLeading();
  wi.descent=fm.getDescent();
  wi.height=fm.getHeight();
  wi.width=fm.stringWidth(word);
  map.put(word,wi);
  return wi;
}

Fixed version (ground truth):
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.setFontMetrics(fm);
  wi.setAscentPlusLeading(fm.getAscent() + fm.getLeading());
  wi.setDescent(fm.getDescent());
  wi.setHeight(fm.getHeight());
  wi.setWidth(fm.stringWidth(word));
  map.put(word,wi);
  return wi;
}
Program: 60217
Project: 60217
Buggy source:
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.fontMetrics=fm;
  wi.ascentPlusLeading=fm.getAscent() + fm.getLeading();
  wi.descent=fm.getDescent();
  wi.height=fm.getHeight();
  wi.width=fm.stringWidth(word);
  map.put(word,wi);
  return wi;
}

Fixed version (ground truth):
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.setFontMetrics(fm);
  wi.setAscentPlusLeading(fm.getAscent() + fm.getLeading());
  wi.setDescent(fm.getDescent());
  wi.setHeight(fm.getHeight());
  wi.setWidth(fm.stringWidth(word));
  map.put(word,wi);
  return wi;
}
Program: 60220
Project: 60220
Buggy source:
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.fontMetrics=fm;
  wi.ascentPlusLeading=fm.getAscent() + fm.getLeading();
  wi.descent=fm.getDescent();
  wi.height=fm.getHeight();
  wi.width=fm.stringWidth(word);
  map.put(word,wi);
  return wi;
}

Fixed version (ground truth):
public final WordInfo getWordInfo(String word){
  Map<String,WordInfo> map=this.iWordInfoMap;
  if (map == null) {
    map=new HashMap<String,WordInfo>(1);
    this.iWordInfoMap=map;
  }
  WordInfo wi=(WordInfo)map.get(word);
  if (wi != null) {
    return wi;
  }
  wi=new WordInfo();
  FontMetrics fm=this.getFontMetrics();
  wi.setFontMetrics(fm);
  wi.setAscentPlusLeading(fm.getAscent() + fm.getLeading());
  wi.setDescent(fm.getDescent());
  wi.setHeight(fm.getHeight());
  wi.setWidth(fm.stringWidth(word));
  map.put(word,wi);
  return wi;
}
Program: 60223
Project: 60223
Buggy source:
/** 
 * Adds the given parameter to the set of parameters.
 * @param parem the Parameter to add. This must not be null.
 */
public void setParameter(Parameter param){
  if (param == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (param.getName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  params.put(param.getName(),param);
}

Fixed version (ground truth):
/** 
 * Adds the given parameter to the set of parameters.
 * @param param the Parameter to add. This must not be null.
 */
public void setParameter(Parameter param){
  if (param == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (param.getName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  params.put(param.getName(),param);
}
Program: 60224
Project: 60224
Buggy source:
/** 
 * @inheritDoc
 */
public Object clone() throws CloneNotSupportedException {
  AbstractBean result=(AbstractBean)super.clone();
  result.pcs=new PropertyChangeSupport(result);
  result.vcs=new VetoableChangeSupport(result);
  return result;
}

Fixed version (ground truth):
/** 
 * @exception CloneNotSupportedException
 */
public Object clone() throws CloneNotSupportedException {
  AbstractBean result=(AbstractBean)super.clone();
  result.pcs=new PropertyChangeSupport(result);
  result.vcs=new VetoableChangeSupport(result);
  return result;
}
Program: 60225
Project: 60225
Buggy source:
/** 
 * @param parent
 */
public MultiplexClassLoader(Collection classLoaders){
  super(null);
  this.parentLoaders=(BaseClassLoader[])classLoaders.toArray(EMPTY_CLASS_LOADERS);
}

Fixed version (ground truth):
/** 
 * @param classLoaders
 */
public MultiplexClassLoader(Collection classLoaders){
  super(null);
  this.parentLoaders=(BaseClassLoader[])classLoaders.toArray(EMPTY_CLASS_LOADERS);
}
Program: 60226
Project: 60226
Buggy source:
/** 
 * Converts the given URL into a valid URL by removing control characters (ASCII code < 32).
 * @param the URL to convert
 * @return the encoded URL
 */
public static String removeControlCharacters(String url){
  StringBuilder sb=new StringBuilder(url.length());
  for (int i=0; i < url.length(); i++) {
    char c=url.charAt(i);
    if (c >= 32)     sb.append(c);
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Converts the given URL into a valid URL by removing control characters <code>(ASCII code &lt; 32)</code>.
 * @param url URL to convert
 * @return the encoded URL
 */
public static String removeControlCharacters(String url){
  StringBuilder sb=new StringBuilder(url.length());
  for (int i=0; i < url.length(); i++) {
    char c=url.charAt(i);
    if (c >= 32)     sb.append(c);
  }
  return sb.toString();
}
Program: 60227
Project: 60227
Buggy source:
/** 
 * Converts the given URL into a valid URL by encoding illegal characters. Right now it is implemented like in IE7: only spaces are replaced with "%20". (Firefox 3 also encodes other non-ASCII and some ASCII characters).
 * @param the URL to convert
 * @return the encoded URL
 */
public static String encodeIllegalCharacters(String url){
  return url.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Converts the given URL into a valid URL by encoding illegal characters. Right now it is implemented like in IE7: only spaces are replaced with "%20". (Firefox 3 also encodes other non-ASCII and some ASCII characters).
 * @param url URL to convert
 * @return the encoded URL
 */
public static String encodeIllegalCharacters(String url){
  return url.replace("String_Node_Str","String_Node_Str");
}
Program: 60228
Project: 60228
Buggy source:
public String[] getValues(){
  if (this.state == STATE_COMBO) {
    OptionItem item=(OptionItem)this.comboBox.getSelectedItem();
    return item == null ? null : new String[]{item.getValue()};
  }
 else {
    Object[] values=this.list.getSelectedValues();
    if (values == null) {
      return null;
    }
    ArrayList<String> al=new ArrayList<String>();
    for (int i=0; i < values.length; i++) {
      OptionItem item=(OptionItem)values[i];
      al.add(item.getValue());
    }
    return (String[])al.toArray(new String[0]);
  }
}

Fixed version (ground truth):
public String[] getValues(){
  if (this.state == STATE_COMBO) {
    OptionItem item=(OptionItem)this.comboBox.getSelectedItem();
    return item == null ? null : new String[]{item.getValue()};
  }
 else {
    List<OptionItem> values=this.list.getSelectedValuesList();
    if (values == null) {
      return null;
    }
    ArrayList<String> al=new ArrayList<String>();
    for (int i=0; i < values.size(); i++) {
      OptionItem item=(OptionItem)values.get(i);
      al.add(item.getValue());
    }
    return (String[])al.toArray(new String[0]);
  }
}
Program: 60229
Project: 60229
Buggy source:
public final void paint(Graphics g){
  RenderState rs=this.modelNode.getRenderState();
  if (rs != null && rs.getVisibility() != RenderState.VISIBILITY_VISIBLE) {
    return;
  }
  this.prePaint(g);
  Insets insets=this.getInsets(false,false);
  g.translate(insets.left,insets.top);
  try {
    this.widget.paint(g);
  }
  finally {
    g.translate(-insets.left,-insets.top);
  }
}

Fixed version (ground truth):
public final void paint(Graphics g){
  RenderState rs=this.modelNode.getRenderState();
  System.out.println("String_Node_Str" + rs.getVisibility());
  if (rs != null && rs.getVisibility() != RenderState.VISIBILITY_VISIBLE) {
    return;
  }
  this.prePaint(g);
  Insets insets=this.getInsets(false,false);
  g.translate(insets.left,insets.top);
  try {
    this.widget.paint(g);
  }
  finally {
    g.translate(-insets.left,-insets.top);
  }
}
Program: 60230
Project: 60230
Buggy source:
/** 
 * @param context
 */
public LocalErrorHandler(){
}

Fixed version (ground truth):
public LocalErrorHandler(){
}
Program: 60231
Project: 60231
Buggy source:
/** 
 * Allows   {@link #getPreferredSize()} to render the HTML block in order todetermine the preferred size of this component. Note that <code>getPreferredSize()<code> is a potentially time-consuming operation if the preferred width is set.
 * @param width The preferred blocked width. Use <code>-1</code> to unset.
 */
public void setPreferredWidth(int width){
  this.preferredWidth=width;
}

Fixed version (ground truth):
/** 
 * Allows   {@link #getPreferredSize()} to render the HTML block in order todetermine the preferred size of this component. Note that <code>getPreferredSize()</code> is a potentially time-consuming operation if the preferred width is set.
 * @param width The preferred blocked width. Use <code>-1</code> to unset.
 */
public void setPreferredWidth(int width){
  this.preferredWidth=width;
}
Program: 60232
Project: 60232
Buggy source:
public String mapFunction(String script){
  ArrayList<String> list=new ArrayList<String>();
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  for (int i=0; i < list.size(); i++) {
    if (script.equals(list.get(0))) {
      script="String_Node_Str" + script;
      break;
    }
  }
  return script;
}

Fixed version (ground truth):
public String mapFunction(String script){
  ArrayList<String> list=new ArrayList<String>();
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  for (int i=0; i < list.size(); i++) {
    if (script.equals(list.get(i))) {
      script="String_Node_Str" + script;
      break;
    }
  }
  return script;
}
Program: 60233
Project: 60233
Buggy source:
@Override public void addEventListener(String script,String function){
  JavascriptCommon ut=new JavascriptCommon();
  System.out.println("String_Node_Str" + ut.mapFunction(script));
  ElementAttributeFilter attr=new ElementAttributeFilter(ut.mapFunction(script));
  String[] split=function.split("String_Node_Str");
  function=split[1].replace("String_Node_Str","String_Node_Str").trim();
  attr.setAttribute(this,function);
}

Fixed version (ground truth):
@Override public void addEventListener(String script,String function){
  JavascriptCommon ut=new JavascriptCommon();
  ElementAttributeFilter attr=new ElementAttributeFilter(ut.mapFunction(script));
  String[] split=function.split("String_Node_Str");
  function=split[1].replace("String_Node_Str","String_Node_Str").trim();
  attr.setAttribute(this,function);
}
Program: 60234
Project: 60234
Buggy source:
/** 
 * Gets the state of the request, a value between 0 and 4.
 * @return A value corresponding to one of the STATE* constants in thisclass.
 */
public ReadyState getReadyState();

Fixed version (ground truth):
/** 
 * Gets the state of the request, a value between 0 and 4.
 * @return A value corresponding to one of the STATE* constants in thisclass.
 */
public int getReadyState();
Program: 60236
Project: 60236
Buggy source:
public synchronized ReadyState getReadyState(){
  return this.readyState;
}

Fixed version (ground truth):
public synchronized int getReadyState(){
  return this.readyState;
}
Program: 60237
Project: 60237
Buggy source:
public InputFileControl(HTMLBaseInputElement modelNode){
  super(modelNode);
  this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
  JButton browseButton=this.browseButton;
  browseButton.setAction(new BrowseAction());
  browseButton.setText("String_Node_Str");
  java.awt.Dimension ps=this.textField.getPreferredSize();
  this.textField.setPreferredSize(new java.awt.Dimension(128,ps.height));
  this.textField.setEditable(false);
  if (modelNode.getTitle() != null)   this.textField.setToolTipText(modelNode.getTitle());
  textField.setVisible(modelNode.getHidden());
  textField.applyComponentOrientation(direction(modelNode.getDir()));
  textField.setEditable(new Boolean(modelNode.getContentEditable()));
  textField.setEnabled(!modelNode.getDisabled());
  this.add(this.textField);
  this.add(Box.createHorizontalStrut(4));
  this.add(browseButton);
}

Fixed version (ground truth):
public InputFileControl(HTMLBaseInputElement modelNode){
  super(modelNode);
  this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
  JButton browseButton=this.browseButton;
  browseButton.setAction(new BrowseAction());
  browseButton.setText("String_Node_Str");
  java.awt.Dimension ps=this.textField.getPreferredSize();
  this.textField.setPreferredSize(new java.awt.Dimension(128,ps.height));
  this.textField.setEditable(false);
  if (modelNode.getTitle() != null)   this.textField.setToolTipText(modelNode.getTitle());
  textField.setVisible(modelNode.getHidden());
  textField.applyComponentOrientation(direction(modelNode.getDir()));
  textField.setEditable(new Boolean(modelNode.getContentEditable() == null ? "String_Node_Str" : modelNode.getContentEditable()));
  textField.setEnabled(!modelNode.getDisabled());
  this.add(this.textField);
  this.add(Box.createHorizontalStrut(4));
  this.add(browseButton);
}
Program: 60238
Project: 60238
Buggy source:
public InputPasswordControl(final HTMLBaseInputElement modelNode){
  super(modelNode);
}

Fixed version (ground truth):
public InputPasswordControl(final HTMLBaseInputElement modelNode){
  super(modelNode);
  JPasswordField pwd=(JPasswordField)this.widget;
  if (modelNode.getTitle() != null)   pwd.setToolTipText(modelNode.getTitle());
  pwd.setVisible(modelNode.getHidden());
  pwd.applyComponentOrientation(direction(modelNode.getDir()));
  pwd.setEditable(new Boolean(modelNode.getContentEditable() == null ? "String_Node_Str" : modelNode.getContentEditable()));
  pwd.setEnabled(!modelNode.getDisabled());
  pwd.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      HtmlController.getInstance().onEnterPressed(modelNode,null);
    }
  }
);
}
Program: 60240
Project: 60240
Buggy source:
public InputTextAreaControl(HTMLBaseInputElement modelNode){
  super(modelNode);
  this.setLayout(WrapperLayout.getInstance());
  JTextAreaImpl widget=(JTextAreaImpl)this.createTextField();
  this.widget=widget;
  this.add(new JScrollPane(widget));
  ElementImpl element=this.controlElement;
  String value=element.getTextContent();
  ((JTextAreaImpl)widget).setLineWrap(true);
  if (modelNode.getTitle() != null)   widget.setToolTipText(modelNode.getTitle());
  widget.setVisible(modelNode.getHidden());
  widget.applyComponentOrientation(direction(modelNode.getDir()));
  widget.setEditable(new Boolean(modelNode.getContentEditable()));
  widget.setEnabled(!modelNode.getDisabled());
  widget.setPlaceholder(modelNode.getPlaceholder());
  widget.setText(value);
}

Fixed version (ground truth):
public InputTextAreaControl(HTMLBaseInputElement modelNode){
  super(modelNode);
  this.setLayout(WrapperLayout.getInstance());
  JTextAreaImpl widget=(JTextAreaImpl)this.createTextField();
  this.widget=widget;
  this.add(new JScrollPane(widget));
  ElementImpl element=this.controlElement;
  String value=element.getTextContent();
  ((JTextAreaImpl)widget).setLineWrap(true);
  if (modelNode.getTitle() != null)   widget.setToolTipText(modelNode.getTitle());
  widget.setVisible(modelNode.getHidden());
  widget.applyComponentOrientation(direction(modelNode.getDir()));
  widget.setEditable(new Boolean(modelNode.getContentEditable() == null ? "String_Node_Str" : modelNode.getContentEditable()));
  widget.setEnabled(!modelNode.getDisabled());
  widget.setPlaceholder(modelNode.getPlaceholder());
  widget.setText(value);
}