nus-yam/ex-repair huggingface dataset:
Program: 180361
Project: 180361
Buggy source:
public VerifiedDataBlock<Trajectory> verify(final DataBlock<Trajectory> trajectories,P property){
  final Robustness[] robustnesses=new Robustness[trajectories.size()];
  int counter=0;
  for (  Trajectory trajectory : trajectories) {
    robustnesses[counter]=monitorFactory.createMonitor(trajectory,property).getRobustness(0);
  }
  return new VerifiedDataBlock<Trajectory>(){
    public Robustness getRobustness(    int index){
      return robustnesses[index];
    }
    public Trajectory getTrajectory(    int index){
      return trajectories.getTrajectory(index);
    }
    public int size(){
      return trajectories.size();
    }
    public Iterator<Trajectory> iterator(){
      return trajectories.iterator();
    }
  }
;
}

Fixed version (ground truth):
public VerifiedDataBlock<Trajectory> verify(final DataBlock<Trajectory> trajectories,P property){
  final Robustness[] robustnesses=new Robustness[trajectories.size()];
  int counter=0;
  for (  Trajectory trajectory : trajectories) {
    robustnesses[counter]=monitorFactory.createMonitor(trajectory,property).getRobustness(0);
    counter++;
  }
  return new VerifiedDataBlock<Trajectory>(){
    public Robustness getRobustness(    int index){
      return robustnesses[index];
    }
    public Trajectory getTrajectory(    int index){
      return trajectories.getTrajectory(index);
    }
    public int size(){
      return trajectories.size();
    }
    public Iterator<Trajectory> iterator(){
      return trajectories.iterator();
    }
  }
;
}
Program: 180362
Project: 180362
Buggy source:
public int size(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
public int size(){
  return trajectory.getLength();
}
Program: 180363
Project: 180363
Buggy source:
PointDistanceMetric getDistanceMetric();

Fixed version (ground truth):
/** 
 * @return metric used to determine whether two trajectories has valid/invalid distance
 */
PointDistanceMetric getDistanceMetric();
Program: 180364
Project: 180364
Buggy source:
public SpawnedDataBlockWrapper(DataBlock<Trajectory> trajectories,TrajectoryNeighborhood<Trajectory> neighborhood,DataBlock<Trajectory> secondaryTrajectories){
  if (trajectories == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (neighborhood == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (secondaryTrajectories == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.trajectories=trajectories;
  this.neighborhood=neighborhood;
  this.secondaryTrajectories=secondaryTrajectories;
}

Fixed version (ground truth):
public SpawnedDataBlockWrapper(DataBlock<Trajectory> trajectories,Configuration configuration,DataBlock<Trajectory> secondaryTrajectories){
  if (trajectories == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (configuration == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (secondaryTrajectories == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.trajectories=trajectories;
  this.configuration=configuration;
  this.secondaryTrajectories=secondaryTrajectories;
}
Program: 180365
Project: 180365
Buggy source:
/** 
 * Creates new trajectories in the given space. Number of trajectories is defined through the numOfSamples parameter.
 * @param configuration
 * @param space
 * @param numOfSamples
 */
SpawnedDataBlock spawn(OrthogonalSpace space,InitialSampling initialSampling);

Fixed version (ground truth):
/** 
 * Creates new trajectories in the given space.
 */
SpawnedDataBlock spawn(OrthogonalSpace space,InitialSampling initialSampling,PointDistanceMetric distanceMetric);
Program: 180366
Project: 180366
Buggy source:
public <T>T resolve(Class<T> type,Class<? extends Annotation> qualifier,Context context){
  return context.resolve(type,qualifier);
}

Fixed version (ground truth):
public <T>T resolve(Class<T> type,Class<? extends Annotation> qualifier,Context context){
  Class<? extends Annotation> nonProxyQualifier=(Class<? extends Annotation>)(Proxy.isProxyClass(qualifier) ? qualifier.getInterfaces()[0] : qualifier);
  T result=context.resolve(type,nonProxyQualifier);
  printIfVerbose("String_Node_Str" + type + "String_Node_Str"+ nonProxyQualifier.getSimpleName()+ "String_Node_Str"+ (result == null ? null : result.getClass())+ "String_Node_Str"+ context.getClass().getSimpleName()+ "String_Node_Str");
  return result;
}
Program: 180367
Project: 180367
Buggy source:
public void start(){
  fire(new ManagerStarted(),applicationContext);
}

Fixed version (ground truth):
public void start(){
  fire(new ManagerStarted(),applicationContext);
  descriptor=resolve(ParasimDescriptor.class,Default.class,getRootContext());
  printIfVerbose("String_Node_Str");
  if (isVerbose()) {
    for (    Extension extension : extensionsByContext.get(applicationContext)) {
      printIfVerbose("String_Node_Str" + extension + "String_Node_Str");
    }
  }
}
Program: 180368
Project: 180368
Buggy source:
public <T>void bind(final Class<T> type,Class<? extends Annotation> qualifier,Context context,T value){
  context.getStorage().add(type,qualifier,value);
  fire(value,context);
}

Fixed version (ground truth):
public <T>void bind(final Class<T> type,Class<? extends Annotation> qualifier,Context context,T value){
  Class<? extends Annotation> nonProxyQualifier=(Class<? extends Annotation>)(Proxy.isProxyClass(qualifier) ? qualifier.getInterfaces()[0] : qualifier);
  printIfVerbose("String_Node_Str" + type + "String_Node_Str"+ nonProxyQualifier.getSimpleName()+ "String_Node_Str"+ value.getClass().getName()+ "String_Node_Str"+ context.getClass().getSimpleName()+ "String_Node_Str");
  context.getStorage().add(type,nonProxyQualifier,value);
  fire(value,context);
}
Program: 180369
Project: 180369
Buggy source:
public void fire(Object event,Context context){
  if (event == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (context == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!context.isActive()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  Extension extension : extensionsByContext.get(context)) {
    for (    ObserverMethod method : extension.getObservers()) {
      if (getType(method.getType()).isAssignableFrom(event.getClass())) {
        try {
          method.invoke(this,event);
        }
 catch (        Exception e) {
          LOGGER.warn("String_Node_Str",e);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void fire(Object event,Context context){
  if (event == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (context == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!context.isActive()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  Extension extension : extensionsByContext.get(context)) {
    for (    ObserverMethod method : extension.getObservers()) {
      if (getType(method.getType()).isAssignableFrom(event.getClass())) {
        try {
          printIfVerbose("String_Node_Str" + event + "String_Node_Str"+ extension+ "String_Node_Str"+ method.getMethod().getName()+ "String_Node_Str");
          method.invoke(this,event);
        }
 catch (        Exception e) {
          LOGGER.warn("String_Node_Str",e);
        }
      }
    }
  }
}
Program: 180370
Project: 180370
Buggy source:
public void initializeContext(Context context){
  try {
    context.activate();
    if (!extensionsByContext.containsKey(context)) {
      extensionsByContext.put(context,new ArrayList<Extension>());
    }
    extensionsByContext.get(context).addAll(createExtensions(extensionsByScope.get(context.getScope()),context));
    if (!(context instanceof ApplicationContext)) {
      fire(Before.of(context),applicationContext);
    }
    for (    Extension extension : extensionsByContext.get(context)) {
      for (      ProvidingPoint providingPoint : extension.getProvidingPoints()) {
        ProviderImpl.bind(this,context,providingPoint,getType(providingPoint.getType()),providingPoint.getQualifier());
      }
    }
    fire(Before.of(context),context);
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void initializeContext(Context context){
  try {
    context.activate();
    if (!extensionsByContext.containsKey(context)) {
      extensionsByContext.put(context,Collections.synchronizedList(new ArrayList<Extension>()));
    }
    extensionsByContext.get(context).addAll(createExtensions(extensionsByScope.get(context.getScope()),context));
    if (!(context instanceof ApplicationContext)) {
      fire(Before.of(context),applicationContext);
    }
    for (    Extension extension : extensionsByContext.get(context)) {
      for (      ProvidingPoint providingPoint : extension.getProvidingPoints()) {
        ProviderImpl.bind(this,context,providingPoint,getType(providingPoint.getType()),providingPoint.getQualifier());
      }
    }
    fire(Before.of(context),context);
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 180371
Project: 180371
Buggy source:
public <T>T resolve(Class<T> type,Class<? extends Annotation> qualifier){
  if (this.isActive()) {
    T value=this.getStorage().get(type,qualifier);
    if (value != null) {
      return value;
    }
  }
  if (this.hasParent()) {
    return this.getParent().resolve(type,qualifier);
  }
  return null;
}

Fixed version (ground truth):
public <T>T resolve(Class<T> type,Class<? extends Annotation> qualifier){
  Validate.notNull(type);
  Validate.notNull(qualifier);
  if (this.isActive()) {
    T value=this.getStorage().get(type,qualifier);
    if (value != null) {
      return value;
    }
  }
  if (this.hasParent()) {
    return this.getParent().resolve(type,qualifier);
  }
  return null;
}
Program: 180373
Project: 180373
Buggy source:
public void finalizeContext(Context context){
  if (context.hasParent()) {
    fire(After.of(context),context.getParent());
  }
  fire(After.of(context),context);
  context.destroy();
  extensionsByContext.get(context).clear();
  extensionsByContext.remove(context);
}

Fixed version (ground truth):
private void finalizeContext(Context context,boolean remove){
  if (context.hasParent()) {
    fire(After.of(context),context.getParent());
  }
  fire(After.of(context),context);
  context.destroy();
  extensionsByContext.get(context).clear();
  if (remove) {
    extensionsByContext.remove(context);
  }
}
Program: 180374
Project: 180374
Buggy source:
public void shutdown(){
  try {
    fire(new ManagerStopping(),applicationContext);
  }
  finally {
    for (    Context context : extensionsByContext.keySet()) {
      if (context instanceof ApplicationContext) {
        continue;
      }
      finalizeContext(context);
    }
    finalizeContext(applicationContext);
    extensionsByContext.clear();
    extensionsByScope.clear();
  }
}

Fixed version (ground truth):
public void shutdown(){
  try {
    fire(new ManagerStopping(),applicationContext);
  }
  finally {
    for (    Context context : extensionsByContext.keySet()) {
      if (context instanceof ApplicationContext) {
        continue;
      }
      finalizeContext(context,false);
    }
    finalizeContext(applicationContext);
    extensionsByContext.clear();
    extensionsByScope.clear();
  }
}
Program: 180375
Project: 180375
Buggy source:
/** 
 * Returns distance between two given points. The method should hold that distance(A, B) == distance(B, A) and distance(A, A) = 0.
 * @param first
 * @param second
 * @return distance between two given points
 */
@Override Distance distance(Point first,Point second);

Fixed version (ground truth):
/** 
 * Returns distance between two given points. The method should hold that distance(A, B) == distance(B, A) and distance(A, A) = 0.
 * @param first
 * @param second
 * @return distance between two given points
 */
@Override LimitedDistance distance(Point first,Point second);
Program: 180376
Project: 180376
Buggy source:
public Distance distance(Point first,Point second){
  return distance(first.toArray(),second.toArray());
}

Fixed version (ground truth):
public LimitedDistance distance(Point first,Point second){
  return distance(first.toArray(),second.toArray());
}
Program: 180378
Project: 180378
Buggy source:
public PointDistanceMetric getDistanceMetric(){
  return new PointDistanceMetric(){
    public Distance distance(    float[] first,    float[] second){
      final float[] distance=new float[first.length];
      float maxDistance=0;
      for (int dim=0; dim < first.length; dim++) {
        distance[dim]=Math.abs(first[dim] - second[dim]) / getMaxAbsoluteDistance()[dim];
        if (distance[dim] > maxDistance) {
          maxDistance=distance[dim];
        }
      }
      final float maxDistanceFinal=maxDistance;
      return new LimitedDistance(){
        public boolean isValid(){
          return value() < expectedDistance;
        }
        public boolean isValid(        int dimensionIndex){
          return value(dimensionIndex) < expectedDistance;
        }
        public float value(){
          return maxDistanceFinal;
        }
        public float value(        int dimensionIndex){
          return distance[dimensionIndex];
        }
      }
;
    }
    public Distance distance(    Point first,    Point second){
      return distance(first.toArray(),second.toArray());
    }
  }
;
}

Fixed version (ground truth):
public PointDistanceMetric getDistanceMetric(){
  return new PointDistanceMetric(){
    public LimitedDistance distance(    float[] first,    float[] second){
      final float[] distance=new float[first.length];
      float maxDistance=0;
      for (int dim=0; dim < first.length; dim++) {
        distance[dim]=Math.abs(first[dim] - second[dim]) / getMaxAbsoluteDistance()[dim];
        if (distance[dim] > maxDistance) {
          maxDistance=distance[dim];
        }
      }
      final float maxDistanceFinal=maxDistance;
      return new LimitedDistance(){
        public boolean isValid(){
          return value() < expectedDistance;
        }
        public boolean isValid(        int dimensionIndex){
          return value(dimensionIndex) < expectedDistance;
        }
        public float value(){
          return maxDistanceFinal;
        }
        public float value(        int dimensionIndex){
          return distance[dimensionIndex];
        }
      }
;
    }
    public LimitedDistance distance(    Point first,    Point second){
      return distance(first.toArray(),second.toArray());
    }
  }
;
}
Program: 180379
Project: 180379
Buggy source:
private OrthogonalSpace createOrthogonalSpace(float base,int dimension){
  float[] minBounds=new float[dimension];
  float[] maxBounds=new float[dimension];
  for (int dim=0; dim < dimension; dim++) {
    minBounds[dim]=0;
    maxBounds[dim]=(float)((dim + 1) * base);
  }
  return new OrthogonalSpace(new ArrayPoint(0,minBounds),new ArrayPoint(100,maxBounds));
}

Fixed version (ground truth):
protected OrthogonalSpace createOrthogonalSpace(float base,int dimension){
  float[] minBounds=new float[dimension];
  float[] maxBounds=new float[dimension];
  for (int dim=0; dim < dimension; dim++) {
    minBounds[dim]=0;
    maxBounds[dim]=(float)((dim + 1) * base);
  }
  return new OrthogonalSpace(new ArrayPoint(0,minBounds),new ArrayPoint(100,maxBounds));
}
Program: 180380
Project: 180380
Buggy source:
private SpawnedDataBlock<Trajectory> initialSpawn(OrthogonalSpace space,int numSpawn){
  TrajectorySpawner spawner=createTrajectorySpawner();
  int[] toSpawn=new int[space.getDimension()];
  for (int dim=0; dim < space.getDimension(); dim++) {
    toSpawn[dim]=numSpawn;
  }
  return spawner.spawn(space,toSpawn);
}

Fixed version (ground truth):
protected SpawnedDataBlock<Trajectory> initialSpawn(OrthogonalSpace space,int numSpawn){
  TrajectorySpawner spawner=createTrajectorySpawner();
  int[] toSpawn=new int[space.getDimension()];
  for (int dim=0; dim < space.getDimension(); dim++) {
    toSpawn[dim]=numSpawn;
  }
  return spawner.spawn(space,toSpawn);
}
Program: 180381
Project: 180381
Buggy source:
@Override public void executeVoidMethod(Object o,Method method){
  Object[] paramValues=new Object[method.getParameterTypes().length];
  for (int i=0; i < method.getTypeParameters().length; i++) {
    if (!isServiceAvailable(method.getParameterTypes()[i])) {
      throw new IllegalStateException("String_Node_Str" + method.getParameterTypes()[i].getCanonicalName() + "String_Node_Str"+ o.getClass().getCanonicalName()+ "String_Node_Str");
    }
    paramValues[i]=getService(method.getParameterTypes()[i]);
  }
  try {
    method.setAccessible(true);
    method.invoke(o,paramValues);
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void executeVoidMethod(Object o,Method method){
  Object[] paramValues=new Object[method.getParameterTypes().length];
  for (int i=0; i < method.getParameterTypes().length; i++) {
    if (!isServiceAvailable(method.getParameterTypes()[i])) {
      throw new IllegalStateException("String_Node_Str" + method.getParameterTypes()[i].getCanonicalName() + "String_Node_Str"+ o.getClass().getCanonicalName()+ "String_Node_Str");
    }
    paramValues[i]=getService(method.getParameterTypes()[i]);
  }
  try {
    method.setAccessible(true);
    method.invoke(o,paramValues);
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 180382
Project: 180382
Buggy source:
@BeforeMethod public void beforeMethod(){
  factory=new MapCDIFactory();
  factory.addService(List.class,ArrayList.class);
  factory.addService(Set.class,new HashSet<Object>(Arrays.asList(new Object[]{new Object()})));
  factory.addService(Object.class,Object.class);
  factory.addService(null,null);
  o1=new TestedObject();
  o2=new TestedObject();
}

Fixed version (ground truth):
@BeforeMethod public void beforeMethod(){
  factory=new MapServiceFactory();
  factory.addService(List.class,ArrayList.class);
  factory.addService(Set.class,new HashSet<Object>(Arrays.asList(new Object[]{new Object()})));
  factory.addService(Object.class,Object.class);
  factory.addService(null,null);
  o1=new TestedObject();
  o2=new TestedObject();
}
Program: 180383
Project: 180383
Buggy source:
@Override public void setup(){
  super.setup();
  trajectories=new MutableDataBlock(new LotkaVolteraInitialDataBlock());
  simulator=new Rkf45Simulator();
  trajectories.append(simulator.simulate(new LotkaVolteraAdaptiveStepConfiguration(),trajectories));
  visualizer=new DataBlockVisualizer2D(trajectories,this,0,1,20,13);
}

Fixed version (ground truth):
@Override public void setup(){
  super.setup();
  trajectories=new ListMutableDataBlock(new LotkaVolteraInitialDataBlock());
  simulator=new Rkf45Simulator();
  trajectories.append(simulator.simulate(new LotkaVolteraAdaptiveStepConfiguration(),trajectories));
  visualizer=new DataBlockVisualizer2D(trajectories,this,0,1,20,13);
}
Program: 180385
Project: 180385
Buggy source:
private ArrayDataBlock<Trajectory> createDataBlock(int dim,int size){
  Trajectory[] trajectories=new Trajectory[size];
  for (int s=0; s < size; s++) {
    float[] data=new float[dim];
    for (int d=0; d < dim; d++) {
      data[d]=s * size + d;
    }
    trajectories[s]=new ArrayTrajectory(data,new float[]{(float)0},dim);
  }
  return new ArrayDataBlock<Trajectory>(trajectories);
}

Fixed version (ground truth):
protected DataBlock<Trajectory> createDataBlock(int dim,int size){
  Trajectory[] trajectories=new Trajectory[size];
  for (int s=0; s < size; s++) {
    float[] data=new float[dim];
    for (int d=0; d < dim; d++) {
      data[d]=s * size + d;
    }
    trajectories[s]=new ArrayTrajectory(data,new float[]{(float)0},dim);
  }
  return new ArrayDataBlock<Trajectory>(trajectories);
}
Program: 180386
Project: 180386
Buggy source:
private OdeSystem createOdeSystem(final int dim){
  int[] coefficientIndexes=new int[dim + 1];
  float[] coefficients=new float[dim];
  int[] factorIndexes=new int[dim + 1];
  int[] factors=new int[dim];
  for (int d=0; d < dim; d++) {
    coefficientIndexes[d]=d;
    coefficients[d]=(float)dim / (float)100;
    factorIndexes[d]=d;
    factors[d]=d;
  }
  coefficientIndexes[dim]=dim;
  factorIndexes[dim]=dim;
  return new DefaultOdeSystem(new ArrayOdeSystemEncoding(coefficientIndexes,coefficients,factorIndexes,factors));
}

Fixed version (ground truth):
private OdeSystem createOdeSystem(final int dim){
  int[] coefficientIndexes=new int[dim + 1];
  float[] coefficients=new float[dim];
  int[] factorIndexes=new int[dim + 1];
  int[] factors=new int[dim];
  for (int d=0; d < dim; d++) {
    coefficientIndexes[d]=d;
    coefficients[d]=(float)dim / (float)10;
    factorIndexes[d]=d;
    factors[d]=d;
  }
  coefficientIndexes[dim]=dim;
  factorIndexes[dim]=dim;
  return new DefaultOdeSystem(new ArrayOdeSystemEncoding(coefficientIndexes,coefficients,factorIndexes,factors));
}
Program: 180387
Project: 180387
Buggy source:
protected void testTimeStep(int size){
  SimulatedDataBlock<Trajectory> result=getSimulator().simulate(getConfiguration(),createDataBlock(getConfiguration().getDimension(),size));
  for (int s=0; s < size; s++) {
    Point previous=null;
    for (    Point p : result.getTrajectory(s)) {
      if (previous == null) {
        previous=p;
        continue;
      }
      assertEquals(p.getTime() - previous.getTime(),getConfiguration().getTimeStep(),getConfiguration().getTimeStep() / 1000,"String_Node_Str");
      previous=p;
    }
  }
}

Fixed version (ground truth):
protected void testTimeStep(int size){
  SimulatedDataBlock<Trajectory> result=getSimulator().simulate(getConfiguration(),createDataBlock(getConfiguration().getDimension(),size));
  for (int s=0; s < size; s++) {
    Point previous=null;
    for (    Point p : result.getTrajectory(s)) {
      if (previous == null) {
        previous=p;
        continue;
      }
      assertTrue(Math.abs(p.getTime() - previous.getTime()) <= getConfiguration().getTimeStep() + getConfiguration().getTimeStep() / 1000,"String_Node_Str" + Math.abs(p.getTime() - previous.getTime()) + "String_Node_Str"+ getConfiguration().getTimeStep()+ "String_Node_Str");
      previous=p;
    }
  }
}
Program: 180388
Project: 180388
Buggy source:
public LotkaVolteraConfiguration(){
  super(new LotkaVolteraOdeSystem(),new OrthogonalSpace(new ArrayPoint(0,100,100),new ArrayPoint(100,0,0)));
}

Fixed version (ground truth):
public LotkaVolteraConfiguration(){
  super(new LotkaVolteraOdeSystem(),new OrthogonalSpace(new ArrayPoint(0,0,0),new ArrayPoint(100,100,100)));
}
Program: 180389
Project: 180389
Buggy source:
/** 
 * Returns position of point in array (position of the first dimension value) followed by other dimension values.
 * @param trajectoryIndex index of trajectory which the point belongs to
 * @param pointIndex point index
 * @return point index 
 */
int getPointPosition(int trajectoryIndex,int pointIndex);

Fixed version (ground truth):
/** 
 * Returns position of point in array (position of the first dimension value) followed by other dimension values.
 * @param pointIndex point index
 * @return point index 
 */
int getPointPosition(int pointIndex);
Program: 180390
Project: 180390
Buggy source:
/** 
 * Returns position of time value in array.
 * @param trajectoryIndex index of trajectory which the point belongs to
 * @param pointIndex index
 * @return time index
 */
int getTimePosition(int trajectoryIndex,int pointIndex);

Fixed version (ground truth):
/** 
 * Returns position of time value in array.
 * @param pointIndex index
 * @return time index
 */
int getTimePosition(int pointIndex);
Program: 180391
Project: 180391
Buggy source:
@Override public Point getPoint(int index){
  if (index < 0 || index >= getLength()) {
    throw new IllegalArgumentException("String_Node_Str" + (getLength() - 1) + "String_Node_Str");
  }
  return new ArrayPoint(points,times[pointLocator.getTimePosition(0,index)],pointLocator.getPointPosition(0,index),getDimension());
}

Fixed version (ground truth):
@Override public Point getPoint(int index){
  if (index < 0 || index >= getLength()) {
    throw new IllegalArgumentException("String_Node_Str" + (getLength() - 1) + "String_Node_Str");
  }
  return new ArrayPoint(points,times[pointLocator.getTimePosition(index)],pointLocator.getPointPosition(index),getDimension());
}
Program: 180392
Project: 180392
Buggy source:
public int getPointPosition(int trajectoryIndex,int pointIndex){
  return pointIndex * dimension;
}

Fixed version (ground truth):
public int getPointPosition(int pointIndex){
  return pointIndex * dimension;
}
Program: 180393
Project: 180393
Buggy source:
public int getTimePosition(int trajectoryIndex,int pointIndex){
  return pointIndex;
}

Fixed version (ground truth):
public int getTimePosition(int pointIndex){
  return pointIndex;
}
Program: 180395
Project: 180395
Buggy source:
public void free(){
  if (!isInitialized()) {
    throw new IllegalStateException("String_Node_Str");
  }
  hostLengths=null;
  hostPoints=null;
  hostTimes=null;
  savedDataBlock=null;
  Utils.checkErrorCode(JCuda.cudaFree(deviceLengths));
  Utils.checkErrorCode(JCuda.cudaFree(devicePoints));
  Utils.checkErrorCode(JCuda.cudaFree(deviceTimes));
  initialized=false;
}

Fixed version (ground truth):
public void free(){
  if (!isInitialized()) {
    return;
  }
  hostLengths=null;
  hostPoints=null;
  hostTimes=null;
  savedDataBlock=null;
  Utils.checkErrorCode(JCuda.cudaFree(deviceLengths));
  Utils.checkErrorCode(JCuda.cudaFree(devicePoints));
  Utils.checkErrorCode(JCuda.cudaFree(deviceTimes));
  initialized=false;
}
Program: 180396
Project: 180396
Buggy source:
public DataBlock<Trajectory> loadDataBlock(){
  if (!isInitialized()) {
    throw new IllegalStateException("String_Node_Str");
  }
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostLengths),deviceLengths,getSavedDataBlock().size() * Sizeof.INT,cudaMemcpyKind.cudaMemcpyDeviceToHost));
  int maxLength=0;
  for (int i=0; i < getSavedDataBlock().size(); i++) {
    if (hostLengths[i] > maxLength) {
      maxLength=hostLengths[i];
    }
  }
  int dimension=getSavedDataBlock().getTrajectory(0).getDimension();
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostPoints),devicePoints,getSavedDataBlock().size() * maxLength * Sizeof.FLOAT,cudaMemcpyKind.cudaMemcpyDeviceToHost));
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostTimes),deviceTimes,getSavedDataBlock().size() * maxLength * Sizeof.FLOAT,dimension));
  return dataBlockFactory.createDataBlock(hostPoints,hostTimes,hostLengths,dimension);
}

Fixed version (ground truth):
public DataBlock<Trajectory> loadDataBlock(){
  if (!isInitialized()) {
    throw new IllegalStateException("String_Node_Str");
  }
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostLengths),deviceLengths,getSavedDataBlock().size() * Sizeof.INT,cudaMemcpyKind.cudaMemcpyDeviceToHost));
  int maxLength=0;
  for (int i=0; i < getSavedDataBlock().size(); i++) {
    if (hostLengths[i] > maxLength) {
      maxLength=hostLengths[i];
    }
  }
  int dimension=getSavedDataBlock().getTrajectory(0).getDimension();
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostPoints),devicePoints,getSavedDataBlock().size() * maxLength * getSavedDataBlock().getTrajectory(0).getDimension()* Sizeof.FLOAT,cudaMemcpyKind.cudaMemcpyDeviceToHost));
  Utils.checkErrorCode(JCuda.cudaMemcpy(Pointer.to(hostTimes),deviceTimes,getSavedDataBlock().size() * maxLength * Sizeof.FLOAT,cudaMemcpyKind.cudaMemcpyDeviceToHost));
  return dataBlockFactory.createDataBlock(hostPoints,hostTimes,hostLengths,dimension);
}
Program: 180397
Project: 180397
Buggy source:
public int getPointPosition(int trajectoryIndex,int pointIndex){
  return pointIndex * getSize() * dimension;
}

Fixed version (ground truth):
public int getPointPosition(int pointIndex){
  System.out.println("String_Node_Str" + pointIndex + "String_Node_Str"+ trajectoryIndex+ "String_Node_Str"+ (pointIndex * size() * dimension + trajectoryIndex * dimension));
  return pointIndex * size() * dimension + trajectoryIndex * dimension;
}
Program: 180398
Project: 180398
Buggy source:
public Trajectory getTrajectory(int index){
  if (index < 0 || index >= getSize()) {
    throw new IndexOutOfBoundsException("String_Node_Str" + 0 + "String_Node_Str"+ (getSize() - 1)+ "String_Node_Str");
  }
  return new ArrayTrajectory(points,times,dimension,lengths[index],pointLocator);
}

Fixed version (ground truth):
public Trajectory getTrajectory(int index){
  if (index < 0 || index >= size()) {
    throw new IndexOutOfBoundsException("String_Node_Str" + 0 + "String_Node_Str"+ (size() - 1)+ "String_Node_Str");
  }
  return new ArrayTrajectory(points,times,dimension,lengths[index],createPointLocator(index));
}
Program: 180399
Project: 180399
Buggy source:
public int getTimePosition(int trajectoryIndex,int pointIndex){
  return pointIndex * getSize();
}

Fixed version (ground truth):
public int getTimePosition(int pointIndex){
  return pointIndex * size() + trajectoryIndex;
}
Program: 180400
Project: 180400
Buggy source:
public WorkspaceDataBlock(float[] points,float[] times,int[] lengths,final int dimension){
  super(lengths.length);
  if (points == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (times == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dimension <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.points=points;
  this.times=times;
  this.lengths=lengths;
  this.dimension=dimension;
  int maxLength=0;
  for (int i=0; i < lengths.length; i++) {
    if (lengths[i] > maxLength) {
      maxLength=lengths[i];
    }
  }
  pointLocator=new ArrayPointLocator(){
    public int getPointPosition(    int trajectoryIndex,    int pointIndex){
      return pointIndex * getSize() * dimension;
    }
    public int getTimePosition(    int trajectoryIndex,    int pointIndex){
      return pointIndex * getSize();
    }
  }
;
}

Fixed version (ground truth):
public WorkspaceDataBlock(float[] points,float[] times,int[] lengths,final int dimension){
  super(lengths.length);
  if (points == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (times == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dimension <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.points=points;
  this.times=times;
  this.lengths=lengths;
  this.dimension=dimension;
}
Program: 180401
Project: 180401
Buggy source:
/** 
 * Appends the given trajectory on the end of this trajectory. After calling this method, the reference of the given trajectory will point to this trajectory.
 * @param trajectory the trajectory which will be appended
 */
public void append(Trajectory trajectory){
  if (trajectory == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (trajectory.getFirstPoint().getTime() < trajectories.get(trajectories.size()).getLastPoint().getTime()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setLength(getLength() + trajectory.getLength());
  trajectories.add(trajectory);
  trajectory.getReference().setTrajectory(this);
}

Fixed version (ground truth):
/** 
 * Appends the given trajectory on the end of this trajectory. After calling this method, the reference of the given trajectory will point to this trajectory.
 * @param trajectory the trajectory which will be appended
 */
public void append(Trajectory trajectory){
  if (trajectory == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (trajectory.getFirstPoint().getTime() < trajectories.get(trajectories.size() - 1).getLastPoint().getTime()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setLength(getLength() + trajectory.getLength());
  trajectories.add(trajectory);
  trajectory.getReference().setTrajectory(this);
}
Program: 180402
Project: 180402
Buggy source:
Out simulate(Conf configuration,DataBlock<Trajectory> trajectories);

Fixed version (ground truth):
Out simulate(Conf configuration,org.sybila.parasim.computation.DataBlock<Trajectory> trajectories);
Program: 180403
Project: 180403
Buggy source:
@Override public Point getPoint(int index){
  if (index <= 0 || index >= getLength()) {
    throw new IllegalArgumentException("String_Node_Str" + (getLength() - 1) + "String_Node_Str");
  }
  return new ArrayPoint(points,times[index],index * getDimension(),getDimension());
}

Fixed version (ground truth):
@Override public Point getPoint(int index){
  if (index < 0 || index >= getLength()) {
    throw new IllegalArgumentException("String_Node_Str" + (getLength() - 1) + "String_Node_Str");
  }
  return new ArrayPoint(points,times[index],index * getDimension(),getDimension());
}
Program: 180404
Project: 180404
Buggy source:
/** 
 * Creates a new ListTrajectory with the given points.
 * @param points point sequence 
 */
public ListTrajectory(List<Point> points){
  super(points.get(0).getDimension(),points.size());
}

Fixed version (ground truth):
/** 
 * Creates a new ListTrajectory with the given points.
 * @param points point sequence 
 */
public ListTrajectory(List<Point> points){
  super(points.get(0).getDimension(),points.size());
  this.points=points;
}
Program: 180405
Project: 180405
Buggy source:
private void writeAutoRelated(BufferedWriter writer,String category,String column,ZeroNullType dataZeroVsNulls) throws FishLinkException {
  String related=FishLinkConstants.autoRelatedCategory(category);
  if (related == null) {
    return;
  }
  String uri=categoryUris.get(related);
  if (uri == null) {
    return;
  }
  writeVocab(writer,related);
  writeUriOther(writer,uri,category,column,dataZeroVsNulls);
  try {
    writer.write("String_Node_Str");
    writer.newLine();
  }
 catch (  IOException ex) {
    throw new FishLinkException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private void writeAutoRelated(BufferedWriter writer,String category,String column,ZeroNullType dataZeroVsNulls) throws FishLinkException {
  String related=FishLinkConstants.autoRelatedCategory(category);
  if (related == null) {
    return;
  }
  String uri=categoryUris.get(related);
  if (uri == null) {
    return;
  }
  writeVocab(writer,related);
  writeUriForOther(writer,related,column,dataZeroVsNulls);
  try {
    writer.write("String_Node_Str");
    writer.newLine();
  }
 catch (  IOException ex) {
    throw new FishLinkException("String_Node_Str",ex);
  }
}
Program: 180406
Project: 180406
Buggy source:
SheetWrite(NameChecker nameChecker,Sheet annotatedSheet,int sheetNumber,String url,String pid) throws FishLinkException {
  super(annotatedSheet);
  this.pid=pid;
  this.sheetNumber=sheetNumber;
  this.dataPath=url;
  this.masterNameChecker=nameChecker;
  idColumns=new HashMap<String,String>();
  categoryUris=new HashMap<String,String>();
  allColumns=new ArrayList<String>();
}

Fixed version (ground truth):
SheetWrite(NameChecker nameChecker,Sheet annotatedSheet,int sheetNumber,String url,String pid) throws FishLinkException {
  super(annotatedSheet);
  this.pid=pid;
  this.sheetNumber=sheetNumber;
  this.dataPath=url;
  this.masterNameChecker=nameChecker;
  idValueLinks=new HashMap<String,String>();
  categoryUris=new HashMap<String,String>();
  allColumns=new ArrayList<String>();
}
Program: 180408
Project: 180408
Buggy source:
private void findId(String category,String column) throws FishLinkException {
  String field=getCellValue(column,fieldRow);
  String id=idColumns.get(category);
  if (field.equalsIgnoreCase("String_Node_Str")) {
    if (id == null || id.equalsIgnoreCase("String_Node_Str")) {
      System.out.println(column + "String_Node_Str" + category+ "String_Node_Str"+ column);
      idColumns.put(category,column);
      categoryUris.put(category,getUri(column,category));
    }
 else {
      throw new FishLinkException("String_Node_Str" + category);
    }
  }
 else {
    if (id == null) {
      System.out.println(column + "String_Node_Str" + category+ "String_Node_Str");
      idColumns.put(category,"String_Node_Str");
    }
    if (categoryUris.get(category) == null) {
      categoryUris.put(category,getCatgerogyUri(category));
    }
  }
}

Fixed version (ground truth):
private void findId(String category,String column) throws FishLinkException {
  String field=getCellValue(column,fieldRow);
  String id=idValueLinks.get(category);
  if (field.equalsIgnoreCase("String_Node_Str")) {
    if (id == null || id.equalsIgnoreCase("String_Node_Str")) {
      System.out.println(column + "String_Node_Str" + category+ "String_Node_Str"+ column);
      idValueLinks.put(category,column);
      categoryUris.put(category,getUri(column,category));
    }
 else {
      throw new FishLinkException("String_Node_Str" + category);
    }
  }
 else {
    if (id == null) {
      System.out.println(column + "String_Node_Str" + category+ "String_Node_Str");
      idValueLinks.put(category,"String_Node_Str");
    }
    if (categoryUris.get(category) == null) {
      categoryUris.put(category,getCatgerogyUri(category));
    }
  }
}
Program: 180410
Project: 180410
Buggy source:
private boolean ignore(XLExprValue<?> expression,XLExprValue<?> zeroToNullExpr) throws XLWrapException {
  Object value;
  if (expression == null) {
    value=null;
  }
 else {
    value=expression.getValue();
  }
  String zeroToNullString=zeroToNullExpr.getValue().toString();
  ZeroNullType zeroNullType;
  try {
    zeroNullType=ZeroNullType.parse(zeroToNullString);
  }
 catch (  FishLinkException ex) {
    throw new XLWrapException(ex);
  }
switch (zeroNullType) {
case KEEP:
    return value == null;
case NULLS_AS_ZERO:
  return true;
case ZEROS_AS_NULLS:
return isZero(value);
default :
throw new XLWrapException("String_Node_Str" + zeroNullType);
}
}

Fixed version (ground truth):
private boolean ignore(XLExprValue<?> expression,XLExprValue<?> zeroToNullExpr) throws XLWrapException {
  Object value;
  if (expression == null) {
    value=null;
  }
 else {
    value=expression.getValue();
  }
  String zeroToNullString=zeroToNullExpr.getValue().toString();
  ZeroNullType zeroNullType;
  try {
    zeroNullType=ZeroNullType.parse(zeroToNullString);
  }
 catch (  FishLinkException ex) {
    throw new XLWrapException(ex);
  }
switch (zeroNullType) {
case KEEP:
    return value == null;
case NULLS_AS_ZERO:
  return true;
case ZEROS_AS_NULLS:
if (value == null) {
  return true;
}
return isZero(value);
default :
throw new XLWrapException("String_Node_Str" + zeroNullType);
}
}
Program: 180411
Project: 180411
Buggy source:
private boolean ignore(XLExprValue<?> expression,XLExprValue<?> zeroToNullExpr) throws XLWrapException {
  Object value;
  if (expression == null) {
    value=null;
  }
 else {
    value=expression.getValue();
  }
  String zeroToNullString=zeroToNullExpr.getValue().toString();
  ZeroNullType zeroNullType;
  try {
    zeroNullType=ZeroNullType.parse(zeroToNullString);
  }
 catch (  FishLinkException ex) {
    throw new XLWrapException(ex);
  }
switch (zeroNullType) {
case KEEP:
    return value == null;
case NULLS_AS_ZERO:
  return true;
case ZEROS_AS_NULLS:
if (value instanceof Number) {
  int i=((Number)value).intValue();
  return i == 0;
}
if (value instanceof String) {
return value.toString().equals("String_Node_Str");
}
if (value instanceof Boolean) {
return false;
}
if (value instanceof Date) {
return (((Date)value).getTime() == 0);
}
throw new XLWrapException("String_Node_Str" + value.getClass());
default :
throw new XLWrapException("String_Node_Str" + zeroNullType);
}
}

Fixed version (ground truth):
private boolean ignore(XLExprValue<?> expression,XLExprValue<?> zeroToNullExpr) throws XLWrapException {
  Object value;
  if (expression == null) {
    value=null;
  }
 else {
    value=expression.getValue();
  }
  String zeroToNullString=zeroToNullExpr.getValue().toString();
  ZeroNullType zeroNullType;
  try {
    zeroNullType=ZeroNullType.parse(zeroToNullString);
  }
 catch (  FishLinkException ex) {
    throw new XLWrapException(ex);
  }
switch (zeroNullType) {
case KEEP:
    return value == null;
case NULLS_AS_ZERO:
  return true;
case ZEROS_AS_NULLS:
if (value == null) {
  return false;
}
if (value instanceof Number) {
int i=((Number)value).intValue();
return i == 0;
}
if (value instanceof String) {
return value.toString().equals("String_Node_Str");
}
if (value instanceof Boolean) {
return false;
}
if (value instanceof Date) {
return (((Date)value).getTime() == 0);
}
throw new XLWrapException("String_Node_Str" + value.getClass());
default :
throw new XLWrapException("String_Node_Str" + zeroNullType);
}
}
Program: 180412
Project: 180412
Buggy source:
@Override public XLExprValue<?> eval(ExecutionContext context) throws XLWrapException, XLWrapEOFException {
  XLExprValue<?> value=getArg(0).eval(context);
  if (FishLinkUtils.isZero(value.getValue())) {
    return null;
  }
  return value;
}

Fixed version (ground truth):
@Override public XLExprValue<?> eval(ExecutionContext context) throws XLWrapException, XLWrapEOFException {
  XLExprValue<?> value=getArg(0).eval(context);
  if (value == null) {
    return null;
  }
  if (FishLinkUtils.isZero(value.getValue())) {
    return null;
  }
  return value;
}
Program: 180413
Project: 180413
Buggy source:
public static void main(String[] args) throws XLWrapMapException {
  BrennRegister.register();
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws XLWrapMapException {
  BrennRegister.register();
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
  mapAndRdf("String_Node_Str","String_Node_Str");
}
Program: 180414
Project: 180414
Buggy source:
private void prepareSheet(Sheet masterSheet,FishLinkSheet metaSheet,Sheet dataSheet,Sheet copySheet) throws XLWrapMapException {
  int lastMetaRow=prepareColumnA(masterSheet,metaSheet,dataSheet);
  int lastColumn=dataSheet.getColumns();
  metaSheet.createFreezePane("String_Node_Str",lastMetaRow + 2);
  for (int zeroDataColumn=0; zeroDataColumn < lastColumn; zeroDataColumn++) {
    String metaColumn=FishLinkUtils.indexToAlpha(zeroDataColumn + 1);
    prepareDropDowns(masterSheet,lastMetaRow,metaSheet,metaColumn);
    copyData(lastMetaRow + 2,metaSheet,dataSheet,metaColumn);
  }
  if (copySheet != null) {
    copyMetaData(masterSheet,metaSheet,copySheet,lastMetaRow + 2,lastColumn);
  }
}

Fixed version (ground truth):
private void prepareSheet(Sheet masterSheet,FishLinkSheet metaSheet,Sheet dataSheet,Sheet copySheet) throws XLWrapMapException {
  int lastMetaRow=prepareColumnA(masterSheet,metaSheet,dataSheet);
  int lastColumn=dataSheet.getColumns();
  metaSheet.createFreezePane("String_Node_Str",lastMetaRow + 2);
  for (int zeroDataColumn=0; zeroDataColumn < lastColumn; zeroDataColumn++) {
    String metaColumn=FishLinkUtils.indexToAlpha(zeroDataColumn + 1);
    prepareDropDowns(masterSheet,lastMetaRow,metaSheet,metaColumn);
    copyData(lastMetaRow + 2,metaSheet,dataSheet,metaColumn);
  }
  if (copySheet != null) {
    copyMetaData(masterSheet,metaSheet,copySheet,lastMetaRow,lastColumn);
  }
}
Program: 180415
Project: 180415
Buggy source:
private void prepareMetaData(File metaFile,String pid,Workbook copyWorkbook) throws XLWrapMapException {
  Workbook dataWorkbook=FishLinkUtils.getWorkbookOnPid(pid);
  FishLinkWorkbook metaWorkbook=new FishLinkWorkbook();
  createNamedRanges(metaWorkbook);
  prepareSheets(metaWorkbook,dataWorkbook,copyWorkbook);
  metaWorkbook.write(metaFile);
}

Fixed version (ground truth):
private void prepareMetaData(File metaFile,String pid,Workbook copyWorkbook) throws XLWrapMapException {
  Workbook dataWorkbook=FishLinkUtils.getWorkbookOnPid(pid);
  FishLinkUtils.report("String_Node_Str" + dataWorkbook.getWorkbookInfo());
  FishLinkWorkbook metaWorkbook=new FishLinkWorkbook();
  createNamedRanges(metaWorkbook);
  prepareSheets(metaWorkbook,dataWorkbook,copyWorkbook);
  metaWorkbook.write(metaFile);
}
Program: 180416
Project: 180416
Buggy source:
void write(String filePath) throws XLWrapMapException {
  FileOutputStream fileOut;
  try {
    fileOut=new FileOutputStream(filePath);
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str",ex);
  }
  try {
    poiWorkbook.write(fileOut);
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str",ex);
  }
  try {
    fileOut.close();
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
void write(String filePath) throws XLWrapMapException {
  FileOutputStream fileOut;
  try {
    fileOut=new FileOutputStream(filePath);
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str" + filePath,ex);
  }
  try {
    poiWorkbook.write(fileOut);
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str" + filePath,ex);
  }
  try {
    fileOut.close();
  }
 catch (  IOException ex) {
    throw new XLWrapMapException("String_Node_Str" + filePath,ex);
  }
}
Program: 180417
Project: 180417
Buggy source:
/** 
 * @param index zero-based numerical index
 * @return alpha index
 */
public static String indexToAlpha(int index){
  String reply="String_Node_Str";
  if (index != 26) {
    char first=(char)(index + 65);
    reply=first + "String_Node_Str";
  }
 else {
    char last=(char)(index - ((index / 26) * 26) + 65);
    String rest=indexToAlpha((index / 26));
    reply=rest + last;
  }
  if (index != alphaToIndex(reply)) {
    System.out.println("String_Node_Str" + index);
    System.out.println("String_Node_Str" + reply);
    System.out.println("String_Node_Str" + alphaToIndex(reply));
    int error=1 / 0;
  }
  return reply;
}

Fixed version (ground truth):
/** 
 * @param index zero-based numerical index
 * @return alpha index
 */
public static String indexToAlpha(int index){
  String reply="String_Node_Str";
  if (index < 26) {
    char first=(char)(index + 65);
    reply=first + "String_Node_Str";
  }
 else {
    char last=(char)(index - ((index / 26) * 26) + 65);
    String rest=indexToAlpha((index / 26) - 1);
    reply=rest + last;
  }
  if (index != alphaToIndex(reply)) {
    System.err.println("String_Node_Str" + index);
    System.err.println("String_Node_Str" + reply);
    System.err.println("String_Node_Str" + alphaToIndex(reply));
    throw new AssertionError("String_Node_Str");
  }
  return reply;
}
Program: 180418
Project: 180418
Buggy source:
public void writeMap() throws IOException, XLWrapMapException, XLWrapException, XLWrapEOFException {
  System.out.println("String_Node_Str");
  File mapFile=new File(MAP_FILE_ROOT + doi + "String_Node_Str");
  BufferedWriter mapWriter=new BufferedWriter(new FileWriter(mapFile));
  writePrefix(mapWriter);
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  for (int i=0; i < sheetWrites.length; i++) {
    sheetWrites[i].writeMapping(mapWriter);
  }
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  mapWriter.newLine();
  for (int i=0; i < sheetWrites.length; i++) {
    sheetWrites[i].writeTemplate(mapWriter);
  }
  mapWriter.close();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void writeMap() throws IOException, XLWrapMapException, XLWrapException, XLWrapEOFException {
  System.out.println("String_Node_Str");
  File mapFile=new File(MAP_FILE_ROOT);
  if (!mapFile.exists()) {
    throw new XLWrapMapException("String_Node_Str" + MAP_FILE_ROOT + "String_Node_Str");
  }
  mapFile=new File(MAP_FILE_ROOT + doi + "String_Node_Str");
  BufferedWriter mapWriter=new BufferedWriter(new FileWriter(mapFile));
  writePrefix(mapWriter);
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  for (int i=0; i < sheetWrites.length; i++) {
    sheetWrites[i].writeMapping(mapWriter);
  }
  mapWriter.write("String_Node_Str");
  mapWriter.newLine();
  mapWriter.newLine();
  for (int i=0; i < sheetWrites.length; i++) {
    sheetWrites[i].writeTemplate(mapWriter);
  }
  mapWriter.close();
  System.out.println("String_Node_Str");
}