nus-yam/ex-repair huggingface dataset:
Program: 83049
Project: 83049
Buggy source:
private HttpServlet tryGetOrLoadServlet(TreeLogger logger,String className){
synchronized (loadedServletsByClassName) {
    HttpServlet servlet=(HttpServlet)loadedServletsByClassName.get(className);
    if (servlet != null) {
      return servlet;
    }
    Throwable caught=null;
    try {
      Class servletClass=Class.forName(className);
      Object newInstance=servletClass.newInstance();
      if (!(newInstance instanceof HttpServlet)) {
        logger.log(TreeLogger.ERROR,"String_Node_Str" + className + "String_Node_Str",null);
        return null;
      }
      servlet=(HttpServlet)newInstance;
      servlet.init(getServletConfig());
      loadedServletsByClassName.put(className,servlet);
      return servlet;
    }
 catch (    ClassNotFoundException e) {
      caught=e;
    }
catch (    InstantiationException e) {
      caught=e;
    }
catch (    IllegalAccessException e) {
      caught=e;
    }
catch (    ServletException e) {
      caught=e;
    }
    String msg="String_Node_Str" + className + "String_Node_Str";
    logger.log(TreeLogger.ERROR,msg,caught);
    return null;
  }
}

Fixed version (ground truth):
private HttpServlet tryGetOrLoadServlet(TreeLogger logger,ModuleDef moduleDef,String className){
synchronized (loadedServletsByModuleAndClassName) {
    String moduleAndClassName=moduleDef.getName() + "String_Node_Str" + className;
    HttpServlet servlet=(HttpServlet)loadedServletsByModuleAndClassName.get(moduleAndClassName);
    if (servlet != null) {
      return servlet;
    }
    Throwable caught=null;
    try {
      Class servletClass=Class.forName(className);
      Object newInstance=servletClass.newInstance();
      if (!(newInstance instanceof HttpServlet)) {
        logger.log(TreeLogger.ERROR,"String_Node_Str" + className + "String_Node_Str",null);
        return null;
      }
      servlet=(HttpServlet)newInstance;
      ServletContext context=new HostedModeServletContextProxy(getServletContext(),moduleDef,getOutputDir());
      ServletConfig config=new HostedModeServletConfigProxy(getServletConfig(),context);
      servlet.init(config);
      loadedServletsByModuleAndClassName.put(moduleAndClassName,servlet);
      return servlet;
    }
 catch (    ClassNotFoundException e) {
      caught=e;
    }
catch (    InstantiationException e) {
      caught=e;
    }
catch (    IllegalAccessException e) {
      caught=e;
    }
catch (    ServletException e) {
      caught=e;
    }
    String msg="String_Node_Str" + className + "String_Node_Str";
    logger.log(TreeLogger.ERROR,msg,caught);
    return null;
  }
}
Program: 83051
Project: 83051
Buggy source:
protected String getTextImpl(){
  return getText(elem);
}

Fixed version (ground truth):
protected native String getTextImpl();
Program: 83052
Project: 83052
Buggy source:
protected void setTextImpl(String text){
  setText(elem,text);
}

Fixed version (ground truth):
protected native void setTextImpl(String text);
Program: 83053
Project: 83053
Buggy source:
public void setFontSize(FontSize fontSize){
  int number=fontSize.getNumber();
  if ((number >= 0) && (number <= 7)) {
    execCommand("String_Node_Str",sizeNumberCSSValues[number]);
    return;
  }
}

Fixed version (ground truth):
public void setFontSize(FontSize fontSize){
  int number=fontSize.getNumber();
  if ((number >= 0) && (number <= 7)) {
    execCommand("String_Node_Str",sizeNumberCSSValues[number]);
  }
}
Program: 83054
Project: 83054
Buggy source:
public String getTypeHash() throws UnableToCompleteException {
  if (lazyHash == null) {
    char[] source=cup.getSource();
    int length=declEnd - declStart + 1;
    String s=new String(source,declStart,length);
    try {
      lazyHash=computeStrongName(s.getBytes("String_Node_Str"));
    }
 catch (    UnsupportedEncodingException e) {
      throw new UnableToCompleteException();
    }
  }
  return lazyHash;
}

Fixed version (ground truth):
public String getTypeHash() throws UnableToCompleteException {
  if (lazyHash == null) {
    char[] source=cup.getSource();
    int length=declEnd - declStart + 1;
    String s=new String(source,declStart,length);
    try {
      lazyHash=Util.computeStrongName(s.getBytes(Util.DEFAULT_ENCODING));
    }
 catch (    UnsupportedEncodingException e) {
      throw new UnableToCompleteException();
    }
  }
  return lazyHash;
}
Program: 83055
Project: 83055
Buggy source:
/** 
 * Computes the MD5 hash for the specified byte array.
 * @return a big fat string encoding of the MD5 for the content, suitablyformatted for use as a file name
 */
public static String computeStrongName(byte[] content){
  MessageDigest md5;
  try {
    md5=MessageDigest.getInstance("String_Node_Str");
  }
 catch (  NoSuchAlgorithmException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  for (int i=0; i < content.length; i++) {
    md5.update(content[i]);
  }
  byte[] hash=md5.digest();
  char[] name=new char[2 * hash.length];
  int j=0;
  for (int i=0; i < hash.length; i++) {
    name[j++]=HEX_CHARS[(hash[i] & 0xF0) >> 4];
    name[j++]=HEX_CHARS[hash[i] & 0x0F];
  }
  return new String(name);
}

Fixed version (ground truth):
/** 
 * Computes the MD5 hash for the specified byte array.
 * @return a big fat string encoding of the MD5 for the content, suitablyformatted for use as a file name
 */
public static String computeStrongName(byte[] content){
  MessageDigest md5;
  try {
    md5=MessageDigest.getInstance("String_Node_Str");
  }
 catch (  NoSuchAlgorithmException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  md5.update(content);
  return toHexString(md5.digest());
}
Program: 83056
Project: 83056
Buggy source:
/** 
 * This method invokes an inaccessable method in another class.
 * @param targetClass the class owning the method
 * @param methodName the name of the method
 * @param argumentTypes the types of the parameters to the method call
 * @param target the receiver of the method call
 * @param arguments the parameters to the method call
 */
public static void invokeInaccessableMethod(Class targetClass,String methodName,Class[] argumentTypes,TypeOracle target,Object[] arguments){
  String failedReflectErrMsg="String_Node_Str" + targetClass.getName() + "String_Node_Str"+ methodName+ "String_Node_Str"+ "String_Node_Str";
  try {
    Method m=targetClass.getDeclaredMethod(methodName,argumentTypes);
    m.setAccessible(true);
    m.invoke(target,arguments);
  }
 catch (  NoSuchMethodException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  IllegalArgumentException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  InvocationTargetException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
}

Fixed version (ground truth):
/** 
 * This method invokes an inaccessible method in another class.
 * @param targetClass the class owning the method
 * @param methodName the name of the method
 * @param argumentTypes the types of the parameters to the method call
 * @param target the receiver of the method call
 * @param arguments the parameters to the method call
 */
public static void invokeInaccessableMethod(Class targetClass,String methodName,Class[] argumentTypes,TypeOracle target,Object[] arguments){
  String failedReflectErrMsg="String_Node_Str" + targetClass.getName() + "String_Node_Str"+ methodName+ "String_Node_Str"+ "String_Node_Str";
  try {
    Method m=targetClass.getDeclaredMethod(methodName,argumentTypes);
    m.setAccessible(true);
    m.invoke(target,arguments);
  }
 catch (  NoSuchMethodException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  IllegalArgumentException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
catch (  InvocationTargetException e) {
    throw new RuntimeException(failedReflectErrMsg,e);
  }
}
Program: 83058
Project: 83058
Buggy source:
private ImageRect addImage(TreeLogger logger,String imageName) throws UnableToCompleteException {
  logger=logger.branch(TreeLogger.TRACE,"String_Node_Str" + imageName + "String_Node_Str",null);
  BufferedImage image=null;
  try {
    URL imageUrl=getClass().getClassLoader().getResource(imageName);
    if (imageUrl == null) {
      logger.log(TreeLogger.ERROR,"String_Node_Str",null);
      throw new UnableToCompleteException();
    }
    InputStream is=imageUrl.openStream();
    BufferedInputStream bis=new BufferedInputStream(is);
    byte imgByte;
    while ((imgByte=(byte)bis.read()) != -1) {
      md5.update(imgByte);
    }
    is.close();
    image=ImageIO.read(imageUrl);
    if (image == null) {
      logger.log(TreeLogger.ERROR,"String_Node_Str",null);
      throw new UnableToCompleteException();
    }
  }
 catch (  IOException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str",null);
    throw new UnableToCompleteException();
  }
  ImageRect imageRect=new ImageRect(image);
  orderedImageRects.add(imageRect);
  return imageRect;
}

Fixed version (ground truth):
private ImageRect addImage(TreeLogger logger,String imageName) throws UnableToCompleteException {
  logger=logger.branch(TreeLogger.TRACE,"String_Node_Str" + imageName + "String_Node_Str",null);
  BufferedImage image=null;
  try {
    URL imageUrl=getClass().getClassLoader().getResource(imageName);
    if (imageUrl == null) {
      logger.log(TreeLogger.ERROR,"String_Node_Str",null);
      throw new UnableToCompleteException();
    }
    byte[] imgBytes=Util.readURLAsBytes(imageUrl);
    md5.update(imgBytes);
    image=ImageIO.read(new ByteArrayInputStream(imgBytes));
    if (image == null) {
      logger.log(TreeLogger.ERROR,"String_Node_Str",null);
      throw new UnableToCompleteException();
    }
  }
 catch (  IOException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str",null);
    throw new UnableToCompleteException();
  }
  ImageRect imageRect=new ImageRect(image);
  orderedImageRects.add(imageRect);
  return imageRect;
}
Program: 83061
Project: 83061
Buggy source:
/** 
 * Sends an HTTP request based on the current builder configuration. If no request headers have been set, the header "Content-Type" will be used with a value of "text/plain; charset=utf-8".
 * @param requestData the data to send as part of the request
 * @param callback the response handler to be notified when the request failsor completes
 * @return a {@link Request} object that can be used to track the request
 */
public Request sendRequest(String requestData,RequestCallback callback) throws RequestException {
  JavaScriptObject xmlHttpRequest=httpRequest.createXmlHTTPRequest();
  String openError=XMLHTTPRequest.open(xmlHttpRequest,httpMethod,url,true,user,password);
  if (openError != null) {
    throw new RequestPermissionException(url);
  }
  setHeaders(xmlHttpRequest);
  Request request=new Request(xmlHttpRequest,timeoutMillis,callback);
  String sendError=XMLHTTPRequest.send(xmlHttpRequest,request,requestData,callback);
  if (sendError != null) {
    throw new RequestException(sendError);
  }
  return request;
}

Fixed version (ground truth):
/** 
 * Sends an HTTP request based on the current builder configuration. If no request headers have been set, the header "Content-Type" will be used with a value of "text/plain; charset=utf-8".
 * @param requestData the data to send as part of the request
 * @param callback the response handler to be notified when the request failsor completes
 * @return a {@link Request} object that can be used to track the request
 */
public Request sendRequest(String requestData,RequestCallback callback) throws RequestException {
  if (user == null && password != null) {
    throw new IllegalStateException("String_Node_Str");
  }
  JavaScriptObject xmlHttpRequest=httpRequest.createXmlHTTPRequest();
  String openError;
  if (password != null) {
    openError=XMLHTTPRequest.open(xmlHttpRequest,httpMethod,url,true,user,password);
  }
 else   if (user != null) {
    openError=XMLHTTPRequest.open(xmlHttpRequest,httpMethod,url,true,user);
  }
 else {
    openError=XMLHTTPRequest.open(xmlHttpRequest,httpMethod,url,true);
  }
  if (openError != null) {
    RequestPermissionException requestPermissionException=new RequestPermissionException(url);
    requestPermissionException.initCause(new RequestException(openError));
    throw requestPermissionException;
  }
  setHeaders(xmlHttpRequest);
  Request request=new Request(xmlHttpRequest,timeoutMillis,callback);
  String sendError=XMLHTTPRequest.send(xmlHttpRequest,request,requestData,callback);
  if (sendError != null) {
    throw new RequestException(sendError);
  }
  return request;
}
Program: 83062
Project: 83062
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#RequestBuilder(java.lang.String,java.lang.String)}. 
 */
public void testRequestBuilderStringString_HTTPMethodRestrictionOverride(){
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,"String_Node_Str");
  try {
class MyRequestBuilder extends RequestBuilder {
      MyRequestBuilder(      String httpMethod,      String url){
        super(httpMethod,url);
      }
    }
    ;
    builder=new MyRequestBuilder("String_Node_Str","String_Node_Str");
  }
 catch (  IllegalArgumentException ex) {
    fail(ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#RequestBuilder(java.lang.String,java.lang.String)}. 
 */
public void testRequestBuilderStringString_HTTPMethodRestrictionOverride(){
  new RequestBuilder(RequestBuilder.GET,"String_Node_Str");
class MyRequestBuilder extends RequestBuilder {
    MyRequestBuilder(    String httpMethod,    String url){
      super(httpMethod,url);
    }
  }
  ;
  new MyRequestBuilder("String_Node_Str","String_Node_Str");
}
Program: 83063
Project: 83063
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setHeader(java.lang.String,java.lang.String)}. <p> Test Cases: <ul> <li>name == null <li>name == "" <li>value == null <li>value == "" </ul>
 */
public void testSetRequestHeader(){
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  try {
    builder.setHeader(null,"String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  try {
    builder.setHeader("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException ex) {
  }
  try {
    builder.setHeader("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  try {
    builder.setHeader("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException ex) {
  }
  delayTestFinish(TEST_FINISH_DELAY);
  try {
    builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
    builder.setHeader("String_Node_Str","String_Node_Str");
    builder.setHeader("String_Node_Str","String_Node_Str");
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        fail("String_Node_Str");
      }
      public void onResponseReceived(      Request request,      Response response){
        assertEquals(200,response.getStatusCode());
        finishTest();
      }
    }
);
  }
 catch (  RequestException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setHeader(java.lang.String,java.lang.String)}. <p> Test Cases: <ul> <li>name == null <li>name == "" <li>value == null <li>value == "" </ul>
 */
public void testSetRequestHeader() throws RequestException {
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  try {
    builder.setHeader(null,"String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  try {
    builder.setHeader("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException ex) {
  }
  try {
    builder.setHeader("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  try {
    builder.setHeader("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException ex) {
  }
  delayTestFinish(TEST_FINISH_DELAY);
  builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  builder.setHeader("String_Node_Str","String_Node_Str");
  builder.setHeader("String_Node_Str","String_Node_Str");
  builder.sendRequest(null,new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      fail("String_Node_Str");
    }
    public void onResponseReceived(    Request request,    Response response){
      assertEquals(200,response.getStatusCode());
      finishTest();
    }
  }
);
}
Program: 83064
Project: 83064
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#sendRequest(java.lang.String,com.google.gwt.http.client.RequestCallback)}.
 */
public void testSendRequest_POST(){
  delayTestFinish(TEST_FINISH_DELAY);
  try {
    RequestBuilder builder=new RequestBuilder(RequestBuilder.POST,getTestBaseURL() + "String_Node_Str");
    builder.sendRequest("String_Node_Str",new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        fail("String_Node_Str");
      }
      public void onResponseReceived(      Request request,      Response response){
        assertEquals(200,response.getStatusCode());
        finishTest();
      }
    }
);
  }
 catch (  RequestException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#sendRequest(java.lang.String,com.google.gwt.http.client.RequestCallback)}.
 */
public void testSendRequest_POST() throws RequestException {
  delayTestFinish(TEST_FINISH_DELAY);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.POST,getTestBaseURL() + "String_Node_Str");
  builder.sendRequest("String_Node_Str",new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      fail("String_Node_Str");
    }
    public void onResponseReceived(    Request request,    Response response){
      assertEquals(200,response.getStatusCode());
      finishTest();
    }
  }
);
}
Program: 83065
Project: 83065
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setTimeoutMillis(int)}. <p> Test Cases: <ul> <li>Timeout greater than the server's response time <li>Timeout is less than the server's response time </ul>
 */
public void testSetTimeout_timeout(){
  delayTestFinish(TEST_FINISH_DELAY);
  try {
    RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
    builder.setTimeoutMillis(2000);
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        finishTest();
      }
      public void onResponseReceived(      Request request,      Response response){
        assertEquals(200,response.getStatusCode());
        fail("String_Node_Str");
      }
    }
);
  }
 catch (  RequestException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setTimeoutMillis(int)}. <p> Test Cases: <ul> <li>Timeout greater than the server's response time <li>Timeout is less than the server's response time </ul>
 */
public void testSetTimeout_timeout() throws RequestException {
  delayTestFinish(TEST_FINISH_DELAY);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  builder.setTimeoutMillis(2000);
  builder.sendRequest(null,new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      finishTest();
    }
    public void onResponseReceived(    Request request,    Response response){
      assertEquals(200,response.getStatusCode());
      fail("String_Node_Str");
    }
  }
);
}
Program: 83067
Project: 83067
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#sendRequest(java.lang.String,com.google.gwt.http.client.RequestCallback)}.
 */
public void testSendRequest_GET(){
  delayTestFinish(TEST_FINISH_DELAY);
  try {
    RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        fail();
      }
      public void onResponseReceived(      Request request,      Response response){
        assertEquals(200,response.getStatusCode());
        finishTest();
      }
    }
);
  }
 catch (  RequestException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#sendRequest(java.lang.String,com.google.gwt.http.client.RequestCallback)}.
 */
public void testSendRequest_GET() throws RequestException {
  delayTestFinish(TEST_FINISH_DELAY);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  builder.sendRequest(null,new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      fail();
    }
    public void onResponseReceived(    Request request,    Response response){
      assertEquals(200,response.getStatusCode());
      finishTest();
    }
  }
);
}
Program: 83068
Project: 83068
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setTimeoutMillis(int)}. <p> Test Cases: <ul> <li>Timeout greater than the server's response time <li>Timeout is less than the server's response time </ul>
 */
public void testSetTimeout_noTimeout(){
  delayTestFinish(TEST_FINISH_DELAY);
  try {
    RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
    builder.setTimeoutMillis(10000);
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        fail("String_Node_Str");
      }
      public void onResponseReceived(      Request request,      Response response){
        assertEquals(200,response.getStatusCode());
        finishTest();
      }
    }
);
  }
 catch (  RequestException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.RequestBuilder#setTimeoutMillis(int)}. <p> Test Cases: <ul> <li>Timeout greater than the server's response time <li>Timeout is less than the server's response time </ul>
 */
public void testSetTimeout_noTimeout() throws RequestException {
  delayTestFinish(TEST_FINISH_DELAY);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,getTestBaseURL() + "String_Node_Str");
  builder.setTimeoutMillis(10000);
  builder.sendRequest(null,new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      fail("String_Node_Str");
    }
    public void onResponseReceived(    Request request,    Response response){
      assertEquals(200,response.getStatusCode());
      finishTest();
    }
  }
);
}
Program: 83069
Project: 83069
Buggy source:
/** 
 * Creates an empty vertical split panel.
 */
public VerticalSplitPanel(){
  super(DOM.createDiv(),DOM.createDiv(),DOM.createDiv(),DOM.createDiv());
  final Element thisElem=getElement();
  final Element splitElem=getSplitElement();
  final Element topElem=getElement(TOP);
  final Element bottomElem=getElement(BOTTOM);
  probeElem=lockStyles(DOM.createDiv());
  DOM.appendChild(thisElem,topElem);
  DOM.appendChild(thisElem,splitElem);
  DOM.appendChild(thisElem,bottomElem);
  DOM.appendChild(thisElem,probeElem);
  addElementClipping(thisElem);
  addElementScrolling(topElem);
  addElementScrolling(bottomElem);
  preventElementPadding(thisElem);
  preventElementPadding(topElem);
  preventElementPadding(bottomElem);
  setElementClassname(topElem,"String_Node_Str");
  setElementClassname(splitElem,"String_Node_Str");
  setElementClassname(bottomElem,"String_Node_Str");
  setStyleName("String_Node_Str");
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      updateBottomHeight();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates an empty vertical split panel.
 */
public VerticalSplitPanel(){
  super(DOM.createDiv(),DOM.createDiv(),DOM.createDiv(),DOM.createDiv());
  final Element thisElem=getElement();
  final Element splitElem=getSplitElement();
  final Element topElem=getElement(TOP);
  final Element bottomElem=getElement(BOTTOM);
  probeElem=lockStyles(DOM.createDiv());
  DOM.appendChild(thisElem,topElem);
  DOM.appendChild(thisElem,splitElem);
  DOM.appendChild(thisElem,bottomElem);
  DOM.appendChild(thisElem,probeElem);
  addElementClipping(thisElem);
  addElementScrolling(topElem);
  addElementScrolling(bottomElem);
  preventElementPadding(thisElem);
  preventElementPadding(topElem);
  preventElementPadding(bottomElem);
  setElementClassname(topElem,"String_Node_Str");
  setElementClassname(splitElem,"String_Node_Str");
  setElementClassname(bottomElem,"String_Node_Str");
  setStyleName("String_Node_Str");
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      updateBottomHeight();
    }
  }
);
  setSplitPosition("String_Node_Str");
}
Program: 83070
Project: 83070
Buggy source:
private static void setHeight(Element elem,int px){
  DOM.setStyleAttribute(elem,"String_Node_Str",Math.max(0,px) + "String_Node_Str");
}

Fixed version (ground truth):
public void setHeight(String height){
  super.setHeight(height);
  updateBottomHeight();
}
Program: 83071
Project: 83071
Buggy source:
private static native void _destroyJsRootedValue(int jsRootedValue);

Fixed version (ground truth):
/** 
 * Destroy a JsRootedValue.
 * @param jsRootedValue pointer to underlying JsRootedValue as an integer.
 */
private static native void _destroyJsRootedValue(int jsRootedValue);
Program: 83072
Project: 83072
Buggy source:
/** 
 * Create a JsValue object with the JavaScript value jsval. Only used internally.
 * @param scriptObject reference to containing window object in JavaScript
 * @param jsval a JavaScript jsval as a 32-bit int
 */
protected JsValueMoz(int scriptObject,int jsval){
  jsRootedValue=_createJsRootedValue(scriptObject,jsval);
  if (debugFlag) {
    debugInfo.createInstance(jsRootedValue);
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param other JsValueMoz instance to copy
 */
public JsValueMoz(JsValueMoz other){
  jsRootedValue=_copyJsRootedValue(other.jsRootedValue);
  if (debugFlag) {
    debugInfo.createInstance(jsRootedValue);
  }
}
Program: 83073
Project: 83073
Buggy source:
public void doCleanup(){
  JsValueMoz.destroyJsRootedValue(jsRootedValue);
}

Fixed version (ground truth):
public void doCleanup(){
  _destroyJsRootedValue(jsRootedValue);
}
Program: 83074
Project: 83074
Buggy source:
private static native int _createJsRootedValue(int scriptObject,int jsval);

Fixed version (ground truth):
/** 
 * Create a JsRootedValue and return a pointer to it as a Java int.
 * @param jsval JavaScript jsval for initial value
 * @return pointer to JsRootedValue object as an integer
 */
private static native int _createJsRootedValue(int jsval);
Program: 83075
Project: 83075
Buggy source:
/** 
 * Call this to raise an exception in JavaScript before returning control. Currently, the JavaScript exception throw is always null.
 * @param jscontext A JSContext pointer as a Java int
 */
public static void raiseJavaScriptException(int jscontext){
  if (!_raiseJavaScriptException(jscontext)) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Call this to raise an exception in JavaScript before returning control. Currently, the JavaScript exception throw is always null.
 */
public static void raiseJavaScriptException(){
  if (!_raiseJavaScriptException()) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 83076
Project: 83076
Buggy source:
private static native boolean _raiseJavaScriptException(int jscontext);

Fixed version (ground truth):
private static native boolean _raiseJavaScriptException();
Program: 83078
Project: 83078
Buggy source:
/** 
 * Invokes a native JavaScript function.
 * @param name the name of the function to invoke
 * @param jthis the function's 'this' context
 * @param types the type of each argument
 * @param args the arguments to be passed
 * @return the return value as a Object.
 */
protected JsValue doInvoke(String name,Object jthis,Class[] types,Object[] args){
  JsValueMoz jsthis=JsValueMoz.createUndefinedValue(window);
  CompilingClassLoader isolatedClassLoader=getIsolatedClassLoader();
  jsthis.setWrappedJavaObject(isolatedClassLoader,jthis);
  int argc=args.length;
  JsValueMoz argv[]=new JsValueMoz[argc];
  int[] jsArgsInt=new int[argc];
  for (int i=0; i < argc; ++i) {
    argv[i]=JsValueMoz.createUndefinedValue(window);
    JsValueGlue.set(argv[i],isolatedClassLoader,types[i],args[i]);
    jsArgsInt[i]=argv[i].getJsRootedValue();
  }
  JsValueMoz returnVal=JsValueMoz.createUndefinedValue(window);
  LowLevelMoz.invoke(window,name,jsthis.getJsRootedValue(),jsArgsInt,returnVal.getJsRootedValue());
  return returnVal;
}

Fixed version (ground truth):
/** 
 * Invokes a native JavaScript function.
 * @param name the name of the function to invoke
 * @param jthis the function's 'this' context
 * @param types the type of each argument
 * @param args the arguments to be passed
 * @return the return value as a Object.
 */
protected JsValue doInvoke(String name,Object jthis,Class[] types,Object[] args){
  JsValueMoz jsthis=new JsValueMoz();
  CompilingClassLoader isolatedClassLoader=getIsolatedClassLoader();
  jsthis.setWrappedJavaObject(isolatedClassLoader,jthis);
  int argc=args.length;
  JsValueMoz argv[]=new JsValueMoz[argc];
  int[] jsArgsInt=new int[argc];
  for (int i=0; i < argc; ++i) {
    argv[i]=new JsValueMoz();
    JsValueGlue.set(argv[i],isolatedClassLoader,types[i],args[i]);
    jsArgsInt[i]=argv[i].getJsRootedValue();
  }
  JsValueMoz returnVal=new JsValueMoz();
  LowLevelMoz.invoke(window,name,jsthis.getJsRootedValue(),jsArgsInt,returnVal.getJsRootedValue());
  return returnVal;
}
Program: 83079
Project: 83079
Buggy source:
/** 
 * Determines whether the specified cell exists.
 * @param row the cell's row
 * @param column the cell's column
 * @return <code>true</code> if the specified cell exists
 */
public boolean isCellPresent(int row,int column){
  if ((row >= getRowCount()) && (row < 0)) {
    return false;
  }
  if ((column < 0) || (column >= getCellCount(row))) {
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
/** 
 * Determines whether the specified cell exists.
 * @param row the cell's row
 * @param column the cell's column
 * @return <code>true</code> if the specified cell exists
 */
public boolean isCellPresent(int row,int column){
  if ((row >= getRowCount()) || (row < 0)) {
    return false;
  }
  if ((column < 0) || (column >= getCellCount(row))) {
    return false;
  }
 else {
    return true;
  }
}
Program: 83080
Project: 83080
Buggy source:
/** 
 * Creates a set of potential candidates that match the given query.
 * @param limit number of candidates to return
 * @param query query string
 * @return possible candidates
 */
private HashSet createCandidatesFromWord(String query){
  HashSet candidateSet=new HashSet();
  List words=tree.getSuggestions(query,Integer.MAX_VALUE);
  if (words != null) {
    for (int i=0; i < words.size(); i++) {
      Collection belongsTo=(Collection)toCandidates.get(words.get(i));
      if (belongsTo != null) {
        candidateSet.addAll(belongsTo);
      }
    }
  }
  return candidateSet;
}

Fixed version (ground truth):
/** 
 * Creates a set of potential candidates that match the given query.
 * @param query query string
 * @return possible candidates
 */
private HashSet createCandidatesFromWord(String query){
  HashSet candidateSet=new HashSet();
  List words=tree.getSuggestions(query,Integer.MAX_VALUE);
  if (words != null) {
    for (int i=0; i < words.size(); i++) {
      Collection belongsTo=(Collection)toCandidates.get(words.get(i));
      if (belongsTo != null) {
        candidateSet.addAll(belongsTo);
      }
    }
  }
  return candidateSet;
}
Program: 83081
Project: 83081
Buggy source:
/** 
 * Can only be called by the UI thread.
 */
private void uiStyleChildAndAncestors(TreeLogger.Type type,TreeItem child){
  Display display=child.getDisplay();
  Color color;
  Image image=null;
  if (type == TreeLogger.ERROR) {
    color=display.getSystemColor(SWT.COLOR_RED);
    image=imageError;
  }
 else   if (type == TreeLogger.WARN) {
    color=display.getSystemColor(SWT.COLOR_DARK_YELLOW);
    image=imageWarning;
  }
 else   if (type == TreeLogger.INFO) {
    color=display.getSystemColor(SWT.COLOR_BLACK);
    image=imageInfo;
  }
 else   if (type == TreeLogger.TRACE) {
    color=display.getSystemColor(SWT.COLOR_DARK_GRAY);
    image=imageTrace;
  }
 else   if (type == TreeLogger.DEBUG) {
    color=display.getSystemColor(SWT.COLOR_DARK_CYAN);
    image=imageDebug;
  }
 else {
    color=display.getSystemColor(SWT.COLOR_DARK_GREEN);
    image=imageSpam;
  }
  if (image != null) {
    child.setImage(image);
  }
  child.setForeground(color);
  if (type.needsAttention()) {
    boolean propagateColor=true;
    TreeItem parent=child.getParentItem();
    while (parent != null) {
      LogEvent parentEvent=(LogEvent)parent.getData();
      if (propagateColor) {
        if (parentEvent.type.isLowerPriorityThan(type)) {
          parent.setForeground(color);
        }
 else {
          propagateColor=false;
        }
      }
      parent.setExpanded(true);
      parent=parent.getParentItem();
    }
  }
}

Fixed version (ground truth):
/** 
 * Can only be called by the UI thread.
 */
private void uiStyleChildAndAncestors(TreeLogger.Type type,TreeItem child){
  Display display=child.getDisplay();
  Color color;
  Image image=null;
  if (type == TreeLogger.ERROR) {
    color=display.getSystemColor(SWT.COLOR_RED);
    image=imageError;
  }
 else   if (type == TreeLogger.WARN) {
    color=display.getSystemColor(SWT.COLOR_DARK_YELLOW);
    image=imageWarning;
  }
 else   if (type == TreeLogger.INFO) {
    color=display.getSystemColor(SWT.COLOR_BLACK);
    image=imageInfo;
  }
 else   if (type == TreeLogger.TRACE) {
    color=display.getSystemColor(SWT.COLOR_DARK_GRAY);
    image=imageTrace;
  }
 else   if (type == TreeLogger.DEBUG) {
    color=display.getSystemColor(SWT.COLOR_DARK_CYAN);
    image=imageDebug;
  }
 else {
    color=display.getSystemColor(SWT.COLOR_DARK_GREEN);
    image=imageSpam;
  }
  if (image != null) {
    child.setImage(image);
  }
  child.setForeground(color);
  if (type.needsAttention()) {
    Stack parents=new Stack();
    boolean propagateColor=true;
    TreeItem parent=child.getParentItem();
    while (parent != null) {
      parents.push(parent);
      LogEvent parentEvent=(LogEvent)parent.getData();
      if (propagateColor) {
        if (parentEvent.type.isLowerPriorityThan(type)) {
          parent.setForeground(color);
        }
 else {
          propagateColor=false;
        }
      }
      parent=parent.getParentItem();
    }
    while (!parents.isEmpty()) {
      parent=(TreeItem)parents.pop();
      parent.setExpanded(true);
    }
  }
}
Program: 83082
Project: 83082
Buggy source:
private static void dispatchEventImpl(Event evt,Element elem,EventListener listener){
  if (elem == sCaptureElem) {
    if (eventGetType(evt) == Event.ONLOSECAPTURE) {
      sCaptureElem=null;
    }
  }
  listener.onBrowserEvent(evt);
}

Fixed version (ground truth):
private static void dispatchEventImpl(Event evt,Element elem,EventListener listener){
  if (elem == sCaptureElem) {
    if (eventGetType(evt) == Event.ONLOSECAPTURE) {
      sCaptureElem=null;
    }
  }
  Event prevCurrentEvent=currentEvent;
  currentEvent=evt;
  try {
    listener.onBrowserEvent(evt);
  }
  finally {
    currentEvent=prevCurrentEvent;
  }
}
Program: 83083
Project: 83083
Buggy source:
private void setContentDisplay(){
  String primaryStyleName=getStyleName();
  if (isOpen) {
    removeStyleName(primaryStyleName + STYLENAME_SUFFIX_CLOSED);
    addStyleName(primaryStyleName + STYLENAME_SUFFIX_OPEN);
  }
 else {
    removeStyleName(primaryStyleName + STYLENAME_SUFFIX_OPEN);
    addStyleName(primaryStyleName + STYLENAME_SUFFIX_CLOSED);
  }
  if (content != null) {
    content.setVisible(isOpen);
  }
}

Fixed version (ground truth):
private void setContentDisplay(){
  if (isOpen) {
    removeStyleDependentName(STYLENAME_SUFFIX_CLOSED);
    addStyleDependentName(STYLENAME_SUFFIX_OPEN);
  }
 else {
    removeStyleDependentName(STYLENAME_SUFFIX_OPEN);
    addStyleDependentName(STYLENAME_SUFFIX_CLOSED);
  }
  if (content != null) {
    content.setVisible(isOpen);
  }
}
Program: 83084
Project: 83084
Buggy source:
/** 
 * Gets a style from a specified row.
 * @param row the row to which the style while be added
 * @see UIObject#getStyleName()
 * @throws IndexOutOfBoundsException
 * @return the style name
 */
public String getStyleName(int row){
  return DOM.getElementProperty(getElement(row),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Gets the style of the specified row.
 * @param row the row to be queried
 * @return the style name
 * @see UIObject#getStyleName()
 * @throws IndexOutOfBoundsException
 */
public String getStyleName(int row){
  return UIObject.getStyleName(getElement(row));
}
Program: 83085
Project: 83085
Buggy source:
/** 
 * Sets the style name associated with the specified row.
 * @param row the row whose style name is to be set
 * @param styleName the new style name
 * @see UIObject#setStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void setStyleName(int row,String styleName){
  UIObject.resetStyleName(ensureElement(row),styleName);
}

Fixed version (ground truth):
/** 
 * Sets the style name associated with the specified row.
 * @param row the row whose style name is to be set
 * @param styleName the new style name
 * @see UIObject#setStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void setStyleName(int row,String styleName){
  UIObject.setStyleName(ensureElement(row),styleName);
}
Program: 83086
Project: 83086
Buggy source:
/** 
 * Removes a style from the specified row.
 * @param row the row to which the style while be removed
 * @param styleName the style name to be removed
 * @see UIObject#removeStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void removeStyleName(int row,String styleName){
  UIObject.setStyleName(ensureElement(row),styleName,false);
}

Fixed version (ground truth):
/** 
 * Removes a style from the specified row.
 * @param row the row from which the style will be removed
 * @param styleName the style name to be removed
 * @see UIObject#removeStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void removeStyleName(int row,String styleName){
  UIObject.setStyleName(ensureElement(row),styleName,false);
}
Program: 83087
Project: 83087
Buggy source:
/** 
 * Adds a style to the specified row.
 * @param row the row to which the style while be added
 * @param styleName the style name to be added
 * @see UIObject#addStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void addStyleName(int row,String styleName){
  UIObject.setStyleName(ensureElement(row),styleName,true);
}

Fixed version (ground truth):
/** 
 * Adds a style to the specified row.
 * @param row the row to which the style will be added
 * @param styleName the style name to be added
 * @see UIObject#addStyleName(String)
 * @throws IndexOutOfBoundsException
 */
public void addStyleName(int row,String styleName){
  UIObject.setStyleName(ensureElement(row),styleName,true);
}
Program: 83088
Project: 83088
Buggy source:
/** 
 * Turns read-only mode on or off.
 * @param readOnly if <code>true</code>, the widget becomes read-only; if<code>false</code> the widget becomes editable
 */
public void setReadOnly(boolean readOnly){
  DOM.setElementPropertyBoolean(getElement(),"String_Node_Str",readOnly);
  String readOnlyStyle=getStyleName() + "String_Node_Str";
  if (readOnly) {
    addStyleName(readOnlyStyle);
  }
 else {
    removeStyleName(readOnlyStyle);
  }
}

Fixed version (ground truth):
/** 
 * Turns read-only mode on or off.
 * @param readOnly if <code>true</code>, the widget becomes read-only; if<code>false</code> the widget becomes editable
 */
public void setReadOnly(boolean readOnly){
  DOM.setElementPropertyBoolean(getElement(),"String_Node_Str",readOnly);
  String readOnlyStyle="String_Node_Str";
  if (readOnly) {
    addStyleDependentName(readOnlyStyle);
  }
 else {
    removeStyleDependentName(readOnlyStyle);
  }
}
Program: 83090
Project: 83090
Buggy source:
public void computeTypeIds(){
  classes.add(null);
  jsonObjects.add(new JsonObject(program));
  for (Iterator it=program.getDeclaredTypes().iterator(); it.hasNext(); ) {
    JReferenceType type=(JReferenceType)it.next();
    if (type instanceof JClassType) {
      computeSourceClass((JClassType)type);
    }
  }
  for (Iterator it=program.getAllArrayTypes().iterator(); it.hasNext(); ) {
    JArrayType type=(JArrayType)it.next();
    computeSourceClass(type);
  }
  program.initTypeInfo(classes,jsonObjects);
  program.recordQueryIds(queryIds);
}

Fixed version (ground truth):
public void computeTypeIds(){
  classes.add(null);
  jsonObjects.add(new JsonObject(program));
  computeSourceClass(program.getTypeJavaLangString());
  assert(classes.size() == 2);
  for (Iterator it=program.getDeclaredTypes().iterator(); it.hasNext(); ) {
    JReferenceType type=(JReferenceType)it.next();
    if (type instanceof JClassType) {
      computeSourceClass((JClassType)type);
    }
  }
  for (Iterator it=program.getAllArrayTypes().iterator(); it.hasNext(); ) {
    JArrayType type=(JArrayType)it.next();
    computeSourceClass(type);
  }
  program.initTypeInfo(classes,jsonObjects);
  program.recordQueryIds(queryIds);
}
Program: 83091
Project: 83091
Buggy source:
private GenerateJavaScriptAST(JProgram program,JsProgram jsProgram){
  this.program=program;
  typeOracle=program.typeOracle;
  this.jsProgram=jsProgram;
  topScope=jsProgram.getScope();
  objectScope=jsProgram.getObjectScope();
  interfaceScope=new JsScope(objectScope,"String_Node_Str");
}

Fixed version (ground truth):
private GenerateJavaScriptAST(JProgram program,JsProgram jsProgram,boolean obfuscate,boolean prettyNames){
  this.program=program;
  typeOracle=program.typeOracle;
  this.jsProgram=jsProgram;
  topScope=jsProgram.getScope();
  objectScope=jsProgram.getObjectScope();
  interfaceScope=new JsScope(objectScope,"String_Node_Str");
  this.obfuscate=obfuscate;
  this.prettyNames=prettyNames;
  if (obfuscate) {
    specialObfuscatedIdents.put("String_Node_Str","String_Node_Str");
    specialObfuscatedIdents.put("String_Node_Str","String_Node_Str");
    specialObfuscatedIdents.put("String_Node_Str","String_Node_Str");
    specialObfuscatedIdents.put("String_Node_Str","String_Node_Str");
    specialObfuscatedIdents.put("String_Node_Str","String_Node_Str");
  }
}
Program: 83092
Project: 83092
Buggy source:
private void generateTypeTable(JsVars vars){
  JField typeIdArray=program.getSpecialField("String_Node_Str");
  JsName jsName=getName(typeIdArray);
  JsArrayLiteral arrayLit=new JsArrayLiteral();
  for (int i=0; i < program.getJsonTypeTable().size(); ++i) {
    JsonObject jsonObject=(JsonObject)program.getJsonTypeTable().get(i);
    accept(jsonObject);
    arrayLit.getExpressions().add((JsExpression)pop());
  }
  JsVar var=new JsVar(jsName);
  var.setInitExpr(arrayLit);
  vars.add(var);
}

Fixed version (ground truth):
private void generateTypeTable(JsVars vars){
  JField typeIdArray=program.getSpecialField("String_Node_Str");
  JsName typeIdArrayName=getName(typeIdArray);
  if (typeIdArrayName == null) {
    return;
  }
  JsArrayLiteral arrayLit=new JsArrayLiteral();
  for (int i=0; i < program.getJsonTypeTable().size(); ++i) {
    JsonObject jsonObject=(JsonObject)program.getJsonTypeTable().get(i);
    accept(jsonObject);
    arrayLit.getExpressions().add((JsExpression)pop());
  }
  JsVar var=new JsVar(typeIdArrayName);
  var.setInitExpr(arrayLit);
  vars.add(var);
}
Program: 83093
Project: 83093
Buggy source:
private void generateTypeName(JClassType x,JsStatements globalStmts){
  JField typeIdField=program.getSpecialField("String_Node_Str");
  JsNameRef lhs=getName(typeIdField).makeRef();
  lhs.setQualifier(globalTemp.makeRef());
  String className=getClassName(x.getName());
  String packageName=getPackageName(x.getName());
  JsExpression rhs;
  if (packageName.length() > 0) {
    JsName name=(JsName)packageNames.get(packageName);
    rhs=new JsBinaryOperation(JsBinaryOperator.ADD,name.makeRef(),jsProgram.getStringLiteral(className));
  }
 else {
    rhs=jsProgram.getStringLiteral(x.getName());
  }
  JsExpression asg=createAssignment(lhs,rhs);
  globalStmts.add(new JsExprStmt(asg));
}

Fixed version (ground truth):
private void generateTypeName(JClassType x,JsStatements globalStmts){
  JField typeNameField=program.getSpecialField("String_Node_Str");
  JsName typeNameName=getName(typeNameField);
  if (typeNameName == null) {
    return;
  }
  JsNameRef lhs=typeNameName.makeRef();
  lhs.setQualifier(globalTemp.makeRef());
  String className=getClassName(x.getName());
  String packageName=getPackageName(x.getName());
  JsExpression rhs;
  if (packageName.length() > 0) {
    JsNameRef packageRef=((JsName)packageNames.get(packageName)).makeRef();
    rhs=new JsBinaryOperation(JsBinaryOperator.ADD,packageRef,jsProgram.getStringLiteral(className));
  }
 else {
    rhs=jsProgram.getStringLiteral(x.getName());
  }
  JsExpression asg=createAssignment(lhs,rhs);
  globalStmts.add(new JsExprStmt(asg));
}
Program: 83094
Project: 83094
Buggy source:
private void generateTypeId(JClassType x,JsStatements globalStmts){
  int typeId=program.getTypeId(x);
  if (typeId >= 0) {
    JField typeIdField=program.getSpecialField("String_Node_Str");
    JsNameRef fieldRef=getName(typeIdField).makeRef();
    fieldRef.setQualifier(globalTemp.makeRef());
    JsIntegralLiteral typeIdLit=jsProgram.getIntegralLiteral(BigInteger.valueOf(typeId));
    JsExpression asg=createAssignment(fieldRef,typeIdLit);
    globalStmts.add(new JsExprStmt(asg));
  }
}

Fixed version (ground truth):
private void generateTypeId(JClassType x,JsStatements globalStmts){
  int typeId=program.getTypeId(x);
  if (typeId >= 0) {
    JField typeIdField=program.getSpecialField("String_Node_Str");
    JsName typeIdName=getName(typeIdField);
    if (typeIdName == null) {
      return;
    }
    JsNameRef fieldRef=typeIdName.makeRef();
    fieldRef.setQualifier(globalTemp.makeRef());
    JsIntegralLiteral typeIdLit=jsProgram.getIntegralLiteral(BigInteger.valueOf(typeId));
    JsExpression asg=createAssignment(fieldRef,typeIdLit);
    globalStmts.add(new JsExprStmt(asg));
  }
}
Program: 83095
Project: 83095
Buggy source:
public static void exec(JProgram program,JsProgram jsProgram){
  GenerateJavaScriptAST generateJavaScriptAST=new GenerateJavaScriptAST(program,jsProgram);
  generateJavaScriptAST.execImpl();
}

Fixed version (ground truth):
public static void exec(JProgram program,JsProgram jsProgram,boolean obfuscate,boolean prettyNames){
  GenerateJavaScriptAST generateJavaScriptAST=new GenerateJavaScriptAST(program,jsProgram,obfuscate,prettyNames);
  generateJavaScriptAST.execImpl();
}
Program: 83096
Project: 83096
Buggy source:
/** 
 * Sets the vertical alignment of the given widget within its cell.
 * @param w the widget whose vertical alignment is to be set
 * @param align the widget's vertical alignment, as defined in{@link HasVerticalAlignment}.
 */
public void setCellVerticalAlignment(Widget w,VerticalAlignmentConstant align){
  Element td=getWidgetTd(w);
  if (td != null) {
    DOM.setStyleAttribute(td,"String_Node_Str",align.getVerticalAlignString());
  }
}

Fixed version (ground truth):
protected void setCellVerticalAlignment(Element td,VerticalAlignmentConstant align){
  DOM.setStyleAttribute(td,"String_Node_Str",align.getVerticalAlignString());
}