nus-yam/ex-repair huggingface dataset:
Program: 64862
Project: 64862
Buggy source:
protected void cloneFields(CubeQueryDefinition cloned){
  cloned.bindingList.addAll(this.bindingList);
  cloned.breakHierarchyOption=this.breakHierarchyOption;
  cloned.cacheQueryResults=this.cacheQueryResults;
  cloned.columnEdge=this.columnEdge != null ? this.columnEdge.clone() : null;
  cloned.computedMeasureList.addAll(this.computedMeasureList);
  cloned.cubeOperations.addAll(this.cubeOperations);
  cloned.derivedMeasureList.addAll(this.derivedMeasureList);
  cloned.filterList.addAll(this.filterList);
  cloned.ID=this.ID;
  cloned.measureList.addAll(this.measureList);
  cloned.needAccessFactTable=this.needAccessFactTable;
  cloned.pageEdge=this.pageEdge != null ? this.pageEdge.clone() : null;
  cloned.queryResultsID=this.queryResultsID;
  cloned.rowEdge=this.rowEdge != null ? this.rowEdge.clone() : null;
  cloned.sortList.addAll(this.sortList);
}

Fixed version (ground truth):
protected void cloneFields(CubeQueryDefinition cloned){
  cloned.bindingList.addAll(this.bindingList);
  cloned.breakHierarchyOption=this.breakHierarchyOption;
  cloned.cacheQueryResults=this.cacheQueryResults;
  cloned.columnEdge=this.columnEdge != null ? this.columnEdge.clone() : null;
  cloned.computedMeasureList.addAll(this.computedMeasureList);
  cloned.cubeOperations.addAll(this.cubeOperations);
  cloned.derivedMeasureList.addAll(this.derivedMeasureList);
  cloned.filterList.addAll(this.filterList);
  cloned.ID=this.ID;
  cloned.measureList.addAll(this.measureList);
  cloned.needAccessFactTable=this.needAccessFactTable;
  cloned.pageEdge=this.pageEdge != null ? this.pageEdge.clone() : null;
  cloned.queryResultsID=this.queryResultsID;
  cloned.rowEdge=this.rowEdge != null ? this.rowEdge.clone() : null;
  cloned.sortList.addAll(this.sortList);
  cloned.links.addAll(this.links);
}
Program: 64863
Project: 64863
Buggy source:
public static QueryDefinition cloneQuery(QueryDefinition query){
  if (query == null) {
    return null;
  }
  IBaseQueryDefinition parent=query.getParentQuery();
  QueryDefinition newQuery=null;
  if (parent instanceof BaseQueryDefinition) {
    newQuery=new QueryDefinition((BaseQueryDefinition)parent,query.needAutoBinding());
  }
 else {
    newQuery=new QueryDefinition(query.needAutoBinding());
  }
  newQuery.getBindings().putAll(query.getBindings());
  newQuery.getFilters().addAll(query.getFilters());
  newQuery.getSorts().addAll(query.getSorts());
  newQuery.getSubqueries().addAll(query.getSubqueries());
  newQuery.getGroups().addAll(query.getGroups());
  newQuery.setUsesDetails(query.usesDetails());
  newQuery.setMaxRows(query.getMaxRows());
  newQuery.setDataSetName(query.getDataSetName());
  newQuery.setColumnProjection(query.getColumnProjection());
  newQuery.setName(query.getName());
  newQuery.setIsSummaryQuery(query.isSummaryQuery());
  newQuery.setQueryExecutionHints(query.getQueryExecutionHints());
  return newQuery;
}

Fixed version (ground truth):
public static QueryDefinition cloneQuery(QueryDefinition query){
  if (query == null) {
    return null;
  }
  IBaseQueryDefinition parent=query.getParentQuery();
  QueryDefinition newQuery=null;
  if (parent instanceof BaseQueryDefinition) {
    newQuery=new QueryDefinition((BaseQueryDefinition)parent,query.needAutoBinding());
  }
 else {
    newQuery=new QueryDefinition(query.needAutoBinding());
  }
  newQuery.getBindings().putAll(query.getBindings());
  newQuery.getFilters().addAll(query.getFilters());
  newQuery.getSorts().addAll(query.getSorts());
  newQuery.getSubqueries().addAll(query.getSubqueries());
  newQuery.getGroups().addAll(query.getGroups());
  newQuery.setUsesDetails(query.usesDetails());
  newQuery.setMaxRows(query.getMaxRows());
  newQuery.setDataSetName(query.getDataSetName());
  newQuery.setColumnProjection(query.getColumnProjection());
  newQuery.setName(query.getName());
  newQuery.setIsSummaryQuery(query.isSummaryQuery());
  newQuery.setQueryExecutionHints(query.getQueryExecutionHints());
  newQuery.setLinks(query.getLinks());
  return newQuery;
}
Program: 64864
Project: 64864
Buggy source:
private void doAddContent(IContent content){
  if (contents.size() == CONTENTS_CONVERTION_THRESHOLD) {
    contents=new TreeSet<IContent>(contents);
  }
  contents.add(content);
}

Fixed version (ground truth):
private void doAddContent(IContent content){
  if (contents.size() == CONTENTS_CONVERTION_THRESHOLD) {
    contents=new LinkedHashSet<IContent>(contents);
  }
  contents.add(content);
}
Program: 64865
Project: 64865
Buggy source:
/** 
 */
public void testLike(){
  String[] script=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  boolean[] result=new boolean[]{true,true,true,true,true,false,false,false,true,false,true,false,true};
  for (int i=0; i < script.length; i++) {
    assertEquals(result[i],((Boolean)cx.evaluateString(scope,script[i],"String_Node_Str",1,null)).booleanValue());
  }
}

Fixed version (ground truth):
/** 
 */
public void testLike(){
  String[] script=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  boolean[] result=new boolean[]{true,true,true,true,true,false,false,false,true,false,true,false,true,true,false,true,true};
  for (int i=0; i < script.length; i++) {
    assertEquals(result[i],((Boolean)cx.evaluateString(scope,script[i],"String_Node_Str",1,null)).booleanValue());
  }
}
Program: 64867
Project: 64867
Buggy source:
public String getQueryText() throws BirtException {
  return queryText;
}

Fixed version (ground truth):
public String getQueryText(){
  return queryText;
}
Program: 64868
Project: 64868
Buggy source:
public String getQueryText() throws ScriptException {
  try {
    return dataSet.getQueryText();
  }
 catch (  BirtException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public String getQueryText() throws ScriptException {
  return dataSet.getQueryText();
}
Program: 64869
Project: 64869
Buggy source:
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FiscalWeek</code>
 */
public void testFiscalWeek() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int[] values=new int[]{1,2,1,53,27,28,2,6};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}

Fixed version (ground truth):
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FiscalWeek</code>
 */
public void testFiscalWeek() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int[] values=new int[]{1,2,1,52,27,28,2,6};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}
Program: 64870
Project: 64870
Buggy source:
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FirstDayOfFiscalYear</code>
 */
public void testFirstDayOfFiscalYear() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  Calendar c=Calendar.getInstance();
  c.clear();
  Date[] values=new Date[]{date(c,2015,0,1),date(c,2015,0,1),date(c,2015,6,1),date(c,2015,6,1),date(c,2014,6,1),date(c,2014,6,1)};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}

Fixed version (ground truth):
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FirstDayOfFiscalYear</code>
 */
public void testFirstDayOfFiscalYear() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  Calendar c=Calendar.getInstance();
  c.clear();
  Date[] values=new Date[]{date(c,2015,0,1),date(c,2015,0,1),date(c,2014,6,1),date(c,2015,6,1),date(c,2014,6,1),date(c,2014,6,1)};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}
Program: 64871
Project: 64871
Buggy source:
protected Object getValue(Object[] args) throws BirtException {
  if (existNullValue(args)) {
    return null;
  }
  Calendar current=getCalendar(null);
  if (args[0] instanceof Integer) {
    if (args.length > 1) {
      current=getCalendar(DataTypeUtil.toDate(args[1]));
    }
    current.set(Calendar.YEAR,(Integer)args[0]);
  }
 else {
    current.setTime(DataTypeUtil.toDate(args[0]));
    if (args.length > 1) {
      Calendar start=getCalendar(DataTypeUtil.toDate(args[1]));
      adjustFiscalYear(current,start);
      current.set(Calendar.MONTH,start.get(Calendar.MONTH));
      current.set(Calendar.DATE,start.get(Calendar.DATE));
    }
 else {
      current.set(Calendar.MONTH,0);
      current.set(Calendar.DATE,1);
    }
  }
  return current.getTime();
}

Fixed version (ground truth):
protected Object getValue(Object[] args) throws BirtException {
  if (existNullValue(args)) {
    return null;
  }
  Calendar current=getCalendar(null);
  if (args[0] instanceof Integer) {
    if (args.length > 1) {
      current=getCalendar(DataTypeUtil.toDate(args[1]));
    }
    current.set(Calendar.YEAR,(Integer)args[0]);
    if (current.get(Calendar.DAY_OF_YEAR) > 1) {
      current.add(Calendar.YEAR,-1);
    }
  }
 else {
    current.setTime(DataTypeUtil.toDate(args[0]));
    if (args.length > 1) {
      Calendar start=getCalendar(DataTypeUtil.toDate(args[1]));
      adjustFiscalYear(current,start);
      current.set(Calendar.MONTH,start.get(Calendar.MONTH));
      current.set(Calendar.DATE,start.get(Calendar.DATE));
    }
 else {
      current.set(Calendar.MONTH,0);
      current.set(Calendar.DATE,1);
    }
  }
  return current.getTime();
}
Program: 64872
Project: 64872
Buggy source:
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FiscalWeek</code>
 */
public void testFiscalWeek() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int[] values=new int[]{3,50,3,2,6};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}

Fixed version (ground truth):
/** 
 * Test method for <code>org.eclipse.birt.core.script.function.bre.BirtDateTime.Function_FiscalWeek</code>
 */
public void testFiscalWeek() throws BirtException {
  String[] scripts=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int[] values=new int[]{1,2,1,53,27,28,2,6};
  for (int i=0; i < values.length; i++) {
    Object result=cx.evaluateString(scope,scripts[i],"String_Node_Str",1,null);
    assertEquals(String.valueOf(i),values[i],result);
  }
}
Program: 64873
Project: 64873
Buggy source:
protected void processGroup(ListingDesign listing,int groupLevel,boolean breakBefore){
  GroupDesign group=listing.getGroup(groupLevel);
  PolicyNode parent=parentNode;
  visitReportItem(group,Boolean.TRUE);
  parentNode=currentNode;
  if (group.getPageBreakAfter() != null) {
    currentNode.breakAfter=true;
  }
  if (breakBefore || group.getPageBreakBefore() != null) {
    currentNode.breakBefore=true;
  }
  BandDesign header=group.getHeader();
  if (header != null) {
    header.accept(this,null);
  }
  if (++groupLevel < listing.getGroupCount()) {
    processGroup(listing,groupLevel,header != null);
  }
 else {
    processDetail(listing,true);
    processDetail(listing,false);
  }
  BandDesign footer=group.getFooter();
  if (footer != null) {
    footer.accept(this,Boolean.TRUE);
  }
  parentNode=parent;
}

Fixed version (ground truth):
protected void processGroup(ListingDesign listing,int groupLevel,boolean breakBefore){
  GroupDesign group=listing.getGroup(groupLevel);
  PolicyNode parent=parentNode;
  visitReportItem(group,Boolean.TRUE);
  parentNode=currentNode;
  if (group.getPageBreakAfter() != null) {
    currentNode.breakAfter=true;
  }
  if (breakBefore || group.getPageBreakBefore() != null) {
    currentNode.breakBefore=true;
  }
  BandDesign header=group.getHeader();
  if (header != null) {
    header.accept(this,null);
  }
  if (++groupLevel < listing.getGroupCount()) {
    processGroup(listing,groupLevel,header != null);
    processGroup(listing,groupLevel,false);
  }
 else {
    processDetail(listing,true);
    processDetail(listing,false);
  }
  BandDesign footer=group.getFooter();
  if (footer != null) {
    footer.accept(this,Boolean.TRUE);
  }
  parentNode=parent;
}
Program: 64874
Project: 64874
Buggy source:
protected PolicyNode findNextNode(PolicyNode node){
  if (node.design instanceof GroupDesign)   return node;
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  int count=node.parent.children.size();
  if (index < count - 1) {
    return (PolicyNode)node.parent.children.get(index + 1);
  }
 else {
    return findNextNode(node.parent);
  }
}

Fixed version (ground truth):
protected PolicyNode findNextNode(PolicyNode node){
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  int count=node.parent.children.size();
  if (index < count - 1) {
    return (PolicyNode)node.parent.children.get(index + 1);
  }
 else {
    return findPreviousNode(node.parent);
  }
}
Program: 64875
Project: 64875
Buggy source:
protected PolicyNode findPreviousNode(PolicyNode node){
  if (node.design instanceof GroupDesign)   return node;
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  if (index < 1) {
    return findPreviousNode(node.parent);
  }
 else {
    return (PolicyNode)node.parent.children.get(index - 1);
  }
}

Fixed version (ground truth):
protected PolicyNode findPreviousNode(PolicyNode node){
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  if (index < 1) {
    return findPreviousNode(node.parent);
  }
 else {
    return (PolicyNode)node.parent.children.get(index - 1);
  }
}
Program: 64876
Project: 64876
Buggy source:
public void write(long pos,byte[] b,int off,int len) throws IOException {
  out.seek(pos);
  out.write(b,off,len);
}

Fixed version (ground truth):
public void write(long pos,byte[] b,int off,int len) throws IOException {
  out.seek(pos);
  out.write(b,off,len);
  out.flush();
}
Program: 64877
Project: 64877
Buggy source:
public RAStreamBufferMgr(RandomAccessFile randomFile) throws IOException {
  this.randomFile=randomFile;
  this.length=randomFile.length();
  this.totalBuffer=0;
  this.currentBuffer=getBuffer(0);
}

Fixed version (ground truth):
public RAStreamBufferMgr(RandomAccessFile randomFile) throws IOException {
  this.randomFile=randomFile;
  this.length=randomFile.length();
  this.totalBuffer=0;
  this.currentBuffer=null;
}
Program: 64878
Project: 64878
Buggy source:
public long getFilePointer(){
  return currentBuffer.getOffset() + currentBuffer.getBufCur();
}

Fixed version (ground truth):
public long getFilePointer(){
  return currentBuffer == null ? 0 : currentBuffer.getOffset() + currentBuffer.getBufCur();
}
Program: 64879
Project: 64879
Buggy source:
public void write(byte b[],int off,int len) throws IOException {
  while (len > 0) {
    int ret=currentBuffer.write(b,off,len);
    len-=ret;
    off+=ret;
    if (len > 0) {
      currentBuffer=getBuffer(currentBuffer.getOffset() + IOUtil.RA_STREAM_BUFFER_LENGTH);
      currentBuffer.setBufCur(0);
    }
  }
  long fp=getFilePointer();
  if (fp > length) {
    length=fp;
  }
}

Fixed version (ground truth):
public void write(byte b[],int off,int len) throws IOException {
  if (currentBuffer == null) {
    currentBuffer=getBuffer(0);
  }
  while (len > 0) {
    int ret=currentBuffer.write(b,off,len);
    len-=ret;
    off+=ret;
    if (len > 0) {
      currentBuffer=getBuffer(currentBuffer.getOffset() + IOUtil.RA_STREAM_BUFFER_LENGTH);
      currentBuffer.setBufCur(0);
    }
  }
  long fp=getFilePointer();
  if (fp > length) {
    length=fp;
  }
}
Program: 64880
Project: 64880
Buggy source:
public void seek(long localPos) throws IOException {
  long offset=(localPos / IOUtil.RA_STREAM_BUFFER_LENGTH) * IOUtil.RA_STREAM_BUFFER_LENGTH;
  if (currentBuffer.getOffset() != offset)   currentBuffer=getBuffer(offset);
  currentBuffer.setBufCur((int)(localPos - offset));
  if (localPos > length) {
    length=localPos;
  }
}

Fixed version (ground truth):
public void seek(long localPos) throws IOException {
  long offset=(localPos / IOUtil.RA_STREAM_BUFFER_LENGTH) * IOUtil.RA_STREAM_BUFFER_LENGTH;
  if (currentBuffer == null || currentBuffer.getOffset() != offset)   currentBuffer=getBuffer(offset);
  currentBuffer.setBufCur((int)(localPos - offset));
  if (localPos > length) {
    length=localPos;
  }
}
Program: 64881
Project: 64881
Buggy source:
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression,boolean mode){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (getCompiledExpCacheMap(mode).containsKey(expression)) {
    return ((Boolean)getCompiledExpCacheMap(mode).get(expression)).booleanValue();
  }
  Context context=Context.enter();
  AstRoot tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    tree=p.parse(expression,null,0);
  }
 catch (  Exception e) {
    getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child,mode);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}

Fixed version (ground truth):
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression,boolean mode){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (getCompiledExpCacheMap(mode).containsKey(expression)) {
    return ((Boolean)getCompiledExpCacheMap(mode).get(expression)).booleanValue();
  }
  Context context=Context.enter();
  ScriptNode tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    AstRoot root=p.parse(expression,null,0);
    IRFactory ir=new IRFactory(m_compilerEnv);
    tree=ir.transformTree(root);
  }
 catch (  Exception e) {
    getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child,mode);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}
Program: 64882
Project: 64882
Buggy source:
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression,boolean mode){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (getCompiledExpCacheMap(mode).containsKey(expression)) {
    return ((Boolean)getCompiledExpCacheMap(mode).get(expression)).booleanValue();
  }
  Context context=Context.enter();
  AstRoot tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    tree=p.parse(expression,null,0);
  }
 catch (  Exception e) {
    getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child,mode);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}

Fixed version (ground truth):
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression,boolean mode){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (getCompiledExpCacheMap(mode).containsKey(expression)) {
    return ((Boolean)getCompiledExpCacheMap(mode).get(expression)).booleanValue();
  }
  Context context=Context.enter();
  ScriptNode tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    AstRoot root=p.parse(expression,null,0);
    IRFactory ir=new IRFactory(m_compilerEnv);
    tree=ir.transformTree(root);
  }
 catch (  Exception e) {
    getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child,mode);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  getCompiledExpCacheMap(mode).put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}
Program: 64883
Project: 64883
Buggy source:
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (compiledExprCache.containsKey(expression))   return ((Boolean)compiledExprCache.get(expression)).booleanValue();
  Context context=Context.enter();
  AstRoot tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    tree=p.parse(expression,null,0);
  }
 catch (  Exception e) {
    compiledExprCache.put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  compiledExprCache.put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}

Fixed version (ground truth):
/** 
 * whether the expression is column reference
 * @param expression
 * @return
 */
public static boolean isColumnExpression(String expression){
  boolean isColumn=false;
  if (expression == null || expression.trim().length() == 0)   return isColumn;
  if (compiledExprCache.containsKey(expression))   return ((Boolean)compiledExprCache.get(expression)).booleanValue();
  Context context=Context.enter();
  ScriptNode tree;
  try {
    CompilerEnvirons m_compilerEnv=new CompilerEnvirons();
    m_compilerEnv.initFromContext(context);
    Parser p=new Parser(m_compilerEnv,context.getErrorReporter());
    AstRoot root=p.parse(expression,null,0);
    IRFactory ir=new IRFactory(m_compilerEnv);
    tree=ir.transformTree(root);
  }
 catch (  Exception e) {
    compiledExprCache.put(expression,Boolean.valueOf(false));
    return false;
  }
 finally {
    Context.exit();
  }
  if (tree.getFirstChild() == tree.getLastChild()) {
    if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK) {
      isColumn=false;
    }
    Node exprNode=tree.getFirstChild();
    Node child=exprNode.getFirstChild();
    assert(child != null);
    if (child.getType() == Token.GETELEM || child.getType() == Token.GETPROP)     isColumn=getDirectColRefExpr(child);
 else     isColumn=false;
  }
 else {
    isColumn=false;
  }
  compiledExprCache.put(expression,Boolean.valueOf(isColumn));
  return isColumn;
}
Program: 64884
Project: 64884
Buggy source:
/** 
 * @param expr
 * @param objectName
 * @return
 */
private static String getReferencedScriptObject(String expr,String objectName){
  if (expr == null)   return null;
  try {
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    return getScriptObjectName(tree,objectName);
  }
  finally {
    Context.exit();
  }
}

Fixed version (ground truth):
/** 
 * @param expr
 * @param objectName
 * @return
 */
private static String getReferencedScriptObject(String expr,String objectName){
  if (expr == null)   return null;
  try {
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    IRFactory ir=new IRFactory(ce);
    ScriptNode script=ir.transformTree(tree);
    return getScriptObjectName(script,objectName);
  }
  finally {
    Context.exit();
  }
}
Program: 64885
Project: 64885
Buggy source:
/** 
 * @param expr
 * @param objectName
 * @return
 */
public static Set<String> getReferencedMeasure(String expr){
  if (expr == null)   return Collections.EMPTY_SET;
  try {
    Set<String> result=new LinkedHashSet<String>();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    getScriptObjectName(tree,"String_Node_Str",result);
    return result;
  }
 catch (  Exception e) {
    return Collections.EMPTY_SET;
  }
 finally {
    Context.exit();
  }
}

Fixed version (ground truth):
/** 
 * @param expr
 * @param objectName
 * @return
 */
public static Set<String> getReferencedMeasure(String expr){
  if (expr == null)   return Collections.emptySet();
  try {
    Set<String> result=new LinkedHashSet<String>();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    IRFactory ir=new IRFactory(ce);
    ScriptNode script=ir.transformTree(tree);
    getScriptObjectName(script,"String_Node_Str",result);
    return result;
  }
 catch (  Exception e) {
    return Collections.emptySet();
  }
 finally {
    Context.exit();
  }
}
Program: 64886
Project: 64886
Buggy source:
/** 
 * @param expr
 * @param bindings
 * @param onlyFromDirectReferenceExpr
 * @return
 * @throws DataException
 */
public static Set<IDimLevel> getReferencedDimLevel(String expr) throws CoreException {
  if (expr == null)   return new HashSet<IDimLevel>();
  try {
    Set<IDimLevel> result=new HashSet<IDimLevel>();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    populateDimLevels(null,tree,result);
    return result;
  }
 catch (  Exception e) {
    return Collections.EMPTY_SET;
  }
 finally {
    Context.exit();
  }
}

Fixed version (ground truth):
/** 
 * @param expr
 * @param bindings
 * @param onlyFromDirectReferenceExpr
 * @return
 * @throws DataException
 */
public static Set<IDimLevel> getReferencedDimLevel(String expr) throws CoreException {
  if (expr == null)   return new HashSet<IDimLevel>();
  try {
    Set<IDimLevel> result=new HashSet<IDimLevel>();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    AstRoot tree=p.parse(expr,null,0);
    IRFactory ir=new IRFactory(ce);
    ScriptNode script=ir.transformTree(tree);
    populateDimLevels(null,script,result);
    return result;
  }
 catch (  Exception e) {
    return Collections.emptySet();
  }
 finally {
    Context.exit();
  }
}
Program: 64889
Project: 64889
Buggy source:
/** 
 * Creates the dimension expression according to level attribute
 * @param level level handle
 * @param attributeName level attribute name
 * @return the dimension expression or null
 * @since 2.6
 */
public static String createDimensionExpression(LevelHandle level,String attributeName){
  if (level == null) {
    return null;
  }
  return ExpressionUtil.createJSDimensionExpression(level.getContainer().getContainer().getName(),level.getName(),attributeName);
}

Fixed version (ground truth):
/** 
 * Creates the dimension expression according to level attribute
 * @param level level handle
 * @param attributeName level attribute name
 * @return the dimension expression or null
 * @since 2.6
 */
public static String createDimensionExpression(LevelHandle level,String attributeName){
  if (level == null) {
    return null;
  }
  if (attributeName == null) {
    return createDimensionExpression(level);
  }
  return ExpressionUtil.createJSDimensionExpression(level.getContainer().getContainer().getName(),level.getName(),attributeName);
}
Program: 64890
Project: 64890
Buggy source:
public Object visitReportItem(ReportItemDesign item,Object value){
  PolicyNode node=new PolicyNode();
  node.parent=parentNode;
  node.design=item;
  boolean needExecute=value == Boolean.TRUE;
  if (needExecute) {
    node.execute=true;
  }
  setupPageBreak(node);
  parentNode.children.add(node);
  currentNode=node;
  return Boolean.valueOf(needExecute);
}

Fixed version (ground truth):
public Object visitReportItem(ReportItemDesign item,Object value){
  PolicyNode node=null;
  if (itemNodeMap.containsKey(item)) {
    node=itemNodeMap.get(item);
  }
 else {
    node=new PolicyNode();
    node.parent=parentNode;
    node.design=item;
    itemNodeMap.put(item,node);
    parentNode.children.add(node);
  }
  boolean needExecute=value == Boolean.TRUE;
  if (needExecute) {
    node.execute=true;
  }
  setupPageBreak(node);
  currentNode=node;
  return Boolean.valueOf(needExecute);
}
Program: 64892
Project: 64892
Buggy source:
private EngineConfig getEngineConfig(ModuleHandle handle){
  EngineConfig ec=new EngineConfig();
  ClassLoader parent=Thread.currentThread().getContextClassLoader();
  if (parent == null) {
    parent=this.getClass().getClassLoader();
  }
  ClassLoader customClassLoader=DataSetProvider.getCustomScriptClassLoader(parent,handle);
  ec.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,customClassLoader);
  return ec;
}

Fixed version (ground truth):
private EngineConfig getEngineConfig(ModuleHandle handle){
  EngineConfig ec=new EngineConfig();
  ClassLoader parent=Thread.currentThread().getContextClassLoader();
  if (parent == null) {
    parent=this.getClass().getClassLoader();
  }
  ClassLoader customClassLoader=DataSetProvider.getCustomScriptClassLoader(parent,handle);
  return ec;
}
Program: 64893
Project: 64893
Buggy source:
public boolean hasNextChild(){
  if (currentElement < totalElements) {
    return true;
  }
  if (endOfGroup) {
    return false;
  }
  try {
    while (!endOfGroup) {
      IQueryResultSet rset=listingExecutor.getResultSet();
      GroupDesign groupDesign=(GroupDesign)getDesign();
      int endGroup=rset.getEndingGroupLevel();
      int groupLevel=groupDesign.getGroupLevel() + 1;
      if (endGroup <= groupLevel) {
        totalElements=0;
        currentElement=0;
        BandDesign footer=groupDesign.getFooter();
        if (footer != null) {
          executableElements[totalElements++]=footer;
        }
        endOfGroup=true;
        return currentElement < totalElements;
      }
      if (rset.next()) {
        collectExecutableElements();
        if (currentElement < totalElements) {
          return true;
        }
      }
    }
  }
 catch (  BirtException ex) {
    context.addException(this.getDesign(),ex);
  }
  return false;
}

Fixed version (ground truth):
public boolean hasNextChild(){
  if (currentElement < totalElements) {
    return true;
  }
  if (endOfGroup) {
    return false;
  }
  try {
    while (!endOfGroup) {
      IQueryResultSet rset=listingExecutor.getResultSet();
      GroupDesign groupDesign=(GroupDesign)getDesign();
      int endGroup=rset.getEndingGroupLevel();
      int groupLevel=groupDesign.getGroupLevel() + 1;
      if (endGroup <= groupLevel) {
        totalElements=0;
        currentElement=0;
        BandDesign footer=groupDesign.getFooter();
        if (footer != null) {
          executableElements[totalElements++]=footer;
        }
        endOfGroup=true;
        return currentElement < totalElements;
      }
      if (rset.next()) {
        collectExecutableElements();
        if (currentElement < totalElements) {
          return true;
        }
      }
 else       break;
    }
  }
 catch (  BirtException ex) {
    context.addException(this.getDesign(),ex);
  }
  return false;
}
Program: 64894
Project: 64894
Buggy source:
protected boolean isIE7(String userAgent){
  if (userAgent != null) {
    if ((userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str")) && (!userAgent.contains("String_Node_Str"))) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
protected boolean isIE7(String userAgent){
  if ((userAgent != null) && (!userAgent.contains("String_Node_Str"))) {
    if (userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str")) {
      return true;
    }
  }
  return false;
}
Program: 64897
Project: 64897
Buggy source:
protected boolean isIE7(String userAgent){
  if (userAgent != null) {
    if (userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str")) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
protected boolean isIE7(String userAgent){
  if (userAgent != null) {
    if ((userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str") || userAgent.contains("String_Node_Str")) && (!userAgent.contains("String_Node_Str"))) {
      return true;
    }
  }
  return false;
}
Program: 64898
Project: 64898
Buggy source:
protected void startTable(ITableContent tableContent){
  LayoutStatus status=new LayoutStatus();
  status.table=table;
  status.cells=cells;
  status.columnCount=columnCount;
  status.hasHiddenColumn=hasHiddenColumn;
  status.currentCell=currentCell;
  statuses.push(status);
  table=tableContent;
  columnCount=tableContent.getColumnCount();
  cells=new int[columnCount];
  columnHiddens=new boolean[columnCount];
  for (int i=0; i < columnCount; i++) {
    IColumn column=tableContent.getColumn(i);
    boolean isHidden=column.getComputedStyle().getProperty(IStyle.STYLE_DISPLAY) == IStyle.NONE_VALUE;
    columnHiddens[i]=isHidden;
    if (isHidden) {
      hasHiddenColumn=true;
    }
  }
}

Fixed version (ground truth):
protected void startTable(ITableContent tableContent){
  LayoutStatus status=new LayoutStatus();
  status.table=table;
  status.cells=cells;
  status.columnCount=columnCount;
  status.columnHiddens=columnHiddens;
  status.hasHiddenColumn=hasHiddenColumn;
  status.currentCell=currentCell;
  statuses.push(status);
  table=tableContent;
  columnCount=tableContent.getColumnCount();
  cells=new int[columnCount];
  columnHiddens=new boolean[columnCount];
  for (int i=0; i < columnCount; i++) {
    IColumn column=tableContent.getColumn(i);
    boolean isHidden=column.getComputedStyle().getProperty(IStyle.STYLE_DISPLAY) == IStyle.NONE_VALUE;
    columnHiddens[i]=isHidden;
    if (isHidden) {
      hasHiddenColumn=true;
    }
  }
}
Program: 64900
Project: 64900
Buggy source:
private void startBackgroundContainer(IStyle style,DimensionType pageWidth,DimensionType pageHeight){
  String backgroundHeight=parseBackgroundSize(style.getBackgroundHeight(),pageHeight);
  String backgroundWidth=parseBackgroundSize(style.getBackgroundWidth(),pageWidth);
  if (backgroundHeight == null && backgroundWidth == null) {
    return;
  }
 else {
    if (backgroundHeight == null) {
      backgroundHeight="String_Node_Str";
    }
    if (backgroundWidth == null) {
      backgroundWidth="String_Node_Str";
    }
  }
  String image=style.getBackgroundImage();
  if (image == null || "String_Node_Str".equalsIgnoreCase(image)) {
    return;
  }
  needOutputBackgroundSize=true;
  String backgroundPositionX=style.getBackgroundPositionX();
  if (backgroundPositionX == null) {
    backgroundPositionX="String_Node_Str";
  }
  String backgroundPositionY=style.getBackgroundPositionY();
  if (backgroundPositionY == null) {
    backgroundPositionY="String_Node_Str";
  }
  writer.openTag(HTMLTags.TAG_DIV);
  writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str" + pageWidth + "String_Node_Str"+ pageHeight+ "String_Node_Str");
  writer.openTag(HTMLTags.TAG_IMAGE);
  writer.attributeAllowEmpty(HTMLTags.ATTR_ALT,"String_Node_Str");
  image=handleStyleImage(image,true);
  if (image != null && image.length() > 0) {
    writer.attribute(HTMLTags.ATTR_SRC,image);
    writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str" + backgroundWidth + "String_Node_Str"+ backgroundHeight+ "String_Node_Str"+ backgroundPositionX+ "String_Node_Str"+ backgroundPositionY+ "String_Node_Str");
  }
  writer.closeTag(HTMLTags.TAG_IMAGE);
}

Fixed version (ground truth):
private void startBackgroundContainer(IStyle style,DimensionType pageWidth,DimensionType pageHeight){
  String backgroundHeight=parseBackgroundSize(style.getBackgroundHeight(),pageHeight);
  String backgroundWidth=parseBackgroundSize(style.getBackgroundWidth(),pageWidth);
  if (backgroundHeight == null && backgroundWidth == null) {
    return;
  }
 else {
    if (backgroundHeight == null) {
      backgroundHeight="String_Node_Str";
    }
    if (backgroundWidth == null) {
      backgroundWidth="String_Node_Str";
    }
  }
  String image=style.getBackgroundImage();
  if (image == null || "String_Node_Str".equalsIgnoreCase(image)) {
    return;
  }
  needOutputBackgroundSize=true;
  writer.openTag(HTMLTags.TAG_DIV);
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str").append(pageWidth).append("String_Node_Str");
  sb.append("String_Node_Str").append(pageHeight).append("String_Node_Str");
  AttributeBuilder.buildBackground(sb,style,this);
  sb.append("String_Node_Str").append(backgroundWidth).append("String_Node_Str").append(backgroundHeight).append("String_Node_Str");
  writer.attribute(HTMLTags.ATTR_STYLE,sb.toString());
}
Program: 64901
Project: 64901
Buggy source:
public void onPageBreak(boolean isHorizontalPageBreak,boolean isFixedlayoutPageBreak){
  if (!isHorizontalPageBreak) {
    pageRowCount=0;
    if (addAfterBreak) {
      next();
      addAfterBreak=false;
    }
 else     if (isFixedlayoutPageBreak) {
      next();
    }
 else {
      if (softBreakBefore) {
        softBreakBefore=false;
      }
    }
  }
}

Fixed version (ground truth):
public void onPageBreak(boolean isHorizontalPageBreak,boolean isFixedlayoutPageBreak){
  if (!isHorizontalPageBreak) {
    pageRowCount=0;
    if (addAfterBreak) {
      next();
      addAfterBreak=false;
    }
 else {
      if (isFixedlayoutPageBreak) {
        next();
      }
      if (softBreakBefore) {
        softBreakBefore=false;
      }
    }
  }
}
Program: 64902
Project: 64902
Buggy source:
public boolean needSave(){
  if (name != null) {
    return true;
  }
  if (x != null || y != null || width != null || height != null) {
    return true;
  }
  if (hyperlink != null || bookmark != null || toc != null) {
    return true;
  }
  if (helpText != null) {
    return true;
  }
  if (inlineStyle != null && !inlineStyle.isEmpty()) {
    return true;
  }
  if (acl != null) {
    return true;
  }
  if (userProperties != null && !userProperties.isEmpty()) {
    return true;
  }
  if (extProperties != null && !extProperties.isEmpty()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean needSave(){
  if (name != null) {
    return true;
  }
  if (x != null || y != null || width != null || height != null) {
    return true;
  }
  if (hyperlink != null || bookmark != null || toc != null) {
    return true;
  }
  if (helpText != null) {
    return true;
  }
  if (inlineStyle != null && !inlineStyle.isEmpty()) {
    return true;
  }
  if (acl != null) {
    return true;
  }
  if (userProperties != null && !userProperties.isEmpty()) {
    return true;
  }
  if (extProperties != null && !extProperties.isEmpty()) {
    return true;
  }
  if (altText != null || altTextKey != null) {
    return true;
  }
  return false;
}
Program: 64903
Project: 64903
Buggy source:
private String getImageCacheID(IContent content){
  StringBuffer buffer=new StringBuffer();
  buffer.append(content.getInstanceID().toUniqueString());
  buffer.append(getChartResolution(content));
  buffer.append(getChartFormats());
  buffer.append(locale);
  if (timeZone != null) {
    buffer.append(timeZone.getID());
  }
  return buffer.toString();
}

Fixed version (ground truth):
private String getImageCacheID(IContent content){
  StringBuffer buffer=new StringBuffer();
  buffer.append(content.getInstanceID().toUniqueString());
  buffer.append(getChartResolution(content));
  buffer.append(getChartFormats());
  buffer.append(locale);
  if (timeZone != null) {
    buffer.append(timeZone.getID());
  }
  DimensionType heightDimension=content.getHeight();
  String heightUnits=heightDimension == null ? "String_Node_Str" : heightDimension.getUnits();
  double heightValue=heightDimension == null ? 0 : heightDimension.getMeasure();
  DimensionType widthDimension=content.getWidth();
  String widthUnits=widthDimension == null ? "String_Node_Str" : widthDimension.getUnits();
  double widthValue=widthDimension == null ? 0 : widthDimension.getMeasure();
  buffer.append(heightValue);
  buffer.append(heightUnits);
  buffer.append(widthValue);
  buffer.append(widthUnits);
  return buffer.toString();
}
Program: 64905
Project: 64905
Buggy source:
protected void createDataSetContents(Composite parent){
  if (dataSetName != null) {
    Label lb=new Label(parent,SWT.NONE);
    lb.setText(Messages.getString("String_Node_Str"));
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan=2;
    lb.setLayoutData(data);
  }
 else {
    Label dateSetLabel=new Label(parent,SWT.NONE);
    dateSetLabel.setText(Messages.getString("String_Node_Str"));
    dataSetCombo=new Combo(parent,SWT.BORDER | SWT.READ_ONLY);
    datasets=UIUtil.getVisibleDataSetHandles(SessionHandleAdapter.getInstance().getModule());
    dataSetCombo.setItems(getDataSetComboList());
    dataSetCombo.select(0);
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    dataSetCombo.setLayoutData(data);
    dataSetCombo.setVisibleItemCount(30);
    dataSetCombo.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        handleDataSetComboSelectedEvent();
      }
    }
);
  }
}

Fixed version (ground truth):
protected void createDataSetContents(Composite parent){
  if (dataSetName != null) {
    Label lb=new Label(parent,SWT.NONE);
    lb.setText(Messages.getString("String_Node_Str"));
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan=2;
    lb.setLayoutData(data);
  }
 else {
    Label dateSetLabel=new Label(parent,SWT.NONE);
    dateSetLabel.setText(Messages.getString("String_Node_Str"));
    dataSetCombo=new Combo(parent,SWT.BORDER | SWT.READ_ONLY);
    datasets=UIUtil.getVisibleDataSetHandles(SessionHandleAdapter.getInstance().getModule());
    dataSetCombo.setItems(getDataSetComboList());
    dataSetCombo.select(0);
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    dataSetCombo.setLayoutData(data);
    dataSetCombo.setVisibleItemCount(30);
    dataSetCombo.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        Object input=populateInput();
        if (input instanceof Map) {
          if (columnTreeViewer == null) {
            disposeChildren(contentPane);
            columnTableViewer=null;
            createColumnBindingTreeContents(contentPane,input);
          }
        }
 else {
          if (columnTableViewer == null) {
            disposeChildren(contentPane);
            columnTreeViewer=null;
            createColumnBindingTableContents(contentPane,input);
          }
        }
        handleDataSetComboSelectedEvent(input);
      }
    }
);
  }
}
Program: 64906
Project: 64906
Buggy source:
public void widgetSelected(SelectionEvent e){
  handleDataSetComboSelectedEvent();
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  Object input=populateInput();
  if (input instanceof Map) {
    if (columnTreeViewer == null) {
      disposeChildren(contentPane);
      columnTableViewer=null;
      createColumnBindingTreeContents(contentPane,input);
    }
  }
 else {
    if (columnTableViewer == null) {
      disposeChildren(contentPane);
      columnTreeViewer=null;
      createColumnBindingTableContents(contentPane,input);
    }
  }
  handleDataSetComboSelectedEvent(input);
}