nus-yam/ex-repair huggingface dataset:
Program: 42584
Project: 42584
Buggy source:
public void populateDatatable(HttpServletResponse response,HttpServletRequest request,Feature[] features,int datasetSize) throws IOException {
  JSONObject jsonResponse=new JSONObject();
  jsonResponse.put("String_Node_Str",Integer.parseInt(request.getParameter("String_Node_Str")));
  jsonResponse.put("String_Node_Str",datasetSize);
  jsonResponse.put("String_Node_Str",datasetSize);
  for (  Feature feature : features) {
    JSONArray jsonArray=new JSONArray();
    jsonArray.put("String_Node_Str" + feature.getFieldName() + "String_Node_Str");
    jsonArray.put(buildInputCheckBox(feature.isInputSpecified()));
    jsonArray.put(buildSectionBox(new String[]{"String_Node_Str","String_Node_Str"},feature.getType().toString(),"String_Node_Str"));
    jsonArray.put("String_Node_Str");
    jsonArray.put(buildSectionBox(new String[]{"String_Node_Str","String_Node_Str"},feature.getImputeOperation().toString(),"String_Node_Str"));
    jsonResponse.append("String_Node_Str",jsonArray);
  }
  response.resetBuffer();
  response.reset();
  response.setContentType("String_Node_Str");
  response.getWriter().print(jsonResponse.toString().trim());
}

Fixed version (ground truth):
public void populateDatatable(HttpServletResponse response,HttpServletRequest request,Feature[] features,int datasetSize) throws IOException {
  JSONObject jsonResponse=new JSONObject();
  jsonResponse.put("String_Node_Str",Integer.parseInt(request.getParameter("String_Node_Str")));
  jsonResponse.put("String_Node_Str",datasetSize);
  jsonResponse.put("String_Node_Str",datasetSize);
  for (  Feature feature : features) {
    JSONArray jsonArray=new JSONArray();
    jsonArray.put("String_Node_Str" + feature.getFieldName() + "String_Node_Str");
    jsonArray.put(buildInputCheckBox(feature.isInputSpecified()));
    jsonArray.put(buildSectionBox(new String[]{"String_Node_Str","String_Node_Str"},feature.getType().getFeatureName(),"String_Node_Str"));
    jsonArray.put(feature.getSummaryStats());
    jsonArray.put(buildSectionBox(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},feature.getImputeOperation().getImputeOptionName(),"String_Node_Str"));
    jsonResponse.append("String_Node_Str",jsonArray);
  }
  response.resetBuffer();
  response.reset();
  response.setContentType("String_Node_Str");
  response.getWriter().print(jsonResponse.toString().trim());
}
Program: 42585
Project: 42585
Buggy source:
public Feature[] getFeatures(int dataSet,int startPoint,int numberOfFeatures) throws DatabaseHandlerException {
  Feature[] features=new Feature[numberOfFeatures];
  try {
    ResultSet result=connection.createStatement().executeQuery("String_Node_Str" + dataSet + "String_Node_Str"+ numberOfFeatures+ "String_Node_Str"+ (startPoint - 1)+ "String_Node_Str");
    Feature[] feature=new Feature[numberOfFeatures];
    FeatureType featureType=new FeatureType();
    ImputeOption imputeOperation=new ImputeOption();
    int i=0;
    while (result.next()) {
      featureType.setFeatureType(result.getNString(3));
      imputeOperation.setMethod(result.getNString(5));
      feature[i++]=new Feature(result.getNString(1),result.getBoolean(6),featureType,imputeOperation);
    }
  }
 catch (  SQLException e) {
    String msg="String_Node_Str" + dataSet + "String_Node_Str"+ e.getMessage();
    LOGGER.error(msg,e);
    throw new DatabaseHandlerException(msg);
  }
  return features;
}

Fixed version (ground truth):
public Feature[] getFeatures(int dataSet,int startPoint,int numberOfFeatures) throws DatabaseHandlerException {
  Feature[] features=new Feature[numberOfFeatures];
  try {
    ResultSet result=connection.createStatement().executeQuery("String_Node_Str" + dataSet + "String_Node_Str"+ numberOfFeatures+ "String_Node_Str"+ (startPoint - 1)+ "String_Node_Str");
    FeatureType featureType=new FeatureType();
    ImputeOption imputeOperation=new ImputeOption();
    int i=0;
    while (result.next()) {
      featureType.setFeatureType(result.getNString(3));
      imputeOperation.setMethod(result.getNString(5));
      features[i++]=new Feature(result.getNString(1),result.getBoolean(6),featureType,imputeOperation);
    }
  }
 catch (  SQLException e) {
    String msg="String_Node_Str" + dataSet + "String_Node_Str"+ e.getMessage();
    LOGGER.error(msg,e);
    throw new DatabaseHandlerException(msg);
  }
  return features;
}
Program: 42587
Project: 42587
Buggy source:
/** 
 * Calculates   {@link SpecifiedMonetarySummation} for given {@link Item}
 * @param item
 * @return
 */
public static SpecifiedMonetarySummation calculateSpecifiedMonetarySummation(final Item item){
  log.debug("String_Node_Str",item.getProduct().getName());
  CurrencyCode currencyCode=getCurrency(item);
  SpecifiedMonetarySummation monetarySummation=MonetarySummations.newSpecifiedMonetarySummation(currencyCode);
  monetarySummation.setLineTotal(Amounts.setPrecision(new ItemLineTotalCalculator().apply(item),2,RoundingMode.HALF_UP));
  monetarySummation.setTotalAllowanceCharge(Amounts.setPrecision(new ItemTotalAllowanceChargeCalculator(currencyCode).apply(item),2,RoundingMode.HALF_UP));
  log.debug("String_Node_Str",monetarySummation.getLineTotal());
  log.debug("String_Node_Str",monetarySummation.getTotalAllowanceCharge());
  return monetarySummation;
}

Fixed version (ground truth):
/** 
 * Calculates   {@link SpecifiedMonetarySummation} for given {@link Item}
 * @param item
 * @return
 */
public static SpecifiedMonetarySummation calculateSpecifiedMonetarySummation(final Item item){
  log.debug("String_Node_Str",item.getProduct() != null ? item.getProduct().getName() : "String_Node_Str");
  CurrencyCode currencyCode=getCurrency(item);
  SpecifiedMonetarySummation monetarySummation=MonetarySummations.newSpecifiedMonetarySummation(currencyCode);
  monetarySummation.setLineTotal(Amounts.setPrecision(new ItemLineTotalCalculator().apply(item),2,RoundingMode.HALF_UP));
  monetarySummation.setTotalAllowanceCharge(Amounts.setPrecision(new ItemTotalAllowanceChargeCalculator(currencyCode).apply(item),2,RoundingMode.HALF_UP));
  log.debug("String_Node_Str",monetarySummation.getLineTotal());
  log.debug("String_Node_Str",monetarySummation.getTotalAllowanceCharge());
  return monetarySummation;
}
Program: 42588
Project: 42588
Buggy source:
@Parameterized.Parameters(name="String_Node_Str") public static Collection<Object[]> getData(){
  return Arrays.asList(new Object[][]{{"String_Node_Str",0},{"String_Node_Str",2},{"String_Node_Str",5},{"String_Node_Str",0},{"String_Node_Str",2},{"String_Node_Str",5}});
}

Fixed version (ground truth):
@Parameterized.Parameters(name="String_Node_Str") public static Collection<Object[]> getData(){
  return Arrays.asList(new Object[][]{{"String_Node_Str",0},{"String_Node_Str",2},{"String_Node_Str",5},{"String_Node_Str",0},{"String_Node_Str",1},{"String_Node_Str",5}});
}
Program: 42589
Project: 42589
Buggy source:
/** 
 * Gets the invoice header notes. Example:: -   {@code note content: }{@link Note#getContent() Invoice like agreed on the telephone with Mr.X.} --  {@code note subject code as UNCL 4451: }{@link Note#getSubjectCode() AAK}
 * @return the included note
 */
@Basic @Valid @NotEmpty public List<Note> getNotes(){
  if (notes == null) {
    notes=new ArrayList<Note>();
  }
  return this.notes;
}

Fixed version (ground truth):
/** 
 * Gets the invoice header notes. Example:: -   {@code note content: }{@link Note#getContent() Invoice like agreed on the telephone with Mr.X.} --  {@code note subject code as UNCL 4451: }{@link Note#getSubjectCode() AAK}
 * @return the included note
 */
@Basic @Valid public List<Note> getNotes(){
  if (notes == null) {
    notes=new ArrayList<Note>();
  }
  return this.notes;
}
Program: 42590
Project: 42590
Buggy source:
/** 
 * Gets the human readable content.
 * @return the content
 */
@Basic(ifParent=Header.class) @Comfort(ifParent=PositionDocument.class) @NotEmpty public List<String> getContents(){
  if (contents == null) {
    this.contents=new ArrayList<String>();
  }
  return this.contents;
}

Fixed version (ground truth):
/** 
 * Gets the human readable note content.
 * @return the content
 */
@Basic(ifParent=Header.class) @Comfort(ifParent=PositionDocument.class) @NotEmpty public List<String> getContents(){
  if (contents == null) {
    this.contents=new ArrayList<String>();
  }
  return this.contents;
}
Program: 42591
Project: 42591
Buggy source:
@Test public void validateInvoice(){
  Invoice invoice=createInvoice();
  InvoiceValidator invoiceValidator=new InvoiceValidator();
  Set<ConstraintViolation<Invoice>> violations=invoiceValidator.validate(invoice);
  for (  ConstraintViolation<Invoice> violation : violations) {
  }
  assertThat(violations.size()).isZero();
}

Fixed version (ground truth):
@Test public void validateInvoice(){
  Invoice invoice=createInvoice();
  InvoiceValidator invoiceValidator=new InvoiceValidator();
  Set<ConstraintViolation<Invoice>> violations=invoiceValidator.validate(invoice);
  for (  ConstraintViolation<Invoice> violation : violations) {
    log.log(Level.INFO,violation.getMessage() + "String_Node_Str" + violation.getPropertyPath());
  }
  assertThat(violations.size()).isZero();
}
Program: 42592
Project: 42592
Buggy source:
@Test public void validateInvoiceModel(){
  Invoice invoice=transformer.toModel(testFile);
  ConformanceLevel conformanceLevel=invoice.getContext().getGuideline().getConformanceLevel();
  Class<?>[] validationGroups=resolveIntoValidationGroups(conformanceLevel);
  Set<ConstraintViolation<Invoice>> validationResult=validator.validate(invoice,validationGroups);
  if (!validationResult.isEmpty()) {
    ConstraintViolation<Invoice> violation=validationResult.iterator().next();
    assertThat(validationResult).as(violation.getMessage()).isEmpty();
  }
 else {
    modelValidationCounter++;
  }
}

Fixed version (ground truth):
@Test public void validateInvoiceModel(){
  Invoice invoice=transformer.toModel(testFile);
  ConformanceLevel conformanceLevel=invoice.getContext().getGuideline().getConformanceLevel();
  Class<?>[] validationGroups=resolveIntoValidationGroups(conformanceLevel);
  Set<ConstraintViolation<Invoice>> validationResult=validator.validate(invoice,validationGroups);
  for (  ConstraintViolation<Invoice> violation : validationResult) {
    String msg=violation.getPropertyPath() + "String_Node_Str" + violation.getMessage()+ "String_Node_Str"+ violation.getInvalidValue();
    assertThat(validationResult).as(msg).isEmpty();
  }
  modelValidationCounter++;
}
Program: 42593
Project: 42593
Buggy source:
public static <T extends GenericHandler>Object runAnnotated(T handler,Class<? extends Servlet> servletClass,Class<? extends Annotation> annotationClass){
  HandlerMeta meta=HandlerMeta.get(handler.getClass(),servletClass);
  HandlerMethod method=meta.methodsMap.get(annotationClass);
  if (method == null) {
    return null;
  }
  return method.run(handler.context,handler,annotationClass == After.class);
}

Fixed version (ground truth):
public static <T extends GenericHandler>Object runAnnotated(T handler,Class<? extends Servlet> servletClass,Class<? extends Annotation> annotationClass){
  HandlerMeta meta=HandlerMeta.get(handler.getClass(),servletClass);
  HandlerMethod method=meta.methodsMap.get(annotationClass);
  if (method == null) {
    return null;
  }
  return new HandlerMethodRunner(method).run(handler.context,handler,annotationClass == After.class);
}
Program: 42594
Project: 42594
Buggy source:
public static <T extends GenericHandler>Object runHandler(T handler,Class<? extends Servlet> servletClass){
  HandlerMeta meta=HandlerMeta.get(handler.getClass(),servletClass);
  for (  HandlerMethod method : meta.handlerMethods) {
    Object result=method.run(handler.context,handler,false);
    if (result != NoAdapter.NO_ADAPTER) {
      return result;
    }
  }
  return NoAdapter.NO_ADAPTER;
}

Fixed version (ground truth):
public static <T extends GenericHandler>Object runHandler(T handler,Class<? extends Servlet> servletClass){
  HandlerMeta meta=HandlerMeta.get(handler.getClass(),servletClass);
  for (  HandlerMethod method : meta.handlerMethods) {
    Object result=new HandlerMethodRunner(method).run(handler.context,handler,false);
    if (result != NoAdapter.NO_ADAPTER) {
      return result;
    }
  }
  return NoAdapter.NO_ADAPTER;
}
Program: 42595
Project: 42595
Buggy source:
@After public void after(){
  Date endTime=new Date();
  long timeDiff=endTime.getTime() - startTime.getTime();
  String queryString=context.getRequest().getQueryString();
  if (queryString == null) {
    queryString="String_Node_Str";
  }
 else {
    queryString="String_Node_Str" + queryString;
  }
  Util.getLogger().info("String_Node_Str",context.getRequest().getMethod(),context.getRequest().getRequestURI(),queryString,timeDiff);
  if (context.getRequest() != null && !context.isExceptionHandled()) {
    Util.getLogger().warn("String_Node_Str",context.getException());
  }
}

Fixed version (ground truth):
@After public void after(){
  Date endTime=new Date();
  long timeDiff=endTime.getTime() - startTime.getTime();
  String queryString=context.getRequest().getQueryString();
  if (queryString == null) {
    queryString="String_Node_Str";
  }
 else {
    queryString="String_Node_Str" + queryString;
  }
  Util.getLogger().info("String_Node_Str",context.getRequest().getMethod(),context.getRequest().getRequestURI(),queryString,timeDiff);
  if (context.getException() != null && !context.isExceptionHandled()) {
    Util.getLogger().warn("String_Node_Str",context.getException());
  }
}
Program: 42596
Project: 42596
Buggy source:
@Before @HandleErrors({@ErrorCase(code=403,logLevel="String_Node_Str",description="String_Node_Str",exception=UserDao.TokenNotFoundException.class),@ErrorCase(code=500,logLevel="String_Node_Str",description="String_Node_Str",exception=UserDao.UserNotFoundException.class)}) public void getUser(@HeaderParam("String_Node_Str") @Required String token) throws UserDao.TokenNotFoundException, UserDao.UserNotFoundException, InstantiationException, IllegalAccessException {
  Long userId=getUserDao().getUserIdFromToken(token);
  injectorVariable=getUserDao().getUser(userId);
}

Fixed version (ground truth):
@Before @HandleErrors({@ErrorCase(code=403,logLevel="String_Node_Str",description="String_Node_Str",exception=UserDao.TokenNotFoundException.class),@ErrorCase(code=500,logLevel="String_Node_Str",description="String_Node_Str",exception=UserDao.UserNotFoundException.class)}) public void getUser(@HeaderParam("String_Node_Str") @Required String token) throws UserDao.TokenNotFoundException, UserDao.UserNotFoundException, InstantiationException, IllegalAccessException {
  String username=getUserDao().getUsernameFromToken(token);
  injectorVariable=getUserDao().getUser(username);
}
Program: 42597
Project: 42597
Buggy source:
/** 
 * Save a user's token, with an expire time.
 * @param token  The token.
 * @param userId The id of user.
 * @param expire Expire time, in millisecond.
 */
public void saveToken(String token,long userId,long expire);

Fixed version (ground truth):
/** 
 * Save a user's token, with an expire time.
 * @param token    The token.
 * @param username The username.
 * @param expire   Expire time, in millisecond.
 */
public void saveToken(String token,String username,long expire);
Program: 42598
Project: 42598
Buggy source:
public UserNotFoundException(Long userId){
  super("String_Node_Str" + userId.toString());
}

Fixed version (ground truth):
public UserNotFoundException(String username){
  super("String_Node_Str" + username);
}
Program: 42599
Project: 42599
Buggy source:
/** 
 * Get user from userId.
 * @param userId The id of user.
 * @return A user.
 * @throws UserNotFoundException
 */
public UserType getUser(long userId) throws UserNotFoundException ;

Fixed version (ground truth):
/** 
 * Get user from username.
 * @param username The username.
 * @return A user.
 * @throws UserNotFoundException
 */
public UserType getUser(String username) throws UserNotFoundException ;
Program: 42600
Project: 42600
Buggy source:
/** 
 * Get static UserDao. Used to get UserDao from class type.
 * @return A global static UserDao.
 */
public UserDao getInstance();

Fixed version (ground truth):
/** 
 * Get static UserDao. Used to get UserDao from class type.
 * @return A global static UserDao.
 */
public UserDaoType getInstance();
Program: 42601
Project: 42601
Buggy source:
@Before public void setUp() throws NoSuchMethodException, InstantiationException, IllegalAccessException, NoSuchFieldException {
  servlet=new Servlet("String_Node_Str");
  request=new MockHttpServletRequest();
  response=new MockHttpServletResponse();
}

Fixed version (ground truth):
@Before public void setUp() throws NoSuchMethodException, InstantiationException, IllegalAccessException, NoSuchFieldException, JsonMappingException {
  servlet=new Servlet("String_Node_Str");
  request=new MockHttpServletRequest();
  response=new MockHttpServletResponse();
}
Program: 42603
Project: 42603
Buggy source:
@TrueAdapter1 @AddHeaderFilter(name="String_Node_Str",value="String_Node_Str") @ExceptionFilter public void exception(){
  context.response.setHeader("String_Node_Str","String_Node_Str");
  throw new NullPointerException("String_Node_Str");
}

Fixed version (ground truth):
@TrueAdapter1 @AddHeaderFilter(name="String_Node_Str",value="String_Node_Str") @ExceptionFilter public void exception(){
  context.response.setHeader("String_Node_Str","String_Node_Str");
}
Program: 42604
Project: 42604
Buggy source:
@Test public void exceptionFilterTest(){
  servlet.addHandler(ExceptionFilterHandler.class);
  servlet.service(request,response);
  assertEquals("String_Node_Str",response.getHeader("String_Node_Str"));
  assertEquals("String_Node_Str",response.getHeader("String_Node_Str"));
  assertEquals("String_Node_Str",response.getHeader("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void exceptionFilterTest(){
  servlet.addHandler(ExceptionFilterHandler.class);
  servlet.service(request,response);
  assertEquals("String_Node_Str",response.getHeader("String_Node_Str"));
  assertEquals(null,response.getHeader("String_Node_Str"));
  assertEquals("String_Node_Str",response.getHeader("String_Node_Str"));
}
Program: 42605
Project: 42605
Buggy source:
@After public void getException(){
  if (context.exception != null) {
    context.response.setHeader("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
@After public void getException(){
  if (context.exception instanceof TestFilterException) {
    context.response.setHeader("String_Node_Str","String_Node_Str");
  }
}
Program: 42606
Project: 42606
Buggy source:
private CompletableFuture<Stream<List<GitHubContributor>>> getContributors(String user,List<GitHubRepo> repos){
  return Futures.sequence(repos.stream().map(r -> Futures.toCompletable(gitHubService.contributorsAsync(user,r.getName()),executor)).filter(f -> f != null));
}

Fixed version (ground truth):
private CompletableFuture<Stream<List<GitHubContributor>>> getContributors(String user,List<GitHubRepo> repos){
  return Futures.sequence(repos.stream().map(r -> Futures.toCompletable(gitHubService.contributorsAsync(user,r.getName()),executor)));
}
Program: 42607
Project: 42607
Buggy source:
public static <T>CompletableFuture<Stream<T>> sequence(Stream<CompletableFuture<T>> futures){
  CompletableFuture<Void> allDoneFuture=CompletableFuture.allOf(futures.toArray(value -> new CompletableFuture[(int)futures.count()]));
  return allDoneFuture.thenApply(v -> futures.map(future -> future.join()));
}

Fixed version (ground truth):
public static <T>CompletableFuture<Stream<T>> sequence(Stream<CompletableFuture<T>> futures){
  List<CompletableFuture<T>> futureList=futures.filter(f -> f != null).collect(Collectors.toList());
  CompletableFuture<Void> allDoneFuture=CompletableFuture.allOf(futureList.toArray(new CompletableFuture[futureList.size()]));
  return allDoneFuture.thenApply(v -> futureList.stream().map(future -> future.join()));
}
Program: 42608
Project: 42608
Buggy source:
@Override public void onScroll(AbsListView absListView,int firstVisibleItem,int visibleItemCount,int totalItemCount){
  View firstChild=absListView.getChildAt(0);
  if (firstChild != null && firstChild == mTransparentHeader) {
    int scrollY=-absListView.getChildAt(0).getTop();
    if (mScrollView.getScrollY() != scrollY) {
      mScrollView.scrollTo(0,(int)(scrollY / mParallaxFactor));
      ViewGroup.LayoutParams lp=mScrollView.getLayoutParams();
      lp.height=mHeaderHeight - scrollY;
      mScrollView.setLayoutParams(lp);
    }
  }
}

Fixed version (ground truth):
@Override public void onScroll(AbsListView absListView,int firstVisibleItem,int visibleItemCount,int totalItemCount){
  View firstChild=absListView.getChildAt(0);
  if (firstChild != null) {
    if (firstChild == mTransparentHeader) {
      int scrollY=-firstChild.getTop();
      if (mScrollView.getScrollY() != scrollY) {
        mScrollView.scrollTo(0,(int)(scrollY / mParallaxFactor));
        ViewGroup.LayoutParams lp=mScrollView.getLayoutParams();
        lp.height=mHeaderHeight - scrollY;
        mScrollView.setLayoutParams(lp);
      }
    }
 else {
      mScrollView.scrollTo(0,mHeaderHeight);
      ViewGroup.LayoutParams lp=mScrollView.getLayoutParams();
      lp.height=0;
      mScrollView.setLayoutParams(lp);
    }
  }
}
Program: 42609
Project: 42609
Buggy source:
private int getClosestIndex(ArrayList<GpsMeasurement> wayPoints,GPSPoseMessage currentLocation){
  double min=Double.MAX_VALUE;
  int closestIndex=lastClosestIndex;
  for (int i=lastClosestIndex; i < (lastClosestIndex + wayPointLOOKAHEADMAX) && i < wayPoints.size(); i++) {
    GPSPoseMessage gpsPoseMessage=wayPoints.get(i).toGpsPoseMessage(0);
    double d=GPSPoseMessage.getDistance(currentLocation,gpsPoseMessage);
    if (d < min) {
      min=d;
      closestIndex=i;
    }
  }
  lastClosestIndex=closestIndex;
  return closestIndex;
}

Fixed version (ground truth):
private int getClosestIndex(ArrayList<GpsMeasurement> wayPoints,GPSPoseMessage currentLocation){
  double min=Double.MAX_VALUE;
  int closestIndex=lastClosestIndex;
  for (int i=lastClosestIndex; i < (lastClosestIndex + WAY_POINT_LOOKAHEAD_MAX) && i < wayPoints.size(); i++) {
    GPSPoseMessage gpsPoseMessage=wayPoints.get(i).toGpsPoseMessage(0);
    double d=GPSPoseMessage.getDistance(currentLocation,gpsPoseMessage);
    if (d < min) {
      min=d;
      closestIndex=i;
    }
  }
  lastClosestIndex=closestIndex;
  return closestIndex;
}
Program: 42610
Project: 42610
Buggy source:
private ControllerTesterRobot(){
  super();
  ArrayList<GpsMeasurement> wayPoints=null;
  try {
    wayPoints=WayPointUtil.createWayPointsFromWaypointList(RobobuggyConfigFile.getWaypointSourceLogFile());
    nodeList.add(new WayPointFollowerPlanner(wayPoints));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  nodeList.add(new ControllerTester("String_Node_Str",new LocTuple(wayPoints.get(0).getLatitude(),wayPoints.get(0).getLongitude())));
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}

Fixed version (ground truth):
private ControllerTesterRobot(){
  super();
  ArrayList<GpsMeasurement> wayPoints=new ArrayList<>();
  try {
    wayPoints=WayPointUtil.createWayPointsFromWaypointList(RobobuggyConfigFile.getWaypointSourceLogFile());
    nodeList.add(new WayPointFollowerPlanner(wayPoints));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  nodeList.add(new ControllerTester("String_Node_Str",new LocTuple(wayPoints.get(0).getLatitude(),wayPoints.get(0).getLongitude())));
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}
Program: 42611
Project: 42611
Buggy source:
/** 
 * Create a new   {@link PeriodicNode} decorator
 * @param name - name of tester
 * @param initialPosition - represents initial position of tester
 */
public ControllerTester(String name,LocTuple initialPosition){
  super(new BuggyBaseNode(NodeChannel.AUTO),SIM_PERIOD,name);
  double[][] xAsDoubleArr={{LocalizerUtil.deg2UTM(initialPosition).getEasting()},{LocalizerUtil.deg2UTM(initialPosition).getNorthing()},{VELOCITY},{INITIAL_HEADING_RAD},{0}};
  x=new Matrix(xAsDoubleArr);
  new Subscriber("String_Node_Str",NodeChannel.DRIVE_CTRL.getMsgPath(),((topicName,m) -> {
    commandedSteeringAngle=((DriveControlMessage)m).getAngleDouble();
  }
));
  simulatedPosePub=new Publisher(NodeChannel.POSE.getMsgPath());
  gpspub=new Publisher(NodeChannel.GPS.getMsgPath());
}

Fixed version (ground truth):
/** 
 * Create a new   {@link PeriodicNode} decorator
 * @param name - name of tester
 * @param initialPosition - represents initial position of tester
 */
public ControllerTester(String name,LocTuple initialPosition){
  super(new BuggyBaseNode(NodeChannel.AUTO),SIM_PERIOD,name);
  double[][] xAsDoubleArr={{LocalizerUtil.deg2UTM(initialPosition).getEasting()},{LocalizerUtil.deg2UTM(initialPosition).getNorthing()},{VELOCITY},{INITIAL_HEADING_RAD},{0}};
  x=new Matrix(xAsDoubleArr);
  new Subscriber("String_Node_Str",NodeChannel.DRIVE_CTRL.getMsgPath(),((topicName,m) -> {
    commandedSteeringAngle=((DriveControlMessage)m).getAngleDouble();
  }
));
  simulatedPosePub=new Publisher(NodeChannel.POSE.getMsgPath());
  new Publisher(NodeChannel.GPS.getMsgPath());
}
Program: 42614
Project: 42614
Buggy source:
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=TransistorAuton.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}

Fixed version (ground truth):
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=PlayBackRobot.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}
Program: 42616
Project: 42616
Buggy source:
private double stanleyMethodController(){
  int closestIndex=getClosestIndex(wayPoints,pose);
  double K=0.01;
  double velocity=pose.getCurrentState().get(2,0);
  if (closestIndex >= (wayPoints.size() - 1)) {
    new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.EXCEPTION);
    return 0;
  }
  GpsMeasurement ptA=wayPoints.get(closestIndex);
  GpsMeasurement ptB=wayPoints.get(closestIndex + 1);
  double pathx=LocalizerUtil.convertLonToMeters(ptB.getLongitude()) - LocalizerUtil.convertLonToMeters(ptA.getLongitude());
  double pathy=LocalizerUtil.convertLatToMeters(ptB.getLatitude()) - LocalizerUtil.convertLatToMeters(ptA.getLatitude());
  double dx=LocalizerUtil.convertLonToMeters(pose.getLongitude()) - LocalizerUtil.convertLonToMeters(ptA.getLongitude());
  double dy=LocalizerUtil.convertLatToMeters(pose.getLatitude()) - LocalizerUtil.convertLatToMeters(ptA.getLatitude());
  currentWaypoint=ptA;
  double pathHeading=Math.atan2(pathy,pathx);
  double headingError=Util.normalizeAngleRad(pathHeading) - Util.normalizeAngleRad(pose.getHeading());
  double commandedAngle;
  double crosstrackError=GPSPoseMessage.getDistance(currentWaypoint.toGpsPoseMessage(0),pose);
  commandedAngle=headingError + Math.atan2(K * crosstrackError,velocity);
  commandedAngle=Util.normalizeAngleRad(commandedAngle);
  return commandedAngle;
}

Fixed version (ground truth):
private double stanleyMethodController(){
  int closestIndex=getClosestIndex(wayPoints,pose);
  double K=0.05;
  double velocity=pose.getCurrentState().get(2,0);
  if (closestIndex >= (wayPoints.size() - 1)) {
    new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.EXCEPTION);
    return 0;
  }
  GpsMeasurement ptA=wayPoints.get(closestIndex);
  GpsMeasurement ptB=wayPoints.get(closestIndex + 1);
  double pathx=LocalizerUtil.convertLonToMeters(ptB.getLongitude()) - LocalizerUtil.convertLonToMeters(ptA.getLongitude());
  double pathy=LocalizerUtil.convertLatToMeters(ptB.getLatitude()) - LocalizerUtil.convertLatToMeters(ptA.getLatitude());
  double dx=LocalizerUtil.convertLonToMeters(pose.getLongitude()) - LocalizerUtil.convertLonToMeters(ptA.getLongitude());
  double dy=LocalizerUtil.convertLatToMeters(pose.getLatitude()) - LocalizerUtil.convertLatToMeters(ptA.getLatitude());
  currentWaypoint=ptA;
  double pathHeading=Math.atan2(pathy,pathx);
  double headingError=Util.normalizeAngleRad(pathHeading) - Util.normalizeAngleRad(pose.getHeading());
  double commandedAngle;
  double L=GPSPoseMessage.getDistance(pose,ptA.toGpsPoseMessage(0));
  double theta=Math.atan2(dy,dx);
  double crosstrackError=L * Math.sin(theta);
  int direction;
  if (headingError > 0) {
    direction=1;
  }
 else {
    direction=-1;
  }
  crosstrackError=crosstrackError * direction;
  commandedAngle=headingError + Math.atan2(K * crosstrackError,velocity);
  commandedAngle=Util.normalizeAngleRad(commandedAngle);
  return commandedAngle;
}
Program: 42617
Project: 42617
Buggy source:
@Override public void actionPerformed(String topicName,Message m){
  GPSPoseMessage gpsM=(GPSPoseMessage)m;
  zoomLevel=getMapTree().getViewer().getZoom();
  getMapTree().getViewer().setDisplayPosition(new Coordinate(gpsM.getLatitude(),gpsM.getLongitude()),zoomLevel);
  addPointsToMapTree(Color.RED,new LocTuple(gpsM.getLatitude(),gpsM.getLongitude()));
  getMapTree().getViewer().removeMapMarker(currentWaypoint);
  currentWaypoint.setLat(WayPointFollowerPlanner.currentWaypoint.getLatitude());
  currentWaypoint.setLon(WayPointFollowerPlanner.currentWaypoint.getLongitude());
  getMapTree().getViewer().addMapMarker(currentWaypoint);
  getMapTree().getViewer().removeMapPolygon(currentHeading);
  currentHeading=new MapPolygonImpl(new Coordinate(WayPointFollowerPlanner.currentWaypoint.getLatitude(),WayPointFollowerPlanner.currentWaypoint.getLongitude()),new Coordinate(WayPointFollowerPlanner.currentWaypoint.getLatitude() + 0.001 * Math.sin(WayPointFollowerPlanner.currentCommandedAngle),WayPointFollowerPlanner.currentWaypoint.getLongitude() + 0.001 * Math.cos(WayPointFollowerPlanner.currentCommandedAngle)),new Coordinate(WayPointFollowerPlanner.currentWaypoint.getLatitude(),WayPointFollowerPlanner.currentWaypoint.getLongitude()));
  getMapTree().getViewer().addMapPolygon(currentHeading);
}

Fixed version (ground truth):
@Override public void actionPerformed(String topicName,Message m){
  GPSPoseMessage gpsM=(GPSPoseMessage)m;
  zoomLevel=getMapTree().getViewer().getZoom();
  getMapTree().getViewer().setDisplayPosition(new Coordinate(gpsM.getLatitude(),gpsM.getLongitude()),zoomLevel);
  addPointsToMapTree(Color.RED,new LocTuple(gpsM.getLatitude(),gpsM.getLongitude()));
  getMapTree().getViewer().removeMapMarker(currentWaypoint);
  currentWaypoint.setLat(WayPointFollowerPlanner.currentWaypoint.getLatitude());
  currentWaypoint.setLon(WayPointFollowerPlanner.currentWaypoint.getLongitude());
  getMapTree().getViewer().addMapMarker(currentWaypoint);
  double currentHeading=gpsM.getCurrentState().get(3,0);
  getMapTree().getViewer().removeMapPolygon(currentHeadingMapObj);
  currentHeadingMapObj=new MapPolygonImpl(new Coordinate(gpsM.getLatitude(),gpsM.getLongitude()),new Coordinate(gpsM.getLatitude() + 0.0001 * Math.sin(WayPointFollowerPlanner.currentCommandedAngle + currentHeading),gpsM.getLongitude() + 0.0001 * Math.cos(WayPointFollowerPlanner.currentCommandedAngle + currentHeading)),new Coordinate(gpsM.getLatitude(),gpsM.getLongitude()));
  getMapTree().getViewer().addMapPolygon(currentHeadingMapObj);
}
Program: 42619
Project: 42619
Buggy source:
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=TransistorDataCollection.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}

Fixed version (ground truth):
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=PlayBackRobot.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}
Program: 42620
Project: 42620
Buggy source:
/** 
 * Returns the steering angle to which the   {@link PathPlanner} thinks thebuggy's steering should be commanded to follow the desired path.
 * @return desired commanded steering angle
 */
protected abstract double getCommandedSteeringAngle();

Fixed version (ground truth):
/** 
 * Returns the steering angle to which the   {@link PathPlanner} thinks thebuggy's steering should be commanded to follow the desired path.
 * @return desired commanded steering angle IN RADIANS
 */
protected abstract double getCommandedSteeringAngle();
Program: 42621
Project: 42621
Buggy source:
/** 
 * Used to send the commanded angle and brake state to the Arduino.  {@inheritDoc}
 */
@Override protected void update(){
  int outputAngle=commandedAngle;
  if (outputAngle > 1000) {
    outputAngle=1000;
  }
 else   if (outputAngle < -1000) {
    outputAngle=-1000;
  }
  RBSMSteeringMessage msgSteer=new RBSMSteeringMessage(outputAngle);
  send(msgSteer.getMessageBytes());
  RBSMBrakeMessage msgBrake=new RBSMBrakeMessage(commandedBrakeEngaged);
  send(msgBrake.getMessageBytes());
}

Fixed version (ground truth):
/** 
 * Used to send the commanded angle and brake state to the Arduino.  {@inheritDoc}
 */
@Override protected void update(){
  int outputAngleHundredthsDegrees=(int)(Math.toDegrees(commandedAngle) * 100);
  if (outputAngleHundredthsDegrees > 1000) {
    outputAngleHundredthsDegrees=1000;
  }
 else   if (outputAngleHundredthsDegrees < -1000) {
    outputAngleHundredthsDegrees=-1000;
  }
  RBSMSteeringMessage msgSteer=new RBSMSteeringMessage(outputAngleHundredthsDegrees);
  send(msgSteer.getMessageBytes());
  RBSMBrakeMessage msgBrake=new RBSMBrakeMessage(commandedBrakeEngaged);
  send(msgBrake.getMessageBytes());
}
Program: 42622
Project: 42622
Buggy source:
private PlayBackRobot(){
  super();
  new LineByLineSensorPlayer(RobobuggyConfigFile.getPlayBackSourceFile(),1);
  new KfLocalizer(10);
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.addTab(new AutonomousPanel(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}

Fixed version (ground truth):
private PlayBackRobot(){
  super();
  new LineByLineSensorPlayer(RobobuggyConfigFile.getPlayBackSourceFile(),1);
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.addTab(new AutonomousPanel(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}
Program: 42624
Project: 42624
Buggy source:
/** 
 * Initializes the publishers for the playback util
 */
private PlayBackUtil(){
  imuPub=new Publisher(NodeChannel.IMU.getMsgPath());
  magPub=new Publisher(NodeChannel.IMU_MAGNETIC.getMsgPath());
  gpsPub=new Publisher(NodeChannel.GPS.getMsgPath());
  encoderPub=new Publisher(NodeChannel.ENCODER.getMsgPath());
  brakePub=new Publisher(NodeChannel.BRAKE_STATE.getMsgPath());
  steeringPub=new Publisher(NodeChannel.STEERING.getMsgPath());
  steeringCommandPub=new Publisher(NodeChannel.STEERING_COMMANDED.getMsgPath());
  loggingButtonPub=new Publisher(NodeChannel.GUI_LOGGING_BUTTON.getMsgPath());
  logicNotificationPub=new Publisher(NodeChannel.LOGIC_NOTIFICATION.getMsgPath());
}

Fixed version (ground truth):
/** 
 * Initializes the publishers for the playback util
 */
private PlayBackUtil(){
  imuPub=new Publisher(NodeChannel.IMU.getMsgPath());
  magPub=new Publisher(NodeChannel.IMU_MAGNETIC.getMsgPath());
  gpsPub=new Publisher(NodeChannel.GPS.getMsgPath());
  encoderPub=new Publisher(NodeChannel.ENCODER.getMsgPath());
  brakePub=new Publisher(NodeChannel.BRAKE_STATE.getMsgPath());
  steeringPub=new Publisher(NodeChannel.STEERING.getMsgPath());
  steeringCommandPub=new Publisher(NodeChannel.STEERING_COMMANDED.getMsgPath());
  loggingButtonPub=new Publisher(NodeChannel.GUI_LOGGING_BUTTON.getMsgPath());
  logicNotificationPub=new Publisher(NodeChannel.LOGIC_NOTIFICATION.getMsgPath());
  posePub=new Publisher(NodeChannel.POSE.getMsgPath());
}
Program: 42625
Project: 42625
Buggy source:
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=TransistorDataCollection.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}

Fixed version (ground truth):
/** 
 * Run Alice
 * @param args : None
 */
public static void main(String[] args){
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  try {
    JNISetup.setupJNI();
  }
 catch (  NoSuchFieldException|SecurityException|IllegalAccessException|IllegalArgumentException e1) {
    e1.printStackTrace();
  }
  RobobuggyConfigFile.loadConfigFile();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot=PlayBackRobot.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  Gui.getInstance();
  new RobobuggyLogicNotification("String_Node_Str",RobobuggyMessageLevel.NOTE);
  robot.startNodes();
}
Program: 42626
Project: 42626
Buggy source:
/** 
 * Returns the steering angle to which the   {@link PathPlanner} thinks thebuggy's steering should be commanded to follow the desired path.
 * @return desired commanded steering angle
 */
protected abstract double getCommandedSteeringAngle();

Fixed version (ground truth):
/** 
 * Returns the steering angle to which the   {@link PathPlanner} thinks thebuggy's steering should be commanded to follow the desired path.
 * @return desired commanded steering angle IN RADIANS
 */
protected abstract double getCommandedSteeringAngle();
Program: 42627
Project: 42627
Buggy source:
/** 
 * Used to send the commanded angle and brake state to the Arduino.  {@inheritDoc}
 */
@Override protected void update(){
  int outputAngle=commandedAngle;
  if (outputAngle > 1000) {
    outputAngle=1000;
  }
 else   if (outputAngle < -1000) {
    outputAngle=-1000;
  }
  RBSMSteeringMessage msgSteer=new RBSMSteeringMessage(outputAngle);
  send(msgSteer.getMessageBytes());
  RBSMBrakeMessage msgBrake=new RBSMBrakeMessage(commandedBrakeEngaged);
  send(msgBrake.getMessageBytes());
}

Fixed version (ground truth):
/** 
 * Used to send the commanded angle and brake state to the Arduino.  {@inheritDoc}
 */
@Override protected void update(){
  int outputAngleHundredthsDegrees=(int)(Math.toDegrees(commandedAngle) * 100);
  if (outputAngleHundredthsDegrees > 1000) {
    outputAngleHundredthsDegrees=1000;
  }
 else   if (outputAngleHundredthsDegrees < -1000) {
    outputAngleHundredthsDegrees=-1000;
  }
  RBSMSteeringMessage msgSteer=new RBSMSteeringMessage(outputAngleHundredthsDegrees);
  send(msgSteer.getMessageBytes());
  RBSMBrakeMessage msgBrake=new RBSMBrakeMessage(commandedBrakeEngaged);
  send(msgBrake.getMessageBytes());
}
Program: 42628
Project: 42628
Buggy source:
private PlayBackRobot(){
  super();
  new LineByLineSensorPlayer(RobobuggyConfigFile.getPlayBackSourceFile(),1);
  new KfLocalizer(10);
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.addTab(new AutonomousPanel(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}

Fixed version (ground truth):
private PlayBackRobot(){
  super();
  new LineByLineSensorPlayer(RobobuggyConfigFile.getPlayBackSourceFile(),1);
  RobobuggyJFrame mainWindow=new RobobuggyJFrame("String_Node_Str",1.0,1.0);
  Gui.getInstance().addWindow(mainWindow);
  RobobuggyGUITabs tabs=new RobobuggyGUITabs();
  mainWindow.addComponent(tabs,0.0,0.0,1.0,1.0);
  tabs.addTab(new MainGuiWindow(),"String_Node_Str");
  tabs.addTab(new AutonomousPanel(),"String_Node_Str");
  tabs.add(new PathPanel(),"String_Node_Str");
  tabs.addTab(new ConfigurationPanel(),"String_Node_Str");
}
Program: 42630
Project: 42630
Buggy source:
/** 
 * Initializes the publishers for the playback util
 */
private PlayBackUtil(){
  imuPub=new Publisher(NodeChannel.IMU.getMsgPath());
  magPub=new Publisher(NodeChannel.IMU_MAGNETIC.getMsgPath());
  gpsPub=new Publisher(NodeChannel.GPS.getMsgPath());
  encoderPub=new Publisher(NodeChannel.ENCODER.getMsgPath());
  brakePub=new Publisher(NodeChannel.BRAKE_STATE.getMsgPath());
  steeringPub=new Publisher(NodeChannel.STEERING.getMsgPath());
  steeringCommandPub=new Publisher(NodeChannel.STEERING_COMMANDED.getMsgPath());
  loggingButtonPub=new Publisher(NodeChannel.GUI_LOGGING_BUTTON.getMsgPath());
  logicNotificationPub=new Publisher(NodeChannel.LOGIC_NOTIFICATION.getMsgPath());
}

Fixed version (ground truth):
/** 
 * Initializes the publishers for the playback util
 */
private PlayBackUtil(){
  imuPub=new Publisher(NodeChannel.IMU.getMsgPath());
  magPub=new Publisher(NodeChannel.IMU_MAGNETIC.getMsgPath());
  gpsPub=new Publisher(NodeChannel.GPS.getMsgPath());
  encoderPub=new Publisher(NodeChannel.ENCODER.getMsgPath());
  brakePub=new Publisher(NodeChannel.BRAKE_STATE.getMsgPath());
  steeringPub=new Publisher(NodeChannel.STEERING.getMsgPath());
  steeringCommandPub=new Publisher(NodeChannel.STEERING_COMMANDED.getMsgPath());
  loggingButtonPub=new Publisher(NodeChannel.GUI_LOGGING_BUTTON.getMsgPath());
  logicNotificationPub=new Publisher(NodeChannel.LOGIC_NOTIFICATION.getMsgPath());
  posePub=new Publisher(NodeChannel.POSE.getMsgPath());
}
Program: 42631
Project: 42631
Buggy source:
@After public void tearDown() throws Exception {
}

Fixed version (ground truth):
/** 
 * Called after each test case finishes Does nothing at the moment
 */
@After public void tearDown(){
}
Program: 42632
Project: 42632
Buggy source:
/** 
 * tests for correct failure of convertMinSecToFloatLongitude() if given invalid input
 */
@Test public void testBadConversionMinSecToFloatLong(){
  GpsNode gpsNode1=new GpsNode(NodeChannel.GPS,"String_Node_Str");
  String input="String_Node_Str";
  try {
    double output=gpsNode1.convertMinSecToFloatLongitude(input);
    fail("String_Node_Str");
  }
 catch (  Exception E) {
    return;
  }
}

Fixed version (ground truth):
/** 
 * tests for correct failure of convertMinSecToFloatLongitude() if given invalid input
 */
@Test public void testBadConversionMinSecToFloatLong(){
  GpsNode gpsNode1=new GpsNode(NodeChannel.GPS,"String_Node_Str");
  String input="String_Node_Str";
  try {
    double output=gpsNode1.convertMinSecToFloatLongitude(input);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    return;
  }
}
Program: 42633
Project: 42633
Buggy source:
@Before public void setUp() throws Exception {
  messageList.clear();
}

Fixed version (ground truth):
/** 
 * Called before each test case runs Clears the message list so we don't get any corruption between tests
 */
@Before public void setUp(){
  messageList.clear();
}