nus-yam/ex-repair huggingface dataset:
Program: 32387
Project: 32387
Buggy source:
/** 
 * Compares the contents of two instances to see if they are equal.
 * @param obj is the object to compare to.
 * @return True if the contents of the objects are equal.
 */
@Override public boolean equals(Object obj){
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final BloomFilter other=(BloomFilter)obj;
  if (this.k != other.k)   return false;
  if (this.bitSetSize != other.bitSetSize)   return false;
  if (this.bitset != other.bitset && (this.bitset == null || !this.bitset.equals(other.bitset))) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compares the contents of two instances to see if they are equal.
 * @param obj is the object to compare to.
 * @return True if the contents of the objects are equal.
 */
@Override public boolean equals(Object obj){
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final BloomFilter other=(BloomFilter)obj;
  if (this.k != other.k)   return false;
  if (this.bitsPerElement != other.bitsPerElement)   return false;
  if (this.numElements != other.numElements)   return false;
  return this.bitset.equals(other.bitset);
}
Program: 32388
Project: 32388
Buggy source:
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  bitset=(BitSet)in.readObject();
  bitSetSize=in.readInt();
  bitsPerElement=in.readFloat();
  numOfElements=in.readInt();
  k=in.readShort();
}

Fixed version (ground truth):
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  bitset=(BitSet)in.readObject();
  bitsPerElement=in.readFloat();
  numElements=in.readInt();
  k=in.readShort();
}
Program: 32389
Project: 32389
Buggy source:
public boolean isFull(){
  if (bitset.cardinality() * 2 > bitSetSize)   return true;
  return false;
}

Fixed version (ground truth):
public boolean isFull(){
  if (bitset.cardinality() * 2 + 1 >= getBitSetSize())   return true;
  return false;
}
Program: 32390
Project: 32390
Buggy source:
int[] hash(long val){
  int[] h=new int[k];
  long h0=hash0(val);
  long h1=hash1(val);
  for (int i=0; i < k; i++) {
    long x=h0 + i * h1;
    h[i]=Math.abs((int)(x % bitSetSize));
  }
  return h;
}

Fixed version (ground truth):
int[] hash(long val){
  int[] h=new int[k];
  long h0=hash0(val);
  long h1=hash1(val);
  for (int i=0; i < k; i++) {
    long x=h0 + i * h1;
    if (x < 0)     x=-x;
    h[i]=(int)(x % getBitSetSize());
  }
  return h;
}
Program: 32392
Project: 32392
Buggy source:
public void initSocialite(SocialiteCommandLineOptions opt){
  mod=new SocialiteMod(opt.threadNum,opt.dist,true);
  getLocals().__setitem__(new PyString(mod.modName()),mod.getModule());
  getLocals().__setitem__(new PyString(mod.modUniqueName()),mod.getModule());
  PyList all=(PyList)mod.__all__();
  for (int i=0; i < all.size(); i++) {
    String k=(String)all.get(i);
    PyObject attr=mod.getAttr(k);
    getLocals().__setitem__(k,attr);
  }
}

Fixed version (ground truth):
public void initSocialite(SocialiteCommandLineOptions opt){
  mod=new SocialiteMod(opt.threadNum,opt.dist,opt.interactive);
  getLocals().__setitem__(new PyString(mod.modName()),mod.getModule());
  getLocals().__setitem__(new PyString(mod.modUniqueName()),mod.getModule());
  PyList all=(PyList)mod.__all__();
  for (int i=0; i < all.size(); i++) {
    String k=(String)all.get(i);
    PyObject attr=mod.getAttr(k);
    getLocals().__setitem__(k,attr);
  }
}
Program: 32393
Project: 32393
Buggy source:
@Override public boolean push(String line){
  if (inQuery) {
    if (hasDeclEnd(line)) {
      inQuery=false;
      return super.push(line);
    }
 else {
      if (line.trim().length() > 0)       buffer.append("String_Node_Str" + line);
      return true;
    }
  }
 else {
    if (hasDeclBegin(line) && !hasDeclEnd(line)) {
      inQuery=true;
      buffer.append("String_Node_Str" + line);
      return true;
    }
  }
  return super.push(line);
}

Fixed version (ground truth):
@Override public boolean push(String line){
  return super.push(line);
}
Program: 32394
Project: 32394
Buggy source:
/** 
 * Returns a new python interpreter using the InteractiveConsole subclass from the <tt>python.console</tt> registry key. <p> When stdin is interactive the default is   {@link JLineConsole}. Otherwise the featureless   {@link InteractiveConsole} is always used as alternative consoles causeunexpected behavior with the std file streams.
 */
private static InteractiveConsole newInterpreter(SocialiteCommandLineOptions opts){
  if (opts.interactive) {
    return new JLineSociaLiteConsole(opts);
  }
 else {
    return new SocialiteConsole(opts);
  }
}

Fixed version (ground truth):
/** 
 * Returns a new python interpreter using the InteractiveConsole subclass from the <tt>python.console</tt> registry key. <p> When stdin is interactive the default is   {@link JLineConsole}. Otherwise the featureless   {@link InteractiveConsole} is always used as alternative consoles causeunexpected behavior with the std file streams.
 */
private static InteractiveConsole newInterpreter(SocialiteCommandLineOptions opts){
  if (opts.interactive) {
    return new JLineSociaLiteConsole(opts);
  }
 else {
    return new JLineSociaLiteConsole(opts);
  }
}
Program: 32395
Project: 32395
Buggy source:
void tableStatus(Status summary){
  Parser p=getEngine().getParser();
  Map<String,Table> tableMap=p.getTableMap();
  String tableInfo="String_Node_Str";
  boolean first=true;
  for (  String name : tableMap.keySet()) {
    if (!first)     tableInfo+="String_Node_Str";
    tableInfo+=name;
    first=false;
  }
  summary.putTableStatus(tableInfo);
}

Fixed version (ground truth):
void tableStatus(Status summary){
  if (!engineExists())   return;
  DistEngine engine=getEngine();
  Parser p=getEngine().getParser();
  Map<String,Table> tableMap=p.getTableMap();
  String tableInfo="String_Node_Str";
  boolean first=true;
  for (  String name : tableMap.keySet()) {
    if (!first)     tableInfo+="String_Node_Str";
    tableInfo+=name;
    first=false;
  }
  summary.putTableStatus(tableInfo);
}
Program: 32396
Project: 32396
Buggy source:
QuerySignature getQuerySig(Predicate p,Map<String,Table> tableMap){
  sig$.name=tableMap.get(p.name()).className();
  sig$.constIdx.resetQuick();
  int i=0;
  for (  Object o : p.getAllParamsExpanded()) {
    if (o instanceof Const)     sig$.constIdx.add(i);
    i++;
  }
  return sig$;
}

Fixed version (ground truth):
QuerySignature getQuerySig(Predicate p,Map<String,Table> tableMap){
  sig$.name=tableMap.get(p.name()).className();
  sig$.constIdx.resetQuick();
  sig$.dontcareIdx.resetQuick();
  int i=0;
  for (  Object o : p.getAllParamsExpanded()) {
    if (o instanceof Const)     sig$.constIdx.add(i);
    if (isDontCare(o))     sig$.dontcareIdx.add(i);
    i++;
  }
  return sig$;
}
Program: 32397
Project: 32397
Buggy source:
public QuerySignature(String _name,TIntArrayList _constIdx){
  name=_name;
  constIdx=_constIdx;
}

Fixed version (ground truth):
public QuerySignature(String _name,TIntArrayList _constIdx,TIntArrayList _dontcareIdx){
  name=_name;
  constIdx=_constIdx;
  dontcareIdx=_dontcareIdx;
}
Program: 32398
Project: 32398
Buggy source:
public boolean equals(Object o){
  if (!(o instanceof QuerySignature))   return false;
  QuerySignature sig=(QuerySignature)o;
  return name.equals(sig.name) && constIdx.equals(sig.constIdx);
}

Fixed version (ground truth):
public boolean equals(Object o){
  if (!(o instanceof QuerySignature))   return false;
  QuerySignature sig=(QuerySignature)o;
  return name.equals(sig.name) && constIdx.equals(sig.constIdx) && dontcareIdx.equals(sig.dontcareIdx);
}
Program: 32399
Project: 32399
Buggy source:
public QuerySignature clone(){
  return new QuerySignature(name,new TIntArrayList(constIdx));
}

Fixed version (ground truth):
public QuerySignature clone(){
  return new QuerySignature(name,new TIntArrayList(constIdx),new TIntArrayList(dontcareIdx));
}
Program: 32400
Project: 32400
Buggy source:
void generateVisitMethod(){
  List<ColumnGroup> columnGroups=table.getColumnGroups();
  int arity=table.numColumns();
  Collection<Variable> resolved=constVars.valueCollection();
  ST method=null;
  Predicate p=queryP;
  for (  ColumnGroup g : columnGroups) {
    int startCol=g.startIdx();
    int endCol=g.endIdx();
    method=getVisitMethod(startCol,endCol,arity);
    CodeGen.fillVisitMethodBody(method,p,startCol,endCol,resolved,getIndexByCols());
  }
  ST code=CodeGen.findCodeBlockFor(method,p);
  invokeQueryVisitor(code);
}

Fixed version (ground truth):
void generateVisitMethod(){
  List<ColumnGroup> columnGroups=table.getColumnGroups();
  int arity=table.numColumns();
  Collection<Variable> resolved=constVars.valueCollection();
  ST method=null;
  Predicate p=queryP;
  for (  ColumnGroup g : columnGroups) {
    int startCol=g.startIdx();
    int endCol=g.endIdx();
    if (allDontCares(startCol)) {
      method.add("String_Node_Str","String_Node_Str");
      break;
    }
    method=getVisitMethod(startCol,endCol,arity);
    CodeGen.fillVisitMethodBody(method,p,startCol,endCol,resolved,getIndexByCols());
  }
  ST code=CodeGen.findCodeBlockFor(method,p);
  invokeQueryVisitor(code);
}
Program: 32401
Project: 32401
Buggy source:
public static int nextId(){
  return NextId.invoke();
}

Fixed version (ground truth):
public static int nextId(int prevId,int ignored){
  return prevId;
}
Program: 32402
Project: 32402
Buggy source:
public static PythonInterpreter get(){
  return interp;
}

Fixed version (ground truth):
public static PythonInterpreter get(){
}
Program: 32403
Project: 32403
Buggy source:
public static String[] split(String str,String delim,int maxsplit){
  int delimLength=delim.length();
  if (delimLength == 1) {
    return split(str,delim.charAt(0),maxsplit);
  }
  ArrayList<String> splitted=new ArrayList<String>();
  str=str.trim();
  int idx=0, newIdx=-1;
  int splitnum=0;
  while ((newIdx=str.indexOf(delim,idx)) != -1) {
    if (newIdx > idx)     splitted.add(str.substring(idx,newIdx));
    idx=newIdx + delimLength;
    splitnum++;
    if (maxsplit > 0 && splitnum >= maxsplit)     break;
  }
  if (idx < str.length())   splitted.add(str.substring(idx));
  return splitted.toArray(new String[splitted.size()]);
}

Fixed version (ground truth):
public static String[] split(String str,String delim,int maxsplit){
  int delimLength=delim.length();
  if (delimLength == 1) {
    return split(str,delim.charAt(0),maxsplit);
  }
  ArrayList<String> splitted=new ArrayList<String>();
  int idx=0, newIdx=-1;
  int splitnum=0;
  while ((newIdx=str.indexOf(delim,idx)) != -1) {
    if (newIdx > idx)     splitted.add(str.substring(idx,newIdx));
    idx=newIdx + delimLength;
    splitnum++;
    if (maxsplit > 0 && splitnum >= maxsplit)     break;
  }
  if (idx < str.length())   splitted.add(str.substring(idx));
  return splitted.toArray(new String[splitted.size()]);
}
Program: 32404
Project: 32404
Buggy source:
public ST codegen(){
  ST expr=CodeGen.expr();
  expr.add("String_Node_Str",codeStr(arg));
  return expr;
}

Fixed version (ground truth):
public ST codegen(){
  ST expr=CodeGen.expr();
  expr.add("String_Node_Str","String_Node_Str" + codeStr(arg) + "String_Node_Str");
  return expr;
}
Program: 32405
Project: 32405
Buggy source:
void adjustIterColumn(Rule r){
  for (  Predicate p : r.getAllP()) {
    TableDecl tdecl=tableDeclMap.get(p.name());
    if (!tdecl.hasIterColumn())     continue;
    int iterCol=tdecl.iterColumn();
    if (iterCol == 0 && tdecl.locationColDecl() != null) {
      throw new AnalysisException("String_Node_Str",r);
    }
    Object iterParam=p.getAllInputParams()[iterCol];
    if (!isIntConst(iterParam)) {
      String msg="String_Node_Str" + iterCol + "String_Node_Str"+ p.name();
      throw new AnalysisException(msg,r);
    }
    p.setName(IterTable.name(p.name(),iterColumnVal(iterParam) % tdecl.maxIter()));
    p.removeParamAt(tdecl.iterColumn());
  }
}

Fixed version (ground truth):
void adjustIterColumn(Rule r){
  for (  Predicate p : r.getAllP()) {
    TableDecl tdecl=tableDeclMap.get(p.name());
    if (tdecl == null) {
      throw new AnalysisException("String_Node_Str" + p.name() + "String_Node_Str");
    }
    if (!tdecl.hasIterColumn())     continue;
    int iterCol=tdecl.iterColumn();
    if (iterCol == 0 && tdecl.locationColDecl() != null) {
      throw new AnalysisException("String_Node_Str",r);
    }
    Object iterParam=p.getAllInputParams()[iterCol];
    if (!isIntConst(iterParam)) {
      String msg="String_Node_Str" + iterCol + "String_Node_Str"+ p.name();
      throw new AnalysisException(msg,r);
    }
    p.setName(IterTable.name(p.name(),iterColumnVal(iterParam) % tdecl.maxIter()));
    p.removeParamAt(tdecl.iterColumn());
  }
}
Program: 32406
Project: 32406
Buggy source:
static void _findTuplesToGen(Table t,TupleDecls required){
  if (t.numColumns() <= PREGEN_WIDTH)   return;
  Class<?>[] types=new Class[t.numColumns()];
  for (int i=0; i < t.numColumns(); i++)   types[i]=t.getColumn(i).type();
  required.add(types);
  if (t.groupbyColNum() > PREGEN_WIDTH) {
    types=new Class[t.groupbyColNum()];
    for (int i=0; i < t.groupbyColNum(); i++)     types[i]=t.getColumn(i).type();
    required.add(types);
  }
  if (t.groupbyRestColNum() > PREGEN_WIDTH) {
    types=new Class[t.groupbyRestColNum()];
    for (int i=t.groupbyColNum(); i < t.numColumns(); i++)     types[i - t.groupbyColNum()]=t.getColumn(i).type();
    required.add(types);
  }
}

Fixed version (ground truth):
static void _findTuplesToGen(Table t,TupleDecls required){
  if (t.numColumns() <= PREGEN_WIDTH) {
    _findTuplesToGenForIterTable(t,required);
    return;
  }
  Class<?>[] types=new Class[t.numColumns()];
  for (int i=0; i < t.numColumns(); i++)   types[i]=t.getColumn(i).type();
  required.add(types);
  _findTuplesToGenForIterTable(t,required);
  if (t.groupbyColNum() > PREGEN_WIDTH) {
    types=new Class[t.groupbyColNum()];
    for (int i=0; i < t.groupbyColNum(); i++)     types[i]=t.getColumn(i).type();
    required.add(types);
  }
  if (t.groupbyRestColNum() > PREGEN_WIDTH) {
    types=new Class[t.groupbyRestColNum()];
    for (int i=t.groupbyColNum(); i < t.numColumns(); i++)     types[i - t.groupbyColNum()]=t.getColumn(i).type();
    required.add(types);
  }
}
Program: 32407
Project: 32407
Buggy source:
void genAggrUpdateCode(ST code,String headTable,ST ifUpdated){
  AggrFunction f=headP.getAggrF();
  boolean aggrPrimType=MyType.javaType(f.getArgs().get(0)).isPrimitive();
  String groupbyRetType=MyType.javaTypeName(f.getAggrColumnType());
  code.add("String_Node_Str",groupbyRetType + "String_Node_Str");
  String groupby=invokeGroupby(headTable,headP);
  code.add("String_Node_Str","String_Node_Str" + groupby);
  String eq=aggrPrimType ? "String_Node_Str" : "String_Node_Str";
  String contIfOldAns="String_Node_Str" + aggrVar() + eq+ "String_Node_Str";
  if (f.isSimpleAggr()) {
    code.add("String_Node_Str",aggrVar() + "String_Node_Str" + f.codegen("String_Node_Str").render());
    boolean hasNestingAfterAggr=headT.numColumns() > f.getIdx() + 1 && headT.nestingBeginsAfter(f.getIdx() + 1);
    if (hasNestingAfterAggr) {
      Object aggrParam=f.getArgs().get(0);
      code.add("String_Node_Str","String_Node_Str" + aggrVar() + eq+ "String_Node_Str"+ aggrParam+ "String_Node_Str");
    }
 else {
      code.add("String_Node_Str",contIfOldAns);
    }
    code.add("String_Node_Str",isUpdatedVar() + "String_Node_Str" + updateHeadParamsTo(headTable));
  }
 else {
    code.add("String_Node_Str",aggrVar() + "String_Node_Str");
    code.add("String_Node_Str",isUpdatedVar() + "String_Node_Str" + f.codegen("String_Node_Str").render());
  }
}

Fixed version (ground truth):
void genAggrUpdateCode(ST code,String headTable){
  AggrFunction f=headP.getAggrF();
  boolean aggrPrimType=MyType.javaType(f.getArgs().get(0)).isPrimitive();
  String groupbyRetType=MyType.javaTypeName(f.getAggrColumnType());
  code.add("String_Node_Str",groupbyRetType + "String_Node_Str");
  String groupby=invokeGroupby(headTable,headP);
  code.add("String_Node_Str","String_Node_Str" + groupby);
  String eq=aggrPrimType ? "String_Node_Str" : "String_Node_Str";
  String contIfOldAns="String_Node_Str" + aggrVar() + eq+ "String_Node_Str";
  if (f.isSimpleAggr()) {
    code.add("String_Node_Str",aggrVar() + "String_Node_Str" + f.codegen("String_Node_Str").render());
    boolean hasNestingAfterAggr=headT.numColumns() > f.getIdx() + 1 && headT.nestingBeginsAfter(f.getIdx() + 1);
    if (hasNestingAfterAggr) {
      Object aggrParam=f.getArgs().get(0);
      code.add("String_Node_Str","String_Node_Str" + aggrVar() + eq+ "String_Node_Str"+ aggrParam+ "String_Node_Str");
    }
 else {
      code.add("String_Node_Str",contIfOldAns);
    }
    code.add("String_Node_Str",isUpdatedVar() + "String_Node_Str" + updateHeadParamsTo(headTable));
  }
 else {
    code.add("String_Node_Str",aggrVar() + "String_Node_Str");
    code.add("String_Node_Str",isUpdatedVar() + "String_Node_Str" + f.codegen("String_Node_Str").render());
  }
}
Program: 32410
Project: 32410
Buggy source:
int findSlicingColumn(Rule r){
}

Fixed version (ground truth):
int findSlicingColumn(Rule r){
  if (!isParallel)   return 0;
  if (!Analysis.isParallelRule(r,tableMap))   return -1;
  Predicate firstP=(Predicate)r.getBody().get(0);
  Object f=firstP.getAllInputParams()[0];
  Table firstT=tableMap.get(firstP.name());
  if (firstT.getColumn(0).isIndexed() && f instanceof Const)   return -1;
  int column=Analysis.firstShardedColumnWithVar(firstP,firstT);
  if (column >= 0) {
    return column;
  }
 else {
    return 0;
  }
}
Program: 32411
Project: 32411
Buggy source:
public static String[] split(String str,String delim,int maxsplit){
  int delimLength=delim.length();
  if (delimLength == 1) {
    return split(str,delim.charAt(0),maxsplit);
  }
  ArrayList<String> splitted=new ArrayList<String>();
  str=str.trim();
  int idx=0, newIdx=-1;
  int splitnum=0;
  while ((newIdx=str.indexOf(delim,idx)) != -1) {
    if (newIdx > idx)     splitted.add(str.substring(idx,newIdx));
    idx=newIdx + delimLength;
    splitnum++;
    if (maxsplit > 0 && splitnum >= maxsplit)     break;
  }
  if (idx < str.length())   splitted.add(str.substring(idx));
  return splitted.toArray(new String[splitted.size()]);
}

Fixed version (ground truth):
public static String[] split(String str,String delim,int maxsplit){
  int delimLength=delim.length();
  if (delimLength == 1) {
    return split(str,delim.charAt(0),maxsplit);
  }
  ArrayList<String> splitted=new ArrayList<String>();
  str=str.trim();
  int idx=0, newIdx=-1;
  int splitnum=0;
  while ((newIdx=str.indexOf(delim,idx)) != -1) {
    if (newIdx > idx)     splitted.add(str.substring(idx,newIdx));
    idx=newIdx + delimLength;
    splitnum++;
    if (maxsplit > 0 && splitnum + 1 >= maxsplit)     break;
  }
  if (idx < str.length())   splitted.add(str.substring(idx));
  return splitted.toArray(new String[splitted.size()]);
}
Program: 32412
Project: 32412
Buggy source:
private Dimension getPrototypeSize(E prototypeValue){
  ListCellRenderer<? super E> renderer=comboBox.getRenderer();
  if (renderer == null)   renderer=new DefaultListCellRenderer();
  final Component comp=renderer.getListCellRendererComponent(popup.getList(),prototypeValue,-1,false,false);
  comp.setFont(comboBox.getFont());
  return comp.getPreferredSize();
}

Fixed version (ground truth):
private Dimension getPrototypeSize(E prototypeValue){
  ListCellRenderer<? super E> renderer=comboBox.getRenderer();
  if (renderer == null)   renderer=new DefaultListCellRenderer();
  final Component comp=renderer.getListCellRendererComponent((JList<E>)popup.getList(),prototypeValue,-1,false,false);
  comp.setFont(comboBox.getFont());
  return comp.getPreferredSize();
}
Program: 32414
Project: 32414
Buggy source:
/** 
 * Peer method to   {@link #writeObject(ObjectOutputStream)}. Note that this is functionally equivalent to a constructor and should validate that everything is in place including locks, etc.
 */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
  final E[] elements=(E[])in.readObject();
  final ListEventListener<E>[] listeners=(ListEventListener<E>[])in.readObject();
  try {
    this.publisher=(ListEventPublisher)in.readObject();
    this.updates=new ListEventAssembler<E>(this,publisher);
    this.readWriteLock=(ReadWriteLock)in.readObject();
  }
 catch (  OptionalDataException e) {
    if (e.eof)     this.readWriteLock=LockFactory.DEFAULT.createReadWriteLock();
 else     throw e;
  }
  this.data=new ArrayList<E>(elements.length);
  this.data.addAll(Arrays.asList(elements));
  for (  ListEventListener<E> listener : listeners) {
    this.updates.addListEventListener(listener);
  }
}

Fixed version (ground truth):
/** 
 * Peer method to   {@link #writeObject(ObjectOutputStream)}. Note that this is functionally equivalent to a constructor and should validate that everything is in place including locks, etc.
 */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
  final E[] elements=(E[])in.readObject();
  final ListEventListener<E>[] listeners=(ListEventListener<E>[])in.readObject();
  try {
    this.publisher=(ListEventPublisher)in.readObject();
    this.updates=new ListEventAssembler<>(this,publisher);
    this.readWriteLock=(ReadWriteLock)in.readObject();
  }
 catch (  OptionalDataException e) {
    if (e.eof)     this.readWriteLock=LockFactory.DEFAULT.createReadWriteLock();
 else     throw e;
  }
  this.data=new ArrayList<>(elements.length);
  this.data.addAll(Arrays.asList(elements));
  for (  ListEventListener<E> listener : listeners) {
    this.updates.addListEventListener(listener);
  }
}
Program: 32415
Project: 32415
Buggy source:
/** 
 * Creates a new   {@link EventList} that shares its {@link ReadWriteLock} and{@link ListEventPublisher} with this {@link CompositeList}. This is necessary when this   {@link CompositeList} will be used by multiplethreads. <p>Note that the created  {@link EventList} must be explicitly added as a memberto this  {@link CompositeList} using {@link #addMemberList(EventList)}.
 * @return a new EventList appropriate for use as a{#link #addMemberList member list} of this CompositeList
 */
public <E>EventList<E> createMemberList(){
  return new BasicEventList<E>(getPublisher(),getReadWriteLock());
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link EventList} that shares its {@link ReadWriteLock} and{@link ListEventPublisher} with this {@link CompositeList}. This is necessary when this   {@link CompositeList} will be used by multiplethreads. <p>Note that the created  {@link EventList} must be explicitly added as a memberto this  {@link CompositeList} using {@link #addMemberList(EventList)}.
 * @return a new EventList appropriate for use as a{#link #addMemberList member list} of this CompositeList
 */
public <E>EventList<E> createMemberList(){
  return new BasicEventList<>(getPublisher(),getReadWriteLock());
}
Program: 32416
Project: 32416
Buggy source:
/** 
 * Returns a new empty   {@link DebugList} which shares the same{@link ListEventListener} and {@link ReadWriteLock} with this DebugList.This method is particularly useful when debugging a  {@link CompositeList}where some member lists are DebugLists and thus must share an identical publisher and locks in order to participate in the CompositeList.
 */
public <E>DebugList<E> createNewDebugList(){
  return new DebugList<E>(getPublisher(),debugReadWriteLock);
}

Fixed version (ground truth):
/** 
 * Returns a new empty   {@link DebugList} which shares the same{@link ListEventListener} and {@link ReadWriteLock} with this DebugList.This method is particularly useful when debugging a  {@link CompositeList}where some member lists are DebugLists and thus must share an identical publisher and locks in order to participate in the CompositeList.
 */
public <E>DebugList<E> createNewDebugList(){
  return new DebugList<>(getPublisher(),debugReadWriteLock);
}
Program: 32417
Project: 32417
Buggy source:
/** 
 * Creates a   {@link DebugList} using the specified{@link ListEventPublisher} and {@link ReadWriteLock}. This is particularly useful when multiple   {@link DebugList}s are used within a  {@link CompositeList} and must share the same lock and publisher.
 */
private DebugList(ListEventPublisher publisher,DebugReadWriteLock debugReadWriteLock){
  this.debugReadWriteLock=debugReadWriteLock;
  this.delegate=new BasicEventList<E>(publisher,this.debugReadWriteLock);
  this.delegate.addListEventListener(delegateWatcher);
}

Fixed version (ground truth):
/** 
 * Creates a   {@link DebugList} using the specified{@link ListEventPublisher} and {@link ReadWriteLock}. This is particularly useful when multiple   {@link DebugList}s are used within a  {@link CompositeList} and must share the same lock and publisher.
 */
private DebugList(ListEventPublisher publisher,DebugReadWriteLock debugReadWriteLock){
  this.debugReadWriteLock=debugReadWriteLock;
  this.delegate=new BasicEventList<>(publisher,this.debugReadWriteLock);
  this.delegate.addListEventListener(delegateWatcher);
}
Program: 32418
Project: 32418
Buggy source:
/** 
 * Validates that containsAll() works with null.
 */
@Test public void testContainsAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.containsAll(Arrays.asList(null,null)));
  }
}

Fixed version (ground truth):
/** 
 * Validates that containsAll() works with null.
 */
@Test public void testContainsAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(false,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.containsAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.containsAll(Arrays.asList(null,null)));
  }
}
Program: 32419
Project: 32419
Buggy source:
/** 
 * Validates that lastIndexOf() works with null.
 */
@Test public void testLastIndexOfNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertTrue(-1 == list.lastIndexOf(null));
    assertTrue(-1 != list.lastIndexOf("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertTrue(-1 != list.lastIndexOf(null));
    assertTrue(-1 != list.lastIndexOf("String_Node_Str"));
    assertTrue(-1 == list.lastIndexOf("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Validates that lastIndexOf() works with null.
 */
@Test public void testLastIndexOfNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertTrue(-1 == list.lastIndexOf(null));
    assertTrue(-1 != list.lastIndexOf("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertTrue(-1 != list.lastIndexOf(null));
    assertTrue(-1 != list.lastIndexOf("String_Node_Str"));
    assertTrue(-1 == list.lastIndexOf("String_Node_Str"));
  }
}
Program: 32420
Project: 32420
Buggy source:
/** 
 * Validates that retainAll() works with null.
 */
@Test public void testRetainAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
  }
}

Fixed version (ground truth):
/** 
 * Validates that retainAll() works with null.
 */
@Test public void testRetainAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(true,list.retainAll(Arrays.asList("String_Node_Str",null)));
  }
}
Program: 32421
Project: 32421
Buggy source:
/** 
 * Validates that hashCode() works with null.
 */
@Test public void testHashCodeNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    List<String> copy=new ArrayList<>();
    list.clear();
    copy.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    copy.addAll(list);
    assertEquals(copy.hashCode(),list.hashCode());
    assertTrue(list.equals(copy));
    copy.set(0,"String_Node_Str");
    assertFalse(list.equals(copy));
    list.clear();
    copy.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    copy.addAll(list);
    assertEquals(copy.hashCode(),list.hashCode());
    assertTrue(list.equals(copy));
    copy.set(0,"String_Node_Str");
    assertFalse(list.equals(copy));
  }
}

Fixed version (ground truth):
/** 
 * Validates that hashCode() works with null.
 */
@Test public void testHashCodeNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    List<String> copy=new ArrayList<>();
    list.clear();
    copy.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    copy.addAll(list);
    assertEquals(copy.hashCode(),list.hashCode());
    assertTrue(list.equals(copy));
    copy.set(0,"String_Node_Str");
    assertFalse(list.equals(copy));
    list.clear();
    copy.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    copy.addAll(list);
    assertEquals(copy.hashCode(),list.hashCode());
    assertTrue(list.equals(copy));
    copy.set(0,"String_Node_Str");
    assertFalse(list.equals(copy));
  }
}
Program: 32422
Project: 32422
Buggy source:
/** 
 * Validates that indexOf() works with null.
 */
@Test public void testIndexOfNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertTrue(-1 == list.indexOf(null));
    assertTrue(-1 != list.indexOf("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertTrue(-1 != list.indexOf(null));
    assertTrue(-1 != list.indexOf("String_Node_Str"));
    assertTrue(-1 == list.indexOf("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Validates that indexOf() works with null.
 */
@Test public void testIndexOfNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertTrue(-1 == list.indexOf(null));
    assertTrue(-1 != list.indexOf("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertTrue(-1 != list.indexOf(null));
    assertTrue(-1 != list.indexOf("String_Node_Str"));
    assertTrue(-1 == list.indexOf("String_Node_Str"));
  }
}
Program: 32423
Project: 32423
Buggy source:
/** 
 * Validates that removeAll() works with null.
 */
@Test public void testRemoveAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.removeAll(Arrays.asList(null,"String_Node_Str")));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.removeAll(Arrays.asList("String_Node_Str",null)));
  }
}

Fixed version (ground truth):
/** 
 * Validates that removeAll() works with null.
 */
@Test public void testRemoveAllNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.removeAll(Arrays.asList(null,"String_Node_Str")));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str","String_Node_Str")));
    assertEquals(true,list.removeAll(Arrays.asList("String_Node_Str",null)));
    assertEquals(false,list.removeAll(Arrays.asList("String_Node_Str",null)));
  }
}
Program: 32424
Project: 32424
Buggy source:
/** 
 * Validates that contains() works with null.
 */
@Test public void testContainsNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(false,list.contains(null));
    assertEquals(true,list.contains("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.contains(null));
    assertEquals(true,list.contains("String_Node_Str"));
    assertEquals(false,list.contains("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Validates that contains() works with null.
 */
@Test public void testContainsNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(false,list.contains(null));
    assertEquals(true,list.contains("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.contains(null));
    assertEquals(true,list.contains("String_Node_Str"));
    assertEquals(false,list.contains("String_Node_Str"));
  }
}
Program: 32425
Project: 32425
Buggy source:
/** 
 * Validates that remove() works with null.
 */
@Test public void testRemoveNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<>()));
  for (  List<String> list : listTypes) {
    installConsistencyListener(list);
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(false,list.remove(null));
    assertEquals(true,list.remove("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.remove(null));
    assertEquals(true,list.remove("String_Node_Str"));
    assertEquals(false,list.remove("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Validates that remove() works with null.
 */
@Test public void testRemoveNull(){
  List<List<String>> listTypes=new ArrayList<>();
  listTypes.add(new ArrayList<>());
  listTypes.add(new BasicEventList<>());
  listTypes.add(SortedList.create(new BasicEventList<String>()));
  for (  List<String> list : listTypes) {
    installConsistencyListener(list);
    list.clear();
    list.addAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    assertEquals(false,list.remove(null));
    assertEquals(true,list.remove("String_Node_Str"));
    list.clear();
    list.addAll(Arrays.asList(null,"String_Node_Str",null,"String_Node_Str"));
    assertEquals(true,list.remove(null));
    assertEquals(true,list.remove("String_Node_Str"));
    assertEquals(false,list.remove("String_Node_Str"));
  }
}
Program: 32427
Project: 32427
Buggy source:
/** 
 * Set the   {@link Comparator} used to determine how elements are splitinto groups. <p>Performance Note: sorting will take <code>O(N * Log N)</code> time. <p><strong><font color="#FF0000">Warning:</font></strong> This method is thread ready but not thread safe. See  {@link EventList} for an exampleof thread safe code.
 */
public void setComparator(Comparator<E> comparator){
  final boolean isEmpty=isEmpty();
  if (!isEmpty) {
    updates.beginEvent();
    updates.addDelete(0,size() - 1);
  }
  SortedList<E> sortedList=(SortedList<E>)separatorSource.source;
  sortedList.setComparator(comparator);
  if (!isEmpty) {
    rebuildCollapsedElements();
    updates.addInsert(0,size() - 1);
    updates.commitEvent();
  }
}

Fixed version (ground truth):
/** 
 * Set the   {@link Comparator} used to determine how elements are splitinto groups. <p>Performance Note: sorting will take <code>O(N * Log N)</code> time. <p><strong><font color="#FF0000">Warning:</font></strong> This method is thread ready but not thread safe. See  {@link EventList} for an exampleof thread safe code.
 */
public void setComparator(Comparator<E> comparator){
  final boolean isEmpty=isEmpty();
  if (!isEmpty) {
    updates.beginEvent();
    updates.addDelete(0,size() - 1);
  }
  SortedList<E> sortedList=(SortedList<E>)separatorSource.source;
  sortedList.setComparator(comparator);
  if (!isEmpty) {
    rebuildCollapsedElements();
    updates.addInsert(0,size() - 1);
    updates.commitEvent();
  }
 else {
    separatorSource.grouper.setComparator(comparator);
  }
}
Program: 32428
Project: 32428
Buggy source:
/** 
 * Set the match mode for this   {@link CompositeMatcherEditor}.
 * @param mode either <code>CompositeMatcherEditor.AND</code> to match all<code>CompositeMatcherEditor.OR</code> to match any.
 */
public void setMode(int mode){
  if (this.mode == mode)   return;
  int oldMode=this.mode;
  this.mode=mode;
  if (matcherEditors.isEmpty()) {
    return;
  }
 else   if (oldMode == AND && mode == OR) {
    fireRelaxed(rebuildMatcher());
  }
 else   if (oldMode == OR && mode == AND) {
    fireConstrained(rebuildMatcher());
  }
 else {
    throw new IllegalArgumentException();
  }
}

Fixed version (ground truth):
/** 
 * Set the match mode for this   {@link CompositeMatcherEditor}.
 * @param mode either <code>CompositeMatcherEditor.AND</code> to match all<code>CompositeMatcherEditor.OR</code> to match any.
 */
public void setMode(int mode){
  if (this.mode == mode)   return;
  int oldMode=this.mode;
  this.mode=mode;
  if (oldMode == AND && mode == OR) {
    if (matcherEditors.isEmpty()) {
      fireMatchNone();
    }
 else     if (matcherEditors.size() > 1) {
      fireRelaxed(rebuildMatcher());
    }
  }
 else   if (oldMode == OR && mode == AND) {
    if (matcherEditors.isEmpty()) {
      fireMatchAll();
    }
 else     if (matcherEditors.size() > 1) {
      fireConstrained(rebuildMatcher());
    }
  }
 else {
    throw new IllegalArgumentException();
  }
}
Program: 32430
Project: 32430
Buggy source:
/** 
 * Test that the   {@link CompositeMatcherEditor} fires the right events in OR mode.
 */
@Test public void testCompositeMatcherEditorOrEvents(){
  SimpleMatcherEditorListener listener=new SimpleMatcherEditorListener();
  compositeMatcherEditor.addMatcherEditorListener(listener);
  compositeMatcherEditor.setMode(CompositeMatcherEditor.OR);
  listener.assertNoEvents(0);
  compositeMatcherEditor.getMatcherEditors().add(textMatcherEditor);
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertConstrained(4);
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertRelaxed(6);
  compositeMatcherEditor.getMatcherEditors().add(anotherTextMatcherEditor);
  listener.assertRelaxed(7);
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertConstrained(8);
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str","String_Node_Str"});
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertRelaxed(10);
  anotherTextMatcherEditor.setFilterText(new String[0]);
  listener.assertRelaxed(11);
  compositeMatcherEditor.getMatcherEditors().remove(1);
  listener.assertConstrained(12);
  compositeMatcherEditor.getMatcherEditors().remove(0);
  listener.assertMatchAll(13);
}

Fixed version (ground truth):
/** 
 * Test that the   {@link CompositeMatcherEditor} fires the right events in OR mode.
 */
@Test public void testCompositeMatcherEditorOrEvents(){
  SimpleMatcherEditorListener listener=new SimpleMatcherEditorListener();
  compositeMatcherEditor.addMatcherEditorListener(listener);
  compositeMatcherEditor.setMode(CompositeMatcherEditor.OR);
  listener.assertMatchNone(1);
  compositeMatcherEditor.getMatcherEditors().add(textMatcherEditor);
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertConstrained(5);
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertRelaxed(7);
  compositeMatcherEditor.getMatcherEditors().add(anotherTextMatcherEditor);
  listener.assertRelaxed(8);
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertConstrained(9);
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str","String_Node_Str"});
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  listener.assertRelaxed(11);
  anotherTextMatcherEditor.setFilterText(new String[0]);
  listener.assertRelaxed(12);
  compositeMatcherEditor.getMatcherEditors().remove(1);
  listener.assertConstrained(13);
  compositeMatcherEditor.getMatcherEditors().remove(0);
  listener.assertMatchAll(14);
}
Program: 32431
Project: 32431
Buggy source:
/** 
 * Get the publisher used to distribute   {@link ListEvent}s.
 */
public ListEventPublisher getPublisher();

Fixed version (ground truth):
/** 
 * Get the publisher used to distribute   {@link ListEvent}s. It's always defined.
 */
public ListEventPublisher getPublisher();
Program: 32432
Project: 32432
Buggy source:
/** 
 * Removes the specified listener from receiving change updates for this list.
 */
public void removeListEventListener(ListEventListener<? super E> listChangeListener);

Fixed version (ground truth):
/** 
 * Removes the specified listener from receiving change updates for this list.
 * @param listChangeListener event listener != null
 * @throws NullPointerException if the specified listener is null
 * @throws IllegalArgumentException if the specified listener wasn't added before
 */
public void removeListEventListener(ListEventListener<? super E> listChangeListener);
Program: 32433
Project: 32433
Buggy source:
/** 
 * Registers the specified listener to receive change updates for this list.
 */
public void addListEventListener(ListEventListener<? super E> listChangeListener);

Fixed version (ground truth):
/** 
 * Registers the specified listener to receive change updates for this list.
 * @param listChangeListener event listener != null
 * @throws NullPointerException if the specified listener is null
 */
public void addListEventListener(ListEventListener<? super E> listChangeListener);
Program: 32434
Project: 32434
Buggy source:
/** 
 * Gets the lock required to share this list between multiple threads.
 * @return a re-entrant {@link ReadWriteLock} that guarantees thread safeaccess to this list.
 */
public ReadWriteLock getReadWriteLock();

Fixed version (ground truth):
/** 
 * Gets the lock required to share this list between multiple threads. It's always defined.
 * @return a re-entrant {@link ReadWriteLock} that guarantees thread safeaccess to this list.
 */
public ReadWriteLock getReadWriteLock();