nus-yam/ex-repair huggingface dataset:
Program: 17941
Project: 17941
Buggy source:
/** 
 * OK, Apr19
 * @throws Exception
 */
public void testDateRanges() throws Exception {
  WhitespaceAnalyzer wsa=new WhitespaceAnalyzer();
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * OK, Apr19
 */
public void testDateRanges() throws Exception {
  WhitespaceAnalyzer wsa=new WhitespaceAnalyzer();
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",null,"String_Node_Str");
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str");
}
Program: 17943
Project: 17943
Buggy source:
/** 
 * @throws Exception
 */
public void testEscaped() throws Exception {
  WhitespaceAnalyzer wsa=new WhitespaceAnalyzer();
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
}

Fixed version (ground truth):
public void testEscaped() throws Exception {
  WhitespaceAnalyzer wsa=new WhitespaceAnalyzer();
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
  assertQueryEquals("String_Node_Str",wsa,"String_Node_Str",TermQuery.class);
}
Program: 17944
Project: 17944
Buggy source:
private static LuceneCacheWrapper<NumericDocValues> getLuceneCache(FunctionQParser fp,String fieldname) throws SyntaxError {
  LuceneCacheWrapper<NumericDocValues> cacheWrapper;
  SchemaField field=fp.getReq().getSchema().getField(fieldname);
  try {
    cacheWrapper=LuceneCacheWrapper.getFloatCache("String_Node_Str",field.getType().getUninversionType(field),fp.getReq().getSearcher().getLeafReader());
  }
 catch (  IOException e) {
    throw new SyntaxError("String_Node_Str",e);
  }
  return cacheWrapper;
}

Fixed version (ground truth):
private static LuceneCacheWrapper<NumericDocValues> getLuceneCache(FunctionQParser fp,String fieldname) throws SyntaxError {
  LuceneCacheWrapper<NumericDocValues> cacheWrapper;
  SchemaField field=fp.getReq().getSchema().getField(fieldname);
  try {
    cacheWrapper=LuceneCacheWrapper.getFloatCache("String_Node_Str",UninvertingReader.Type.SORTED_SET_FLOAT,fp.getReq().getSearcher().getLeafReader());
  }
 catch (  IOException e) {
    throw new SyntaxError("String_Node_Str",e);
  }
  return cacheWrapper;
}
Program: 17945
Project: 17945
Buggy source:
public static LuceneCacheWrapper<NumericDocValues> getFloatCache(String fieldName,Type type,LeafReader reader) throws IOException {
  Map<String,UninvertingReader.Type> mapping=new HashMap<String,UninvertingReader.Type>();
  mapping.put(fieldName,type);
  UninvertingReader uninvertingReader=new UninvertingReader(reader,mapping);
  NumericDocValues values=uninvertingReader.getNumericDocValues(fieldName);
  final String fName=fieldName;
  LuceneCacheWrapper<NumericDocValues> newCache=new LuceneCacheWrapper<NumericDocValues>(new SoftReference<NumericDocValues>(values)){
    @Override public String internalToString(){
      return "String_Node_Str" + fName;
    }
    @Override public float getFloat(    int docid){
      long v=this.cache.get().get(docid);
      return (float)v;
    }
  }
;
  return newCache;
}

Fixed version (ground truth):
public static LuceneCacheWrapper<NumericDocValues> getFloatCache(String fieldName,Type type,LeafReader reader) throws IOException {
  Map<String,UninvertingReader.Type> mapping=new HashMap<String,UninvertingReader.Type>();
  mapping.put(fieldName,type);
  UninvertingReader uninvertingReader=new UninvertingReader(reader,mapping);
  NumericDocValues values=uninvertingReader.getNumericDocValues(fieldName);
  if (values == null)   values=DocValues.emptyNumeric();
  final String fName=fieldName;
  LuceneCacheWrapper<NumericDocValues> newCache=new LuceneCacheWrapper<NumericDocValues>(new SoftReference<NumericDocValues>(values)){
    @Override public String internalToString(){
      return "String_Node_Str" + fName;
    }
    @Override public float getFloat(    int docid){
      long v=this.cache.get().get(docid);
      return (float)v;
    }
  }
;
  return newCache;
}
Program: 17946
Project: 17946
Buggy source:
/** 
 * Returns a hash code value for this object. 
 */
public int hashCode(){
  return 435878 ^ boostField.hashCode() ^ cache.hashCode();
}

Fixed version (ground truth):
/** 
 * Returns a hash code value for this object. 
 */
public int hashCode(){
}
Program: 17947
Project: 17947
Buggy source:
protected QueryNode applyNonAnalyzableToAllChildren(QueryNode node){
  if (node instanceof AqpNonAnalyzedQueryNode) {
    return node;
  }
 else   if (node instanceof FieldQueryNode) {
    return new AqpNonAnalyzedQueryNode((FieldQueryNode)node);
  }
  List<QueryNode> children=node.getChildren();
  if (children != null) {
    for (int i=0; i < children.size(); i++) {
      children.set(i,applyNonAnalyzableToAllChildren(children.get(i)));
    }
  }
  return node;
}

Fixed version (ground truth):
protected QueryNode applyNonAnalyzableToAllChildren(QueryNode node){
  if (node instanceof AqpNonAnalyzedQueryNode) {
    return node;
  }
 else   if (node instanceof FieldQueryNode) {
    return new AqpNonAnalyzedQueryNode((FieldQueryNode)node);
  }
  List<QueryNode> children=node.getChildren();
  if (children != null) {
    for (int i=0; i < children.size(); i++) {
      children.set(i,applyNonAnalyzableToAllChildren(children.get(i)));
    }
    node.set(children);
  }
  return node;
}
Program: 17949
Project: 17949
Buggy source:
private void runDiscovery(SolrQueryRequest req) throws IOException, SQLException, ParseException {
  SolrParams params=req.getParams();
  if (params.get("String_Node_Str",null) == null || params.getInt("String_Node_Str",0) == -1) {
    queue.setPresent(new BitSet());
    queue.setMissing(new BitSet());
    queue.setToDelete(new BitSet());
    setWorkerMessage("String_Node_Str");
  }
  BitSet[] data=discoverMissingRecords(queue.getPresent(),queue.getMissing(),queue.getToDelete(),req);
  queue.setPresent(data[0]);
  queue.setMissing(data[1]);
  queue.setToDelete(data[2]);
}

Fixed version (ground truth):
private void runDiscovery(SolrQueryRequest req) throws IOException, SQLException, ParseException {
  SolrParams params=req.getParams();
  if (params.get("String_Node_Str",null) == null || params.getInt("String_Node_Str",0) == -1) {
    queue.setPresent(new BitSet());
    queue.setMissing(new BitSet());
    queue.setToDelete(new BitSet());
    setWorkerMessage("String_Node_Str");
  }
 else {
    if (queue.getMissing() == null)     queue.setMissing(new BitSet());
    if (queue.getPresent() == null)     queue.setPresent(new BitSet());
    if (queue.getToDelete() == null)     queue.setToDelete(new BitSet());
  }
  BitSet[] data=discoverMissingRecords(queue.getPresent(),queue.getMissing(),queue.getToDelete(),req);
  queue.setPresent(data[0]);
  queue.setMissing(data[1]);
  queue.setToDelete(data[2]);
}
Program: 17952
Project: 17952
Buggy source:
public NameInfo(String name){
  if (name.endsWith("String_Node_Str") || !name.contains("String_Node_Str"))   containsOnlySurname=true;
  parts=name.split("String_Node_Str");
  lastPartWasAcronym=parts[parts.length - 1].length() == 1;
  noOfParts=parts.length;
  origName=name;
}

Fixed version (ground truth):
public NameInfo(String name){
  if (name.endsWith("String_Node_Str") || !name.contains("String_Node_Str"))   containsOnlySurname=true;
  parts=AuthorUtils.splitName(name);
  lastPartWasAcronym=parts[parts.length - 1].length() == 1;
  noOfParts=parts.length;
  origName=name;
}
Program: 17953
Project: 17953
Buggy source:
private int containsLongForm(String[] names){
  int i=0;
  for (  String name : names) {
    if (isLongForm(name.split("String_Node_Str"))) {
      i++;
    }
  }
  return i;
}

Fixed version (ground truth):
private int containsLongForm(String[] names){
  int i=0;
  for (  String name : names) {
    if (isLongForm(AuthorUtils.splitName(name))) {
      i++;
    }
  }
  return i;
}
Program: 17955
Project: 17955
Buggy source:
private String buildLine(String[] names){
  HashSet<String> set=new HashSet<String>();
  StringBuilder out=new StringBuilder();
  boolean notFirst=false;
  for (  String name : names) {
    String[] p=name.split("String_Node_Str");
    if (isLongForm(p)) {
      set.add(makeShortForm(p));
    }
    set.add(name);
  }
  for (  String name : set) {
    if (notFirst)     out.append("String_Node_Str");
    out.append(escape(name));
    notFirst=true;
  }
  return out.toString();
}

Fixed version (ground truth):
private String buildLine(String[] names){
  HashSet<String> set=new HashSet<String>();
  StringBuilder out=new StringBuilder();
  boolean notFirst=false;
  for (  String name : names) {
    String[] p=AuthorUtils.splitName(name);
    if (isLongForm(p)) {
      set.add(makeShortForm(p));
    }
    set.add(name);
  }
  for (  String name : set) {
    if (notFirst)     out.append("String_Node_Str");
    out.append(escape(name));
    notFirst=true;
  }
  return out.toString();
}
Program: 17956
Project: 17956
Buggy source:
private String unescape(String s){
  return s.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
private String unescape(String s){
  return s.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str" + charSeparator,charSeparator.toString());
}
Program: 17957
Project: 17957
Buggy source:
private String[] getNames(String vals){
  List<String> nn=StrUtils.splitSmart(vals,',');
  String names[]=new String[nn.size()];
  int j=0;
  for (  String n : nn) {
    names[j]=unescape(n);
    j++;
  }
  return names;
}

Fixed version (ground truth):
private String[] getNames(String vals){
  List<String> nn=StrUtils.splitSmart(vals,charSeparator);
  String names[]=new String[nn.size()];
  int j=0;
  for (  String n : nn) {
    names[j]=unescape(n);
    j++;
  }
  return names;
}
Program: 17963
Project: 17963
Buggy source:
public String getWorkerMessage(){
  StringBuilder out=new StringBuilder();
  for (  String msg : workerMessage) {
    out.append(msg);
    out.append("String_Node_Str");
  }
  workerMessage.clear();
  return out.toString();
}

Fixed version (ground truth):
public String getWorkerMessage(){
  StringBuilder out=new StringBuilder();
  for (  String msg : workerMessage) {
    out.append(msg);
    out.append("String_Node_Str");
  }
  if (workerMessage.size() > 100) {
synchronized (workerMessage) {
      for (int i=100; i < workerMessage.size(); i++) {
        workerMessage.remove(i);
      }
    }
  }
  ;
  return out.toString();
}
Program: 17965
Project: 17965
Buggy source:
public void setWorkerMessage(String msg){
  workerMessage.add(0,msg);
}

Fixed version (ground truth):
public void setWorkerMessage(String msg){
synchronized (workerMessage) {
    workerMessage.add(0,msg);
  }
}
Program: 17966
Project: 17966
Buggy source:
public AqpFunctionQueryNode(String name,AqpFunctionQueryBuilder builder,AqpANTLRNode node) throws ParseException {
  allocate();
  setLeaf(true);
  originalInput=AqpQProcessor.getOriginalInput(node,nodesToCount);
  funcValues=new ArrayList<OriginalInput>();
  if (node.getTokenLabel().equals("String_Node_Str")) {
    for (    QueryNode n : node.getChildren()) {
      funcValues.add(AqpQProcessor.getOriginalInput((AqpANTLRNode)n,nodesToCount));
    }
  }
 else {
    funcValues.add(AqpQProcessor.getOriginalInput((AqpANTLRNode)node,nodesToCount));
  }
  this.builder=builder;
  this.name=name;
}

Fixed version (ground truth):
public AqpFunctionQueryNode(String name,AqpFunctionQueryBuilder builder,AqpANTLRNode node) throws ParseException {
  allocate();
  setLeaf(true);
  originalInput=AqpQProcessor.getOriginalInput(node,nodesToCount);
  funcValues=new ArrayList<OriginalInput>();
  if (node.getTokenLabel().equals("String_Node_Str")) {
    for (    QueryNode n : node.getChildren()) {
      funcValues.add(AqpQProcessor.getOriginalInput((AqpANTLRNode)n,nodesToCount));
    }
  }
 else   if (node.getTokenLabel().equals("String_Node_Str") && node.getChild("String_Node_Str") != null) {
    for (    QueryNode n : node.getChild("String_Node_Str").getChildren()) {
      funcValues.add(AqpQProcessor.getOriginalInput((AqpANTLRNode)n,nodesToCount));
    }
  }
 else {
    funcValues.add(AqpQProcessor.getOriginalInput((AqpANTLRNode)node,nodesToCount));
  }
  this.builder=builder;
  this.name=name;
}
Program: 17968
Project: 17968
Buggy source:
protected String getTokenInput(QueryNode child){
  AqpANTLRNode n=null;
  if (child instanceof AqpANTLRNode) {
    n=(AqpANTLRNode)child;
  }
 else {
    for (    QueryNode c : child.getChildren()) {
      return getTokenInput(c);
    }
  }
  AqpANTLRNode fieldNode=n.getChild("String_Node_Str");
  if (fieldNode != null) {
    return ((AqpANTLRNode)(fieldNode.getChildren().get(0)).getChildren().get(0)).getTokenInput();
  }
  return null;
}

Fixed version (ground truth):
protected String getTokenInput(QueryNode child){
  AqpANTLRNode n=null;
  if (child instanceof AqpANTLRNode) {
    n=(AqpANTLRNode)child;
  }
 else {
    for (    QueryNode c : child.getChildren()) {
      return getTokenInput(c);
    }
  }
  AqpANTLRNode fieldNode=n.getChild("String_Node_Str");
  if (fieldNode != null) {
    if (fieldNode.getChildren().size() > 0 && !fieldNode.getChildren().get(0).isLeaf() && fieldNode.getChildren().get(0).getChildren().get(0) instanceof AqpANTLRNode) {
      return ((AqpANTLRNode)(fieldNode.getChildren().get(0)).getChildren().get(0)).getTokenInput();
    }
  }
  return null;
}
Program: 17970
Project: 17970
Buggy source:
@Override public String toString(){
  return name + "String_Node_Str" + topN+ "String_Node_Str"+ this.acceptsDocsOutOfOrder()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + topN + "String_Node_Str"+ this.acceptsDocsOutOfOrder()+ (detail != null ? "String_Node_Str" + detail : "String_Node_Str")+ "String_Node_Str";
}
Program: 17971
Project: 17971
Buggy source:
public void testCitationCache() throws Exception {
  Map<Integer,List<Integer>> cache1=DictionaryRecIdCache.INSTANCE.getCache(UnInvertedMap.MULTIVALUED,searcher,new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str");
  Map<Integer,List<Integer>> cache2=DictionaryRecIdCache.INSTANCE.getCache(UnInvertedMap.MULTIVALUED,searcher,new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str");
  assertTrue(cache1.equals(cache2));
  assertTrue(cache1 == cache2);
}

Fixed version (ground truth):
public void testCitationCache() throws Exception {
  Map<Integer,List<Integer>> cache1=DictionaryRecIdCache.INSTANCE.getCache(UnInvertedMap.MULTIVALUED,searcher,new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str");
  Map<Integer,List<Integer>> cache2=DictionaryRecIdCache.INSTANCE.getCache(UnInvertedMap.MULTIVALUED,searcher,new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str");
  assertTrue(cache1.equals(cache2));
  assertTrue(cache1 == cache2);
  assertTrue(cache1.get(0).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(1).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(2).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(3).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(4).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(5).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(6).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(7).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(8).equals(Arrays.asList(2,4)));
  assertTrue(cache1.get(9).equals(Arrays.asList(2,3,4)));
  assertTrue(cache1.get(10).equals(Arrays.asList(2,3,4)));
  Map<String,Integer> refs1=DictionaryRecIdCache.INSTANCE.getCache(Str2LuceneId.MAPPING,searcher,new String[]{"String_Node_Str","String_Node_Str"});
  Map<String,Integer> refs2=DictionaryRecIdCache.INSTANCE.getCache(Str2LuceneId.MAPPING,searcher,new String[]{"String_Node_Str","String_Node_Str"});
  assertTrue(refs1.equals(refs2));
  assertTrue(refs1 == refs2);
  assertTrue(refs1.get("String_Node_Str").equals(0));
  assertTrue(refs1.get("String_Node_Str").equals(1));
  assertTrue(refs1.get("String_Node_Str").equals(2));
  assertTrue(refs1.get("String_Node_Str").equals(2));
  assertTrue(refs1.get("String_Node_Str").equals(2));
  assertTrue(refs1.get("String_Node_Str").equals(3));
  assertTrue(refs1.get("String_Node_Str").equals(4));
  assertTrue(refs1.get("String_Node_Str").equals(5));
  assertTrue(refs1.get("String_Node_Str").equals(5));
  assertTrue(refs1.get("String_Node_Str").equals(6));
  assertTrue(refs1.get("String_Node_Str").equals(7));
  assertTrue(refs1.get("String_Node_Str").equals(8));
  assertTrue(refs1.get("String_Node_Str").equals(9));
  assertTrue(refs1.get("String_Node_Str").equals(10));
}
Program: 17972
Project: 17972
Buggy source:
@Override public void run(SolrQueryRequest locReq,BatchHandlerRequestQueue queue) throws Exception {
  SolrParams params=locReq.getParams();
  String jobid=params.get("String_Node_Str");
  String workDir=params.get("String_Node_Str");
  File input=new File(workDir + "String_Node_Str" + jobid+ "String_Node_Str");
  if (!input.canRead()) {
    throw new SolrException(ErrorCode.BAD_REQUEST,"String_Node_Str" + input);
  }
  AtomicReader reader=locReq.getSearcher().getAtomicReader();
  FixedBitSet bits=new FixedBitSet(reader.maxDoc());
  Map<String,Integer> bibcodes=DictionaryRecIdCache.INSTANCE.getTranslationCacheString(locReq.getSearcher(),new String[]{"String_Node_Str","String_Node_Str"});
  BufferedReader br=new BufferedReader(new FileReader(input));
  String line;
  while ((line=br.readLine()) != null) {
    line=line.toLowerCase().trim();
    if (bibcodes.containsKey(line)) {
      bits.set(bibcodes.get(line));
    }
  }
  br.close();
  if (bits.cardinality() <= 0) {
    return;
  }
  ModifiableSolrParams mParams=new ModifiableSolrParams(locReq.getParams());
  mParams.set(CommonParams.Q,"String_Node_Str");
  locReq.setParams(mParams);
  internalWorker.setFilter(new BitSetFilter(bits));
  internalWorker.run(locReq,queue);
}

Fixed version (ground truth):
@Override public void run(SolrQueryRequest locReq,BatchHandlerRequestQueue queue) throws Exception {
  SolrParams params=locReq.getParams();
  String jobid=params.get("String_Node_Str");
  String workDir=params.get("String_Node_Str");
  File input=new File(workDir + "String_Node_Str" + jobid+ "String_Node_Str");
  if (!input.canRead()) {
    throw new SolrException(ErrorCode.BAD_REQUEST,"String_Node_Str" + input);
  }
  AtomicReader reader=locReq.getSearcher().getAtomicReader();
  FixedBitSet bits=new FixedBitSet(reader.maxDoc());
  Map<String,Integer> bibcodes=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.Str2LuceneId.MAPPING,locReq.getSearcher(),new String[]{"String_Node_Str","String_Node_Str"});
  BufferedReader br=new BufferedReader(new FileReader(input));
  String line;
  while ((line=br.readLine()) != null) {
    line=line.toLowerCase().trim();
    if (bibcodes.containsKey(line)) {
      bits.set(bibcodes.get(line));
    }
  }
  br.close();
  if (bits.cardinality() <= 0) {
    return;
  }
  ModifiableSolrParams mParams=new ModifiableSolrParams(locReq.getParams());
  mParams.set(CommonParams.Q,"String_Node_Str");
  locReq.setParams(mParams);
  internalWorker.setFilter(new BitSetFilter(bits));
  internalWorker.run(locReq,queue);
}
Program: 17973
Project: 17973
Buggy source:
public InvenioWeight(IndexSearcher searcher,InvenioQuery query,String idField) throws IOException {
  this.innerQuery=query.getInnerQuery();
  this.weight=innerQuery.createWeight(searcher);
  this.similarity=searcher.getSimilarity();
  this.query=query;
  this.recidToDocid=DictionaryRecIdCache.INSTANCE.getTranslationCache(searcher.getIndexReader(),new String[]{idField});
  this.searcherCounter=0;
  this.idField=idField;
}

Fixed version (ground truth):
public InvenioWeight(IndexSearcher searcher,InvenioQuery query,String idField) throws IOException {
  this.innerQuery=query.getInnerQuery();
  this.weight=innerQuery.createWeight(searcher);
  this.similarity=searcher.getSimilarity();
  this.query=query;
  this.recidToDocid=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.Int2LuceneId.MAPPING,searcher,new String[]{idField});
  this.searcherCounter=0;
  this.idField=idField;
}
Program: 17974
Project: 17974
Buggy source:
@Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (invertedIndex == null) {
    if (cacheGetter != null) {
      invertedIndex=(int[][])cacheGetter.getCache();
    }
 else {
      invertedIndex=DictionaryRecIdCache.INSTANCE.getUnInvertedDocidsStrField(searcher,uniqueIdField,referenceField);
    }
  }
  if (invertedIndex == null || invertedIndex.length == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}

Fixed version (ground truth):
@Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (invertedIndex == null) {
    if (cacheGetter != null) {
      invertedIndex=(int[][])cacheGetter.getCache();
    }
 else {
      invertedIndex=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.UnInvertedArray.MULTIVALUED_STRING,searcher,uniqueIdField,referenceField);
    }
  }
  if (invertedIndex == null || invertedIndex.length == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}
Program: 17975
Project: 17975
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (valueToDocidCache == null) {
    if (cacheGetter != null) {
      valueToDocidCache=(Map<String,Integer>)cacheGetter.getCache();
    }
 else {
      valueToDocidCache=DictionaryRecIdCache.INSTANCE.getTranslationCacheString(searcher,uniqueIdField);
    }
  }
  if (valueToDocidCache == null || valueToDocidCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (valueToDocidCache == null) {
    if (cacheGetter != null) {
      valueToDocidCache=(Map<String,Integer>)cacheGetter.getCache();
    }
 else {
      valueToDocidCache=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.Str2LuceneId.MAPPING,searcher,uniqueIdField);
    }
  }
  if (valueToDocidCache == null || valueToDocidCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}
Program: 17976
Project: 17976
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (docToDocidsCache == null) {
    if (cacheGetter != null) {
      docToDocidsCache=(Map<Integer,List<Integer>>)cacheGetter.getCache();
    }
 else {
      docToDocidsCache=DictionaryRecIdCache.INSTANCE.getCacheTranslatedMultiValuesString(searcher,uniqueIdField,referenceField);
    }
  }
  if (docToDocidsCache == null || docToDocidsCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (docToDocidsCache == null) {
    if (cacheGetter != null) {
      docToDocidsCache=(Map<Integer,List<Integer>>)cacheGetter.getCache();
    }
 else {
      docToDocidsCache=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.UnInvertedMap.MULTIVALUED,searcher,uniqueIdField,referenceField);
    }
  }
  if (docToDocidsCache == null || docToDocidsCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}
Program: 17977
Project: 17977
Buggy source:
@Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (invertedIndex == null) {
    if (cacheGetter != null) {
      invertedIndex=(int[][])cacheGetter.getCache();
    }
 else {
      invertedIndex=DictionaryRecIdCache.INSTANCE.getUnInvertedDocidsStrField(searcher,uniqueIdField,referenceField);
    }
    boostCache=FieldCache.DEFAULT.getFloats(DictionaryRecIdCache.INSTANCE.getAtomicReader(((IndexSearcher)searcher).getIndexReader()),boostField,false);
  }
  if (invertedIndex == null || invertedIndex.length == 0 || boostCache.length == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}

Fixed version (ground truth):
@Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (invertedIndex == null) {
    if (cacheGetter != null) {
      invertedIndex=(int[][])cacheGetter.getCache();
    }
 else {
      invertedIndex=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.UnInvertedArray.MULTIVALUED_STRING,searcher,uniqueIdField,referenceField);
    }
    boostCache=FieldCache.DEFAULT.getFloats(DictionaryRecIdCache.INSTANCE.getAtomicReader(((IndexSearcher)searcher).getIndexReader()),boostField,false);
  }
  if (invertedIndex == null || invertedIndex.length == 0 || boostCache.length == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}
Program: 17978
Project: 17978
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (valueToDocidCache == null) {
    if (cacheGetter != null) {
      valueToDocidCache=(Map<String,Integer>)cacheGetter.getCache();
    }
 else {
      valueToDocidCache=DictionaryRecIdCache.INSTANCE.getTranslationCacheString(searcher,uniqueIdField);
    }
  }
  if (valueToDocidCache == null || valueToDocidCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean searcherInitialization(IndexSearcher searcher,Weight firstOrderWeight) throws IOException {
  if (valueToDocidCache == null) {
    if (cacheGetter != null) {
      valueToDocidCache=(Map<String,Integer>)cacheGetter.getCache();
    }
 else {
      valueToDocidCache=DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.Str2LuceneId.MAPPING,searcher,uniqueIdField);
    }
  }
  if (valueToDocidCache == null || valueToDocidCache.size() == 0) {
    return false;
  }
  return super.searcherInitialization(searcher,firstOrderWeight);
}
Program: 17980
Project: 17980
Buggy source:
protected void compactHitsAbsCount(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  float seenTimes=0.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      seenTimes+=1.0f;
      continue;
    }
    currDoc.score=seenTimes;
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1.0f;
  }
  if (seenTimes > 1.0f) {
    currDoc.score=seenTimes;
    newHits.add(currDoc);
  }
  hits=newHits;
}

Fixed version (ground truth):
protected void compactHitsAbsCount(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  float seenTimes=0.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      seenTimes+=1.0f;
      continue;
    }
    currDoc.score=seenTimes;
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1.0f;
  }
  if (newHits.size() == 0 || newHits.get(newHits.size() - 1).doc != currDoc.doc) {
    currDoc.score=seenTimes;
    newHits.add(currDoc);
  }
  hits=newHits;
}
Program: 17981
Project: 17981
Buggy source:
protected void compactHitsArithmMean(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  int seenTimes=0;
  float score=0.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      score+=d.score;
      seenTimes+=1;
      continue;
    }
    if (seenTimes > 1)     currDoc.score=(float)score / seenTimes;
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1;
    score=currDoc.score;
  }
  if (seenTimes > 1) {
    currDoc.score=(float)score / seenTimes;
  }
  newHits.add(currDoc);
  hits=newHits;
}

Fixed version (ground truth):
protected void compactHitsArithmMean(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  int seenTimes=0;
  float score=0.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      score+=d.score;
      seenTimes+=1;
      continue;
    }
    if (seenTimes > 1)     currDoc.score=(float)score / seenTimes;
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1;
    score=currDoc.score;
  }
  if (newHits.size() == 0 || newHits.get(newHits.size() - 1).doc != currDoc.doc) {
    currDoc.score=(float)score / seenTimes;
  }
  newHits.add(currDoc);
  hits=newHits;
}
Program: 17982
Project: 17982
Buggy source:
protected void compactHitsGeomMean(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  int seenTimes=0;
  float score=1.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      score*=d.score;
      seenTimes+=1;
      continue;
    }
    if (seenTimes > 1)     currDoc.score=(float)Math.pow(score,1.0f / seenTimes);
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1;
    score=currDoc.score;
  }
  if (seenTimes > 1) {
    currDoc.score=(float)Math.pow(score,1.0f / seenTimes);
  }
  newHits.add(currDoc);
  hits=newHits;
}

Fixed version (ground truth):
protected void compactHitsGeomMean(){
  ArrayList<CollectorDoc> newHits=new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());
  if (hits.size() < 1)   return;
  CollectorDoc currDoc=hits.get(0);
  int seenTimes=0;
  float score=1.0f;
  for (  CollectorDoc d : hits) {
    if (d.doc == currDoc.doc) {
      score*=d.score;
      seenTimes+=1;
      continue;
    }
    if (seenTimes > 1)     currDoc.score=(float)Math.pow(score,1.0f / seenTimes);
    newHits.add(currDoc);
    currDoc=d;
    seenTimes=1;
    score=currDoc.score;
  }
  if (newHits.size() == 0 || newHits.get(newHits.size() - 1).doc != currDoc.doc) {
    currDoc.score=(float)Math.pow(score,1.0f / seenTimes);
  }
  newHits.add(currDoc);
  hits=newHits;
}
Program: 17983
Project: 17983
Buggy source:
public static String normalizeAuthor(String a){
  a=n0.matcher(a).replaceAll("String_Node_Str");
  a=n1.matcher(a).replaceAll("String_Node_Str");
  a=n3.matcher(a).replaceAll("String_Node_Str");
  a=n2.matcher(a.trim()).replaceAll("String_Node_Str");
  a=a.replace('-',' ');
  if (!(a.contains("String_Node_Str") || a.contains("String_Node_Str")))   a=a + "String_Node_Str";
  return a;
}

Fixed version (ground truth):
public static String normalizeAuthor(String a){
  a=n0.matcher(a).replaceAll("String_Node_Str");
  a=n1.matcher(a).replaceAll("String_Node_Str");
  a=n3.matcher(a).replaceAll("String_Node_Str");
  a=n2.matcher(a.trim()).replaceAll("String_Node_Str");
  if (!(a.contains("String_Node_Str")))   a=a + "String_Node_Str";
  a=a.replace('-',' ');
  return a;
}
Program: 17985
Project: 17985
Buggy source:
@Override protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException {
  if (enteredCleanZone == true) {
    counter--;
    if (counter == 0) {
      enteredCleanZone=false;
    }
    return node;
  }
  String fv=null;
  if (node instanceof FieldQueryNode) {
    fv=((FieldQueryNode)node).getTextAsString();
  }
  QueryNode rn=super.postProcessNode(node);
  if (rn != node || node instanceof FieldQueryNode) {
    rn.setTag(ORIGINAL_VALUE,fv);
    return new AqpAnalyzedQueryNode(rn);
  }
  return rn;
}

Fixed version (ground truth):
@Override protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException {
  if (enteredCleanZone == true) {
    counter--;
    if (counter == 0) {
      enteredCleanZone=false;
    }
    return node;
  }
  String fv=null;
  if (node instanceof FieldQueryNode) {
    fv=((FieldQueryNode)node).getTextAsString();
  }
  QueryNode rn=super.postProcessNode(node);
  if (rn != node || node instanceof FieldQueryNode) {
    rn.setTag(ORIGINAL_VALUE,fv);
    rn.setTag(ANALYZED,true);
  }
  return rn;
}
Program: 17986
Project: 17986
Buggy source:
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (enteredCleanZone == true) {
    counter++;
  }
 else   if (node instanceof AqpNonAnalyzedQueryNode || node instanceof AqpAnalyzedQueryNode) {
    enteredCleanZone=true;
    counter++;
  }
 else   if (node instanceof AqpFunctionQueryNode && ((AqpFunctionQueryNode)node).canBeAnalyzed() == false) {
    enteredCleanZone=true;
    counter++;
  }
  return super.preProcessNode(node);
}

Fixed version (ground truth):
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (enteredCleanZone == true) {
    counter++;
  }
 else   if (node instanceof AqpNonAnalyzedQueryNode || node.getTag(ANALYZED) != null) {
    enteredCleanZone=true;
    counter++;
  }
 else   if (node instanceof AqpFunctionQueryNode && ((AqpFunctionQueryNode)node).canBeAnalyzed() == false) {
    enteredCleanZone=true;
    counter++;
  }
  return super.preProcessNode(node);
}
Program: 17990
Project: 17990
Buggy source:
@Override public String getSchemaFile(){
  makeResourcesVisible(this.solrConfig.getResourceLoader(),new String[]{MontySolrSetup.getMontySolrHome() + "String_Node_Str",MontySolrSetup.getSolrHome() + "String_Node_Str"});
  String configFile=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  File newConfig;
  try {
    newConfig=duplicateFile(new File(configFile));
    File synonymsFile=createTempFile(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
    replaceInFile(newConfig,"String_Node_Str","String_Node_Str" + synonymsFile.getAbsolutePath() + "String_Node_Str");
    File curatedSynonyms=createTempFile(new String[]{"String_Node_Str"});
    replaceInFile(newConfig,"String_Node_Str","String_Node_Str" + curatedSynonyms.getAbsolutePath() + "String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace();
    throw new IllegalStateException(e.getMessage());
  }
  return newConfig.getAbsolutePath();
}

Fixed version (ground truth):
@Override public String getSchemaFile(){
  makeResourcesVisible(this.solrConfig.getResourceLoader(),new String[]{MontySolrSetup.getMontySolrHome() + "String_Node_Str",MontySolrSetup.getSolrHome() + "String_Node_Str"});
  String configFile=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  File newConfig;
  try {
    newConfig=duplicateFile(new File(configFile));
    File multiSynonymsFile=createTempFile(new String[]{"String_Node_Str"});
    replaceInFile(newConfig,"String_Node_Str","String_Node_Str" + multiSynonymsFile.getAbsolutePath() + "String_Node_Str");
    File synonymsFile=createTempFile(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
    replaceInFile(newConfig,"String_Node_Str","String_Node_Str" + synonymsFile.getAbsolutePath() + "String_Node_Str");
    File curatedSynonyms=createTempFile(new String[]{"String_Node_Str"});
    replaceInFile(newConfig,"String_Node_Str","String_Node_Str" + curatedSynonyms.getAbsolutePath() + "String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace();
    throw new IllegalStateException(e.getMessage());
  }
  return newConfig.getAbsolutePath();
}
Program: 17991
Project: 17991
Buggy source:
@Override public String getSolrConfigFile(){
  String configFile=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  String dataConfig=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  File newConfig=new File(configFile);
  System.err.println("String_Node_Str" + System.getProperty("String_Node_Str","String_Node_Str"));
  if (System.getProperty("String_Node_Str",null) != null) {
    File newDataConfig;
    try {
      newConfig=duplicateFile(new File(configFile));
      newDataConfig=duplicateFile(new File(dataConfig));
      replaceInFile(newDataConfig,"String_Node_Str",String.format("String_Node_Str",System.getProperty("String_Node_Str")));
      replaceInFile(newConfig,"String_Node_Str",newDataConfig.getAbsolutePath());
    }
 catch (    IOException e) {
      e.printStackTrace();
      throw new IllegalStateException(e.getMessage());
    }
  }
  return newConfig.getAbsolutePath();
}

Fixed version (ground truth):
@Override public String getSolrConfigFile(){
  String configFile=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  String dataConfig=MontySolrSetup.getMontySolrHome() + "String_Node_Str";
  File newConfig=new File(configFile);
  System.err.println(System.getProperties());
  System.err.println("String_Node_Str" + System.getProperty("String_Node_Str","String_Node_Str"));
  if (System.getProperty("String_Node_Str",null) != null) {
    File newDataConfig;
    try {
      newConfig=duplicateFile(new File(configFile));
      newDataConfig=duplicateFile(new File(dataConfig));
      replaceInFile(newDataConfig,"String_Node_Str",String.format("String_Node_Str",System.getProperty("String_Node_Str")));
      replaceInFile(newConfig,"String_Node_Str",newDataConfig.getAbsolutePath());
    }
 catch (    IOException e) {
      e.printStackTrace();
      throw new IllegalStateException(e.getMessage());
    }
  }
  return newConfig.getAbsolutePath();
}
Program: 17992
Project: 17992
Buggy source:
/** 
 * Returns a hash code value for this object. 
 */
public int hashCode(){
  return referenceField.hashCode() ^ (docToDocidsCache != null ? docToDocidsCache.hashCode() : 0);
}

Fixed version (ground truth):
/** 
 * Returns a hash code value for this object. 
 */
public int hashCode(){
  return referenceField.hashCode() ^ (docToDocidsCache != null ? docToDocidsCache.size() : 0);
}
Program: 17994
Project: 17994
Buggy source:
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof FieldQueryNode && !(node.getParent() instanceof TermRangeQueryNode)) {
    FieldQueryNode n=(FieldQueryNode)node;
    String input=n.getTextAsString();
    if (input == null) {
      return node;
    }
    if (isRegex(input)) {
      if (!isRegex(input.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
        input=input.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
        if (input.endsWith("String_Node_Str") && !input.contains("String_Node_Str")) {
          return new PrefixWildcardQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
        }
        return new WildcardQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
      }
      try {
        Pattern.compile(input);
        return new AqpAdsabsRegexQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
      }
 catch (      PatternSyntaxException e) {
        return node;
      }
    }
  }
  return node;
}

Fixed version (ground truth):
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof FieldQueryNode && !(node instanceof AqpNonAnalyzedQueryNode) && !(node.getParent() instanceof TermRangeQueryNode)) {
    FieldQueryNode n=(FieldQueryNode)node;
    String input=n.getTextAsString();
    if (input == null) {
      return node;
    }
    if (isRegex(input)) {
      if (!isRegex(input.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
        input=input.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
        if (input.endsWith("String_Node_Str") && !input.contains("String_Node_Str")) {
          return new PrefixWildcardQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
        }
        return new WildcardQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
      }
      try {
        Pattern.compile(input);
        return new AqpAdsabsRegexQueryNode(n.getFieldAsString(),input,n.getBegin(),n.getEnd());
      }
 catch (      PatternSyntaxException e) {
        return node;
      }
    }
  }
  return node;
}
Program: 17998
Project: 17998
Buggy source:
private void printDetailedInfo(SolrQueryResponse rsp){
  printInfo(rsp);
  List<String> tbd=new ArrayList<String>();
  rsp.add("String_Node_Str",tbd);
  for (  RequestData rd : queue.tbdQueue.values()) {
    tbd.add(rd.toString());
  }
  rsp.add("String_Node_Str",queue.failedIds);
  List<String> fb=new ArrayList<String>();
  rsp.add("String_Node_Str",fb);
  for (  RequestData rd : queue.failedQueue.values()) {
    fb.add(rd.toString());
  }
  rsp.add("String_Node_Str",getWorkerMessage());
}

Fixed version (ground truth):
private void printDetailedInfo(SolrQueryResponse rsp){
  List<String> tbd=new ArrayList<String>();
  rsp.add("String_Node_Str",tbd);
  for (  RequestData rd : queue.tbdQueue.values()) {
    tbd.add(rd.toString());
  }
  rsp.add("String_Node_Str",queue.failedIds);
  List<String> fb=new ArrayList<String>();
  rsp.add("String_Node_Str",fb);
  for (  RequestData rd : queue.failedQueue.values()) {
    fb.add(rd.toString());
  }
  rsp.add("String_Node_Str",getWorkerMessage());
}
Program: 17999
Project: 17999
Buggy source:
private void runSynchronously(RequestQueue queue,SolrQueryRequest req) throws MalformedURLException, IOException, InterruptedException {
  SolrCore core=req.getCore();
  SolrRequestHandler handler=req.getCore().getRequestHandler(handlerName);
  RequestData data=queue.pop();
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),data.getReqParams());
  if (data.url.substring(0,8).equals("String_Node_Str")) {
    runDiscoveryReindexing(locReq);
    locReq.close();
    return;
  }
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString());
  SolrQueryResponse rsp;
  boolean repeat=false;
  do {
    rsp=new SolrQueryResponse();
    core.execute(handler,locReq,rsp);
    String is=(String)rsp.getValues().get("String_Node_Str");
    if (is.equals("String_Node_Str")) {
      repeat=true;
      Thread.sleep(sleepTime);
      setWorkerMessage("String_Node_Str" + handlerName);
    }
  }
 while (repeat);
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString()+ "String_Node_Str"+ rsp.getValues().toString());
  locReq.close();
}

Fixed version (ground truth):
private void runSynchronously(RequestQueue queue,SolrQueryRequest req) throws InterruptedException, IOException {
  SolrCore core=req.getCore();
  SolrRequestHandler handler=req.getCore().getRequestHandler(handlerName);
  RequestData data=queue.pop();
  SolrParams params=data.getReqParams();
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),params);
  if (data.url.substring(0,8).equals("String_Node_Str")) {
    try {
      runDiscoveryReindexing(locReq);
    }
 catch (    IOException e) {
      throw e;
    }
 finally {
      locReq.close();
    }
    return;
  }
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString());
  SolrQueryResponse rsp;
  locReq.close();
  boolean repeat=false;
  int maxRepeat=10;
  do {
    locReq=new LocalSolrQueryRequest(req.getCore(),params);
    rsp=new SolrQueryResponse();
    core.execute(handler,locReq,rsp);
    String is=(String)rsp.getValues().get("String_Node_Str");
    if (is.equals("String_Node_Str")) {
      repeat=true;
      try {
        Thread.sleep(sleepTime);
      }
 catch (      InterruptedException e) {
        queue.reInsert(data);
        throw e;
      }
 finally {
        locReq.close();
      }
      setWorkerMessage("String_Node_Str" + handlerName);
    }
 else {
      repeat=false;
    }
    setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ rsp.getValues().toString());
    locReq.close();
    if (maxRepeat-- < 0) {
      setWorkerMessage("String_Node_Str");
      try {
        queue.registerFailedBatch(req.getParamString());
      }
 catch (      UnsupportedEncodingException e) {
        log.error(e.getMessage());
      }
      repeat=false;
    }
  }
 while (repeat);
}
Program: 18000
Project: 18000
Buggy source:
private void printMissingRecs(SolrQueryResponse rsp){
  printInfo(rsp);
  BitSet missing=queue.getMissing();
  BitSet present=queue.getPresent();
  if (missing == null) {
    rsp.add("String_Node_Str","String_Node_Str");
    return;
  }
 else {
    rsp.add("String_Node_Str","String_Node_Str");
  }
  rsp.add("String_Node_Str",present.cardinality());
  rsp.add("String_Node_Str",missing.cardinality());
  ArrayList<Integer> tbd=new ArrayList<Integer>(missing.cardinality());
  rsp.add("String_Node_Str",tbd);
  int j=0;
  for (int i=missing.nextSetBit(0); i >= 0; i=missing.nextSetBit(i + 1)) {
    tbd.add(i);
  }
}

Fixed version (ground truth):
private void printMissingRecs(SolrQueryResponse rsp){
  BitSet missing=queue.getMissing();
  BitSet present=queue.getPresent();
  if (missing == null) {
    rsp.add("String_Node_Str","String_Node_Str");
    return;
  }
 else {
    rsp.add("String_Node_Str","String_Node_Str");
  }
  rsp.add("String_Node_Str",present.cardinality());
  rsp.add("String_Node_Str",missing.cardinality());
  ArrayList<Integer> tbd=new ArrayList<Integer>(missing.cardinality());
  rsp.add("String_Node_Str",tbd);
  int j=0;
  for (int i=missing.nextSetBit(0); i >= 0; i=missing.nextSetBit(i + 1)) {
    tbd.add(i);
  }
}
Program: 18001
Project: 18001
Buggy source:
public String getWorkerMessage(){
  StringBuilder out=new StringBuilder();
  for (  String msg : workerMessage) {
    out.append(msg);
    out.append("String_Node_Str");
  }
  return out.toString();
}

Fixed version (ground truth):
public String getWorkerMessage(){
  StringBuilder out=new StringBuilder();
  for (  String msg : workerMessage) {
    out.append(msg);
    out.append("String_Node_Str");
  }
  workerMessage.clear();
  return out.toString();
}
Program: 18004
Project: 18004
Buggy source:
public Query reParse(Query query,QParser qp,Class<?>... types) throws ParseException {
  parser=qp;
  qtypes=types;
  swimDeep(query);
  return query;
}

Fixed version (ground truth):
public Query reParse(Query query,QParser qp,Class<?>... types) throws ParseException {
  parsingLock.lock();
  try {
    parser=qp;
    qtypes=types;
    swimDeep(query);
    return query;
  }
  finally {
    parser=null;
    qtypes=null;
    parsingLock.unlock();
  }
}