nus-yam/ex-repair huggingface dataset:
Program: 99219
Project: 99219
Buggy source:
public void draw(){
  background(0);
  map.draw();
  debugDisplay.draw();
  Location location=map.mapDisplay.getLocationFromScreenPosition(mouseX,mouseY);
  fill(215,0,0);
  text(location + "String_Node_Str",mouseX,mouseY);
  float[] xy=map.mapDisplay.getScreenPositionFromLocation(berlinLocation);
  ellipse(xy[0],xy[1],10,10);
}

Fixed version (ground truth):
public void draw(){
  background(0);
  map.draw();
  debugDisplay.draw();
  noFill();
  strokeWeight(4);
  stroke(0,0,250,150);
  float[] tl=map.mapDisplay.getScreenFromObjectPosition(0,0);
  float[] tr=map.mapDisplay.getScreenFromObjectPosition(map.mapDisplay.getWidth(),0);
  float[] br=map.mapDisplay.getScreenFromObjectPosition(map.mapDisplay.getWidth(),map.mapDisplay.getHeight());
  float[] bl=map.mapDisplay.getScreenFromObjectPosition(0,map.mapDisplay.getHeight());
  beginShape();
  vertex(tl[0],tl[1]);
  vertex(tr[0],tr[1]);
  vertex(br[0],br[1]);
  vertex(bl[0],bl[1]);
  endShape(CLOSE);
  noStroke();
  Location location=map.mapDisplay.getLocationFromScreenPosition(mouseX,mouseY);
  fill(215,0,0);
  text(location + "String_Node_Str",mouseX,mouseY);
  float[] xy=map.mapDisplay.getScreenPositionFromLocation(berlinLocation);
  ellipse(xy[0],xy[1],10,10);
}
Program: 99220
Project: 99220
Buggy source:
/** 
 * Rotates the map by given angle. Whole map will be rotated, not only the inner display.
 * @param angle The angle to rotate the map by.
 */
public void rotate(float angle){
  outerRotate(angle);
}

Fixed version (ground truth):
/** 
 * Rotates the map by given angle. Whole map will be rotated, not only the inner display.
 * @param angle The angle to rotate the map by.
 */
public void rotate(float angle){
  innerRotate(angle);
}
Program: 99221
Project: 99221
Buggy source:
public void rotateTo(float angle){
  setOuterRotate(angle);
}

Fixed version (ground truth):
public void rotateTo(float angle){
  setInnerRotate(angle);
}
Program: 99222
Project: 99222
Buggy source:
protected void innerRotate(float angle){
  mapDisplay.innerAngle+=angle;
  mapDisplay.calculateInnerMatrix();
}

Fixed version (ground truth):
public void innerRotate(float angle){
  mapDisplay.innerAngle+=angle;
  mapDisplay.calculateInnerMatrix();
}
Program: 99224
Project: 99224
Buggy source:
public Location getLocationFromInnerObjectPosition(float x,float y){
  PMatrix3D m=new PMatrix3D();
  float tl[]=new float[3];
  m.mult(new float[]{0,0,0},tl);
  float br[]=new float[3];
  m.mult(new float[]{TILE_WIDTH,TILE_HEIGHT,0},br);
  float col=(x - tl[0]) / (br[0] - tl[0]);
  float row=(y - tl[1]) / (br[1] - tl[1]);
  Coordinate coord=new Coordinate(row,col,0);
  return provider.coordinateLocation(coord);
}

Fixed version (ground truth):
public Location getLocationFromInnerObjectPosition(float x,float y){
  Coordinate coord=getCoordinateFromInnerPosition(x,y);
  return provider.coordinateLocation(coord);
}
Program: 99225
Project: 99225
Buggy source:
public MarkerManager(Map map,List<E> markers){
  this.map=map;
  this.markers=markers;
}

Fixed version (ground truth):
public MarkerManager(Map map,List<E> markers){
  this.map=map;
  addMarkers(markers);
}
Program: 99226
Project: 99226
Buggy source:
public void addMarkers(List<E> markers){
  this.markers.addAll(markers);
}

Fixed version (ground truth):
public void addMarkers(List<E> markers){
  if (this.markers == null) {
    this.markers=new ArrayList<E>();
  }
  this.markers.addAll(markers);
}
Program: 99227
Project: 99227
Buggy source:
public boolean addMarker(E marker){
  if (markers == null) {
    markers=new ArrayList<E>();
  }
  if (markers.contains(marker))   return false;
  markers.add(marker);
  return true;
}

Fixed version (ground truth):
public boolean addMarker(E marker){
  if (markers == null) {
    this.markers=new ArrayList<E>();
  }
  if (markers.contains(marker))   return false;
  markers.add(marker);
  return true;
}
Program: 99228
Project: 99228
Buggy source:
public void drawOuter(){
  for (  Marker marker : markers) {
    PGraphics pg=map.mapDisplay.getPG();
    float[] xy=map.mapDisplay.getObjectFromLocation(marker.getLocation());
    float x=xy[0];
    float y=xy[1];
    marker.drawOuter(pg,x,y);
  }
}

Fixed version (ground truth):
public void drawOuter(){
  for (  Marker marker : markers) {
    PGraphics pg=map.mapDisplay.getOuterPG();
    float[] xy=map.mapDisplay.getObjectFromLocation(marker.getLocation());
    float x=xy[0];
    float y=xy[1];
    marker.drawOuter(pg,x,y);
  }
}
Program: 99229
Project: 99229
Buggy source:
public Location getLocation(int x,int y){
  return mapDisplay.pointLocation(x,y);
}

Fixed version (ground truth):
public Location getLocation(float x,float y){
  return mapDisplay.pointLocation(x,y);
}
Program: 99230
Project: 99230
Buggy source:
public void mouseDragged(){
  for (  Map map : maps) {
    if (map.isHit(mouseX,mouseY)) {
      log.debug("String_Node_Str" + map.getId());
      Location newLocation=map.getLocation(mouseX,mouseY);
      Location oldLocation=map.getLocation(pmouseX,pmouseY);
      oldLocation.sub(newLocation);
      oldLocation.add(map.getCenter());
      PanMapEvent panMapEvent=new PanMapEvent(this,map.getId());
      panMapEvent.setLocation(oldLocation);
      panMapEvent.setTweening(false);
      eventDispatcher.fireMapEvent(panMapEvent);
    }
  }
}

Fixed version (ground truth):
public void mouseDragged(){
  for (  Map map : maps) {
    if (map.isHit(mouseX,mouseY)) {
      log.debug("String_Node_Str" + map.getId());
      PVector center=map.getScreenCenter();
      PVector mouse=new PVector(mouseX,mouseY);
      PVector pmouse=new PVector(pmouseX,pmouseY);
      pmouse.sub(mouse);
      pmouse.add(center);
      Location newCenter=map.getLocation(pmouse.x,pmouse.y);
      PanMapEvent panMapEvent=new PanMapEvent(this,map.getId());
      panMapEvent.setLocation(newCenter);
      panMapEvent.setTweening(false);
      eventDispatcher.fireMapEvent(panMapEvent);
    }
  }
}
Program: 99231
Project: 99231
Buggy source:
public void keyPressed(){
  rotateCenter=new PVector(mouseX,mouseY);
  if (key == 'r') {
    map.rotate(-0.1f,rotateCenter);
  }
 else   if (key == 'l') {
    map.rotate(0.1f,rotateCenter);
  }
}

Fixed version (ground truth):
public void keyPressed(){
  rotateCenter=new PVector(mouseX,mouseY);
  if (key == 'r') {
    map.rotate(-PI / 8,rotateCenter);
  }
 else   if (key == 'l') {
    map.rotate(PI / 8,rotateCenter);
  }
}
Program: 99232
Project: 99232
Buggy source:
public void mouseClicked(){
}

Fixed version (ground truth):
public void mouseClicked(){
  rotateCenter=new PVector(mouseX,mouseY);
}
Program: 99233
Project: 99233
Buggy source:
public void keyPressed(){
  if (key == 'r') {
    map.rotate(-0.1f);
  }
 else   if (key == 'l') {
    map.rotate(0.1f);
  }
}

Fixed version (ground truth):
public void keyPressed(){
  if (key == 'r') {
    map.rotate(-PI / 8);
  }
 else   if (key == 'l') {
    map.rotate(PI / 8);
  }
}
Program: 99234
Project: 99234
Buggy source:
public void rotate(float diffAngle){
  rotate(diffAngle,new PVector(width / 2,height / 2));
}

Fixed version (ground truth):
public void rotate(float diffAngle){
  rotate(diffAngle,new PVector(width / 2 + x,height / 2 + y));
}
Program: 99235
Project: 99235
Buggy source:
public Location getCenter(){
  return mapDisplay.pointLocation(mapDisplay.width / 2 + x,mapDisplay.height / 2 + y);
}

Fixed version (ground truth):
public Location getCenter(){
  return mapDisplay.getCenter();
}
Program: 99236
Project: 99236
Buggy source:
public void rotateTo(float angle){
  rotateTo(angle,new PVector(width / 2,height / 2));
}

Fixed version (ground truth):
public void rotateTo(float angle){
  rotateTo(angle,new PVector(width / 2 + x,height / 2 + y));
}
Program: 99237
Project: 99237
Buggy source:
public Location getLocation(int mouseX,int mouseY){
  log.debug("String_Node_Str" + id + "String_Node_Str");
  return mapDisplay.pointLocation(mouseX,mouseY);
}

Fixed version (ground truth):
public Location getLocation(int mouseX,int mouseY){
  return mapDisplay.pointLocation(mouseX,mouseY);
}
Program: 99238
Project: 99238
Buggy source:
public void keyPressed(char key,int keyCode){
  for (  Map map : maps) {
    if (map.isActive()) {
      log.debug("String_Node_Str" + key + "String_Node_Str");
      ZoomMapEvent zoomMapEvent=new ZoomMapEvent(this,map.getId());
      if (key == '+') {
        zoomMapEvent.setSubType(ZoomMapEvent.ZOOM_BY);
        zoomMapEvent.setZoomLevelDelta(1);
      }
 else       if (key == '-') {
        zoomMapEvent.setSubType(ZoomMapEvent.ZOOM_BY);
        zoomMapEvent.setZoomLevelDelta(-1);
      }
      eventDispatcher.fireMapEvent(zoomMapEvent);
    }
  }
}

Fixed version (ground truth):
public void keyPressed(char key,int keyCode){
  for (  Map map : maps) {
    if (map.isActive()) {
      log.debug("String_Node_Str" + key + "String_Node_Str");
      ZoomMapEvent zoomMapEvent=new ZoomMapEvent(this,map.getId());
      if (key == '+') {
        zoomMapEvent.setSubType(ZoomMapEvent.ZOOM_BY);
        zoomMapEvent.setZoomLevelDelta(1);
        eventDispatcher.fireMapEvent(zoomMapEvent);
      }
 else       if (key == '-') {
        zoomMapEvent.setSubType(ZoomMapEvent.ZOOM_BY);
        zoomMapEvent.setZoomLevelDelta(-1);
        eventDispatcher.fireMapEvent(zoomMapEvent);
      }
    }
  }
}
Program: 99239
Project: 99239
Buggy source:
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.groupPrincipal,new String());
}

Fixed version (ground truth):
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.groupPrincipal,"String_Node_Str");
}
Program: 99240
Project: 99240
Buggy source:
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.rolePrincipal,new String());
}

Fixed version (ground truth):
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.rolePrincipal,"String_Node_Str");
}
Program: 99241
Project: 99241
Buggy source:
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.userPrincipal,new String());
}

Fixed version (ground truth):
/** 
 * Equals_other object.
 */
@Test public void equals_otherObject(){
  Assert.assertNotEquals(this.userPrincipal,"String_Node_Str");
}
Program: 99242
Project: 99242
Buggy source:
/** 
 * Test role format sid.
 * @throws LoginException the login exception
 */
@Test public void testRoleFormatSid() throws LoginException {
  final Subject subject=new Subject();
  final UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler(WindowsAccountImpl.getCurrentUsername(),"String_Node_Str");
  final Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  this.loginModule.initialize(subject,callbackHandler,null,options);
  Assert.assertTrue(this.loginModule.login());
  Assert.assertTrue(this.loginModule.commit());
  Assert.assertEquals(2,subject.getPrincipals().size());
  Assert.assertTrue(subject.getPrincipals().contains(new GroupPrincipal("String_Node_Str")));
  for (  final Principal principal : subject.getPrincipals()) {
    if (principal instanceof GroupPrincipal) {
      int size=0;
      Enumeration<? extends Principal> groupPrincipal=((GroupPrincipal)principal).members();
      while (groupPrincipal.hasMoreElements()) {
        groupPrincipal.nextElement().getName().startsWith("String_Node_Str");
        size++;
      }
      Assert.assertEquals(2,size);
    }
 else {
      Assert.assertTrue(principal.getName().equals(WindowsAccountImpl.getCurrentUsername()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Test role format sid.
 * @throws LoginException the login exception
 */
@Test public void testRoleFormatSid() throws LoginException {
  final Subject subject=new Subject();
  final UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler(WindowsAccountImpl.getCurrentUsername(),"String_Node_Str");
  final Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  this.loginModule.initialize(subject,callbackHandler,null,options);
  Assert.assertTrue(this.loginModule.login());
  Assert.assertTrue(this.loginModule.commit());
  Assert.assertEquals(2,subject.getPrincipals().size());
  Assert.assertTrue(subject.getPrincipals().contains(new GroupPrincipal("String_Node_Str")));
  for (  final Principal principal : subject.getPrincipals()) {
    if (principal instanceof GroupPrincipal) {
      int size=0;
      Enumeration<? extends Principal> groupPrincipal=((GroupPrincipal)principal).members();
      while (groupPrincipal.hasMoreElements()) {
        if (groupPrincipal.nextElement().getName().startsWith("String_Node_Str")) {
          size++;
        }
      }
      Assert.assertEquals(2,size);
    }
 else {
      Assert.assertTrue(principal.getName().equals(WindowsAccountImpl.getCurrentUsername()));
    }
  }
}
Program: 99245
Project: 99245
Buggy source:
private boolean post(final Request request,final Response response){
  final String username=request.getParameter("String_Node_Str");
  final String password=request.getParameter("String_Node_Str");
  this.log.debug("String_Node_Str",username);
  IWindowsIdentity windowsIdentity;
  try {
    windowsIdentity=this.auth.logonUser(username,password);
  }
 catch (  Exception e) {
    this.log.error(e.getMessage());
    this.log.trace("String_Node_Str",e);
    return false;
  }
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    this.log.warn("String_Node_Str",windowsIdentity.getFqn());
    return false;
  }
  try {
    this.log.debug("String_Node_Str",username,windowsIdentity.getSidString());
    final GenericWindowsPrincipal windowsPrincipal=new GenericWindowsPrincipal(windowsIdentity,this.context.getRealm(),this.principalFormat,this.roleFormat);
    this.log.debug("String_Node_Str",windowsPrincipal.getRolesString());
    final HttpSession session=request.getSession(true);
    this.log.debug("String_Node_Str",session.getId());
    register(request,response,windowsPrincipal,"String_Node_Str",windowsPrincipal.getName(),null);
    this.log.info("String_Node_Str",windowsPrincipal.getName());
  }
  finally {
    windowsIdentity.dispose();
  }
  return true;
}

Fixed version (ground truth):
private boolean post(final Request request,final Response response){
  final String username=request.getParameter("String_Node_Str");
  final String password=request.getParameter("String_Node_Str");
  this.log.debug("String_Node_Str",username);
  IWindowsIdentity windowsIdentity;
  try {
    windowsIdentity=this.auth.logonUser(username,password);
  }
 catch (  Exception e) {
    this.log.error(e.getMessage());
    this.log.trace("String_Node_Str",e);
    return false;
  }
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    this.log.warn("String_Node_Str",windowsIdentity.getFqn());
    return false;
  }
  try {
    this.log.debug("String_Node_Str",username,windowsIdentity.getSidString());
    final GenericWindowsPrincipal windowsPrincipal=new GenericWindowsPrincipal(windowsIdentity,this.context.getRealm(),this.principalFormat,this.roleFormat);
    this.log.debug("String_Node_Str",windowsPrincipal.getRolesString());
    final HttpSession session=request.getSession(true);
    this.log.debug("String_Node_Str",session == null ? "String_Node_Str" : session.getId());
    register(request,response,windowsPrincipal,"String_Node_Str",windowsPrincipal.getName(),null);
    this.log.info("String_Node_Str",windowsPrincipal.getName());
  }
  finally {
    windowsIdentity.dispose();
  }
  return true;
}
Program: 99247
Project: 99247
Buggy source:
public void testLogin() throws LoginException {
  Subject subject=new Subject();
  UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler(WindowsAccountImpl.getCurrentUsername(),"String_Node_Str");
  Map<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  _loginModule.initialize(subject,callbackHandler,null,options);
  assertTrue(_loginModule.login());
  assertEquals(0,subject.getPrincipals().size());
  assertTrue(_loginModule.commit());
  assertEquals(3,subject.getPrincipals().size());
  assertTrue(subject.getPrincipals().contains("String_Node_Str"));
  assertTrue(subject.getPrincipals().contains("String_Node_Str"));
  assertTrue(subject.getPrincipals().contains(WindowsAccountImpl.getCurrentUsername()));
  assertTrue(_loginModule.logout());
  assertTrue(subject.getPrincipals().size() == 0);
}

Fixed version (ground truth):
public void testLogin() throws LoginException {
  Subject subject=new Subject();
  UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler(WindowsAccountImpl.getCurrentUsername(),"String_Node_Str");
  Map<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  _loginModule.initialize(subject,callbackHandler,null,options);
  assertTrue(_loginModule.login());
  assertEquals(0,subject.getPrincipals().size());
  assertTrue(_loginModule.commit());
  assertEquals(3,subject.getPrincipals().size());
  assertTrue(subject.getPrincipals().contains(new RolePrincipal("String_Node_Str")));
  assertTrue(subject.getPrincipals().contains(new RolePrincipal("String_Node_Str")));
  assertTrue(subject.getPrincipals().contains(new UserPrincipal(WindowsAccountImpl.getCurrentUsername())));
  assertTrue(_loginModule.logout());
  assertTrue(subject.getPrincipals().size() == 0);
}
Program: 99248
Project: 99248
Buggy source:
public void testGuestLogin() throws LoginException {
  Subject subject=new Subject();
  UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler("String_Node_Str","String_Node_Str");
  Map<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  _loginModule.initialize(subject,callbackHandler,null,options);
  assertTrue(_loginModule.getAllowGuestLogin());
  assertTrue(_loginModule.login());
  assertEquals(0,subject.getPrincipals().size());
  assertTrue(_loginModule.commit());
  assertEquals(3,subject.getPrincipals().size());
  assertTrue(subject.getPrincipals().contains("String_Node_Str"));
  assertTrue(subject.getPrincipals().contains("String_Node_Str"));
  _loginModule.setAllowGuestLogin(false);
  try {
    assertTrue(_loginModule.login());
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    assertTrue(e instanceof LoginException);
  }
}

Fixed version (ground truth):
public void testGuestLogin() throws LoginException {
  Subject subject=new Subject();
  UsernamePasswordCallbackHandler callbackHandler=new UsernamePasswordCallbackHandler("String_Node_Str","String_Node_Str");
  Map<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  _loginModule.initialize(subject,callbackHandler,null,options);
  assertTrue(_loginModule.getAllowGuestLogin());
  assertTrue(_loginModule.login());
  assertEquals(0,subject.getPrincipals().size());
  assertTrue(_loginModule.commit());
  assertEquals(3,subject.getPrincipals().size());
  assertTrue(subject.getPrincipals().contains(new RolePrincipal("String_Node_Str")));
  assertTrue(subject.getPrincipals().contains(new RolePrincipal("String_Node_Str")));
  _loginModule.setAllowGuestLogin(false);
  try {
    assertTrue(_loginModule.login());
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    assertTrue(e instanceof LoginException);
  }
}
Program: 99249
Project: 99249
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o instanceof String) {
    return getName().equals(o);
  }
  if (o instanceof RolePrincipal) {
    return getName().equals(((RolePrincipal)o).getName());
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o instanceof RolePrincipal) {
    return getName().equals(((RolePrincipal)o).getName());
  }
  return false;
}
Program: 99250
Project: 99250
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o instanceof String) {
    return getName().equals(o);
  }
  if (o instanceof UserPrincipal) {
    return getName().equals(((UserPrincipal)o).getName());
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o instanceof UserPrincipal) {
    return getName().equals(((UserPrincipal)o).getName());
  }
  return false;
}
Program: 99251
Project: 99251
Buggy source:
public void testIsSerializable() throws IOException, ClassNotFoundException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  ObjectOutputStream oos=new ObjectOutputStream(out);
  oos.writeObject(_windowsPrincipal);
  oos.close();
  assertTrue(out.toByteArray().length > 0);
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  ObjectInputStream ois=new ObjectInputStream(in);
  Object o=ois.readObject();
  WindowsPrincipal copy=(WindowsPrincipal)o;
  assertEquals(_windowsPrincipal.getName(),copy.getName());
  assertEquals(_windowsPrincipal.getRolesString(),copy.getRolesString());
  assertEquals(_windowsPrincipal.getSidString(),copy.getSidString());
  assertEquals(_windowsPrincipal.getSid(),copy.getSid());
}

Fixed version (ground truth):
public void testIsSerializable() throws IOException, ClassNotFoundException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  ObjectOutputStream oos=new ObjectOutputStream(out);
  oos.writeObject(_windowsPrincipal);
  oos.close();
  assertTrue(out.toByteArray().length > 0);
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  ObjectInputStream ois=new ObjectInputStream(in);
  Object o=ois.readObject();
  WindowsPrincipal copy=(WindowsPrincipal)o;
  assertEquals(_windowsPrincipal.getName(),copy.getName());
  assertEquals(_windowsPrincipal.getRolesString(),copy.getRolesString());
  assertEquals(_windowsPrincipal.getSidString(),copy.getSidString());
  assertEquals(Arrays.equals(_windowsPrincipal.getSid(),copy.getSid()),true);
}
Program: 99252
Project: 99252
Buggy source:
public void testIsSerializable() throws IOException, ClassNotFoundException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  ObjectOutputStream oos=new ObjectOutputStream(out);
  oos.writeObject(_windowsPrincipal);
  oos.close();
  assertTrue(out.toByteArray().length > 0);
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  ObjectInputStream ois=new ObjectInputStream(in);
  Object o=ois.readObject();
  WindowsPrincipal copy=(WindowsPrincipal)o;
  assertEquals(_windowsPrincipal.getName(),copy.getName());
  assertEquals(_windowsPrincipal.getRolesString(),copy.getRolesString());
  assertEquals(_windowsPrincipal.getSidString(),copy.getSidString());
  assertEquals(_windowsPrincipal.getSid(),copy.getSid());
}

Fixed version (ground truth):
public void testIsSerializable() throws IOException, ClassNotFoundException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  ObjectOutputStream oos=new ObjectOutputStream(out);
  oos.writeObject(_windowsPrincipal);
  oos.close();
  assertTrue(out.toByteArray().length > 0);
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  ObjectInputStream ois=new ObjectInputStream(in);
  Object o=ois.readObject();
  WindowsPrincipal copy=(WindowsPrincipal)o;
  assertEquals(_windowsPrincipal.getName(),copy.getName());
  assertEquals(_windowsPrincipal.getRolesString(),copy.getRolesString());
  assertEquals(_windowsPrincipal.getSidString(),copy.getSidString());
  assertEquals(Arrays.equals(_windowsPrincipal.getSid(),copy.getSid()),true);
}
Program: 99253
Project: 99253
Buggy source:
/** 
 * Return output format (list of fields), given input format   {@code format}. Intermediaries should call   {@code modifyOutputFormat(format)} on nestedprocessor first, then make appropriate changes to it if they add/remove fields.
 * @param format input format
 * @return output format
 * @see CDXFieldConstants
 */
public FieldSplitFormat modifyOutputFormat(FieldSplitFormat format);

Fixed version (ground truth):
/** 
 * Return output format (list of fields), given input format   {@code format}. Intermediaries should call   {@code modifyOutputFormat(format)} on nestedprocessor first, then make appropriate changes to it if they add/remove fields.
 * @param format input format
 * @return output format
 */
public FieldSplitFormat modifyOutputFormat(FieldSplitFormat format);
Program: 99254
Project: 99254
Buggy source:
/** 
 * Return name of this exclusion context.
 * @return
 */
public String getCollectionContextName();

Fixed version (ground truth):
/** 
 * Return name of this exclusion context.
 * @return the name of this exclusion context
 */
public String getCollectionContextName();
Program: 99255
Project: 99255
Buggy source:
private static String getDaysInMonthBound(int year,int month){
  Calendar cal=Calendar.getInstance(TimeZone.getTimeZone("String_Node_Str"));
  cal.set(Calendar.YEAR,year);
  cal.set(Calendar.MONTH,month);
  return new Integer(cal.getActualMaximum(Calendar.DAY_OF_MONTH)).toString();
}

Fixed version (ground truth):
private static String getDaysInMonthBound(int year,int month){
  Calendar cal=Calendar.getInstance(TimeZone.getTimeZone("String_Node_Str"));
  cal.set(Calendar.YEAR,year);
  cal.set(Calendar.MONTH,month);
  cal.set(Calendar.DAY_OF_MONTH,1);
  return new Integer(cal.getActualMaximum(Calendar.DAY_OF_MONTH)).toString();
}
Program: 99256
Project: 99256
Buggy source:
@SuppressWarnings("String_Node_Str") public String[] nameToUrls(String name) throws IOException {
  ArrayList<String> urls=new ArrayList<String>();
  String prefix=name + delimiter;
  Iterator<String> itr=flatFile.getRecordIterator(prefix);
  while (itr.hasNext()) {
    String line=itr.next();
    if (line.startsWith(prefix)) {
      urls.add(line.substring(prefix.length()));
    }
 else {
      break;
    }
  }
  if (urls.size() == 0 && name.indexOf("String_Node_Str") == -1 && !name.endsWith("String_Node_Str")) {
    prefix=name + "String_Node_Str" + delimiter;
    itr=flatFile.getRecordIterator(prefix + "String_Node_Str");
    while (itr.hasNext()) {
      String line=itr.next();
      if (line.startsWith(prefix)) {
        urls.add(line.substring(prefix.length()));
      }
 else {
        break;
      }
    }
  }
  if (itr instanceof CloseableIterator) {
    CloseableIterator<String> citr=(CloseableIterator<String>)itr;
    citr.close();
  }
  if (urls.size() == 0) {
    LOGGER.info("String_Node_Str" + name + "String_Node_Str"+ path);
  }
  String[] a=new String[urls.size()];
  for (int i=0; i < urls.size(); i++) {
    a[i]=urls.get(i);
  }
  return a;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public String[] nameToUrls(String name) throws IOException {
  ArrayList<String> urls=new ArrayList<String>();
  String prefix=name + delimiter;
  Iterator<String> itr=flatFile.getRecordIterator(prefix);
  while (itr.hasNext()) {
    String line=itr.next();
    if (line.startsWith(prefix)) {
      urls.add(line.substring(prefix.length()));
    }
 else {
      break;
    }
  }
  if (urls.size() == 0 && name.indexOf("String_Node_Str") == -1 && !name.endsWith("String_Node_Str")) {
    prefix=name + "String_Node_Str" + delimiter;
    itr=flatFile.getRecordIterator(prefix + "String_Node_Str");
    while (itr.hasNext()) {
      String line=itr.next();
      if (line.startsWith(prefix)) {
        urls.add(line.substring(prefix.length()));
      }
 else {
        break;
      }
    }
  }
 else   if (name.indexOf("String_Node_Str") == -1 && name.endsWith("String_Node_Str")) {
    prefix=name.substring(0,name.length() - 1) + delimiter;
    itr=flatFile.getRecordIterator(prefix + "String_Node_Str");
    while (itr.hasNext()) {
      String line=itr.next();
      if (line.startsWith(prefix)) {
        urls.add(line.substring(prefix.length()));
      }
 else {
        break;
      }
    }
  }
  if (itr instanceof CloseableIterator) {
    CloseableIterator<String> citr=(CloseableIterator<String>)itr;
    citr.close();
  }
  if (urls.size() == 0) {
    LOGGER.info("String_Node_Str" + name + "String_Node_Str"+ path);
  }
  String[] a=new String[urls.size()];
  for (int i=0; i < urls.size(); i++) {
    a[i]=urls.get(i);
  }
  return a;
}
Program: 99257
Project: 99257
Buggy source:
/** 
 * Returns true if this Canonicalizer returns SURTs, false is URLs
 * @return
 */
public boolean isSurtForm();

Fixed version (ground truth):
/** 
 * Returns true if this Canonicalizer returns SURTs, false is URLs
 * @return <b>true</b> if SURTs are returned <b>false</b> otherwise.
 */
public boolean isSurtForm();
Program: 99258
Project: 99258
Buggy source:
/** 
 * Does this policy effectively allow everything? (No  disallows or timing (crawl-delay) directives?)
 * @return
 */
public boolean allowsAll(){
  return agentsToDirectives.isEmpty();
}

Fixed version (ground truth):
/** 
 * Does this policy effectively allow everything? (No  disallows or timing (crawl-delay) directives?)
 * @return <b>true</b> if the map containing user-agents to directives is empty, <b>false</b> otherwise.
 */
public boolean allowsAll(){
  return agentsToDirectives.isEmpty();
}
Program: 99259
Project: 99259
Buggy source:
public int filterObject(CaptureSearchResult r){
  if (!notifiedSeen) {
    if (filterGroup != null) {
      filterGroup.setSawAdministrative();
    }
    notifiedSeen=true;
  }
  String surt;
  try {
    String url=canonicalizer.urlStringToKey(r.getOriginalUrl());
    surt=SURT.fromPlain(url);
  }
 catch (  URIException e) {
    return FILTER_EXCLUDE;
  }
  if (lastChecked != null) {
    if (lastChecked.equals(surt)) {
      if (lastCheckedExcluded) {
        return ObjectFilter.FILTER_EXCLUDE;
      }
 else {
        return ObjectFilter.FILTER_INCLUDE;
      }
    }
  }
  lastChecked=surt;
  lastCheckedExcluded=isExcluded(surt);
  if (lastCheckedExcluded) {
    return ObjectFilter.FILTER_EXCLUDE;
  }
 else {
    if (!notifiedPassed) {
      if (filterGroup != null) {
        filterGroup.setPassedAdministrative();
      }
      notifiedPassed=true;
    }
    return ObjectFilter.FILTER_INCLUDE;
  }
}

Fixed version (ground truth):
@Override public int filterObject(CaptureSearchResult r){
  if (!notifiedSeen) {
    if (filterGroup != null) {
      filterGroup.setSawAdministrative();
    }
    notifiedSeen=true;
  }
  String surt;
  try {
    String url=canonicalizer.urlStringToKey(r.getOriginalUrl());
    surt=SURT.fromPlain(url);
  }
 catch (  URIException e) {
    return FILTER_EXCLUDE;
  }
  if (lastChecked != null) {
    if (lastChecked.equals(surt)) {
      if (lastCheckedExcluded) {
        return ObjectFilter.FILTER_EXCLUDE;
      }
 else {
        return ObjectFilter.FILTER_INCLUDE;
      }
    }
  }
  lastChecked=surt;
  lastCheckedExcluded=isExcluded(surt);
  if (lastCheckedExcluded) {
    return ObjectFilter.FILTER_EXCLUDE;
  }
 else {
    if (!notifiedPassed) {
      if (filterGroup != null) {
        filterGroup.setPassedAdministrative();
      }
      notifiedPassed=true;
    }
    return ObjectFilter.FILTER_INCLUDE;
  }
}
Program: 99260
Project: 99260
Buggy source:
/** 
 * @param map where each String key is a SURT that is blocked.
 */
public StaticListExclusionFilter(TreeSet<String> exclusions,UrlCanonicalizer canonicalizer){
  this.exclusions=exclusions;
  this.canonicalizer=canonicalizer;
}

Fixed version (ground truth):
/** 
 * @param exclusions
 * @param canonicalizer
 */
public StaticListExclusionFilter(TreeSet<String> exclusions,UrlCanonicalizer canonicalizer){
  this.exclusions=exclusions;
  this.canonicalizer=canonicalizer;
}
Program: 99262
Project: 99262
Buggy source:
public String makeReplayURI(String datespec,String url){
  String suffix=datespec + context + "String_Node_Str"+ url;
  String prefix=converter.getReplayURIPrefix();
  if (prefix == null) {
    return suffix;
  }
 else {
    if (url.startsWith(prefix)) {
      return url;
    }
    return prefix + suffix;
  }
}

Fixed version (ground truth):
@Override public String makeReplayURI(String datespec,String url){
  String suffix=datespec + context + "String_Node_Str"+ url;
  String prefix=converter.getReplayURIPrefix();
  if (prefix == null) {
    return suffix;
  }
 else {
    if (url.startsWith(prefix)) {
      return url;
    }
    return prefix + suffix;
  }
}
Program: 99263
Project: 99263
Buggy source:
/** 
 * @param converter ArchivalUrlResultURIConverter to wrap
 * @param context flags indicating the context of URLs created by thisobject
 */
public ArchivalUrlSpecialContextResultURIConverter(String context){
  this.context=context;
}

Fixed version (ground truth):
/** 
 * @param context flags indicating the context of URLs created by thisobject
 */
public ArchivalUrlSpecialContextResultURIConverter(String context){
  this.context=context;
}
Program: 99264
Project: 99264
Buggy source:
public ResultURIConverter getContextConverter(String flags){
  if (flags == null) {
    return converter;
  }
  return new ArchivalUrlSpecialContextResultURIConverter(flags);
}

Fixed version (ground truth):
@Override public ResultURIConverter getContextConverter(String flags){
  if (flags == null) {
    return converter;
  }
  return new ArchivalUrlSpecialContextResultURIConverter(flags);
}
Program: 99265
Project: 99265
Buggy source:
/** 
 * @param endJsp the path to the JSP to execute and include at the startof the document
 */
public void setStartJsp(String startJsp){
  this.startJsp=startJsp;
}

Fixed version (ground truth):
/** 
 * @param startJsp The path to the JSP to execute and include at the startof the document
 */
public void setStartJsp(String startJsp){
  this.startJsp=startJsp;
}
Program: 99266
Project: 99266
Buggy source:
public void handleParseStart(ParseContext pContext) throws IOException {
  ReplayParseContext context=(ReplayParseContext)pContext;
  String policy=context.getJspExec().getUiResults().getResult().getOraclePolicy();
  if (policy != null) {
    context.setOraclePolicy(policy);
  }
  if (startJsp != null) {
    OutputStream out=context.getOutputStream();
    String tmp=null;
    try {
      tmp=context.getJspExec().jspToString(startJsp);
    }
 catch (    ServletException e) {
      e.printStackTrace();
    }
    if (tmp != null) {
      String charset=context.getOutputCharset();
      out.write(tmp.getBytes(charset));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param pContext
 * @throws IOException
 */
@Override public void handleParseStart(ParseContext pContext) throws IOException {
  ReplayParseContext context=(ReplayParseContext)pContext;
  String policy=context.getJspExec().getUiResults().getResult().getOraclePolicy();
  if (policy != null) {
    context.setOraclePolicy(policy);
  }
  if (startJsp != null) {
    OutputStream out=context.getOutputStream();
    String tmp=null;
    try {
      tmp=context.getJspExec().jspToString(startJsp);
    }
 catch (    ServletException e) {
      e.printStackTrace();
    }
    if (tmp != null) {
      String charset=context.getOutputCharset();
      out.write(tmp.getBytes(charset));
    }
  }
}
Program: 99267
Project: 99267
Buggy source:
public void handleParseComplete(ParseContext pContext) throws IOException {
  if (endJsp != null && pContext.isInHTML()) {
    ReplayParseContext context=(ReplayParseContext)pContext;
    OutputStream out=context.getOutputStream();
    String tmp=null;
    try {
      tmp=context.getJspExec().jspToString(endJsp);
    }
 catch (    ServletException e) {
      e.printStackTrace();
    }
    if (tmp != null) {
      String charset=context.getOutputCharset();
      out.write(tmp.getBytes(charset));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param pContext
 * @throws IOException
 */
@Override public void handleParseComplete(ParseContext pContext) throws IOException {
  if (endJsp != null && pContext.isInHTML()) {
    ReplayParseContext context=(ReplayParseContext)pContext;
    OutputStream out=context.getOutputStream();
    String tmp=null;
    try {
      tmp=context.getJspExec().jspToString(endJsp);
    }
 catch (    ServletException e) {
      e.printStackTrace();
    }
    if (tmp != null) {
      String charset=context.getOutputCharset();
      out.write(tmp.getBytes(charset));
    }
  }
}
Program: 99270
Project: 99270
Buggy source:
/** 
 * @param prefix
 * @return an absolute String URL that will point to the root of theserver that is handling the request. 
 * @deprecated use AccessPoint.get*Prefix
 */
public String getServerPrefix(){
  if (accessPoint == null) {
    return "String_Node_Str";
  }
  return accessPoint.getQueryPrefix();
}

Fixed version (ground truth):
/** 
 * @return an absolute String URL that will point to the root of theserver that is handling the request. 
 * @deprecated use AccessPoint.get*Prefix
 */
public String getServerPrefix(){
  if (accessPoint == null) {
    return "String_Node_Str";
  }
  return accessPoint.getQueryPrefix();
}
Program: 99271
Project: 99271
Buggy source:
/** 
 * @return
 * @deprecated
 */
public Set<String> keySet(){
  return filters.keySet();
}

Fixed version (ground truth):
/** 
 * @return A set containing all the keys in the request filter HashMap.
 * @deprecated
 */
public Set<String> keySet(){
  return filters.keySet();
}
Program: 99272
Project: 99272
Buggy source:
/** 
 * @return
 */
public String getHostPort(){
  return dprp.getHostPort();
}

Fixed version (ground truth):
/** 
 * @return The host port used.
 */
public String getHostPort(){
  return dprp.getHostPort();
}
Program: 99273
Project: 99273
Buggy source:
protected RequestParser[] getRequestParsers(){
  RequestParser[] theParsers={dprp,new OpenSearchRequestParser(this),new FormRequestParser(this)};
  return theParsers;
}

Fixed version (ground truth):
/** 
 * @return An array of all available {@link RequestParser}s.
 */
@Override protected RequestParser[] getRequestParsers(){
  RequestParser[] theParsers={dprp,new OpenSearchRequestParser(this),new FormRequestParser(this)};
  return theParsers;
}
Program: 99274
Project: 99274
Buggy source:
/** 
 * @param hostPort
 */
public void setHostPort(String hostPort){
  dprp.setHostPort(hostPort);
}

Fixed version (ground truth):
/** 
 * @param hostPort The host port to use.
 */
public void setHostPort(String hostPort){
  dprp.setHostPort(hostPort);
}
Program: 99275
Project: 99275
Buggy source:
public void setHosts(List<String> hosts){
  this.hosts=new HashMap<String,Object>();
  for (  String host : hosts) {
    this.hosts.put(host,null);
  }
}

Fixed version (ground truth):
/** 
 * @param hosts
 */
public void setHosts(List<String> hosts){
  this.hosts=new HashMap<String,Object>();
  for (  String host : hosts) {
    this.hosts.put(host,null);
  }
}
Program: 99276
Project: 99276
Buggy source:
public void setJspHandler(String jspHandler){
  this.jspHandler=jspHandler;
}

Fixed version (ground truth):
/** 
 * @param jspHandler The JSP handler to use.
 */
public void setJspHandler(String jspHandler){
  this.jspHandler=jspHandler;
}
Program: 99277
Project: 99277
Buggy source:
public String getJspHandler(){
  return jspHandler;
}

Fixed version (ground truth):
/** 
 * @return The JSP handler being used.
 */
public String getJspHandler(){
  return jspHandler;
}
Program: 99278
Project: 99278
Buggy source:
/** 
 * @param exception
 * @param wbRequest
 * @return
 */
private String getCustomHandler(WaybackException exception,WaybackRequest wbRequest){
  if ((exception instanceof ResourceNotInArchiveException) && wbRequest.isReplayRequest()) {
    String url=wbRequest.getRequestUrl();
    String host=UrlOperations.urlToHost(url);
    if (hosts.containsKey(host)) {
      return jspHandler;
    }
  }
  return null;
}

Fixed version (ground truth):
private String getCustomHandler(WaybackException exception,WaybackRequest wbRequest){
  if ((exception instanceof ResourceNotInArchiveException) && wbRequest.isReplayRequest()) {
    String url=wbRequest.getRequestUrl();
    String host=UrlOperations.urlToHost(url);
    if (hosts.containsKey(host)) {
      return jspHandler;
    }
  }
  return null;
}
Program: 99279
Project: 99279
Buggy source:
public List<String> getHosts(){
  return null;
}

Fixed version (ground truth):
/** 
 * @return This method currently always returns <b>null</b>.
 */
public List<String> getHosts(){
  return null;
}
Program: 99280
Project: 99280
Buggy source:
/** 
 * @param list
 * @return
 */
private static List<Partition<CaptureSearchResult>> splitToDays(Partition<CaptureSearchResult> month){
  CaptureSearchResultPartitionMap map=new CaptureSearchResultPartitionMap();
  Partitioner<CaptureSearchResult> partitioner=new Partitioner<CaptureSearchResult>(map);
  PartitionSize daySize=Partitioner.daySize;
  List<Partition<CaptureSearchResult>> days=partitioner.getRange(daySize,month.getStart(),month.getEnd());
  partitioner.populate(days,month.iterator());
  return days;
}

Fixed version (ground truth):
/** 
 * @param list
 * @return The input lis split into day intervals.
 */
private static List<Partition<CaptureSearchResult>> splitToDays(Partition<CaptureSearchResult> month){
  CaptureSearchResultPartitionMap map=new CaptureSearchResultPartitionMap();
  Partitioner<CaptureSearchResult> partitioner=new Partitioner<CaptureSearchResult>(map);
  PartitionSize daySize=Partitioner.daySize;
  List<Partition<CaptureSearchResult>> days=partitioner.getRange(daySize,month.getStart(),month.getEnd());
  partitioner.populate(days,month.iterator());
  return days;
}
Program: 99281
Project: 99281
Buggy source:
/** 
 * @param resource
 * @param result
 * @param uriConverter
 * @param filter 
 * @return
 */
public static Map<String,String> processHeaders(Resource resource,CaptureSearchResult result,ResultURIConverter uriConverter,HttpHeaderProcessor filter){
  HashMap<String,String> output=new HashMap<String,String>();
  Map<String,String> headers=resource.getHttpHeaders();
  if (headers != null) {
    Iterator<String> itr=headers.keySet().iterator();
    while (itr.hasNext()) {
      String key=itr.next();
      String value=headers.get(key);
      value=(value == null) ? "String_Node_Str" : value;
      filter.filter(output,key,value,uriConverter,result);
    }
  }
  return output;
}

Fixed version (ground truth):
/** 
 * @param resource
 * @param result
 * @param uriConverter
 * @param filter 
 * @return A HashMap containing the HTTP headers extracted from the Resource.
 */
public static Map<String,String> processHeaders(Resource resource,CaptureSearchResult result,ResultURIConverter uriConverter,HttpHeaderProcessor filter){
  HashMap<String,String> output=new HashMap<String,String>();
  Map<String,String> headers=resource.getHttpHeaders();
  if (headers != null) {
    Iterator<String> itr=headers.keySet().iterator();
    while (itr.hasNext()) {
      String key=itr.next();
      String value=headers.get(key);
      value=(value == null) ? "String_Node_Str" : value;
      filter.filter(output,key,value,uriConverter,result);
    }
  }
  return output;
}
Program: 99282
Project: 99282
Buggy source:
/** 
 * @param httpHeaderProcessor
 */
public ReplayRendererDecorator(ReplayRenderer decorated){
  this.decorated=decorated;
}

Fixed version (ground truth):
/** 
 * @param decorated
 */
public ReplayRendererDecorator(ReplayRenderer decorated){
  this.decorated=decorated;
}
Program: 99283
Project: 99283
Buggy source:
public abstract void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource resource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException, WaybackException ;

Fixed version (ground truth):
@Override public abstract void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource resource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException, WaybackException ;
Program: 99284
Project: 99284
Buggy source:
public void testTransform() throws Exception {
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  st.transform(rc,input);
  assertEquals(4,rc.got.size());
  assertEquals("String_Node_Str",rc.got.get(0));
  assertEquals("String_Node_Str",rc.got.get(1));
  assertEquals("String_Node_Str",rc.got.get(2));
  assertEquals("String_Node_Str",rc.got.get(3));
}

Fixed version (ground truth):
public void testTransform() throws Exception {
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  st.transform(rc,input);
  assertEquals(4,rc.got.size());
  assertTrue(rc.got.contains("String_Node_Str"));
  assertTrue(rc.got.contains("String_Node_Str"));
  assertTrue(rc.got.contains("String_Node_Str"));
  assertTrue(rc.got.contains("String_Node_Str"));
}
Program: 99285
Project: 99285
Buggy source:
public void testRewriteHttpsOnly() throws Exception {
  rc.setRewriteHttpsOnly(true);
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  st.transform(rc,input);
  assertEquals(2,rc.got.size());
  assertEquals("String_Node_Str",rc.got.get(0));
  assertEquals("String_Node_Str",rc.got.get(1));
}

Fixed version (ground truth):
public void testRewriteHttpsOnly() throws Exception {
  rc.setRewriteHttpsOnly(true);
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  st.transform(rc,input);
  assertEquals(2,rc.got.size());
  assertTrue(rc.got.contains("String_Node_Str"));
  assertTrue(rc.got.contains("String_Node_Str"));
}
Program: 99286
Project: 99286
Buggy source:
/** 
 * {@code rewriteHttpsOnly} property is used to limit URL rewriteto HTTPS ones (intended for proxy mode). That should affect how StringTransformer picks up URLs in text for translation.
 * @throws Exception
 */
public void testRewriteHttpsOnly() throws Exception {
  rc.setRewriteHttpsOnly(true);
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  jst.transform(rc,input);
  assertEquals(2,rc.got.size());
  assertEquals("String_Node_Str",rc.got.get(0));
  assertEquals("String_Node_Str",rc.got.get(1));
}

Fixed version (ground truth):
/** 
 * {@code rewriteHttpsOnly} property is used to limit URL rewriteto HTTPS ones (intended for proxy mode). That should affect how StringTransformer picks up URLs in text for translation.
 * @throws Exception
 */
public void testRewriteHttpsOnly() throws Exception {
  rc.setRewriteHttpsOnly(true);
  final String input="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  jst.transform(rc,input);
  assertEquals(2,rc.got.size());
  assertTrue(rc.got.contains("String_Node_Str"));
  assertTrue(rc.got.contains("String_Node_Str"));
}
Program: 99287
Project: 99287
Buggy source:
@Override protected void updatePage(TextDocument page,HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource resource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException {
  page.resolveCSSUrls();
  List<String> jspInserts=getJspInserts();
  StringBuilder toInsert=new StringBuilder(300);
  if (jspInserts != null) {
    Iterator<String> itr=jspInserts.iterator();
    while (itr.hasNext()) {
      toInsert.append(page.includeJspString(itr.next(),httpRequest,httpResponse,wbRequest,results,result,resource));
    }
  }
  page.insertAtStartOfDocument(toInsert.toString());
}

Fixed version (ground truth):
@Override protected void updatePage(TextDocument page,HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource resource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException {
  page.resolveCSSUrls();
  List<String> jspInserts=getJspInserts();
  StringBuilder toInsert=new StringBuilder(300);
  if (jspInserts != null) {
    Iterator<String> itr=jspInserts.iterator();
    while (itr.hasNext()) {
      toInsert.append(page.includeJspString(itr.next(),httpRequest,httpResponse,wbRequest,results,result,resource));
    }
  }
  page.insertAtEndOfDocument(toInsert.toString());
}