nus-yam/ex-repair huggingface dataset:
Program: 78696
Project: 78696
Buggy source:
/** 
 * The method which extracts column name from group definition.
 * @param group
 * @return
 */
private String getGroupKeyColumnName(GroupDefinition group){
  String columnName;
  if (group.getKeyColumn() != null) {
    columnName=group.getKeyColumn();
  }
 else {
    columnName=group.getKeyExpression();
    if (columnName.toUpperCase().startsWith("String_Node_Str"))     columnName=columnName.toUpperCase().replaceFirst("String_Node_Str","String_Node_Str");
 else     if (columnName.toUpperCase().startsWith("String_Node_Str")) {
      columnName=columnName.toUpperCase().replaceFirst("String_Node_Str","String_Node_Str");
      columnName=columnName.trim().substring(0,columnName.length() - 1).trim();
    }
    if (columnName != null && columnName.matches("String_Node_Str"))     columnName=columnName.substring(1,columnName.length() - 1);
  }
  return columnName;
}

Fixed version (ground truth):
/** 
 * The method which extracts column name from group definition.
 * @param group
 * @return
 */
private String getGroupKeyColumnName(GroupDefinition group){
  String columnName;
  if (group.getKeyColumn() != null) {
    columnName=group.getKeyColumn();
  }
 else {
    columnName=group.getKeyExpression();
    if (columnName.toUpperCase().startsWith("String_Node_Str"))     columnName=columnName.toUpperCase().replaceFirst("String_Node_Str","String_Node_Str");
 else     if (columnName.toUpperCase().startsWith("String_Node_Str")) {
      columnName=columnName.toUpperCase().replaceFirst("String_Node_Str","String_Node_Str");
      columnName=columnName.trim().substring(0,columnName.length() - 1).trim();
    }
    if (columnName != null && columnName.matches("String_Node_Str"))     columnName=columnName.substring(1,columnName.length() - 1);
  }
  if (columnName.startsWith("String_Node_Str") && columnName.endsWith("String_Node_Str")) {
    columnName="String_Node_Str" + columnName.substring(2,columnName.length() - 2) + "String_Node_Str";
  }
  return columnName;
}
Program: 78697
Project: 78697
Buggy source:
/** 
 * Constructs an instance with the given report context and scope
 * @param reportContext Context for event handlers. May be null
 * @param jsScope Scope for evaluting property binding expressions. If null, property bindings have no effect
 */
public ModelDteApiAdapter(IReportContext reportContext,Scriptable jsScope){
  this.reportContext=reportContext;
  this.jsScope=jsScope;
}

Fixed version (ground truth):
/** 
 * Constructs an instance with the given report context and scope
 * @param context Context for event handlers. May be null
 * @param jsScope Scope for evaluting property binding expressions. If null, property bindings have no effect
 */
public ModelDteApiAdapter(ExecutionContext context,Scriptable jsScope){
  this.context=context;
  this.jsScope=jsScope;
}
Program: 78700
Project: 78700
Buggy source:
IScriptDataSourceDesign newScriptDataSource(ScriptDataSourceHandle source){
  ScriptDataSourceDesign dteSource=new ScriptDataSourceDesign(source.getQualifiedName());
  IScriptDataSourceEventHandler eventHandler=new ScriptDataSourceScriptExecutor(source,reportContext);
  dteSource.setEventHandler(eventHandler);
  adaptBaseDataSource(source,dteSource);
  dteSource.setOpenScript(source.getOpen());
  dteSource.setCloseScript(source.getClose());
  return dteSource;
}

Fixed version (ground truth):
IScriptDataSourceDesign newScriptDataSource(ScriptDataSourceHandle source){
  ScriptDataSourceDesign dteSource=new ScriptDataSourceDesign(source.getQualifiedName());
  IScriptDataSourceEventHandler eventHandler=new ScriptDataSourceScriptExecutor(source,context);
  dteSource.setEventHandler(eventHandler);
  adaptBaseDataSource(source,dteSource);
  dteSource.setOpenScript(source.getOpen());
  dteSource.setCloseScript(source.getClose());
  return dteSource;
}
Program: 78701
Project: 78701
Buggy source:
IScriptDataSetDesign newScriptDataSet(ScriptDataSetHandle modelDataSet,IReportContext reportContext) throws BirtException {
  ScriptDataSetDesign dteDataSet=new ScriptDataSetDesign(modelDataSet.getQualifiedName());
  IScriptDataSetEventHandler eventHandler=new ScriptDataSetScriptExecutor(modelDataSet,reportContext);
  dteDataSet.setEventHandler(eventHandler);
  adaptBaseDataSet(modelDataSet,dteDataSet);
  dteDataSet.setOpenScript(modelDataSet.getOpen());
  dteDataSet.setFetchScript(modelDataSet.getFetch());
  dteDataSet.setCloseScript(modelDataSet.getClose());
  dteDataSet.setDescribeScript(modelDataSet.getDescribe());
  return dteDataSet;
}

Fixed version (ground truth):
IScriptDataSetDesign newScriptDataSet(ScriptDataSetHandle modelDataSet,ExecutionContext context) throws BirtException {
  ScriptDataSetDesign dteDataSet=new ScriptDataSetDesign(modelDataSet.getQualifiedName());
  IScriptDataSetEventHandler eventHandler=new ScriptDataSetScriptExecutor(modelDataSet,context);
  dteDataSet.setEventHandler(eventHandler);
  adaptBaseDataSet(modelDataSet,dteDataSet);
  dteDataSet.setOpenScript(modelDataSet.getOpen());
  dteDataSet.setFetchScript(modelDataSet.getFetch());
  dteDataSet.setCloseScript(modelDataSet.getClose());
  dteDataSet.setDescribeScript(modelDataSet.getDescribe());
  return dteDataSet;
}
Program: 78702
Project: 78702
Buggy source:
/** 
 * temp method to decide whether need property binding
 * @return
 */
private boolean needPropertyBinding(){
  if (this.reportContext == null || this.jsScope == null)   return false;
 else   return true;
}

Fixed version (ground truth):
/** 
 * temp method to decide whether need property binding
 * @return
 */
private boolean needPropertyBinding(){
  if (this.context == null || this.jsScope == null)   return false;
 else   return true;
}
Program: 78705
Project: 78705
Buggy source:
/** 
 * Gets the column data by column name.
 * @param name of column
 */
Object getColumnValue(String name);

Fixed version (ground truth):
/** 
 * Gets the column data by column name.
 * @param name of column
 * @throws ScriptException 
 */
Object getColumnValue(String name) throws ScriptException ;
Program: 78706
Project: 78706
Buggy source:
/** 
 * Sets the column data by column name.
 * @param name of column
 */
void setColumnValue(String name,Object value);

Fixed version (ground truth):
/** 
 * Sets the column data by column name.
 * @param name of column
 * @throws ScriptException 
 */
void setColumnValue(String name,Object value) throws ScriptException ;
Program: 78707
Project: 78707
Buggy source:
/** 
 * @return Returns the height.
 */
DimensionType getHeight();

Fixed version (ground truth):
/** 
 * @return Returns the height.
 */
String getHeight();
Program: 78709
Project: 78709
Buggy source:
/** 
 * @param computedCol1
 * @param computedCol2
 * @return
 */
private boolean isEqualComputedColumns(List computedCol1,List computedCol2){
  if (computedCol1 == computedCol2)   return true;
  if (isEqualBasicCol(computedCol1,computedCol2) == false)   return false;
  Iterator it=computedCol1.iterator();
  Iterator it2=computedCol1.iterator();
  while (it.hasNext()) {
    IComputedColumn cc=(IComputedColumn)it.next();
    IComputedColumn cc2=(IComputedColumn)it2.next();
    if (isEqualComputedCol(cc,cc2) == false)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param computedCol1
 * @param computedCol2
 * @return
 */
private boolean isEqualComputedColumns(List computedCol1,List computedCol2){
  if (computedCol1 == computedCol2)   return true;
  int basicCol=isEqualBasicCol(computedCol1,computedCol2);
  if (basicCol == B_TRUE)   return true;
 else   if (basicCol == B_FALSE)   return false;
  Iterator it=computedCol1.iterator();
  Iterator it2=computedCol1.iterator();
  while (it.hasNext()) {
    IComputedColumn cc=(IComputedColumn)it.next();
    IComputedColumn cc2=(IComputedColumn)it2.next();
    if (isEqualComputedCol(cc,cc2) == false)     return false;
  }
  return true;
}
Program: 78710
Project: 78710
Buggy source:
/** 
 * @param map1
 * @param map2
 * @return
 */
private boolean isEqualProps(Map map1,Map map2){
  if (map1 == map2)   return true;
 else   if (map1 == null || map2 == null)   return false;
 else   if (map1.keySet().size() != map2.keySet().size())   return false;
  Set set=map1.keySet();
  Iterator it=set.iterator();
  while (it.hasNext()) {
    Object ob=it.next();
    Object value1=map1.get(ob);
    Object value2=map1.get(ob);
    if (isEqualObject(value1,value2) == false)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param map1
 * @param map2
 * @return
 */
private boolean isEqualProps(Map map1,Map map2){
  if (map1 == map2) {
    return true;
  }
 else   if (map1 == null || map2 == null) {
    if (map1 == null) {
      if (map2.size() != 0)       return false;
 else       return true;
    }
 else {
      if (map1.size() != 0)       return false;
 else       return true;
    }
  }
 else   if (map1.keySet().size() != map2.keySet().size()) {
    return false;
  }
  Set set=map1.keySet();
  Iterator it=set.iterator();
  while (it.hasNext()) {
    Object ob=it.next();
    Object value1=map1.get(ob);
    Object value2=map1.get(ob);
    if (isEqualObject(value1,value2) == false)     return false;
  }
  return true;
}
Program: 78711
Project: 78711
Buggy source:
/** 
 * @param resultHints1
 * @param resultHints2
 * @return
 */
private boolean isEqualResultHints(List resultHints1,List resultHints2){
  if (resultHints1 == resultHints2)   return true;
  if (isEqualBasicCol(resultHints1,resultHints2) == false)   return false;
  Iterator it=resultHints1.iterator();
  Iterator it2=resultHints2.iterator();
  while (it.hasNext()) {
    IColumnDefinition cd=(IColumnDefinition)it.next();
    IColumnDefinition cd2=(IColumnDefinition)it2.next();
    if (isEqualColumnDefn(cd,cd2) == false)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param resultHints1
 * @param resultHints2
 * @return
 */
private boolean isEqualResultHints(List resultHints1,List resultHints2){
  if (resultHints1 == resultHints2)   return true;
  int basicCol=isEqualBasicCol(resultHints1,resultHints2);
  if (basicCol == B_TRUE)   return true;
 else   if (basicCol == B_FALSE)   return false;
  Iterator it=resultHints1.iterator();
  Iterator it2=resultHints2.iterator();
  while (it.hasNext()) {
    IColumnDefinition cd=(IColumnDefinition)it.next();
    IColumnDefinition cd2=(IColumnDefinition)it2.next();
    if (isEqualColumnDefn(cd,cd2) == false)     return false;
  }
  return true;
}
Program: 78712
Project: 78712
Buggy source:
/** 
 * @param params1
 * @param params2
 * @return
 */
private boolean isEqualParameters(List params1,List params2){
  if (params1 == params2)   return true;
  if (isEqualBasicCol(params1,params2) == false)   return false;
  Iterator it=params1.iterator();
  Iterator it2=params2.iterator();
  while (it.hasNext()) {
    IParameterDefinition pd=(IParameterDefinition)it.next();
    IParameterDefinition pd2=(IParameterDefinition)it2.next();
    if (isEqualParameter(pd,pd2) == false)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param params1
 * @param params2
 * @return
 */
private boolean isEqualParameters(List params1,List params2){
  if (params1 == params2)   return true;
  int basicCol=isEqualBasicCol(params1,params2);
  if (basicCol == B_TRUE)   return true;
 else   if (basicCol == B_FALSE)   return false;
  Iterator it=params1.iterator();
  Iterator it2=params2.iterator();
  while (it.hasNext()) {
    IParameterDefinition pd=(IParameterDefinition)it.next();
    IParameterDefinition pd2=(IParameterDefinition)it2.next();
    if (isEqualParameter(pd,pd2) == false)     return false;
  }
  return true;
}
Program: 78713
Project: 78713
Buggy source:
/** 
 * @param col1
 * @param col2
 * @return
 */
private boolean isEqualBasicCol(Collection col1,Collection col2){
  if (col1 == col2)   return true;
 else   if (col1 == null || col2 == null)   return false;
 else   return col1.size() == col2.size();
}

Fixed version (ground truth):
/** 
 * @param col1
 * @param col2
 * @return
 */
private int isEqualBasicCol(Collection col1,Collection col2){
  if (col1 == col2) {
    return B_TRUE;
  }
 else   if (col1 == null || col2 == null) {
    if (col1 == null) {
      if (col2.size() == 0)       return B_TRUE;
 else       return B_FALSE;
    }
 else {
      if (col1.size() == 0)       return B_TRUE;
 else       return B_FALSE;
    }
  }
 else {
    if (col1.size() == col2.size())     return B_UNKNOWN;
 else     return B_FALSE;
  }
}
Program: 78714
Project: 78714
Buggy source:
/** 
 * @param ob1
 * @param ob2
 * @return
 */
private boolean isEqualObject(Object ob1,Object ob2){
  if (ob1 == ob2)   return true;
 else   if (ob1 == null || ob2 == null)   return false;
  return ob1.equals(ob2);
}

Fixed version (ground truth):
/** 
 * Only for non-collection object
 * @param ob1
 * @param ob2
 * @return
 */
private boolean isEqualObject(Object ob1,Object ob2){
  if (ob1 == ob2)   return true;
 else   if (ob1 == null || ob2 == null)   return false;
  return ob1.equals(ob2);
}
Program: 78715
Project: 78715
Buggy source:
/** 
 * @param paramsBinding1
 * @param paramsBinding2
 * @return
 */
private boolean isEqualParameterBindings(Collection paramsBinding1,Collection paramsBinding2){
  if (paramsBinding1 == paramsBinding2)   return true;
  if (isEqualBasicCol(paramsBinding1,paramsBinding2) == false)   return false;
  Iterator it=paramsBinding1.iterator();
  Iterator it2=paramsBinding2.iterator();
  while (it.hasNext()) {
    IInputParameterBinding pb=(IInputParameterBinding)it.next();
    IInputParameterBinding pb2=(IInputParameterBinding)it2.next();
    if (isEqualParameterBinding(pb,pb2) == false)     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param paramsBinding1
 * @param paramsBinding2
 * @return
 */
private boolean isEqualParameterBindings(Collection paramsBinding1,Collection paramsBinding2){
  if (paramsBinding1 == paramsBinding2)   return true;
  int basicCol=isEqualBasicCol(paramsBinding1,paramsBinding2);
  if (basicCol == B_TRUE)   return true;
 else   if (basicCol == B_FALSE)   return false;
  Iterator it=paramsBinding1.iterator();
  Iterator it2=paramsBinding2.iterator();
  while (it.hasNext()) {
    IInputParameterBinding pb=(IInputParameterBinding)it.next();
    IInputParameterBinding pb2=(IInputParameterBinding)it2.next();
    if (isEqualParameterBinding(pb,pb2) == false)     return false;
  }
  return true;
}
Program: 78717
Project: 78717
Buggy source:
public void elementChanged(DesignElementHandle focus,NotificationEvent ev){
  super.elementChanged(focus,ev);
switch (ev.getEventType()) {
case NotificationEvent.CONTENT_EVENT:
{
      markDirty(true);
      if (focus instanceof GridHandle) {
        addListenerToChildren();
        refreshChildren();
      }
      break;
    }
default :
  break;
}
}

Fixed version (ground truth):
public void elementChanged(DesignElementHandle focus,NotificationEvent ev){
  if (!isActive()) {
    return;
  }
  super.elementChanged(focus,ev);
switch (ev.getEventType()) {
case NotificationEvent.CONTENT_EVENT:
{
      markDirty(true);
      if (focus instanceof GridHandle) {
        addListenerToChildren();
        refreshChildren();
      }
      break;
    }
default :
  break;
}
}
Program: 78718
Project: 78718
Buggy source:
public void earlyStartup(){
  WorkspaceClasspathManager.registerClassPathFinder(new WorkspaceClassPathFinder());
  String value=System.getProperty("String_Node_Str");
  if (value == null || value.length() == 0) {
    return;
  }
  StringTokenizer token=new StringTokenizer(value,"String_Node_Str");
  while (token.hasMoreTokens()) {
    String str=token.nextToken();
    try {
      DebugUtil.importProject(str);
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void earlyStartup(){
  WorkspaceClassPathFinder finder=new WorkspaceClassPathFinder();
  WorkspaceClasspathManager.registerClassPathFinder(finder);
  String projectClassPaths=finder.getClassPath();
  if (projectClassPaths == null) {
    projectClassPaths="String_Node_Str";
  }
  System.setProperty(WORKSPACE_CLASSPATH_KEY,projectClassPaths);
  String value=System.getProperty("String_Node_Str");
  if (value == null || value.length() == 0) {
    return;
  }
  StringTokenizer token=new StringTokenizer(value,"String_Node_Str");
  while (token.hasMoreTokens()) {
    String str=token.nextToken();
    try {
      DebugUtil.importProject(str);
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}
Program: 78719
Project: 78719
Buggy source:
public static void handleOnCreate(CellContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content);
    if (handleJS(cell,cellDesign.getOnCreate(),context).didRun())     return;
    CellHandle handle=(CellHandle)cellDesign.getHandle();
    if (handle != null) {
      ICellEventHandler eh=(ICellEventHandler)getInstance((CellHandle)cellDesign.getHandle());
      if (eh != null)       eh.onCreate(cell,rowData,context.getReportContext());
    }
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(CellContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content,context);
    if (handleJS(cell,cellDesign.getOnCreate(),context).didRun())     return;
    CellHandle handle=(CellHandle)cellDesign.getHandle();
    if (handle != null) {
      ICellEventHandler eh=(ICellEventHandler)getInstance((CellHandle)cellDesign.getHandle());
      if (eh != null)       eh.onCreate(cell,rowData,context.getReportContext());
    }
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78720
Project: 78720
Buggy source:
public static void handleOnRender(CellContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content);
    if (handleJS(cell,cellDesign.getOnRender(),context).didRun())     return;
    ICellEventHandler eh=(ICellEventHandler)getInstance((CellHandle)cellDesign.getHandle());
    if (eh != null)     eh.onRender(cell,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(CellContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content,context);
    if (handleJS(cell,cellDesign.getOnRender(),context).didRun())     return;
    ICellEventHandler eh=(ICellEventHandler)getInstance((CellHandle)cellDesign.getHandle());
    if (eh != null)     eh.onRender(cell,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78721
Project: 78721
Buggy source:
public static void handleOnCreate(DataContent content,ExecutionContext context){
  try {
    ReportItemDesign dataItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDataItemInstance dataItem=new DataItemInstance(content);
    if (handleJS(dataItem,dataItemDesign.getOnCreate(),context).didRun())     return;
    IDataItemEventHandler eh=(IDataItemEventHandler)getInstance((DataItemHandle)dataItemDesign.getHandle());
    if (eh != null)     eh.onCreate(dataItem,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(DataContent content,ExecutionContext context){
  try {
    ReportItemDesign dataItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDataItemInstance dataItem=new DataItemInstance(content,context);
    if (handleJS(dataItem,dataItemDesign.getOnCreate(),context).didRun())     return;
    IDataItemEventHandler eh=(IDataItemEventHandler)getInstance((DataItemHandle)dataItemDesign.getHandle());
    if (eh != null)     eh.onCreate(dataItem,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78722
Project: 78722
Buggy source:
public static void handleOnRender(DataContent content,ExecutionContext context){
  try {
    ReportItemDesign dataItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDataItemInstance dataItem=new DataItemInstance(content);
    if (handleJS(dataItem,dataItemDesign.getOnRender(),context).didRun())     return;
    IDataItemEventHandler eh=(IDataItemEventHandler)getInstance((DataItemHandle)dataItemDesign.getHandle());
    if (eh != null)     eh.onRender(dataItem,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(DataContent content,ExecutionContext context){
  try {
    ReportItemDesign dataItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDataItemInstance dataItem=new DataItemInstance(content,context);
    if (handleJS(dataItem,dataItemDesign.getOnRender(),context).didRun())     return;
    IDataItemEventHandler eh=(IDataItemEventHandler)getInstance((DataItemHandle)dataItemDesign.getHandle());
    if (eh != null)     eh.onRender(dataItem,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78723
Project: 78723
Buggy source:
public static void handleOnCreate(ForeignContent content,ExecutionContext context){
  try {
    ReportItemDesign textItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDynamicTextInstance text=new DynamicTextInstance(content);
    if (handleJS(text,textItemDesign.getOnCreate(),context).didRun())     return;
    IDynamicTextEventHandler eh=(IDynamicTextEventHandler)getInstance((TextDataHandle)textItemDesign.getHandle());
    if (eh != null)     eh.onCreate(text,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(ForeignContent content,ExecutionContext context){
  try {
    ReportItemDesign textItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDynamicTextInstance text=new DynamicTextInstance(content,context);
    if (handleJS(text,textItemDesign.getOnCreate(),context).didRun())     return;
    IDynamicTextEventHandler eh=(IDynamicTextEventHandler)getInstance((TextDataHandle)textItemDesign.getHandle());
    if (eh != null)     eh.onCreate(text,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78724
Project: 78724
Buggy source:
public static void handleOnRender(ForeignContent content,ExecutionContext context){
  try {
    ReportItemDesign textItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDynamicTextInstance text=new DynamicTextInstance(content);
    if (handleJS(text,textItemDesign.getOnRender(),context).didRun())     return;
    IDynamicTextEventHandler eh=(IDynamicTextEventHandler)getInstance((TextDataHandle)textItemDesign.getHandle());
    if (eh != null)     eh.onRender(text,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(ForeignContent content,ExecutionContext context){
  try {
    ReportItemDesign textItemDesign=(ReportItemDesign)content.getGenerateBy();
    IDynamicTextInstance text=new DynamicTextInstance(content,context);
    if (handleJS(text,textItemDesign.getOnRender(),context).didRun())     return;
    IDynamicTextEventHandler eh=(IDynamicTextEventHandler)getInstance((TextDataHandle)textItemDesign.getHandle());
    if (eh != null)     eh.onRender(text,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78725
Project: 78725
Buggy source:
public static IReportElementInstance getInstance(IElement element){
  if (element == null)   return null;
  if (element instanceof CellContent)   return new CellInstance((CellContent)element);
  if (element instanceof DataContent)   return new DataItemInstance((DataContent)element);
  if (element instanceof ImageContent)   return new ImageInstance((ImageContent)element);
  if (element instanceof LabelContent)   return new LabelInstance((LabelContent)element);
  if (element instanceof ContainerContent)   return new ListInstance((ContainerContent)element);
  if (element instanceof RowContent)   return new RowInstance((RowContent)element);
  if (element instanceof TableContent) {
    Object genBy=((TableContent)element).getGenerateBy();
    if (genBy instanceof TableItemDesign)     return new TableInstance((TableContent)element);
 else     if (genBy instanceof GridItemDesign)     return new GridInstance((TableContent)element);
  }
  if (element instanceof TextContent)   return new TextItemInstance((TextContent)element);
  if (element instanceof ForeignContent) {
    ForeignContent fc=(ForeignContent)element;
    if (IForeignContent.HTML_TYPE.equals(fc.getRawType()) || IForeignContent.TEXT_TYPE.equals(fc.getRawType()) || IForeignContent.TEMPLATE_TYPE.equals(fc.getRawType()))     return new TextItemInstance(fc);
  }
  return null;
}

Fixed version (ground truth):
public static IReportElementInstance getInstance(IElement element,ExecutionContext context){
  if (element == null)   return null;
  if (element instanceof CellContent)   return new CellInstance((CellContent)element,context);
  if (element instanceof DataContent)   return new DataItemInstance((DataContent)element,context);
  if (element instanceof ImageContent)   return new ImageInstance((ImageContent)element,context);
  if (element instanceof LabelContent)   return new LabelInstance((LabelContent)element,context);
  if (element instanceof ContainerContent)   return new ListInstance((ContainerContent)element,context);
  if (element instanceof RowContent)   return new RowInstance((RowContent)element,context);
  if (element instanceof TableContent) {
    Object genBy=((TableContent)element).getGenerateBy();
    if (genBy instanceof TableItemDesign)     return new TableInstance((TableContent)element,context);
 else     if (genBy instanceof GridItemDesign)     return new GridInstance((TableContent)element,context);
  }
  if (element instanceof TextContent)   return new TextItemInstance((TextContent)element,context);
  if (element instanceof ForeignContent) {
    ForeignContent fc=(ForeignContent)element;
    if (IForeignContent.HTML_TYPE.equals(fc.getRawType()) || IForeignContent.TEXT_TYPE.equals(fc.getRawType()) || IForeignContent.TEMPLATE_TYPE.equals(fc.getRawType()))     return new TextItemInstance(fc,context);
  }
  if (element instanceof TableBandContent) {
    return getInstance(element.getParent(),context);
  }
  return null;
}
Program: 78726
Project: 78726
Buggy source:
public static void handleOnCreate(TableContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content);
    if (handleJS(grid,gridDesign.getOnCreate(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onCreate(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(TableContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content,context);
    if (handleJS(grid,gridDesign.getOnCreate(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onCreate(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78727
Project: 78727
Buggy source:
public static void handleOnRender(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content);
    if (handleJS(grid,gridDesign.getOnRender(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onRender(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content,context);
    if (handleJS(grid,gridDesign.getOnRender(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onRender(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78728
Project: 78728
Buggy source:
public static void handleOnCreate(ImageContent content,ExecutionContext context){
  try {
    ReportItemDesign imageDesign=(ReportItemDesign)content.getGenerateBy();
    IImageInstance image=new ImageInstance(content);
    if (handleJS(image,imageDesign.getOnCreate(),context).didRun())     return;
    IImageEventHandler eh=(IImageEventHandler)getInstance((ImageHandle)imageDesign.getHandle());
    if (eh != null)     eh.onCreate(image,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(ImageContent content,ExecutionContext context){
  try {
    ReportItemDesign imageDesign=(ReportItemDesign)content.getGenerateBy();
    IImageInstance image=new ImageInstance(content,context);
    if (handleJS(image,imageDesign.getOnCreate(),context).didRun())     return;
    IImageEventHandler eh=(IImageEventHandler)getInstance((ImageHandle)imageDesign.getHandle());
    if (eh != null)     eh.onCreate(image,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78729
Project: 78729
Buggy source:
public static void handleOnRender(ImageContent content,ExecutionContext context){
  try {
    ReportItemDesign imageDesign=(ReportItemDesign)content.getGenerateBy();
    IImageInstance image=new ImageInstance(content);
    if (handleJS(image,imageDesign.getOnRender(),context).didRun())     return;
    IImageEventHandler eh=(IImageEventHandler)getInstance((ImageHandle)imageDesign.getHandle());
    if (eh != null)     eh.onRender(image,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(ImageContent content,ExecutionContext context){
  try {
    ReportItemDesign imageDesign=(ReportItemDesign)content.getGenerateBy();
    IImageInstance image=new ImageInstance(content,context);
    if (handleJS(image,imageDesign.getOnRender(),context).didRun())     return;
    IImageEventHandler eh=(IImageEventHandler)getInstance((ImageHandle)imageDesign.getHandle());
    if (eh != null)     eh.onRender(image,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78730
Project: 78730
Buggy source:
public static void handleOnCreate(LabelContent content,ExecutionContext context){
  try {
    ReportItemDesign labelDesign=(ReportItemDesign)content.getGenerateBy();
    ILabelInstance label=new LabelInstance(content);
    if (handleJS(label,labelDesign.getOnCreate(),context).didRun())     return;
    ILabelEventHandler eh=(ILabelEventHandler)getInstance((LabelHandle)labelDesign.getHandle());
    if (eh != null)     eh.onCreate(label,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(LabelContent content,ExecutionContext context){
  try {
    ReportItemDesign labelDesign=(ReportItemDesign)content.getGenerateBy();
    ILabelInstance label=new LabelInstance(content,context);
    if (handleJS(label,labelDesign.getOnCreate(),context).didRun())     return;
    ILabelEventHandler eh=(ILabelEventHandler)getInstance((LabelHandle)labelDesign.getHandle());
    if (eh != null)     eh.onCreate(label,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78731
Project: 78731
Buggy source:
public static void handleOnRender(LabelContent content,ExecutionContext context){
  try {
    ReportItemDesign labelDesign=(ReportItemDesign)content.getGenerateBy();
    ILabelInstance label=new LabelInstance(content);
    if (handleJS(label,labelDesign.getOnRender(),context).didRun())     return;
    ILabelEventHandler eh=(ILabelEventHandler)getInstance((LabelHandle)labelDesign.getHandle());
    if (eh != null)     eh.onRender(label,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(LabelContent content,ExecutionContext context){
  try {
    ReportItemDesign labelDesign=(ReportItemDesign)content.getGenerateBy();
    ILabelInstance label=new LabelInstance(content,context);
    if (handleJS(label,labelDesign.getOnRender(),context).didRun())     return;
    ILabelEventHandler eh=(ILabelEventHandler)getInstance((LabelHandle)labelDesign.getHandle());
    if (eh != null)     eh.onRender(label,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78732
Project: 78732
Buggy source:
public static void handleOnCreate(ContainerContent content,ExecutionContext context){
  try {
    ReportItemDesign listDesign=(ReportItemDesign)content.getGenerateBy();
    IListInstance list=new ListInstance(content);
    if (handleJS(list,listDesign.getOnCreate(),context).didRun())     return;
    IListEventHandler eh=(IListEventHandler)getInstance((ListHandle)listDesign.getHandle());
    if (eh != null)     eh.onCreate(list,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(ContainerContent content,ExecutionContext context){
  try {
    ReportItemDesign listDesign=(ReportItemDesign)content.getGenerateBy();
    IListInstance list=new ListInstance(content,context);
    if (handleJS(list,listDesign.getOnCreate(),context).didRun())     return;
    IListEventHandler eh=(IListEventHandler)getInstance((ListHandle)listDesign.getHandle());
    if (eh != null)     eh.onCreate(list,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78733
Project: 78733
Buggy source:
public static void handleOnRender(ContainerContent content,ExecutionContext context){
  try {
    ReportItemDesign listDesign=(ReportItemDesign)content.getGenerateBy();
    IListInstance list=new ListInstance(content);
    if (handleJS(list,listDesign.getOnRender(),context).didRun())     return;
    IListEventHandler eh=(IListEventHandler)getInstance((ListHandle)listDesign.getHandle());
    if (eh != null)     eh.onRender(list,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(ContainerContent content,ExecutionContext context){
  try {
    ReportItemDesign listDesign=(ReportItemDesign)content.getGenerateBy();
    IListInstance list=new ListInstance(content,context);
    if (handleJS(list,listDesign.getOnRender(),context).didRun())     return;
    IListEventHandler eh=(IListEventHandler)getInstance((ListHandle)listDesign.getHandle());
    if (eh != null)     eh.onRender(list,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78734
Project: 78734
Buggy source:
public static void handleOnCreate(RowContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign rowDesign=(ReportItemDesign)content.getGenerateBy();
    IRowInstance row=new RowInstance(content);
    if (handleJS(row,rowDesign.getOnCreate(),context).didRun())     return;
    IRowEventHandler eh=(IRowEventHandler)getInstance((RowHandle)rowDesign.getHandle());
    if (eh != null)     eh.onCreate(row,rowData,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(RowContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign rowDesign=(ReportItemDesign)content.getGenerateBy();
    IRowInstance row=new RowInstance(content,context);
    if (handleJS(row,rowDesign.getOnCreate(),context).didRun())     return;
    IRowEventHandler eh=(IRowEventHandler)getInstance((RowHandle)rowDesign.getHandle());
    if (eh != null)     eh.onCreate(row,rowData,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78735
Project: 78735
Buggy source:
public static void handleOnRender(RowContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign rowDesign=(ReportItemDesign)content.getGenerateBy();
    IRowInstance row=new RowInstance(content);
    if (handleJS(row,rowDesign.getOnRender(),context).didRun())     return;
    IRowEventHandler eh=(IRowEventHandler)getInstance((RowHandle)rowDesign.getHandle());
    if (eh != null)     eh.onRender(row,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(RowContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign rowDesign=(ReportItemDesign)content.getGenerateBy();
    IRowInstance row=new RowInstance(content,context);
    if (handleJS(row,rowDesign.getOnRender(),context).didRun())     return;
    IRowEventHandler eh=(IRowEventHandler)getInstance((RowHandle)rowDesign.getHandle());
    if (eh != null)     eh.onRender(row,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78736
Project: 78736
Buggy source:
public static void handleOnCreate(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign tableDesign=(ReportItemDesign)content.getGenerateBy();
    ITableInstance table=new TableInstance(content);
    if (handleJS(table,tableDesign.getOnCreate(),context).didRun())     return;
    ITableEventHandler eh=(ITableEventHandler)getInstance((TableHandle)tableDesign.getHandle());
    if (eh != null)     eh.onCreate(table,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign tableDesign=(ReportItemDesign)content.getGenerateBy();
    ITableInstance table=new TableInstance(content,context);
    if (handleJS(table,tableDesign.getOnCreate(),context).didRun())     return;
    ITableEventHandler eh=(ITableEventHandler)getInstance((TableHandle)tableDesign.getHandle());
    if (eh != null)     eh.onCreate(table,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78737
Project: 78737
Buggy source:
public static void handleOnRender(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign tableDesign=(ReportItemDesign)content.getGenerateBy();
    ITableInstance table=new TableInstance(content);
    if (handleJS(table,tableDesign.getOnRender(),context).didRun())     return;
    ITableEventHandler eh=(ITableEventHandler)getInstance((TableHandle)tableDesign.getHandle());
    if (eh != null)     eh.onRender(table,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign tableDesign=(ReportItemDesign)content.getGenerateBy();
    ITableInstance table=new TableInstance(content,context);
    if (handleJS(table,tableDesign.getOnRender(),context).didRun())     return;
    ITableEventHandler eh=(ITableEventHandler)getInstance((TableHandle)tableDesign.getHandle());
    if (eh != null)     eh.onRender(table,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78738
Project: 78738
Buggy source:
/** 
 * Constructs an instance with the given report context and scope
 * @param reportContext Context for event handlers. May be null
 * @param jsScope Scope for evaluting property binding expressions. If null, property bindings have no effect
 */
public ModelDteApiAdapter(IReportContext reportContext,Scriptable jsScope){
  this.reportContext=reportContext;
  if (jsScope == null) {
    Context context=Context.enter();
    jsScope=context.initStandardObjects();
  }
 else   this.jsScope=jsScope;
}

Fixed version (ground truth):
/** 
 * Constructs an instance with the given report context and scope
 * @param reportContext Context for event handlers. May be null
 * @param jsScope Scope for evaluting property binding expressions. If null, property bindings have no effect
 */
public ModelDteApiAdapter(IReportContext reportContext,Scriptable jsScope){
  this.reportContext=reportContext;
  this.jsScope=jsScope;
}
Program: 78739
Project: 78739
Buggy source:
/** 
 * Evaluates a property binding Javascript expression
 */
String evaluatePropertyBindingExpr(String expr) throws BirtException {
  expr=formatText(expr);
  Object result=JavascriptEvalUtil.evaluateScript(null,jsScope,expr,"String_Node_Str",0);
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Evaluates a property binding Javascript expression
 */
String evaluatePropertyBindingExpr(String expr) throws BirtException {
  Object result=JavascriptEvalUtil.evaluateScript(null,jsScope,expr,"String_Node_Str",0);
  return result.toString();
}
Program: 78740
Project: 78740
Buggy source:
/** 
 * temp method to decide whether need property binding
 * @return
 */
private boolean needPropertyBinding(){
  if (this.reportContext == null)   return false;
 else   return true;
}

Fixed version (ground truth):
/** 
 * temp method to decide whether need property binding
 * @return
 */
private boolean needPropertyBinding(){
  if (this.reportContext == null || this.jsScope == null)   return false;
 else   return true;
}
Program: 78741
Project: 78741
Buggy source:
public void setInstanceID(InstanceID iid){
  instanceId=iid;
}

Fixed version (ground truth):
public void setInstanceID(InstanceID iid){
  instanceId=iid;
  currentResult=null;
}
Program: 78742
Project: 78742
Buggy source:
public void selectColumns(String[] columnNames){
  selectedColumns=columnNames;
}

Fixed version (ground truth):
public void selectColumns(String[] columnNames){
  selectedColumns=columnNames;
  currentResult=null;
}
Program: 78743
Project: 78743
Buggy source:
public List getMetaData(){
}

Fixed version (ground truth):
public List getMetaData(){
  if (resultMetaList == null) {
    resultMetaList=new ArrayList();
    ResultMetaData metaData=null;
    if (selectedColumns == null && instanceId != null) {
      try {
        currentResult=extract();
        resultMetaList.add(currentResult.getResultMetaData());
      }
 catch (      BirtException e) {
        e.printStackTrace();
      }
    }
    if (selectedColumns == null) {
      return null;
    }
 else {
      metaData=new ResultMetaData(null,selectedColumns);
      resultMetaList.add(metaData);
    }
  }
  return resultMetaList;
}
Program: 78745
Project: 78745
Buggy source:
public void drawGlyphVector(GlyphVector glyph,float x,float y){
  translate(x,y);
  currentElement=createElement("String_Node_Str");
  setFillColor(currentElement);
  for (int idx=0; idx < glyph.getNumGlyphs(); idx++) {
    Element glyphElem=createShape(glyph.getGlyphOutline(idx));
    currentElement.appendChild(glyphElem);
  }
  appendChild(currentElement);
  translate(-x,-y);
}

Fixed version (ground truth):
public void drawGlyphVector(GlyphVector glyph,float x,float y){
  translate(x,y);
  Element currentElement=dom.createElement("String_Node_Str");
  Element transElement=createElement("String_Node_Str");
  currentElement.appendChild(transElement);
  setFillColor(transElement,true);
  for (int idx=0; idx < glyph.getNumGlyphs(); idx++) {
    Element glyphElem=createShape(glyph.getGlyphOutline(idx));
    transElement.appendChild(glyphElem);
  }
  if (clip != null)   currentElement.setAttribute("String_Node_Str","String_Node_Str" + clip.hashCode() + "String_Node_Str");
  appendChild(currentElement);
  translate(-x,-y);
}
Program: 78746
Project: 78746
Buggy source:
protected void setFillColor(Element currentElement){
  Element element=currentElement;
  if (deferStrokColor != null) {
    element=deferStrokColor;
  }
  String style=element.getAttribute("String_Node_Str");
  if (style == null)   style="String_Node_Str";
  if (paint == null) {
    if (color == null)     return;
    String alpha=alphaToString(color);
    if (alpha != null)     style+="String_Node_Str" + alpha + "String_Node_Str";
    element.setAttribute("String_Node_Str",style + "String_Node_Str" + serializeToString(color)+ "String_Node_Str");
  }
 else {
    if (paint instanceof SVGGradientPaint)     element.setAttribute("String_Node_Str",style + "String_Node_Str" + ((SVGGradientPaint)paint).getId()+ "String_Node_Str");
  }
  if (styleClass != null)   element.setAttribute("String_Node_Str",styleClass);
  if (id != null)   element.setAttribute("String_Node_Str",id);
  if (clip != null)   element.setAttribute("String_Node_Str","String_Node_Str" + clip.hashCode() + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Adds fill color and style information to the element passed in.
 * @param currentElement the element to add style information to.
 * @param isClipped boolean that determines whether to defer the clipping of the element
 */
protected void setFillColor(Element currentElement,boolean deferClipped){
  Element element=currentElement;
  if (deferStrokColor != null) {
    element=deferStrokColor;
  }
  String style=element.getAttribute("String_Node_Str");
  if (style == null)   style="String_Node_Str";
  if (paint == null) {
    if (color == null)     return;
    String alpha=alphaToString(color);
    if (alpha != null)     style+="String_Node_Str" + alpha + "String_Node_Str";
    element.setAttribute("String_Node_Str",style + "String_Node_Str" + serializeToString(color)+ "String_Node_Str");
  }
 else {
    if (paint instanceof SVGGradientPaint)     element.setAttribute("String_Node_Str",style + "String_Node_Str" + ((SVGGradientPaint)paint).getId()+ "String_Node_Str");
  }
  if (styleClass != null)   element.setAttribute("String_Node_Str",styleClass);
  if (id != null)   element.setAttribute("String_Node_Str",id);
  if ((clip != null) && (!deferClipped))   element.setAttribute("String_Node_Str","String_Node_Str" + clip.hashCode() + "String_Node_Str");
}
Program: 78747
Project: 78747
Buggy source:
private void createLabel(Composite parent,String content){
  Label label=new Label(parent,SWT.NONE);
  setLabelLayoutData(label);
  if (content != null) {
    label.setText(content);
  }
}

Fixed version (ground truth):
private void createLabel(Composite parent,String content){
  Label label=new Label(parent,SWT.NONE);
  if (content != null) {
    label.setText(content);
  }
  setLabelLayoutData(label);
}
Program: 78748
Project: 78748
Buggy source:
private void setLabelLayoutData(Control control){
  GridData gd=new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
  gd.widthHint=100;
  control.setLayoutData(gd);
}

Fixed version (ground truth):
private void setLabelLayoutData(Label label){
  GridData gd=new GridData();
  if (label.getText().equals(LABEL_VALUES)) {
    gd.verticalAlignment=GridData.BEGINNING;
  }
  gd.widthHint=100;
  if (Locale.getDefault().getLanguage().equals("String_Node_Str")) {
    gd.widthHint+=15;
  }
  label.setLayoutData(gd);
}