nus-yam/ex-repair huggingface dataset:
Program: 155196
Project: 155196
Buggy source:
@Override protected void commitCowMaps(){
  super.commitCowMaps();
  if (cowRelationshipMap != null) {
    relationshipMap=cowRelationshipMap;
    cowRelationshipMap=null;
  }
}

Fixed version (ground truth):
@Override protected void commitCowMaps(){
  super.commitCowMaps();
  ArrayMap<String,ArrayIntSet> newMap=new ArrayMap<String,ArrayIntSet>();
  if (relationshipMap != null) {
    for (    String type : relationshipMap.keySet()) {
      ArrayIntSet source=relationshipMap.get(type);
      ArrayIntSet dest=new ArrayIntSet();
      ArrayIntSet skip=null;
      if (cowRelationshipRemoveMap != null) {
        skip=cowRelationshipRemoveMap.get(type);
      }
      for (      int relId : source.values()) {
        if (skip == null || !skip.contains(relId)) {
          dest.add(relId);
        }
      }
      if (dest.size() > 0) {
        newMap.put(type,dest);
      }
    }
  }
  if (cowRelationshipAddMap != null) {
    for (    String type : cowRelationshipAddMap.keySet()) {
      ArrayIntSet source=cowRelationshipAddMap.get(type);
      ArrayIntSet dest=newMap.get(type);
      if (dest == null) {
        dest=new ArrayIntSet();
        newMap.put(type,dest);
      }
      for (      int relId : source.values()) {
        dest.add(relId);
      }
    }
  }
  cowRelationshipAddMap=null;
  cowRelationshipRemoveMap=null;
  relationshipMap=newMap;
}
Program: 155197
Project: 155197
Buggy source:
/** 
 * If object <CODE>node</CODE> is a node, 0 is returned if <CODE>this</CODE> node id equals <CODE>node's</CODE> node id, 1 if <CODE>this</CODE>  node id is greater and -1 else. <p> If <CODE>node</CODE> isn't a node a ClassCastException will be thrown.
 * @param node the node to compare this node with
 * @return 0 if equal id, 1 if this id is greater else -1
 */
public int compareTo(Node n){
  long ourId=(long)this.getId(), theirId=(long)n.getId();
  if (ourId < theirId) {
    return -1;
  }
 else   if (ourId > theirId) {
    return 1;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
/** 
 * If object <CODE>node</CODE> is a node, 0 is returned if <CODE>this</CODE> node id equals <CODE>node's</CODE> node id, 1 if <CODE>this</CODE>  node id is greater and -1 else. <p> If <CODE>node</CODE> isn't a node a ClassCastException will be thrown.
 * @param node the node to compare this node with
 * @return 0 if equal id, 1 if this id is greater else -1
 */
public int compareTo(Node n){
  long ourId=this.getId(), theirId=n.getId();
  if (ourId < theirId) {
    return -1;
  }
 else   if (ourId > theirId) {
    return 1;
  }
 else {
    return 0;
  }
}
Program: 155198
Project: 155198
Buggy source:
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  if (dir == Direction.BOTH) {
    return getRelationships(type);
  }
  ArrayMap<String,ArrayIntSet> mapToCheck=null;
  if (cowRelationshipMap != null && cowTxId == nodeManager.getTransaction()) {
    mapToCheck=cowRelationshipMap;
  }
 else {
    ensureFullRelationships();
    mapToCheck=relationshipMap;
  }
  ArrayIntSet relationshipSet=mapToCheck.get(type.name());
  if (relationshipSet == null) {
    return Collections.emptyList();
  }
  int[] ids=new int[relationshipSet.size()];
  int position=0;
  for (  int relId : relationshipSet.values()) {
    ids[position++]=relId;
  }
  return new RelationshipIterator(ids,this,dir,nodeManager);
}

Fixed version (ground truth):
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  ArrayIntSet source=relationshipMap.get(type.name());
  if (source != null) {
    for (    int relId : source.values()) {
      if (checkCow && cowRelationshipRemoveMap != null) {
        ArrayIntSet skip=cowRelationshipRemoveMap.get(type.name());
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      relIds.add(relId);
    }
  }
  if (checkCow && cowRelationshipAddMap != null) {
    source=cowRelationshipAddMap.get(type.name());
    if (source != null) {
      for (      int relId : source.values()) {
        relIds.add(relId);
      }
    }
  }
  return new RelationshipArrayIntSetIterator(relIds,this,dir,nodeManager);
}
Program: 155199
Project: 155199
Buggy source:
@Override protected void rollbackCowMaps(){
  super.rollbackCowMaps();
  cowRelationshipMap=null;
}

Fixed version (ground truth):
@Override protected void rollbackCowMaps(){
  super.rollbackCowMaps();
  cowRelationshipAddMap=null;
  cowRelationshipRemoveMap=null;
}
Program: 155200
Project: 155200
Buggy source:
boolean internalHasRelationships(){
  ArrayMap<String,ArrayIntSet> mapToCheck=null;
  if (cowRelationshipMap != null && cowTxId == nodeManager.getTransaction()) {
    mapToCheck=cowRelationshipMap;
  }
 else {
    ensureFullRelationships();
    mapToCheck=relationshipMap;
  }
  if (mapToCheck != null) {
    return (mapToCheck.size() > 0);
  }
  return false;
}

Fixed version (ground truth):
boolean internalHasRelationships(){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  for (  String type : relationshipMap.keySet()) {
    ArrayIntSet source=relationshipMap.get(type);
    for (    int relId : source.values()) {
      if (checkCow && cowRelationshipRemoveMap != null) {
        ArrayIntSet skip=cowRelationshipRemoveMap.get(type);
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      return true;
    }
  }
  if (checkCow && cowRelationshipAddMap != null) {
    for (    String type : cowRelationshipAddMap.keySet()) {
      ArrayIntSet source=cowRelationshipAddMap.get(type);
      if (source.size() > 0) {
        return true;
      }
    }
  }
  return false;
}
Program: 155201
Project: 155201
Buggy source:
NeoStoreXaConnection(NeoStore neoStore,XaResourceManager xaRm){
  super(xaRm);
  this.neoStore=neoStore;
  this.nodeConsumer=new NodeEventConsumerImpl(this);
  this.relConsumer=new RelationshipEventConsumerImpl(this);
  this.relTypeConsumer=new RelationshipTypeEventConsumerImpl(this);
  this.propIndexConsumer=new PropertyIndexEventConsumerImpl(this);
  this.xaResource=new NeoStoreXaResource(neoStore.getStorageFileName(),xaRm);
}

Fixed version (ground truth):
NeoStoreXaConnection(NeoStore neoStore,XaResourceManager xaRm,byte branchId[]){
  super(xaRm);
  this.neoStore=neoStore;
  this.nodeConsumer=new NodeEventConsumerImpl(this);
  this.relConsumer=new RelationshipEventConsumerImpl(this);
  this.relTypeConsumer=new RelationshipTypeEventConsumerImpl(this);
  this.propIndexConsumer=new PropertyIndexEventConsumerImpl(this);
  this.xaResource=new NeoStoreXaResource(neoStore.getStorageFileName(),xaRm,branchId);
}
Program: 155202
Project: 155202
Buggy source:
NeoStoreXaResource(Object identifier,XaResourceManager xaRm){
  super(xaRm);
  this.identifier=identifier;
}

Fixed version (ground truth):
NeoStoreXaResource(Object identifier,XaResourceManager xaRm,byte branchId[]){
  super(xaRm,branchId);
  this.identifier=identifier;
}
Program: 155203
Project: 155203
Buggy source:
public XaConnection getXaConnection(){
  return new NeoStoreXaConnection(neoStore,xaContainer.getResourceManager());
}

Fixed version (ground truth):
public XaConnection getXaConnection(){
  return new NeoStoreXaConnection(neoStore,xaContainer.getResourceManager(),branchId);
}
Program: 155204
Project: 155204
Buggy source:
byte[] getBranchId(XAResource xaRes){
  return xaDsManager.getBranchId(xaRes);
}

Fixed version (ground truth):
byte[] getBranchId(XAResource xaRes){
  if (xaRes instanceof XaResource) {
    byte branchId[]=((XaResource)xaRes).getBranchId();
    if (branchId != null) {
      return branchId;
    }
  }
  return xaDsManager.getBranchId(xaRes);
}
Program: 155205
Project: 155205
Buggy source:
synchronized byte[] getBranchId(XAResource xaResource){
  Iterator<Map.Entry<String,XaDataSource>> itr=dataSources.entrySet().iterator();
  while (itr.hasNext()) {
    Map.Entry<String,XaDataSource> entry=itr.next();
    XaDataSource dataSource=entry.getValue();
    XAResource resource=dataSource.getXaConnection().getXaResource();
    try {
      if (resource.isSameRM(xaResource)) {
        String name=entry.getKey();
        return sourceIdMapping.get(name);
      }
    }
 catch (    XAException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
  }
  throw new RuntimeException("String_Node_Str" + xaResource + "String_Node_Str");
}

Fixed version (ground truth):
synchronized byte[] getBranchId(XAResource xaResource){
  if (xaResource instanceof XaResource) {
    byte branchId[]=((XaResource)xaResource).getBranchId();
    if (branchId != null) {
      return branchId;
    }
  }
  Iterator<Map.Entry<String,XaDataSource>> itr=dataSources.entrySet().iterator();
  while (itr.hasNext()) {
    Map.Entry<String,XaDataSource> entry=itr.next();
    XaDataSource dataSource=entry.getValue();
    XAResource resource=dataSource.getXaConnection().getXaResource();
    try {
      if (resource.isSameRM(xaResource)) {
        String name=entry.getKey();
        return sourceIdMapping.get(name);
      }
    }
 catch (    XAException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
  }
  throw new RuntimeException("String_Node_Str" + xaResource + "String_Node_Str");
}
Program: 155206
Project: 155206
Buggy source:
/** 
 * Public for testing purpose. Do not use.
 */
public synchronized void registerDataSource(String name,XaDataSource dataSource,byte branchId[]){
  dataSources.put(name,dataSource);
  branchIdMapping.put(new String(branchId),dataSource);
  sourceIdMapping.put(name,branchId);
}

Fixed version (ground truth):
/** 
 * Public for testing purpose. Do not use.
 */
public synchronized void registerDataSource(String name,XaDataSource dataSource,byte branchId[]){
  dataSource.setBranchId(branchId);
  dataSources.put(name,dataSource);
  branchIdMapping.put(new String(branchId),dataSource);
  sourceIdMapping.put(name,branchId);
}
Program: 155207
Project: 155207
Buggy source:
protected XaResourceHelpImpl(XaResourceManager xaRm){
  this.xaRm=xaRm;
}

Fixed version (ground truth):
protected XaResourceHelpImpl(XaResourceManager xaRm,byte branchId[]){
  this.xaRm=xaRm;
  this.branchId=branchId;
}
Program: 155208
Project: 155208
Buggy source:
DummyXaResource(XaResourceManager xaRm){
  super(xaRm);
}

Fixed version (ground truth):
DummyXaResource(XaResourceManager xaRm){
  super(xaRm,null);
}
Program: 155209
Project: 155209
Buggy source:
public void releaseCows(Transaction cowTxId,int param){
  NeoPrimitiveElement element=cowMap.get(cowTxId);
  if (element == null) {
    return;
  }
  ArrayMap<Integer,CowNodeElement> cowNodeElements=element.nodes;
  for (  int nodeId : cowNodeElements.keySet()) {
    NodeImpl node=nodeManager.getNodeIfCached(nodeId);
    if (node != null && node.getCowTxId() != null) {
      if (param == Status.STATUS_COMMITTED) {
        node.commitCowMaps();
      }
 else       if (param == Status.STATUS_ROLLEDBACK) {
        node.rollbackCowMaps();
      }
 else {
        throw new RuntimeException("String_Node_Str" + param);
      }
    }
  }
  ArrayMap<Integer,CowRelElement> cowRelElements=element.relationships;
  for (  int relId : cowRelElements.keySet()) {
    RelationshipImpl rel=nodeManager.getRelIfCached(relId);
    if (rel != null && rel.getCowTxId() != null) {
      if (param == Status.STATUS_COMMITTED) {
        rel.commitCowMaps();
      }
 else       if (param == Status.STATUS_ROLLEDBACK) {
        rel.rollbackCowMaps();
      }
 else {
        throw new RuntimeException("String_Node_Str" + param);
      }
    }
  }
  cowMap.remove(cowTxId);
}

Fixed version (ground truth):
public void releaseCows(Transaction cowTxId,int param){
  NeoPrimitiveElement element=cowMap.get(cowTxId);
  if (element == null) {
    return;
  }
  ArrayMap<Integer,CowNodeElement> cowNodeElements=element.nodes;
  for (  int nodeId : cowNodeElements.keySet()) {
    NodeImpl node=nodeManager.getNodeIfCached(nodeId);
    if (node != null) {
      if (param == Status.STATUS_COMMITTED) {
        node.commitCowMaps();
      }
 else       if (param == Status.STATUS_ROLLEDBACK) {
        node.rollbackCowMaps();
      }
 else {
        throw new RuntimeException("String_Node_Str" + param);
      }
    }
  }
  ArrayMap<Integer,CowRelElement> cowRelElements=element.relationships;
  for (  int relId : cowRelElements.keySet()) {
    RelationshipImpl rel=nodeManager.getRelIfCached(relId);
    if (rel != null) {
      if (param == Status.STATUS_COMMITTED) {
        rel.commitCowMaps();
      }
 else       if (param == Status.STATUS_ROLLEDBACK) {
        rel.rollbackCowMaps();
      }
 else {
        throw new RuntimeException("String_Node_Str" + param);
      }
    }
  }
  cowMap.remove(cowTxId);
}
Program: 155210
Project: 155210
Buggy source:
private void adaptCaches(){
  for (  AdaptiveCacheElement element : getCaches()) {
    adaptCache(element.getCache());
  }
}

Fixed version (ground truth):
public void adaptCaches(){
  List<AdaptiveCacheElement> copy=new LinkedList<AdaptiveCacheElement>();
synchronized (this) {
    copy.addAll(caches);
  }
  for (  AdaptiveCacheElement element : copy) {
    adaptCache(element);
  }
}
Program: 155211
Project: 155211
Buggy source:
int getAdaptiveCacheElementIndex(Cache<?,?> cache){
  int i=0;
  for (  AdaptiveCacheElement element : caches) {
    if (element.getCache() == cache) {
      return i;
    }
    i++;
  }
  return -1;
}

Fixed version (ground truth):
synchronized AdaptiveCacheElement getAdaptiveCacheElementIndex(Cache<?,?> cache){
  for (  AdaptiveCacheElement element : caches) {
    if (element.getCache() == cache) {
      return element;
    }
  }
  return null;
}
Program: 155212
Project: 155212
Buggy source:
public synchronized void registerCache(Cache<?,?> cache,float ratio,int minSize){
  if (cache == null || ratio >= 1 || ratio <= 0 || minSize < 0) {
    throw new IllegalArgumentException("String_Node_Str" + cache + "String_Node_Str"+ ratio+ "String_Node_Str"+ minSize);
  }
  AdaptiveCacheElement element=new AdaptiveCacheElement(cache,ratio,minSize);
  int elementIndex=getAdaptiveCacheElementIndex(cache);
  if (elementIndex == -1) {
    caches.add(element);
  }
  cache.setAdaptiveStatus(true);
  log.fine("String_Node_Str" + cache.getName() + "String_Node_Str"+ ratio+ "String_Node_Str"+ minSize+ "String_Node_Str");
}

Fixed version (ground truth):
public synchronized void registerCache(Cache<?,?> cache,float ratio,int minSize){
  if (cache == null || ratio >= 1 || ratio <= 0 || minSize < 0) {
    throw new IllegalArgumentException("String_Node_Str" + cache + "String_Node_Str"+ ratio+ "String_Node_Str"+ minSize);
  }
  for (  AdaptiveCacheElement element : caches) {
    if (element.getCache() == cache) {
      log.fine("String_Node_Str" + cache.getName() + "String_Node_Str");
      return;
    }
  }
  AdaptiveCacheElement element=new AdaptiveCacheElement(cache,ratio,minSize);
  caches.add(element);
  cache.setAdaptiveStatus(true);
  log.fine("String_Node_Str" + cache.getName() + "String_Node_Str"+ ratio+ "String_Node_Str"+ minSize+ "String_Node_Str");
}
Program: 155213
Project: 155213
Buggy source:
public synchronized void unregisterCache(Cache<?,?> cache){
  if (cache == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int elementIndex=getAdaptiveCacheElementIndex(cache);
  if (elementIndex != -1) {
    caches.remove(elementIndex);
  }
  cache.setAdaptiveStatus(false);
  log.fine("String_Node_Str" + cache.getName() + "String_Node_Str");
}

Fixed version (ground truth):
public synchronized void unregisterCache(Cache<?,?> cache){
  if (cache == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Iterator<AdaptiveCacheElement> itr=caches.iterator();
  while (itr.hasNext()) {
    AdaptiveCacheElement element=itr.next();
    if (element.getCache() == cache) {
      itr.remove();
      break;
    }
  }
  log.fine("String_Node_Str" + cache.getName() + "String_Node_Str");
}
Program: 155214
Project: 155214
Buggy source:
public Object getProperty(String key,Object defaultValue){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  for (  PropertyIndex index : nodeManager.index(key)) {
    if (skipMap != null && skipMap.get(index.getKeyId()) != null) {
      return defaultValue;
    }
    if (addMap != null) {
      Property property=addMap.get(index.getKeyId());
      if (property != null) {
        return getPropertyValue(property);
      }
    }
    Property property=propertyMap.get(index.getKeyId());
    if (property != null) {
      return getPropertyValue(property);
    }
  }
  Property property=getSlowProperty(addMap,skipMap,key);
  if (property != null) {
    return getPropertyValue(property);
  }
  return defaultValue;
}

Fixed version (ground truth):
public Object getProperty(String key,Object defaultValue){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  for (  PropertyIndex index : nodeManager.index(key)) {
    if (skipMap != null && skipMap.get(index.getKeyId()) != null) {
      return defaultValue;
    }
    if (addMap != null) {
      Property property=addMap.get(index.getKeyId());
      if (property != null) {
        return getPropertyValue(property);
      }
    }
    Property property=propertyMap.get(index.getKeyId());
    if (property != null) {
      return getPropertyValue(property);
    }
  }
  Property property=getSlowProperty(addMap,skipMap,key);
  if (property != null) {
    return getPropertyValue(property);
  }
  return defaultValue;
}
Program: 155215
Project: 155215
Buggy source:
public Iterable<Object> getPropertyValues(){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  List<Object> values=new ArrayList<Object>();
  for (  Integer index : propertyMap.keySet()) {
    if (skipMap != null && skipMap.get(index) != null) {
      continue;
    }
    if (addMap != null && addMap.get(index) != null) {
      continue;
    }
    values.add(propertyMap.get(index).getValue());
  }
  if (addMap != null) {
    for (    Property property : addMap.values()) {
      values.add(property.getValue());
    }
  }
  return values;
}

Fixed version (ground truth):
public Iterable<Object> getPropertyValues(){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  List<Object> values=new ArrayList<Object>();
  for (  Integer index : propertyMap.keySet()) {
    if (skipMap != null && skipMap.get(index) != null) {
      continue;
    }
    if (addMap != null && addMap.get(index) != null) {
      continue;
    }
    values.add(propertyMap.get(index).getValue());
  }
  if (addMap != null) {
    for (    Property property : addMap.values()) {
      values.add(property.getValue());
    }
  }
  return values;
}
Program: 155216
Project: 155216
Buggy source:
public boolean hasProperty(String key){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  for (  PropertyIndex index : nodeManager.index(key)) {
    if (skipMap != null && skipMap.get(index.getKeyId()) != null) {
      return false;
    }
    if (addMap != null) {
      Property property=addMap.get(index.getKeyId());
      if (property != null) {
        return true;
      }
    }
    Property property=propertyMap.get(index.getKeyId());
    if (property != null) {
      return true;
    }
  }
  Property property=getSlowProperty(addMap,skipMap,key);
  if (property != null) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean hasProperty(String key){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  for (  PropertyIndex index : nodeManager.index(key)) {
    if (skipMap != null && skipMap.get(index.getKeyId()) != null) {
      return false;
    }
    if (addMap != null) {
      Property property=addMap.get(index.getKeyId());
      if (property != null) {
        return true;
      }
    }
    Property property=propertyMap.get(index.getKeyId());
    if (property != null) {
      return true;
    }
  }
  Property property=getSlowProperty(addMap,skipMap,key);
  if (property != null) {
    return true;
  }
  return false;
}
Program: 155217
Project: 155217
Buggy source:
public Iterable<String> getPropertyKeys(){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  List<String> keys=new ArrayList<String>();
  for (  Integer index : propertyMap.keySet()) {
    if (skipMap != null && skipMap.get(index) != null) {
      continue;
    }
    if (addMap != null && addMap.get(index) != null) {
      continue;
    }
    keys.add(nodeManager.getIndexFor(index).getKey());
  }
  if (addMap != null) {
    for (    Integer index : addMap.keySet()) {
      keys.add(nodeManager.getIndexFor(index).getKey());
    }
  }
  return keys;
}

Fixed version (ground truth):
public Iterable<String> getPropertyKeys(){
  ArrayMap<Integer,Property> skipMap=null;
  ArrayMap<Integer,Property> addMap=null;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    skipMap=nodeManager.getCowPropertyRemoveMap(this);
    addMap=nodeManager.getCowPropertyAddMap(this);
  }
  ensureFullProperties();
  List<String> keys=new ArrayList<String>();
  for (  Integer index : propertyMap.keySet()) {
    if (skipMap != null && skipMap.get(index) != null) {
      continue;
    }
    if (addMap != null && addMap.get(index) != null) {
      continue;
    }
    keys.add(nodeManager.getIndexFor(index).getKey());
  }
  if (addMap != null) {
    for (    Integer index : addMap.keySet()) {
      keys.add(nodeManager.getIndexFor(index).getKey());
    }
  }
  return keys;
}
Program: 155218
Project: 155218
Buggy source:
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  ArrayIntSet source=relationshipMap.get(type.name());
  if (source != null) {
    for (    int relId : source.values()) {
      if (checkCow) {
        ArrayIntSet skip=nodeManager.getCowRelationshipRemoveMap(this,type.name());
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      relIds.add(relId);
    }
  }
  if (checkCow) {
    source=nodeManager.getCowRelationshipAddMap(this,type.name());
    if (source != null) {
      for (      int relId : source.values()) {
        relIds.add(relId);
      }
    }
  }
  return new RelationshipArrayIntSetIterator(relIds,this,dir,nodeManager);
}

Fixed version (ground truth):
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  boolean checkCow=false;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  ArrayIntSet source=relationshipMap.get(type.name());
  if (source != null) {
    for (    int relId : source.values()) {
      if (checkCow) {
        ArrayIntSet skip=nodeManager.getCowRelationshipRemoveMap(this,type.name());
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      relIds.add(relId);
    }
  }
  if (checkCow) {
    source=nodeManager.getCowRelationshipAddMap(this,type.name());
    if (source != null) {
      for (      int relId : source.values()) {
        relIds.add(relId);
      }
    }
  }
  return new RelationshipArrayIntSetIterator(relIds,this,dir,nodeManager);
}
Program: 155219
Project: 155219
Buggy source:
boolean internalHasRelationships(){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  for (  String type : relationshipMap.keySet()) {
    ArrayIntSet source=relationshipMap.get(type);
    for (    int relId : source.values()) {
      if (checkCow) {
        ArrayIntSet skip=nodeManager.getCowRelationshipRemoveMap(this,type);
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      return true;
    }
  }
  if (checkCow) {
    ArrayMap<String,ArrayIntSet> cowRelationshipAddMap=nodeManager.getCowRelationshipAddMap(this);
    if (cowRelationshipAddMap != null) {
      for (      String type : cowRelationshipAddMap.keySet()) {
        ArrayIntSet source=cowRelationshipAddMap.get(type);
        if (source.size() > 0) {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
boolean internalHasRelationships(){
  boolean checkCow=false;
  if (cowTxId != null && cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  for (  String type : relationshipMap.keySet()) {
    ArrayIntSet source=relationshipMap.get(type);
    for (    int relId : source.values()) {
      if (checkCow) {
        ArrayIntSet skip=nodeManager.getCowRelationshipRemoveMap(this,type);
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      return true;
    }
  }
  if (checkCow) {
    ArrayMap<String,ArrayIntSet> cowRelationshipAddMap=nodeManager.getCowRelationshipAddMap(this);
    if (cowRelationshipAddMap != null) {
      for (      String type : cowRelationshipAddMap.keySet()) {
        ArrayIntSet source=cowRelationshipAddMap.get(type);
        if (source.size() > 0) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 155220
Project: 155220
Buggy source:
@Override protected void commitCowMaps(){
  super.commitCowMaps();
  ArrayMap<String,ArrayIntSet> newMap=new ArrayMap<String,ArrayIntSet>();
  if (relationshipMap != null) {
    for (    String type : relationshipMap.keySet()) {
      ArrayIntSet source=relationshipMap.get(type);
      ArrayIntSet dest=new ArrayIntSet();
      ArrayIntSet skip=null;
      if (cowRelationshipRemoveMap != null) {
        skip=cowRelationshipRemoveMap.get(type);
      }
      for (      int relId : source.values()) {
        if (skip == null || !skip.contains(relId)) {
          dest.add(relId);
        }
      }
      if (dest.size() > 0) {
        newMap.put(type,dest);
      }
    }
  }
  if (cowRelationshipAddMap != null) {
    for (    String type : cowRelationshipAddMap.keySet()) {
      ArrayIntSet source=cowRelationshipAddMap.get(type);
      ArrayIntSet dest=newMap.get(type);
      if (dest == null) {
        dest=new ArrayIntSet();
        newMap.put(type,dest);
      }
      for (      int relId : source.values()) {
        dest.add(relId);
      }
    }
  }
  cowRelationshipAddMap=null;
  cowRelationshipRemoveMap=null;
  relationshipMap=newMap;
}

Fixed version (ground truth):
@Override protected void commitCowMaps(){
  super.commitCowMaps();
  lock.writeLock().lock();
  try {
    if (relationshipMap == null) {
      relationshipMap=new ArrayMap<String,ArrayIntSet>();
    }
    if (cowRelationshipAddMap != null) {
      for (      String type : cowRelationshipAddMap.keySet()) {
        ArrayIntSet source=cowRelationshipAddMap.get(type);
        if (source.size() == 0) {
          continue;
        }
        ArrayIntSet dest=relationshipMap.get(type);
        if (dest == null) {
          dest=new ArrayIntSet();
          relationshipMap.put(type,dest);
        }
        for (        int relId : source.values()) {
          dest.add(relId);
        }
      }
    }
    if (cowRelationshipRemoveMap != null && relationshipMap != null) {
      for (      String type : cowRelationshipRemoveMap.keySet()) {
        ArrayIntSet source=cowRelationshipRemoveMap.get(type);
        ArrayIntSet dest=relationshipMap.get(type);
        if (dest == null) {
          continue;
        }
        for (        int relId : source.values()) {
          dest.remove(relId);
        }
      }
    }
    cowRelationshipAddMap=null;
    cowRelationshipRemoveMap=null;
  }
  finally {
    lock.writeLock().unlock();
  }
}
Program: 155221
Project: 155221
Buggy source:
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  ArrayIntSet source=relationshipMap.get(type.name());
  if (source != null) {
    for (    int relId : source.values()) {
      if (checkCow && cowRelationshipRemoveMap != null) {
        ArrayIntSet skip=cowRelationshipRemoveMap.get(type.name());
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      relIds.add(relId);
    }
  }
  if (checkCow && cowRelationshipAddMap != null) {
    source=cowRelationshipAddMap.get(type.name());
    if (source != null) {
      for (      int relId : source.values()) {
        relIds.add(relId);
      }
    }
  }
  return new RelationshipArrayIntSetIterator(relIds,this,dir,nodeManager);
}

Fixed version (ground truth):
public Iterable<Relationship> getRelationships(RelationshipType type,Direction dir){
  lock.readLock().lock();
  try {
    boolean checkCow=false;
    if (cowTxId == nodeManager.getTransaction()) {
      checkCow=true;
    }
    ensureFullRelationships();
    ArrayIntSet relIds=new ArrayIntSet();
    ArrayIntSet source=relationshipMap.get(type.name());
    if (source != null) {
      for (      int relId : source.values()) {
        if (checkCow && cowRelationshipRemoveMap != null) {
          ArrayIntSet skip=cowRelationshipRemoveMap.get(type.name());
          if (skip != null && skip.contains(relId)) {
            continue;
          }
        }
        relIds.add(relId);
      }
    }
    if (checkCow && cowRelationshipAddMap != null) {
      source=cowRelationshipAddMap.get(type.name());
      if (source != null) {
        for (        int relId : source.values()) {
          relIds.add(relId);
        }
      }
    }
    return new RelationshipArrayIntSetIterator(relIds,this,dir,nodeManager);
  }
  finally {
    lock.readLock().unlock();
  }
}
Program: 155222
Project: 155222
Buggy source:
boolean internalHasRelationships(){
  boolean checkCow=false;
  if (cowTxId == nodeManager.getTransaction()) {
    checkCow=true;
  }
  ensureFullRelationships();
  ArrayIntSet relIds=new ArrayIntSet();
  for (  String type : relationshipMap.keySet()) {
    ArrayIntSet source=relationshipMap.get(type);
    for (    int relId : source.values()) {
      if (checkCow && cowRelationshipRemoveMap != null) {
        ArrayIntSet skip=cowRelationshipRemoveMap.get(type);
        if (skip != null && skip.contains(relId)) {
          continue;
        }
      }
      return true;
    }
  }
  if (checkCow && cowRelationshipAddMap != null) {
    for (    String type : cowRelationshipAddMap.keySet()) {
      ArrayIntSet source=cowRelationshipAddMap.get(type);
      if (source.size() > 0) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
boolean internalHasRelationships(){
  lock.readLock().lock();
  try {
    boolean checkCow=false;
    if (cowTxId == nodeManager.getTransaction()) {
      checkCow=true;
    }
    ensureFullRelationships();
    ArrayIntSet relIds=new ArrayIntSet();
    for (    String type : relationshipMap.keySet()) {
      ArrayIntSet source=relationshipMap.get(type);
      for (      int relId : source.values()) {
        if (checkCow && cowRelationshipRemoveMap != null) {
          ArrayIntSet skip=cowRelationshipRemoveMap.get(type);
          if (skip != null && skip.contains(relId)) {
            continue;
          }
        }
        return true;
      }
    }
    if (checkCow && cowRelationshipAddMap != null) {
      for (      String type : cowRelationshipAddMap.keySet()) {
        ArrayIntSet source=cowRelationshipAddMap.get(type);
        if (source.size() > 0) {
          return true;
        }
      }
    }
    return false;
  }
  finally {
    lock.readLock().unlock();
  }
}
Program: 155223
Project: 155223
Buggy source:
Config(){
  eventModule=new EventModule();
  cacheManager=new AdaptiveCacheManager();
  txModule=new TxModule(eventModule.getEventManager());
  lockManager=new LockManager();
  lockReleaser=new LockReleaser(lockManager,txModule.getTxManager());
  persistenceModule=new PersistenceModule(txModule.getTxManager());
  idGeneratorModule=new IdGeneratorModule();
  neoModule=new NeoModule(cacheManager,lockManager,txModule.getTxManager(),lockReleaser,eventModule.getEventManager(),persistenceModule.getPersistenceManager(),idGeneratorModule.getIdGenerator());
}

Fixed version (ground truth):
Config(String storeDir){
  this.storeDir=storeDir;
  eventModule=new EventModule();
  cacheManager=new AdaptiveCacheManager();
  txModule=new TxModule(eventModule.getEventManager(),storeDir);
  lockManager=new LockManager();
  lockReleaser=new LockReleaser(lockManager,txModule.getTxManager());
  persistenceModule=new PersistenceModule(txModule.getTxManager());
  idGeneratorModule=new IdGeneratorModule();
  neoModule=new NeoModule(cacheManager,lockManager,txModule.getTxManager(),lockReleaser,eventModule.getEventManager(),persistenceModule.getPersistenceManager(),idGeneratorModule.getIdGenerator());
}
Program: 155225
Project: 155225
Buggy source:
public boolean hasNext(){
  if (nextElement != null) {
    return true;
  }
  do {
    if (nextPosition < relIds.length) {
      try {
        Relationship possibleElement=nodeManager.getRelationshipById(relIds[nextPosition++]);
        if (direction == Direction.INCOMING && possibleElement.getEndNode().equals(fromNode)) {
          nextElement=possibleElement;
        }
 else         if (direction == Direction.OUTGOING && possibleElement.getStartNode().equals(fromNode)) {
          nextElement=possibleElement;
        }
 else         if (direction == Direction.BOTH) {
          nextElement=possibleElement;
        }
      }
 catch (      Throwable t) {
        log.log(Level.INFO,"String_Node_Str" + relIds[nextPosition - 1],t);
      }
    }
  }
 while (nextElement == null && nextPosition < relIds.length);
  return nextElement != null;
}

Fixed version (ground truth):
public boolean hasNext(){
  if (nextElement != null) {
    return true;
  }
  do {
    if (nextPosition < relIds.length) {
      try {
        Relationship possibleElement=nodeManager.getRelationshipById(relIds[nextPosition++]);
        if (direction == Direction.INCOMING && possibleElement.getEndNode().equals(fromNode)) {
          nextElement=possibleElement;
        }
 else         if (direction == Direction.OUTGOING && possibleElement.getStartNode().equals(fromNode)) {
          nextElement=possibleElement;
        }
 else         if (direction == Direction.BOTH) {
          nextElement=possibleElement;
        }
      }
 catch (      Throwable t) {
        log.log(Level.FINE,"String_Node_Str" + relIds[nextPosition - 1],t);
      }
    }
  }
 while (nextElement == null && nextPosition < relIds.length);
  return nextElement != null;
}
Program: 155226
Project: 155226
Buggy source:
synchronized TxLog getTxLog() throws IOException {
  if (txLog.getRecordCount() > maxTxLogRecordCount) {
    if (txLog.getName().equals(txLog1FileName)) {
      txLog.switchToLogFile(txLog2FileName);
      changeActiveLog(txLog2FileName);
    }
 else     if (txLog.getName().equals(txLog2FileName)) {
      txLog.switchToLogFile(txLog1FileName);
      changeActiveLog(txLog1FileName);
    }
 else {
      tmOk=false;
      log.severe("String_Node_Str" + txLog.getName() + "String_Node_Str");
      throw new IOException("String_Node_Str" + txLog.getName() + "String_Node_Str"+ txLog1FileName+ "String_Node_Str"+ txLog2FileName+ "String_Node_Str");
    }
  }
  return txLog;
}

Fixed version (ground truth):
synchronized TxLog getTxLog() throws IOException {
  if (txLog.getRecordCount() > maxTxLogRecordCount) {
    if (txLog.getName().endsWith(txLog1FileName)) {
      txLog.switchToLogFile(txLogDir + separator + txLog2FileName);
      changeActiveLog(txLog2FileName);
    }
 else     if (txLog.getName().endsWith(txLog2FileName)) {
      txLog.switchToLogFile(txLogDir + separator + txLog1FileName);
      changeActiveLog(txLog1FileName);
    }
 else {
      tmOk=false;
      log.severe("String_Node_Str" + txLog.getName() + "String_Node_Str");
      throw new IOException("String_Node_Str" + txLog.getName() + "String_Node_Str"+ txLog1FileName+ "String_Node_Str"+ txLog2FileName+ "String_Node_Str");
    }
  }
  return txLog;
}
Program: 155228
Project: 155228
Buggy source:
TxManager(EventManager eventManager){
  this.eventManager=eventManager;
}

Fixed version (ground truth):
TxManager(EventManager eventManager,String txLogDir){
  this.eventManager=eventManager;
  this.txLogDir=txLogDir;
}
Program: 155229
Project: 155229
Buggy source:
public TxModule(EventManager eventManager){
  this.txManager=new TxManager(eventManager);
  this.xaDsManager=new XaDataSourceManager();
}

Fixed version (ground truth):
public TxModule(EventManager eventManager,String txLogDir){
  this.txLogDir=txLogDir;
  this.txManager=new TxManager(eventManager,txLogDir);
  this.xaDsManager=new XaDataSourceManager();
}
Program: 155230
Project: 155230
Buggy source:
Traverser createTraverser(Order traversalOrder,NodeImpl node,RelationshipType[] types,Direction[] dirs,StopEvaluator stopEvaluator,ReturnableEvaluator returnableEvaluator){
  return traverserFactory.createTraverser(traversalOrder,node,types,dirs,stopEvaluator,returnableEvaluator);
}

Fixed version (ground truth):
Traverser createTraverser(Order traversalOrder,NodeImpl node,RelationshipType[] types,Direction[] dirs,StopEvaluator stopEvaluator,ReturnableEvaluator returnableEvaluator){
  return traverserFactory.createTraverser(traversalOrder,new NodeProxy((int)node.getId(),this),types,dirs,stopEvaluator,returnableEvaluator);
}
Program: 155231
Project: 155231
Buggy source:
private static <T>void collectClasses(Collection<Class<? extends T>> classes,Class<T> superClass,Collection<String> lookInThesePackages,String classPathToken){
  File directory=new File(classPathToken);
  if (!directory.exists()) {
    return;
  }
  try {
    if (directory.isDirectory()) {
      collectFromDirectory(classes,superClass,lookInThesePackages,"String_Node_Str",directory);
    }
 else {
      JarFile jarFile=new JarFile(directory);
      Enumeration<JarEntry> entries=jarFile.entries();
      while (entries.hasMoreElements()) {
        JarEntry entry=entries.nextElement();
        String entryName=fixJarEntryClassName(entry.getName());
        tryCollectClass(classes,superClass,lookInThesePackages,entryName);
      }
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + classPathToken,e);
  }
}

Fixed version (ground truth):
private static <T>void collectClasses(Collection<Class<? extends T>> classes,Class<? extends T> superClass,Collection<String> lookInThesePackages,String classPathToken){
  File directory=new File(classPathToken);
  if (!directory.exists()) {
    return;
  }
  try {
    if (directory.isDirectory()) {
      collectFromDirectory(classes,superClass,lookInThesePackages,"String_Node_Str",directory);
    }
 else {
      JarFile jarFile=new JarFile(directory);
      Enumeration<JarEntry> entries=jarFile.entries();
      while (entries.hasMoreElements()) {
        JarEntry entry=entries.nextElement();
        String entryName=fixJarEntryClassName(entry.getName());
        tryCollectClass(classes,superClass,lookInThesePackages,entryName);
      }
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + classPathToken,e);
  }
}
Program: 155232
Project: 155232
Buggy source:
private static <T>void collectFromDirectory(Collection<Class<? extends T>> classes,Class<T> superClass,Collection<String> lookInThesePackages,String prefix,File directory){
  boolean botherToBrowseFurtherDown=false;
  if (lookInThesePackages != null) {
    for (    String packageName : lookInThesePackages) {
      if (packageName.startsWith(prefix)) {
        botherToBrowseFurtherDown=true;
        break;
      }
    }
  }
 else {
    botherToBrowseFurtherDown=true;
  }
  if (!botherToBrowseFurtherDown) {
    return;
  }
  File[] files=directory.listFiles();
  if (files == null) {
    return;
  }
  for (  File file : files) {
    if (file.isDirectory()) {
      collectFromDirectory(classes,superClass,lookInThesePackages,addToPrefix(prefix,file.getName()),file);
    }
 else {
      String className=addToPrefix(prefix,file.getName());
      className=trimFromClassEnding(className);
      tryCollectClass(classes,superClass,lookInThesePackages,className);
    }
  }
}

Fixed version (ground truth):
private static <T>void collectFromDirectory(Collection<Class<? extends T>> classes,Class<? extends T> superClass,Collection<String> lookInThesePackages,String prefix,File directory){
  boolean botherToBrowseFurtherDown=false;
  if (lookInThesePackages != null) {
    for (    String packageName : lookInThesePackages) {
      if (packageName.startsWith(prefix)) {
        botherToBrowseFurtherDown=true;
        break;
      }
    }
  }
 else {
    botherToBrowseFurtherDown=true;
  }
  if (!botherToBrowseFurtherDown) {
    return;
  }
  File[] files=directory.listFiles();
  if (files == null) {
    return;
  }
  for (  File file : files) {
    if (file.isDirectory()) {
      collectFromDirectory(classes,superClass,lookInThesePackages,addToPrefix(prefix,file.getName()),file);
    }
 else {
      String className=addToPrefix(prefix,file.getName());
      className=trimFromClassEnding(className);
      tryCollectClass(classes,superClass,lookInThesePackages,className);
    }
  }
}
Program: 155233
Project: 155233
Buggy source:
/** 
 * @param < T > the class type.
 * @param superClass the class which the resulting classes must implementor extend.
 * @param lookInThesePackages an optional collection of which java packagesto search in. If null is specified then all packages are searched.
 * @return all classes (in the class path) which extends or implementsa certain class.
 */
public static <T>Collection<Class<? extends T>> listClassesExtendingOrImplementing(Class<T> superClass,Collection<String> lookInThesePackages){
  String classPath=System.getProperty("String_Node_Str");
  StringTokenizer tokenizer=new StringTokenizer(classPath,File.pathSeparator);
  Collection<Class<? extends T>> classes=new HashSet<Class<? extends T>>();
  while (tokenizer.hasMoreTokens()) {
    collectClasses(classes,superClass,lookInThesePackages,tokenizer.nextToken());
  }
  return Collections.unmodifiableCollection(classes);
}

Fixed version (ground truth):
/** 
 * @param < T > the class type.
 * @param superClass the class which the resulting classes must implementor extend.
 * @param lookInThesePackages an optional collection of which java packagesto search in. If null is specified then all packages are searched.
 * @return all classes (in the class path) which extends or implementsa certain class.
 */
public static <T>Collection<Class<? extends T>> listClassesExtendingOrImplementing(Class<? extends T> superClass,Collection<String> lookInThesePackages){
  String classPath=System.getProperty("String_Node_Str");
  StringTokenizer tokenizer=new StringTokenizer(classPath,File.pathSeparator);
  Collection<Class<? extends T>> classes=new HashSet<Class<? extends T>>();
  while (tokenizer.hasMoreTokens()) {
    collectClasses(classes,superClass,lookInThesePackages,tokenizer.nextToken());
  }
  return Collections.unmodifiableCollection(classes);
}
Program: 155234
Project: 155234
Buggy source:
private static <T>void tryCollectClass(Collection<Class<? extends T>> classes,Class<T> superClass,Collection<String> lookInThesePackages,String className){
  try {
    if (!classNameIsInPackage(className,lookInThesePackages)) {
      return;
    }
    Class<? extends T> cls=(Class<? extends T>)Class.forName(className);
    if (cls.isInterface() || Modifier.isAbstract(cls.getModifiers())) {
      return;
    }
    if (superClass.isAssignableFrom(cls)) {
      classes.add(cls);
    }
  }
 catch (  Throwable e) {
  }
}

Fixed version (ground truth):
private static <T>void tryCollectClass(Collection<Class<? extends T>> classes,Class<? extends T> superClass,Collection<String> lookInThesePackages,String className){
  try {
    if (!classNameIsInPackage(className,lookInThesePackages)) {
      return;
    }
    Class<? extends T> cls=Class.forName(className).asSubclass(superClass);
    if (cls.isInterface() || Modifier.isAbstract(cls.getModifiers())) {
      return;
    }
    if (superClass.isAssignableFrom(cls)) {
      classes.add(cls);
    }
  }
 catch (  Throwable e) {
  }
}
Program: 155235
Project: 155235
Buggy source:
@Override public String getDescription(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + GshExecutor.PATH_STRING + "String_Node_Str"+ GshExecutor.DEFAULT_PATHS+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getDescription(){
  GshExecutor anExecutor=new GshExecutor();
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + anExecutor.getPathKey() + "String_Node_Str"+ anExecutor.getDefaultPaths()+ "String_Node_Str";
}
Program: 155236
Project: 155236
Buggy source:
@Override protected String getPathKey(){
  return PATH_STRING;
}

Fixed version (ground truth):
@Override protected String getPathKey(){
  return "String_Node_Str";
}
Program: 155237
Project: 155237
Buggy source:
@Override public String getDescription(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + JshExecutor.PATH_STRING + "String_Node_Str"+ JshExecutor.DEFAULT_PATHS+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getDescription(){
  JshExecutor anExecutor=new JshExecutor();
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + anExecutor.getPathKey() + "String_Node_Str"+ anExecutor.getDefaultPaths()+ "String_Node_Str";
}
Program: 155238
Project: 155238
Buggy source:
@Override protected String getPathKey(){
  return PATH_STRING;
}

Fixed version (ground truth):
@Override protected String getPathKey(){
  return "String_Node_Str";
}