nus-yam/ex-repair huggingface dataset:
Program: 74914
Project: 74914
Buggy source:
/** 
 * Refresh the URL list of DriverClassLoader
 * @return if the refreshURL is different than the former one then return true otherwisereturn false
 */
public boolean refreshURLs(){
  if (bundle == null)   return false;
  boolean foundNew=false;
  Enumeration files=bundle.getEntryPaths(OdaJdbcDriver.Constants.DRIVER_DIRECTORY);
  while (files.hasMoreElements()) {
    String fileName=(String)files.nextElement();
    if (OdaJdbcDriver.isDriverFile(fileName)) {
      if (!fileSet.contains(fileName)) {
        foundNew=true;
        fileSet.add(fileName);
        URL fileURL=bundle.getEntry(fileName);
        addURL(fileURL);
        logger.info("String_Node_Str" + fileName + "String_Node_Str"+ fileURL);
      }
    }
  }
  return foundNew;
}

Fixed version (ground truth):
/** 
 * Refresh the URL list of DriverClassLoader
 * @return if the refreshURL is different than the former one then return true otherwisereturn false
 * @throws OdaException 
 */
public boolean refreshURLs() throws OdaException {
  if (bundle == null)   return false;
  boolean foundNew=false;
  if (driverClassPath != null) {
    try {
      File driverClassFile=new File(driverClassPath);
      if (driverClassFile.exists()) {
        this.addURL(driverClassFile.toURL());
        if (driverClassFile.isDirectory()) {
          File[] driverFiles=driverClassFile.listFiles(new FileFilter(){
            public boolean accept(            File pathname){
              if (pathname.isFile() && OdaJdbcDriver.isDriverFile(pathname.getName())) {
                return true;
              }
              return false;
            }
          }
);
          for (int i=0; i < driverFiles.length; i++) {
            if (!fileSet.contains(driverFiles[i].getName())) {
              foundNew=true;
              fileSet.add(driverFiles[i].getName());
              addURL(driverFiles[i].toURL());
              logger.info("String_Node_Str" + driverFiles[i].getName() + "String_Node_Str"+ driverFiles[i].toURL());
            }
          }
        }
      }
    }
 catch (    MalformedURLException e) {
      throw new OdaException(e);
    }
  }
  Enumeration files=bundle.getEntryPaths(OdaJdbcDriver.Constants.DRIVER_DIRECTORY);
  while (files.hasMoreElements()) {
    String fileName=(String)files.nextElement();
    if (OdaJdbcDriver.isDriverFile(fileName)) {
      if (!fileSet.contains(fileName)) {
        foundNew=true;
        fileSet.add(fileName);
        URL fileURL=bundle.getEntry(fileName);
        addURL(fileURL);
        logger.info("String_Node_Str" + fileName + "String_Node_Str"+ fileURL);
      }
    }
  }
  return foundNew;
}
Program: 74915
Project: 74915
Buggy source:
/** 
 * Gets a JDBC connection from the specified JNDI data source URL, or if not available, directly from the specified driver and JDBC driver url.
 * @param driverClass   the class name of JDBC driver
 * @param url           JDBC connection URL
 * @param jndiNameUrl   the JNDI name to look up a Data Source name service; may be null or empty
 * @param connectionProperties  properties for establising connection
 * @return              a JDBC connection
 * @throws SQLException
 * @throws OdaException
 */
public Connection getConnection(String driverClass,String url,String jndiNameUrl,Properties connectionProperties) throws SQLException, OdaException {
  validateConnectionUrl(url);
  if (logger.isLoggable(Level.FINE))   logger.fine("String_Node_Str" + driverClass + "String_Node_Str"+ url+ "String_Node_Str"+ jndiNameUrl);
  return doConnect(driverClass,url,jndiNameUrl,connectionProperties);
}

Fixed version (ground truth):
/** 
 * Gets a JDBC connection from the specified JNDI data source URL, or if not available, directly from the specified driver and JDBC driver url.
 * @param driverClass   the class name of JDBC driver
 * @param url           JDBC connection URL
 * @param jndiNameUrl   the JNDI name to look up a Data Source name service; may be null or empty
 * @param connectionProperties  properties for establising connection
 * @return              a JDBC connection
 * @throws SQLException
 * @throws OdaException
 */
public Connection getConnection(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,String driverClassPath) throws SQLException, OdaException {
  validateConnectionUrl(url);
  if (logger.isLoggable(Level.FINE))   logger.fine("String_Node_Str" + driverClass + "String_Node_Str"+ url+ "String_Node_Str"+ jndiNameUrl);
  return doConnect(driverClass,url,jndiNameUrl,connectionProperties,driverClassPath);
}
Program: 74916
Project: 74916
Buggy source:
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private synchronized Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties) throws SQLException, OdaException {
  assert(url != null);
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ url);
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  loadAndRegisterDriver(driverClass);
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + url);
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  RuntimeException e) {
    throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private synchronized Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,String driverClassPath) throws SQLException, OdaException {
  assert(url != null);
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ url);
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  loadAndRegisterDriver(driverClass,driverClassPath);
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + url);
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  RuntimeException e) {
    throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,e.getMessage());
  }
}
Program: 74917
Project: 74917
Buggy source:
/** 
 * Try to create a connection based on given connection properties.
 * @param driverClassName
 * @param connectionString
 * @param userId
 * @param password
 * @throws SQLException
 * @throws OdaException
 */
private void tryCreateConnection(String driverClassName,String connectionString,String userId,String password) throws SQLException, OdaException {
  Connection testConn=this.getConnection(driverClassName,connectionString,userId,password);
  assert(testConn != null);
  closeConnection(testConn);
}

Fixed version (ground truth):
/** 
 * Try to create a connection based on given connection properties.
 * @param driverClassName
 * @param connectionString
 * @param userId
 * @param password
 * @throws SQLException
 * @throws OdaException
 */
private void tryCreateConnection(String driverClassName,String connectionString,String userId,String password) throws SQLException, OdaException {
  Connection testConn=this.getConnection(driverClassName,connectionString,userId,password,null);
  assert(testConn != null);
  closeConnection(testConn);
}
Program: 74919
Project: 74919
Buggy source:
public DriverClassLoader(){
  super(new URL[0],DriverClassLoader.class.getClassLoader());
  logger.entering(DriverClassLoader.class.getName(),"String_Node_Str");
  bundle=Platform.getBundle("String_Node_Str");
  if (bundle == null) {
    logger.severe("String_Node_Str");
  }
 else {
    refreshURLs();
  }
}

Fixed version (ground truth):
public DriverClassLoader(String driverClassPath) throws OdaException {
  super(new URL[0],DriverClassLoader.class.getClassLoader());
  logger.entering(DriverClassLoader.class.getName(),"String_Node_Str");
  this.driverClassPath=driverClassPath;
  bundle=Platform.getBundle("String_Node_Str");
  if (bundle == null) {
    logger.severe("String_Node_Str");
  }
 else {
    refreshURLs();
  }
}
Program: 74920
Project: 74920
Buggy source:
private void loadAndRegisterDriver(String className) throws OdaException {
  if (className == null || className.length() == 0)   return;
  if (isDeregistered(className)) {
    throw new JDBCException(ResourceConstants.CANNOT_LOAD_DRIVER,null,className);
  }
 else   if (this.registeredDrivers.containsKey(className)) {
    return;
  }
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + className);
  }
  Driver driver=findDriver(className);
  if (driver != null) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str" + className);
      DriverManager.registerDriver(new WrappedDriver(driver,className));
    }
 catch (    SQLException e) {
      logger.log(Level.WARNING,"String_Node_Str",e);
    }
  }
  registeredDrivers.put(className,DRIVER_REGISTERED);
}

Fixed version (ground truth):
private void loadAndRegisterDriver(String className,String driverClassPath) throws OdaException {
  if (className == null || className.length() == 0)   return;
  if (isDeregistered(className)) {
    throw new JDBCException(ResourceConstants.CANNOT_LOAD_DRIVER,null,className);
  }
 else   if (this.registeredDrivers.containsKey(className)) {
    return;
  }
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + className);
  }
  Driver driver=findDriver(className,driverClassPath);
  if (driver != null) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str" + className);
      DriverManager.registerDriver(new WrappedDriver(driver,className));
    }
 catch (    SQLException e) {
      logger.log(Level.WARNING,"String_Node_Str",e);
    }
  }
  registeredDrivers.put(className,DRIVER_REGISTERED);
}
Program: 74924
Project: 74924
Buggy source:
/** 
 * test aggregation using random access document manager. 
 * @throws IOException
 * @throws BirtException
 */
public void testRAAggregation1() throws IOException, BirtException {
  CubeMaterializer materializer=new CubeMaterializer();
  IDocumentManager localDocManager=materializer.getDocumentManager();
  IDocumentManager oldManager=documentManager;
  documentManager=localDocManager;
  createCube1();
  testCube1Aggregation();
  IDocArchiveWriter writer=createRAWriter();
  materializer.saveCubeToReportDocument("String_Node_Str",writer,new StopSign());
  writer.flush();
  writer.finish();
  documentManager=createRADocumentManager();
  testCube1Aggregation();
  documentManager.close();
  documentManager=oldManager;
}

Fixed version (ground truth):
/** 
 * test aggregation using random access document manager. 
 * @throws IOException
 * @throws BirtException
 */
public void testRAAggregation1() throws IOException, BirtException {
  CubeMaterializer materializer=new CubeMaterializer(null);
  IDocumentManager localDocManager=materializer.getDocumentManager();
  IDocumentManager oldManager=documentManager;
  documentManager=localDocManager;
  createCube1();
  testCube1Aggregation();
  IDocArchiveWriter writer=createRAWriter();
  materializer.saveCubeToReportDocument("String_Node_Str",writer,new StopSign());
  writer.flush();
  writer.finish();
  documentManager=createRADocumentManager();
  testCube1Aggregation();
  documentManager.close();
  documentManager=oldManager;
}
Program: 74925
Project: 74925
Buggy source:
public void shutdown(){
  logger.entering("String_Node_Str","String_Node_Str");
  if (dataSources == null) {
    logger.fine("String_Node_Str");
    return;
  }
  Collection col=dataSources.values();
  Iterator it=col.iterator();
  while (it.hasNext()) {
    DataSourceRuntime ds=(DataSourceRuntime)it.next();
    try {
      closeDataSource(ds);
    }
 catch (    DataException e) {
      if (logger.isLoggable(Level.FINE))       logger.log(Level.FINE,"String_Node_Str" + ds + "String_Node_Str",e);
    }
  }
  this.dataSourceManager.close();
  logger.logp(Level.INFO,DataEngineImpl.class.getName(),"String_Node_Str","String_Node_Str");
  dataSetDesigns=null;
  dataSources=null;
  clearTempFile();
  logger.exiting(DataEngineImpl.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
public void shutdown(){
  logger.entering("String_Node_Str","String_Node_Str");
  if (dataSources == null) {
    logger.fine("String_Node_Str");
    return;
  }
  if (shutdownListenerList != null) {
    for (int i=0; i < shutdownListenerList.size(); i++) {
      ((IShutdownListener)shutdownListenerList.get(i)).dataEngineShutdown();
    }
    shutdownListenerList.clear();
  }
  Collection col=dataSources.values();
  Iterator it=col.iterator();
  while (it.hasNext()) {
    DataSourceRuntime ds=(DataSourceRuntime)it.next();
    try {
      closeDataSource(ds);
    }
 catch (    DataException e) {
      if (logger.isLoggable(Level.FINE))       logger.log(Level.FINE,"String_Node_Str" + ds + "String_Node_Str",e);
    }
  }
  this.dataSourceManager.close();
  logger.logp(Level.INFO,DataEngineImpl.class.getName(),"String_Node_Str","String_Node_Str");
  dataSetDesigns=null;
  dataSources=null;
  clearTempFile();
  logger.exiting(DataEngineImpl.class.getName(),"String_Node_Str");
}
Program: 74926
Project: 74926
Buggy source:
/** 
 * @throws DataException
 * @throws IOException
 */
public CubeMaterializer() throws DataException, IOException {
  documentManager=DocumentManagerFactory.createFileDocumentManager();
}

Fixed version (ground truth):
/** 
 * @throws DataException
 * @throws IOException
 */
public CubeMaterializer(DataEngine dataEngine) throws DataException, IOException {
  this.dataEngine=dataEngine;
  setShutdownListener();
  documentManager=DocumentManagerFactory.createFileDocumentManager();
}
Program: 74927
Project: 74927
Buggy source:
/** 
 * @throws IOException 
 */
public void close() throws IOException {
  documentManager.close();
}

Fixed version (ground truth):
/** 
 * @throws IOException 
 */
public void close() throws IOException {
  documentManager.flush();
}
Program: 74928
Project: 74928
Buggy source:
/** 
 * @param pageContainer
 * @param left
 * @param right
 */
private void setWidthHints(Composite pageContainer,Control left,Control right){
  int leftWidth=left.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  int totalWidth=pageContainer.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  if ((double)leftWidth / (double)totalWidth > 0.4) {
    GridData data=(GridData)left.getLayoutData();
    data.widthHint=(int)(totalWidth * 0.4);
    data=(GridData)right.getLayoutData();
    data.widthHint=(int)(totalWidth * 0.6);
  }
 else {
    GridData data=(GridData)left.getLayoutData();
    data.widthHint=leftWidth;
    data=(GridData)right.getLayoutData();
    data.widthHint=totalWidth - leftWidth;
  }
}

Fixed version (ground truth):
/** 
 * @param pageContainer
 * @param left
 * @param right
 */
private void setWidthHints(Composite pageContainer,Control left,Control right,Sash sash){
  int leftWidth=left.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  int totalWidth=pageContainer.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  if ((double)leftWidth / (double)totalWidth > 0.4) {
    totalWidth=leftWidth / 40 * 100;
    leftWidth=leftWidth - sash.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
    GridData data=(GridData)left.getLayoutData();
    data.widthHint=leftWidth;
    data=(GridData)right.getLayoutData();
    data.widthHint=(int)(totalWidth * 0.6);
  }
 else {
    GridData data=(GridData)left.getLayoutData();
    data.widthHint=leftWidth;
    data=(GridData)right.getLayoutData();
    data.widthHint=totalWidth - leftWidth;
  }
}
Program: 74929
Project: 74929
Buggy source:
/** 
 * create page control for sql edit page
 * @param parent
 * @return
 */
private Control createPageControl(Composite parent){
  Composite pageContainer=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.marginWidth=0;
  layout.marginHeight=0;
  layout.horizontalSpacing=2;
  pageContainer.setLayout(layout);
  pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
  initialImage();
  initialJdbcInfo();
  Control left=createTableSelectionComposite(pageContainer);
  Sash sash=createSash(pageContainer);
  Control right=createTextualQueryComposite(pageContainer);
  setWidthHints(pageContainer,left,right);
  addDragListerner(sash,pageContainer,left,right);
  return pageContainer;
}

Fixed version (ground truth):
/** 
 * create page control for sql edit page
 * @param parent
 * @return
 */
private Control createPageControl(Composite parent){
  Composite pageContainer=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.marginWidth=0;
  layout.marginHeight=0;
  layout.horizontalSpacing=2;
  pageContainer.setLayout(layout);
  pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
  initialImage();
  initialJdbcInfo();
  Control left=createTableSelectionComposite(pageContainer);
  Sash sash=createSash(pageContainer);
  Control right=createTextualQueryComposite(pageContainer);
  setWidthHints(pageContainer,left,right,sash);
  addDragListerner(sash,pageContainer,left,right);
  return pageContainer;
}
Program: 74930
Project: 74930
Buggy source:
public void refresh(){
  enableAllControls(getControl(),isSessionEditable());
}

Fixed version (ground truth):
public void refresh(){
  enableAllControls(getControl(),isSessionEditable());
  if (m_pageHelper != null) {
    m_pageHelper.resetTestAndMngButton();
  }
}
Program: 74931
Project: 74931
Buggy source:
public void start(){
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  generator.start(content,isFirst);
  isStarted=true;
}

Fixed version (ground truth):
public void start(){
  if (isStarted) {
    return;
  }
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  generator.start(content,isFirst);
  isStarted=true;
}
Program: 74932
Project: 74932
Buggy source:
public void start(){
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  generator.start(content,isFirst);
  isStarted=true;
  flushUnStartedChildren();
}

Fixed version (ground truth):
public void start(){
  if (isStarted) {
    return;
  }
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  generator.start(content,isFirst);
  isStarted=true;
  flushUnStartedChildren();
}
Program: 74933
Project: 74933
Buggy source:
public void start(){
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  isStarted=true;
}

Fixed version (ground truth):
public void start(){
  if (isStarted) {
    return;
  }
  if (parent != null && !parent.isStarted()) {
    parent.start();
  }
  ContentEmitterUtil.startContent(content,emitter);
  isStarted=true;
}
Program: 74934
Project: 74934
Buggy source:
void adaptBaseDataSet(DataSetHandle modelDataSet,BaseDataSetDesign dteDataSet) throws BirtException {
  if ((!(modelDataSet instanceof JointDataSetHandle)) && modelDataSet.getDataSource() == null)   throw new EngineException("String_Node_Str");
  if (!(modelDataSet instanceof JointDataSetHandle)) {
    dteDataSet.setDataSource(modelDataSet.getDataSource().getQualifiedName());
    dteDataSet.setBeforeOpenScript(modelDataSet.getBeforeOpen());
    dteDataSet.setAfterOpenScript(modelDataSet.getAfterOpen());
    dteDataSet.setOnFetchScript(modelDataSet.getOnFetch());
    dteDataSet.setBeforeCloseScript(modelDataSet.getBeforeClose());
    dteDataSet.setAfterCloseScript(modelDataSet.getAfterClose());
    dteDataSet.setCacheRowCount(modelDataSet.getCachedRowCount());
  }
  populateParameter(modelDataSet,dteDataSet);
  populateComputedColumn(modelDataSet,dteDataSet);
  populateFilter(modelDataSet,dteDataSet);
  dteDataSet.setRowFetchLimit(modelDataSet.getRowFetchLimit());
  mergeHints(modelDataSet,dteDataSet);
}

Fixed version (ground truth):
void adaptBaseDataSet(DataSetHandle modelDataSet,BaseDataSetDesign dteDataSet) throws BirtException {
  if ((!(modelDataSet instanceof JointDataSetHandle)) && modelDataSet.getDataSource() == null)   throw new EngineException("String_Node_Str");
  if (!(modelDataSet instanceof JointDataSetHandle)) {
    dteDataSet.setDataSource(modelDataSet.getDataSource().getQualifiedName());
    dteDataSet.setBeforeOpenScript(modelDataSet.getBeforeOpen());
    dteDataSet.setAfterOpenScript(modelDataSet.getAfterOpen());
    dteDataSet.setOnFetchScript(modelDataSet.getOnFetch());
    dteDataSet.setBeforeCloseScript(modelDataSet.getBeforeClose());
    dteDataSet.setAfterCloseScript(modelDataSet.getAfterClose());
  }
  populateParameter(modelDataSet,dteDataSet);
  populateComputedColumn(modelDataSet,dteDataSet);
  populateFilter(modelDataSet,dteDataSet);
  dteDataSet.setRowFetchLimit(modelDataSet.getRowFetchLimit());
  mergeHints(modelDataSet,dteDataSet);
}
Program: 74935
Project: 74935
Buggy source:
/** 
 * Get all referenced bindings by the given binding in a set of binding list.
 * @param target
 * @param allHandleList
 * @return
 */
private static Set getReferencedBindings(ComputedColumnHandle target,List allHandleList,Set prohibitedSet){
  Set result=new HashSet();
  if (target == null || allHandleList == null || allHandleList.size() == 0)   return result;
  prohibitedSet.add(target.getName());
  String expr=target.getExpression();
  try {
    List referredBindings=ExpressionUtil.extractColumnExpressions(expr);
    for (int i=0; i < referredBindings.size(); i++) {
      IColumnBinding binding=(IColumnBinding)referredBindings.get(i);
      for (int j=0; j < allHandleList.size(); j++) {
        ComputedColumnHandle handle=(ComputedColumnHandle)allHandleList.get(j);
        if (handle.getName().equals(binding.getResultSetColumnName()) && !prohibitedSet.contains(binding.getResultSetColumnName())) {
          result.add(handle);
        }
      }
    }
    Set temp=new HashSet();
    for (Iterator it=result.iterator(); it.hasNext(); ) {
      Set newProhibitedSet=new HashSet();
      newProhibitedSet.addAll(prohibitedSet);
      temp.addAll(getReferencedBindings((ComputedColumnHandle)it.next(),allHandleList,newProhibitedSet));
    }
    result.addAll(temp);
  }
 catch (  BirtException e) {
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @param target
 * @param allHandleList
 * @param prohibitedSet
 * @return
 */
private static Set getReferencedBindings(ComputedColumnHandle target,List allHandleList,Set prohibitedSet){
  Set result=new HashSet();
  if (target == null || allHandleList == null || allHandleList.size() == 0)   return result;
  prohibitedSet.add(target.getName());
  String expr=target.getExpression();
  try {
    List referredBindings=ExpressionUtil.extractColumnExpressions(expr);
    for (int i=0; i < referredBindings.size(); i++) {
      IColumnBinding binding=(IColumnBinding)referredBindings.get(i);
      for (int j=0; j < allHandleList.size(); j++) {
        ComputedColumnHandle handle=(ComputedColumnHandle)allHandleList.get(j);
        if (handle.getName().equals(binding.getResultSetColumnName()) && !prohibitedSet.contains(binding.getResultSetColumnName())) {
          result.add(handle);
        }
      }
    }
    Set temp=new HashSet();
    for (Iterator it=result.iterator(); it.hasNext(); ) {
      Set newProhibitedSet=new HashSet();
      newProhibitedSet.addAll(prohibitedSet);
      temp.addAll(getReferencedBindings((ComputedColumnHandle)it.next(),allHandleList,newProhibitedSet));
    }
    result.addAll(temp);
  }
 catch (  BirtException e) {
  }
  return result;
}
Program: 74936
Project: 74936
Buggy source:
/** 
 * This function is used to decode a htmlEncoded string and convert to the orginial string
 * @param s
 * @return String
 */
public static final String htmlDecode(String s){
  if (s == null)   return null;
  String sHtmlDecoded=s.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  return sHtmlDecoded;
}

Fixed version (ground truth):
/** 
 * This function is used to decode a htmlEncoded string and convert to the orginial string
 * @param s
 * @return String
 */
public static final String htmlDecode(String s){
  if (s == null)   return null;
  String sHtmlDecoded=s.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  sHtmlDecoded=sHtmlDecoded.replaceAll("String_Node_Str","String_Node_Str");
  return sHtmlDecoded;
}
Program: 74937
Project: 74937
Buggy source:
/** 
 * This function is used to encode an ordinary string that may contain characters or more than one consecutive spaces for appropriate HTML display.
 * @param s
 * @return String
 */
public static final String htmlEncode(String s){
  String sHtmlEncoded="String_Node_Str";
  if (s == null) {
    return null;
  }
  StringBuffer sbHtmlEncoded=new StringBuffer();
  final char chrarry[]=s.toCharArray();
  for (int i=0; i < chrarry.length; i++) {
    char c=chrarry[i];
switch (c) {
case '\t':
      sbHtmlEncoded.append("String_Node_Str");
    break;
case '\n':
  sbHtmlEncoded.append("String_Node_Str");
break;
case '\r':
sbHtmlEncoded.append("String_Node_Str");
break;
case ' ':
sbHtmlEncoded.append("String_Node_Str");
break;
case '"':
sbHtmlEncoded.append("String_Node_Str");
break;
case '\'':
sbHtmlEncoded.append("String_Node_Str");
break;
case '<':
sbHtmlEncoded.append("String_Node_Str");
break;
case '>':
sbHtmlEncoded.append("String_Node_Str");
break;
case '`':
sbHtmlEncoded.append("String_Node_Str");
break;
case '&':
sbHtmlEncoded.append("String_Node_Str");
break;
default :
sbHtmlEncoded.append(c);
}
}
sHtmlEncoded=sbHtmlEncoded.toString();
return sHtmlEncoded;
}

Fixed version (ground truth):
/** 
 * This function is used to encode an ordinary string that may contain characters or more than one consecutive spaces for appropriate HTML display.
 * @param s
 * @return String
 */
public static final String htmlEncode(String s){
  String sHtmlEncoded="String_Node_Str";
  if (s == null) {
    return null;
  }
  StringBuffer sbHtmlEncoded=new StringBuffer();
  final char chrarry[]=s.toCharArray();
  for (int i=0; i < chrarry.length; i++) {
    char c=chrarry[i];
switch (c) {
case '\t':
      sbHtmlEncoded.append("String_Node_Str");
    break;
case '\n':
  sbHtmlEncoded.append("String_Node_Str");
break;
case '\r':
sbHtmlEncoded.append("String_Node_Str");
break;
case ' ':
sbHtmlEncoded.append("String_Node_Str");
break;
case '"':
sbHtmlEncoded.append("String_Node_Str");
break;
case '\'':
sbHtmlEncoded.append("String_Node_Str");
break;
case '<':
sbHtmlEncoded.append("String_Node_Str");
break;
case '>':
sbHtmlEncoded.append("String_Node_Str");
break;
case '`':
sbHtmlEncoded.append("String_Node_Str");
break;
case '&':
sbHtmlEncoded.append("String_Node_Str");
break;
case '\\':
sbHtmlEncoded.append("String_Node_Str");
break;
case '/':
sbHtmlEncoded.append("String_Node_Str");
break;
default :
sbHtmlEncoded.append(c);
}
}
sHtmlEncoded=sbHtmlEncoded.toString();
return sHtmlEncoded;
}
Program: 74938
Project: 74938
Buggy source:
/** 
 * Refresh swt browser
 */
public void display(){
  if (browser != null) {
    String uri=getFileUri();
    if (uri != null && uri.length() > 0) {
      if (this.options == null) {
        this.options=new HashMap();
        this.options.put(WebViewer.SERVLET_NAME_KEY,InputParameterHtmlDialog.VIEWER_RUN);
        this.options.put(WebViewer.FORMAT_KEY,WebViewer.HTML);
      }
      this.options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
      this.options.put(WebViewer.MAX_ROWS_KEY,ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW));
      WebViewer.display(uri,browser,this.options);
    }
  }
}

Fixed version (ground truth):
/** 
 * Refresh swt browser
 */
public void display(){
  if (browser != null) {
    String uri=getFileUri();
    if (uri != null && uri.length() > 0) {
      if (this.options == null) {
        this.options=new HashMap();
        this.options.put(WebViewer.SERVLET_NAME_KEY,InputParameterHtmlDialog.VIEWER_RUN);
        this.options.put(WebViewer.FORMAT_KEY,WebViewer.HTML);
      }
      this.options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
      this.options.put(WebViewer.MAX_ROWS_KEY,ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW));
      this.options.put(WebViewer.MAX_CUBELEVELS_KEY,ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXCUBELEVEL));
      WebViewer.display(uri,browser,this.options);
    }
  }
}
Program: 74939
Project: 74939
Buggy source:
public Data(final String txt,final StyleEntry s){
  this.txt=txt;
  this.style=s;
  id=ID++;
}

Fixed version (ground truth):
public Data(final Object txt,final StyleEntry s){
  this.txt=txt;
  this.style=s;
  id=ID++;
}
Program: 74940
Project: 74940
Buggy source:
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  engine.addData(data.getText(),data.getComputedStyle(),url);
}

Fixed version (ground truth):
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  engine.addData(data,data.getComputedStyle(),url);
}
Program: 74941
Project: 74941
Buggy source:
public void writeText(String txt){
  writer.openTag("String_Node_Str");
  try {
    new java.math.BigDecimal(txt);
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void writeText(Object d){
  writer.openTag("String_Node_Str");
  if (d instanceof Data) {
    if (((Data)d).getDatatype().equals(Data.NUMBER)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else     if (((Data)d).getDatatype().equals(Data.DATE)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
    writer.text(((Data)d).txt.toString());
  }
 else {
    writer.text(d.toString());
  }
  writer.closeTag("String_Node_Str");
}
Program: 74942
Project: 74942
Buggy source:
protected void writeTxtData(Data d){
  startCell(d.span.getCol(),d.span.getColSpan(),0,d.styleId,d.url);
  writeText(d.txt);
  endCell();
}

Fixed version (ground truth):
protected void writeTxtData(Data d){
  startCell(d.span.getCol(),d.span.getColSpan(),0,d.styleId,d.url);
  writeText(d);
  endCell();
}
Program: 74943
Project: 74943
Buggy source:
protected void writeFormulaData(Data d){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str",d.span.getCol());
  writer.attribute("String_Node_Str",d.txt);
  writer.attribute("String_Node_Str",d.span.getColSpan());
  writer.attribute("String_Node_Str",d.styleId);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
protected void writeFormulaData(Data d){
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str",d.span.getCol());
  writer.attribute("String_Node_Str",d.txt.toString());
  writer.attribute("String_Node_Str",d.span.getColSpan());
  writer.attribute("String_Node_Str",d.styleId);
  writer.closeTag("String_Node_Str");
}
Program: 74946
Project: 74946
Buggy source:
/** 
 * Build the style of cell content.
 */
public void buildCellStyle(ICellContent cell,StringBuffer styleBuffer,boolean isHead){
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    styleBuffer.append("String_Node_Str");
  }
  IStyle style=getElementStyle(cell);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of cell content.
 */
public void buildCellStyle(ICellContent cell,StringBuffer styleBuffer,boolean isHead){
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    styleBuffer.append("String_Node_Str");
  }
  IStyle style=cell.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  style=getElementStyle(cell);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}
Program: 74947
Project: 74947
Buggy source:
/** 
 * Build the style of column
 */
public void buildColumnStyle(IColumn column,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,column.getWidth());
  IStyle style=column.getStyle();
  String value=style.getVerticalAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  if (!isEmbeddable) {
    style=column.getInlineStyle();
    if (style == null) {
      return;
    }
  }
  if (style.isEmpty()) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of column
 */
public void buildColumnStyle(IColumn column,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,column.getWidth());
  IStyle style=column.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  String value=style.getVerticalAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  if (!isEmbeddable) {
    style=column.getInlineStyle();
    if (style == null) {
      return;
    }
  }
  if (style.isEmpty()) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}
Program: 74948
Project: 74948
Buggy source:
/** 
 * Build the style of table content
 */
public void buildTableStyle(ITableContent table,StringBuffer styleBuffer){
  addDefaultTableStyles(styleBuffer);
  IStyle style=table.getStyle();
  CSSValue display=null;
  display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
 else   if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  DimensionType height=table.getHeight();
  if (null != height) {
    buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,height);
  }
  DimensionType width=table.getWidth();
  if (null != width) {
    buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,width);
  }
 else {
    styleBuffer.append("String_Node_Str");
  }
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    if (!"String_Node_Str".equalsIgnoreCase(style.getCanShrink())) {
      styleBuffer.append("String_Node_Str");
    }
  }
  String value=style.getTextAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  style=getElementStyle(table);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of table content
 */
public void buildTableStyle(ITableContent table,StringBuffer styleBuffer){
  addDefaultTableStyles(styleBuffer);
  IStyle style=table.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
 else   if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  DimensionType height=table.getHeight();
  if (null != height) {
    buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,height);
  }
  DimensionType width=table.getWidth();
  if (null != width) {
    buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,width);
  }
 else {
    styleBuffer.append("String_Node_Str");
  }
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    if (!"String_Node_Str".equalsIgnoreCase(style.getCanShrink())) {
      styleBuffer.append("String_Node_Str");
    }
  }
  String value=style.getTextAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  style=getElementStyle(table);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}
Program: 74949
Project: 74949
Buggy source:
/** 
 * Build the style of row content.
 */
public void buildRowStyle(IRowContent row,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,row.getHeight());
  IStyle style=getElementStyle(row);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of row content.
 */
public void buildRowStyle(IRowContent row,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,row.getHeight());
  IStyle style=row.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  style=getElementStyle(row);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
  AttributeBuilder.buildTextDecoration(styleBuffer,style);
}
Program: 74950
Project: 74950
Buggy source:
public void endTable(ITableContent table){
  if (enableMetadata) {
    metadataEmitter.endTable(table);
  }
  writer.closeTag(HTMLTags.TAG_TABLE);
  if (enableMetadata) {
    metadataEmitter.endWrapTable(table);
  }
  if (needImplementAlignTable(table)) {
    writer.closeTag(HTMLTags.TAG_DIV);
  }
  logger.log(Level.FINE,"String_Node_Str");
}

Fixed version (ground truth):
public void endTable(ITableContent table){
  if (enableMetadata) {
    metadataEmitter.endTable(table);
  }
  writer.closeTag(HTMLTags.TAG_TABLE);
  if (enableMetadata) {
    metadataEmitter.endWrapTable(table);
  }
  boolean DIVWrap=((Boolean)tableDIVWrapedFlagStack.pop()).booleanValue();
  if (DIVWrap) {
    writer.closeTag(HTMLTags.TAG_DIV);
  }
  logger.log(Level.FINE,"String_Node_Str");
}
Program: 74952
Project: 74952
Buggy source:
/** 
 * Build the style of column
 */
public void buildColumnStyle(IColumn column,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,column.getWidth());
}

Fixed version (ground truth):
/** 
 * Build the style of column
 */
public void buildColumnStyle(IColumn column,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,column.getWidth());
  IStyle style=column.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
}
Program: 74953
Project: 74953
Buggy source:
/** 
 * Build the style of table content
 */
public void buildTableStyle(ITableContent table,StringBuffer styleBuffer){
  addDefaultTableStyles(styleBuffer);
  IStyle style=table.getStyle();
  CSSValue display=null;
  display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
 else   if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  DimensionType height=table.getHeight();
  if (null != height) {
    buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,height);
  }
  DimensionType width=table.getWidth();
  if (null != width) {
    buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,width);
  }
 else {
    styleBuffer.append("String_Node_Str");
  }
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    if (!"String_Node_Str".equalsIgnoreCase(style.getCanShrink())) {
      styleBuffer.append("String_Node_Str");
    }
  }
  style=getElementStyle(table);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of table content
 */
public void buildTableStyle(ITableContent table,StringBuffer styleBuffer){
  addDefaultTableStyles(styleBuffer);
  IStyle style=table.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
 else   if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  DimensionType height=table.getHeight();
  if (null != height) {
    buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,height);
  }
  DimensionType width=table.getWidth();
  if (null != width) {
    buildSize(styleBuffer,HTMLTags.ATTR_WIDTH,width);
  }
 else {
    styleBuffer.append("String_Node_Str");
  }
  if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {
    if (!"String_Node_Str".equalsIgnoreCase(style.getCanShrink())) {
      styleBuffer.append("String_Node_Str");
    }
  }
  style=getElementStyle(table);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBox(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
}
Program: 74954
Project: 74954
Buggy source:
/** 
 * Build the style of row content.
 */
public void buildRowStyle(IRowContent row,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,row.getHeight());
  IStyle style=getElementStyle(row);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
}

Fixed version (ground truth):
/** 
 * Build the style of row content.
 */
public void buildRowStyle(IRowContent row,StringBuffer styleBuffer){
  buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,row.getHeight());
  IStyle style=row.getStyle();
  CSSValue display=style.getProperty(IStyle.STYLE_DISPLAY);
  if (IStyle.NONE_VALUE == display) {
    styleBuffer.append("String_Node_Str");
  }
  style=getElementStyle(row);
  if (style == null) {
    return;
  }
  AttributeBuilder.buildFont(styleBuffer,style);
  AttributeBuilder.buildBackground(styleBuffer,style,reportEmitter);
  AttributeBuilder.buildText(styleBuffer,style);
  AttributeBuilder.buildVisual(styleBuffer,style);
}
Program: 74955
Project: 74955
Buggy source:
private String applyIntrinsicFont(String fontName,int fontStyle,float fontSize,String text){
  setFont(fontName,fontSize);
  text=text.replaceAll("String_Node_Str","String_Node_Str");
  text=text.replaceAll("String_Node_Str","String_Node_Str");
  return ("String_Node_Str" + text + "String_Node_Str");
}

Fixed version (ground truth):
private String applyIntrinsicFont(String fontName,int fontStyle,float fontSize,String text){
  setFont(fontName,fontSize);
  text=escapeSpecialCharacter(text);
  return ("String_Node_Str" + text + "String_Node_Str");
}