nus-yam/ex-repair huggingface dataset:
Program: 116906
Project: 116906
Buggy source:
/** 
 * @see HttpServlet#doPost(HttpServletRequest request,HttpServletResponse response)
 */
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  requestInformation.set(new RequestInformation());
  RequestInformation requestInfo=requestInformation.get();
  History history=new History();
  logOriginalRequestHistory("String_Node_Str",request,history);
  requestInfo.originalRequestInfo=new HttpRequestInfo(request);
  try {
    PostMethod postMethodProxyRequest=new PostMethod(this.getProxyURL(request,history,Constants.REQUEST_TYPE_POST));
    setProxyRequestHeaders(request,postMethodProxyRequest);
    if (ServletFileUpload.isMultipartContent(request)) {
      logger.info("String_Node_Str");
      DiskFileItemFactory diskFactory=createDiskFactory();
      HttpUtilities.handleMultipartPost(postMethodProxyRequest,request,diskFactory);
    }
 else {
      logger.info("String_Node_Str");
      HttpUtilities.handleStandardPost(postMethodProxyRequest,request,history);
    }
    this.cullPathsByBodyFilter(history);
    this.executeProxyRequest(postMethodProxyRequest,request,response,history);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @see HttpServlet#doPost(HttpServletRequest request,HttpServletResponse response)
 */
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  requestInformation.set(new RequestInformation());
  RequestInformation requestInfo=requestInformation.get();
  History history=new History();
  logOriginalRequestHistory("String_Node_Str",request,history);
  try {
    PostMethod postMethodProxyRequest=new PostMethod(this.getProxyURL(request,history,Constants.REQUEST_TYPE_POST));
    setProxyRequestHeaders(request,postMethodProxyRequest);
    if (ServletFileUpload.isMultipartContent(request)) {
      logger.info("String_Node_Str");
      DiskFileItemFactory diskFactory=createDiskFactory();
      HttpUtilities.handleMultipartPost(postMethodProxyRequest,request,diskFactory);
    }
 else {
      logger.info("String_Node_Str");
      HttpUtilities.handleStandardPost(postMethodProxyRequest,request,history);
    }
    this.cullPathsByBodyFilter(history);
    requestInfo.originalRequestInfo=new HttpRequestInfo(request,history.getOriginalRequestPostData());
    this.executeProxyRequest(postMethodProxyRequest,request,response,history);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e.getMessage());
  }
}
Program: 116907
Project: 116907
Buggy source:
/** 
 * @see HttpServlet#doPut(HttpServletRequest request,HttpServletResponse response)
 */
protected void doPut(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  requestInformation.set(new RequestInformation());
  RequestInformation requestInfo=requestInformation.get();
  History history=new History();
  logOriginalRequestHistory("String_Node_Str",request,history);
  requestInfo.originalRequestInfo=new HttpRequestInfo(request);
  try {
    PutMethod putMethodProxyRequest=new PutMethod(this.getProxyURL(request,history,Constants.REQUEST_TYPE_PUT));
    setProxyRequestHeaders(request,putMethodProxyRequest);
    if (ServletFileUpload.isMultipartContent(request)) {
      logger.info("String_Node_Str");
      DiskFileItemFactory diskFactory=createDiskFactory();
      HttpUtilities.handleMultipartPost(putMethodProxyRequest,request,diskFactory);
    }
 else {
      logger.info("String_Node_Str");
      HttpUtilities.handleStandardPost(putMethodProxyRequest,request,history);
    }
    this.cullPathsByBodyFilter(history);
    this.executeProxyRequest(putMethodProxyRequest,request,response,history);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @see HttpServlet#doPut(HttpServletRequest request,HttpServletResponse response)
 */
protected void doPut(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  requestInformation.set(new RequestInformation());
  RequestInformation requestInfo=requestInformation.get();
  History history=new History();
  logOriginalRequestHistory("String_Node_Str",request,history);
  try {
    PutMethod putMethodProxyRequest=new PutMethod(this.getProxyURL(request,history,Constants.REQUEST_TYPE_PUT));
    setProxyRequestHeaders(request,putMethodProxyRequest);
    if (ServletFileUpload.isMultipartContent(request)) {
      logger.info("String_Node_Str");
      DiskFileItemFactory diskFactory=createDiskFactory();
      HttpUtilities.handleMultipartPost(putMethodProxyRequest,request,diskFactory);
    }
 else {
      logger.info("String_Node_Str");
      HttpUtilities.handleStandardPost(putMethodProxyRequest,request,history);
    }
    this.cullPathsByBodyFilter(history);
    requestInfo.originalRequestInfo=new HttpRequestInfo(request,history.getOriginalRequestPostData());
    this.executeProxyRequest(putMethodProxyRequest,request,response,history);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e.getMessage());
  }
}
Program: 116908
Project: 116908
Buggy source:
public static String removePortFromHostHeaderString(String host){
  String hostName="String_Node_Str";
  int portPos=host.indexOf("String_Node_Str");
  if (portPos != -1)   hostName=host.substring(0,portPos);
  return hostName;
}

Fixed version (ground truth):
public static String removePortFromHostHeaderString(String host){
  String hostName=host;
  int portPos=host.indexOf("String_Node_Str");
  if (portPos != -1)   hostName=host.substring(0,portPos);
  return hostName;
}
Program: 116909
Project: 116909
Buggy source:
public void reduce(Text key,Iterable<Text> values,Context context) throws IOException, InterruptedException {
  for (  Text value : values) {
    String logRecord=value.toString();
    Matcher logRecordMatcher=logRecordPattern.matcher(logRecord);
    DateTime timestamp=DateTime.parse(logRecordMatcher.group(2),TIMESTAMP_FORMATTER);
    if (lastTimeStamp == null || (timestamp.getMillis() - lastTimeStamp.getMillis() > SESSION_TIMEOUT_IN_MS)) {
      sessionId++;
    }
    lastTimeStamp=timestamp;
    result.set(logRecord + "String_Node_Str" + sessionId);
    context.write(null,result);
  }
}

Fixed version (ground truth):
public void reduce(IpTimestampKey key,Iterable<Text> values,Context context) throws IOException, InterruptedException {
  for (  Text value : values) {
    String logRecord=value.toString();
    if (lastTimeStamp == null || (key.getUnixTimestamp() - lastTimeStamp > SESSION_TIMEOUT_IN_MS)) {
      sessionId++;
    }
    lastTimeStamp=key.getUnixTimestamp();
    result.set(logRecord + "String_Node_Str" + sessionId);
    context.write(null,result);
  }
}
Program: 116910
Project: 116910
Buggy source:
public void map(Object key,Text value,Context context) throws IOException, InterruptedException {
  logRecordMatcher=logRecordPattern.matcher(value.toString());
  if (logRecordMatcher.matches()) {
    String ip=logRecordMatcher.group(1);
    Long unixTimestamp=Long.parseLong(logRecordMatcher.group(2));
    IpTimestampKey outputKey=new IpTimestampKey(ip,unixTimestamp);
    context.write(outputKey,value);
  }
}

Fixed version (ground truth):
public void map(Object key,Text value,Context context) throws IOException, InterruptedException {
  logRecordMatcher=logRecordPattern.matcher(value.toString());
  if (logRecordMatcher.matches()) {
    String ip=logRecordMatcher.group(1);
    DateTime timestamp=DateTime.parse(logRecordMatcher.group(2),TIMESTAMP_FORMATTER);
    Long unixTimestamp=timestamp.getMillis();
    IpTimestampKey outputKey=new IpTimestampKey(ip,unixTimestamp);
    context.write(outputKey,value);
  }
}
Program: 116911
Project: 116911
Buggy source:
@Override public void onClick(View v){
  if (!currentRoom.isFree())   return;
  TimeSpan limits=currentRoom.getNextFreeTime();
  if (limits == null)   return;
  DateTime now=new DateTime();
  TimeSpan suggested=new TimeSpan(now,now.add(Calendar.MINUTE,DEFAULT_BOOK_NOW_DURATION));
  if (limits.getEnd().before(suggested.getEnd())) {
    suggested=limits;
  }
  final RoomReservationPopup d=new RoomReservationPopup(RoomActivity.this,limits,suggested,currentRoom);
  d.setOnReserveCallback(new OnReserveListener(){
    @Override public void call(    LobbyReservationRowView v){
      d.dismiss();
      refreshData();
    }
  }
);
  RoomActivity.this.trafficLights.disable();
  d.setOnDismissListener(new OnDismissListener(){
    @Override public void onDismiss(    DialogInterface dialog){
      RoomActivity.this.trafficLights.enable();
    }
  }
);
  d.show();
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (!currentRoom.isFree())   return;
  TimeSpan limits=currentRoom.getNextFreeTime();
  DateTime now=new DateTime();
  TimeSpan suggested=new TimeSpan(now,now.add(Calendar.MINUTE,DEFAULT_BOOK_NOW_DURATION));
  if (limits == null) {
    limits=suggested;
  }
 else   if (limits.getEnd().before(suggested.getEnd())) {
    suggested=limits;
  }
  final RoomReservationPopup d=new RoomReservationPopup(RoomActivity.this,limits,suggested,currentRoom);
  d.setOnReserveCallback(new OnReserveListener(){
    @Override public void call(    LobbyReservationRowView v){
      d.dismiss();
      refreshData();
    }
  }
);
  RoomActivity.this.trafficLights.disable();
  d.setOnDismissListener(new OnDismissListener(){
    @Override public void onDismiss(    DialogInterface dialog){
      RoomActivity.this.trafficLights.enable();
    }
  }
);
  d.show();
}
Program: 116914
Project: 116914
Buggy source:
private boolean login(String username,String password){
  DataProxy dataProxy=((ReservatorApplication)getApplication()).getDataProxy();
  try {
    username="String_Node_Str";
    password="String_Node_Str";
    dataProxy.setCredentials(username,password);
    dataProxy.getRooms();
    SharedPreferences preferences=getSharedPreferences(this.getString(R.string.PREFERENCES_NAME),0);
    Editor editor=preferences.edit();
    editor.putString("String_Node_Str",username);
    editor.putString("String_Node_Str",password);
    editor.commit();
    Intent i=new Intent(this,LobbyActivity.class);
    startActivityForResult(i,0);
    return true;
  }
 catch (  ReservatorException ex) {
    Toast err=Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG);
    err.show();
    return false;
  }
}

Fixed version (ground truth):
private boolean login(String username,String password){
  DataProxy dataProxy=((ReservatorApplication)getApplication()).getDataProxy();
  try {
    dataProxy.setCredentials(username,password);
    dataProxy.getRooms();
    SharedPreferences preferences=getSharedPreferences(this.getString(R.string.PREFERENCES_NAME),0);
    Editor editor=preferences.edit();
    editor.putString("String_Node_Str",username);
    editor.putString("String_Node_Str",password);
    editor.commit();
    Intent i=new Intent(this,LobbyActivity.class);
    startActivityForResult(i,0);
    return true;
  }
 catch (  ReservatorException ex) {
    Toast err=Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG);
    err.show();
    return false;
  }
}
Program: 116915
Project: 116915
Buggy source:
private void startAutoGoToFavouriteRoom(){
  if (prehensible) {
    handler.postDelayed(goToFavouriteRoomRunable,100000);
  }
}

Fixed version (ground truth):
private void startAutoGoToFavouriteRoom(){
  if (prehensible) {
    handler.postDelayed(goToFavouriteRoomRunable,60000);
  }
}
Program: 116916
Project: 116916
Buggy source:
private void startAutoRefreshData(){
  handler.postDelayed(refreshDataRunnable,100000);
}

Fixed version (ground truth):
private void startAutoRefreshData(){
  handler.postDelayed(refreshDataRunnable,60000);
}
Program: 116917
Project: 116917
Buggy source:
@Override public void refreshFailed(ReservatorException e){
  Builder alertBuilder=new AlertDialog.Builder(this);
  alertBuilder.setTitle("String_Node_Str").setMessage(e.getMessage()).show();
  hideLoading();
}

Fixed version (ground truth):
@Override public void refreshFailed(ReservatorException e){
  hideLoading();
  stopAutoRefreshData();
  Toast err=Toast.makeText(this,e.getMessage(),Toast.LENGTH_LONG);
  err.show();
  startAutoRefreshData();
  return;
}
Program: 116918
Project: 116918
Buggy source:
@Override public void onPause(){
  String serverAddress=serverAddressView.getText().toString().trim();
  String roomName=roomNameView.getSelectedItem().toString().trim();
  editor.putString(getString(R.string.PREFERENCES_SERVER_ADDRESS),serverAddress);
  editor.putString(getString(R.string.PREFERENCES_ROOM_NAME),roomName);
  editor.commit();
  proxy.setServer(serverAddress);
  super.onPause();
}

Fixed version (ground truth):
@Override public void onPause(){
  String serverAddress=serverAddressView.getText().toString().trim();
  Object selectedRoomName=roomNameView.getSelectedItem();
  String roomName="String_Node_Str";
  if (selectedRoomName != null) {
    roomName=selectedRoomName.toString().trim();
  }
  editor.putString(getString(R.string.PREFERENCES_SERVER_ADDRESS),serverAddress);
  editor.putString(getString(R.string.PREFERENCES_ROOM_NAME),roomName);
  editor.commit();
  proxy.setServer(serverAddress);
  super.onPause();
}
Program: 116920
Project: 116920
Buggy source:
/** 
 * Time in minutes the room is free Precondition: room is free
 * @param from
 * @return Integer.MAX_VALUE if no reservations in future
 */
public int minutesFreeFrom(DateTime from){
  for (  Reservation r : reservations) {
    if (r.getStartTime().after(from)) {
      return (int)(r.getStartTime().getTimeInMillis() - from.getTimeInMillis()) / 60000;
    }
  }
  return Integer.MAX_VALUE;
}

Fixed version (ground truth):
/** 
 * Time in minutes the room is free Precondition: room is free
 * @param from
 * @return Integer.MAX_VALUE if no reservations in future
 */
public int minutesFreeFrom(DateTime from){
  for (  Reservation r : reservations) {
    if (r.getStartTime().after(from)) {
      return (int)((r.getStartTime().getTimeInMillis() - from.getTimeInMillis()) / 60000);
    }
  }
  return Integer.MAX_VALUE;
}
Program: 116921
Project: 116921
Buggy source:
public void run(){
  while (Math.abs(startDelta) < animStep || Math.abs(endDelta) < animStep) {
    TimeBarView.this.span=new TimeSpan(TimeBarView.this.span.getStart().add(Calendar.MILLISECOND,(int)Math.signum(startDelta) * animStep),TimeBarView.this.span.getEnd().add(Calendar.MILLISECOND,(int)Math.signum(endDelta) * animStep));
    startDelta-=Math.signum(startDelta) * animStep;
    endDelta-=Math.signum(endDelta) * animStep;
    postInvalidate();
    try {
      Thread.sleep(10);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
  TimeBarView.this.span=targetTimeSpan;
  postInvalidate();
  animatorThread=null;
}

Fixed version (ground truth):
public void run(){
  while (Math.abs(startDelta) > animStep || Math.abs(endDelta) > animStep) {
    TimeBarView.this.span=new TimeSpan(TimeBarView.this.span.getStart().add(Calendar.MILLISECOND,(int)Math.signum(startDelta) * animStep),TimeBarView.this.span.getEnd().add(Calendar.MILLISECOND,(int)Math.signum(endDelta) * animStep));
    startDelta-=Math.signum(startDelta) * animStep;
    endDelta-=Math.signum(endDelta) * animStep;
    postInvalidate();
    try {
      Thread.sleep(10);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
  TimeBarView.this.span=targetTimeSpan;
  postInvalidate();
  animatorThread=null;
}
Program: 116922
Project: 116922
Buggy source:
public void setSpan(TimeSpan span){
  if (this.span == null || !animationEnabled) {
    this.span=span;
    this.targetTimeSpan=span;
    return;
  }
  targetTimeSpan=span;
  startDelta=span.getStart().getTimeInMillis() - this.span.getStart().getTimeInMillis();
  endDelta=span.getEnd().getTimeInMillis() - this.span.getEnd().getTimeInMillis();
  animStep=(int)Math.max(Math.max(Math.abs(endDelta),Math.abs(startDelta)) / 10,60000);
  if (animatorThread == null) {
    animatorThread=new Thread(){
      public void run(){
        while (Math.abs(startDelta) < animStep || Math.abs(endDelta) < animStep) {
          TimeBarView.this.span=new TimeSpan(TimeBarView.this.span.getStart().add(Calendar.MILLISECOND,(int)Math.signum(startDelta) * animStep),TimeBarView.this.span.getEnd().add(Calendar.MILLISECOND,(int)Math.signum(endDelta) * animStep));
          startDelta-=Math.signum(startDelta) * animStep;
          endDelta-=Math.signum(endDelta) * animStep;
          postInvalidate();
          try {
            Thread.sleep(10);
          }
 catch (          InterruptedException e) {
            e.printStackTrace();
          }
        }
        TimeBarView.this.span=targetTimeSpan;
        postInvalidate();
        animatorThread=null;
      }
    }
;
    animatorThread.start();
  }
  invalidate();
}

Fixed version (ground truth):
public void setSpan(TimeSpan span){
  if (this.span == null || !animationEnabled) {
    this.span=span;
    this.targetTimeSpan=span;
    return;
  }
  targetTimeSpan=span;
  startDelta=span.getStart().getTimeInMillis() - this.span.getStart().getTimeInMillis();
  endDelta=span.getEnd().getTimeInMillis() - this.span.getEnd().getTimeInMillis();
  animStep=(int)Math.max(Math.max(Math.abs(endDelta),Math.abs(startDelta)) / 10,60000);
  if (animatorThread == null) {
    animatorThread=new Thread(){
      public void run(){
        while (Math.abs(startDelta) > animStep || Math.abs(endDelta) > animStep) {
          TimeBarView.this.span=new TimeSpan(TimeBarView.this.span.getStart().add(Calendar.MILLISECOND,(int)Math.signum(startDelta) * animStep),TimeBarView.this.span.getEnd().add(Calendar.MILLISECOND,(int)Math.signum(endDelta) * animStep));
          startDelta-=Math.signum(startDelta) * animStep;
          endDelta-=Math.signum(endDelta) * animStep;
          postInvalidate();
          try {
            Thread.sleep(10);
          }
 catch (          InterruptedException e) {
            e.printStackTrace();
          }
        }
        TimeBarView.this.span=targetTimeSpan;
        postInvalidate();
        animatorThread=null;
      }
    }
;
    animatorThread.start();
  }
  invalidate();
}
Program: 116923
Project: 116923
Buggy source:
@Override public void roomListUpdated(Vector<Room> rooms){
  for (  Room r : rooms) {
    RoomsInfo info=RoomsInfo.getRoomsInfo(r);
    if (info.isProjectRoom()) {
      return;
    }
    showLoading();
    proxy.refreshRoomReservations(r);
  }
  hideLoading();
}

Fixed version (ground truth):
@Override public void roomListUpdated(Vector<Room> rooms){
  for (  Room r : rooms) {
    RoomsInfo info=RoomsInfo.getRoomsInfo(r);
    if (info.isProjectRoom()) {
      continue;
    }
    showLoading();
    proxy.refreshRoomReservations(r);
  }
  hideLoading();
}
Program: 116925
Project: 116925
Buggy source:
public List<com.futurice.android.reservator.model.Reservation> getReservations(com.futurice.android.reservator.model.Room room) throws ReservatorException {
  GetUserAvailabilityResponse response=body.getGetUserAvailabilityResponse();
  if (response == null || !response.getResponseCode().equals("String_Node_Str") || !response.getResponseClass().equals("String_Node_Str")) {
    throw new ReservatorException("String_Node_Str");
  }
  List<com.futurice.android.reservator.model.Reservation> reservations=new ArrayList<com.futurice.android.reservator.model.Reservation>();
  if (response.getCalendarEventArray() == null)   return reservations;
  Calendar startTime=Calendar.getInstance();
  Calendar endTime=Calendar.getInstance();
  for (  CalendarEvent event : response.getCalendarEventArray()) {
    try {
      startTime.setTime(SoapDataProxy.dateFormat.parse(event.getStartTime()));
      endTime.setTime(SoapDataProxy.dateFormat.parse(event.getEndTime()));
    }
 catch (    ParseException e) {
      throw new ReservatorException(e);
    }
    reservations.add(new com.futurice.android.reservator.model.Reservation(room,event.subject,startTime,endTime));
  }
  return reservations;
}

Fixed version (ground truth):
public List<com.futurice.android.reservator.model.Reservation> getReservations(com.futurice.android.reservator.model.Room room) throws ReservatorException {
  GetUserAvailabilityResponse response=body.getGetUserAvailabilityResponse();
  if (response == null || !response.getResponseCode().equals("String_Node_Str") || !response.getResponseClass().equals("String_Node_Str")) {
    throw new ReservatorException("String_Node_Str");
  }
  List<com.futurice.android.reservator.model.Reservation> reservations=new ArrayList<com.futurice.android.reservator.model.Reservation>();
  if (response.getCalendarEventArray() == null)   return reservations;
  Calendar startTime=Calendar.getInstance();
  Calendar endTime=Calendar.getInstance();
  for (  CalendarEvent event : response.getCalendarEventArray()) {
    try {
      startTime.setTime(SoapDataProxy.dateFormat.parse(event.getStartTime()));
      endTime.setTime(SoapDataProxy.dateFormat.parse(event.getEndTime()));
    }
 catch (    ParseException e) {
      throw new ReservatorException(e);
    }
    reservations.add(new com.futurice.android.reservator.model.Reservation(room,event.subject,(Calendar)startTime.clone(),(Calendar)endTime.clone()));
  }
  return reservations;
}
Program: 116926
Project: 116926
Buggy source:
public CalendarView(Context context,AttributeSet attrs){
  super(context,attrs);
  gridPaint=new Paint();
  gridPaint.setColor(Color.argb(255,209,211,212));
  innerLayout=new LinearLayout(context);
  this.addView(innerLayout,LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
  hourColumn=new LinearLayout(getContext());
  hourColumn.setPadding(0,0,0,BOTTOM_PADDING);
  hourColumn.setOrientation(LinearLayout.VERTICAL);
  hourColumn.addView(new TextView(getContext()));
  hourColumn.addView(new TextView(getContext()));
  for (int i=startHour.get(Calendar.HOUR_OF_DAY); i < endHour.get(Calendar.HOUR_OF_DAY); i++) {
    TextView tv=new TextView(getContext());
    tv.setText(Html.fromHtml(i + "String_Node_Str"));
    tv.setGravity(Gravity.TOP | Gravity.RIGHT);
    LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,1,1);
    lp.weight=1;
    hourColumn.addView(tv,lp);
  }
  innerLayout.addView(hourColumn,LayoutParams.WRAP_CONTENT,LayoutParams.FILL_PARENT);
  addVerticalDelimeter(THIN_DELIM,innerLayout);
  inflate(context,R.layout.calendar_view,this);
  scrollView=(LinearLayout)findViewById(R.id.linearLayout1);
}

Fixed version (ground truth):
public CalendarView(Context context,AttributeSet attrs){
  super(context,attrs);
  gridPaint=new Paint();
  gridPaint.setColor(Color.argb(255,209,211,212));
  hourColumn=new LinearLayout(getContext());
  hourColumn.setPadding(0,0,0,BOTTOM_PADDING);
  hourColumn.setOrientation(LinearLayout.VERTICAL);
  hourColumn.addView(new TextView(getContext()));
  hourColumn.addView(new TextView(getContext()));
  for (int i=startHour.get(Calendar.HOUR_OF_DAY); i < endHour.get(Calendar.HOUR_OF_DAY); i++) {
    TextView tv=new TextView(getContext());
    tv.setText(Html.fromHtml(i + "String_Node_Str"));
    tv.setGravity(Gravity.TOP | Gravity.RIGHT);
    LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,1,1);
    lp.weight=1;
    hourColumn.addView(tv,lp);
  }
  addView(hourColumn,LayoutParams.WRAP_CONTENT,LayoutParams.FILL_PARENT);
  addVerticalDelimeter(THIN_DELIM,this);
  inflate(context,R.layout.calendar_view,this);
  scrollView=(LinearLayout)findViewById(R.id.linearLayout1);
}
Program: 116927
Project: 116927
Buggy source:
@Override public void onClick(View v){
  if (v == startMinus) {
    int start=currentTimeStart - timeStep;
    currentTimeStart=Math.max(start,minimumTime);
    refreshLabels();
  }
 else   if (v == startPlus) {
    int start=currentTimeStart + timeStep;
    currentTimeStart=Math.min(start,currentTimeEnd - minimumDuration);
    refreshLabels();
  }
 else   if (v == endMinus) {
  }
 else   if (v == endPlus) {
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (v == startMinus) {
    int start=quantize(currentTimeStart - timeStep);
    currentTimeStart=Math.max(start,minimumTime);
    refreshLabels();
  }
 else   if (v == startPlus) {
    int start=quantize(currentTimeStart + timeStep);
    currentTimeStart=Math.min(start,currentTimeEnd - minimumDuration);
    refreshLabels();
  }
 else   if (v == endMinus) {
    int end=quantize(currentTimeEnd - timeStep);
    currentTimeEnd=Math.max(end,currentTimeStart + minimumDuration);
    refreshLabels();
  }
 else   if (v == endPlus) {
    int end=quantize(currentTimeEnd + timeStep);
    currentTimeEnd=Math.min(end,maximumTime);
    refreshLabels();
  }
}
Program: 116928
Project: 116928
Buggy source:
public Calendar getEndTime(){
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
public Calendar getEndTime(){
  Calendar ret=(Calendar)currentDay.clone();
  ret.set(Calendar.HOUR_OF_DAY,currentTimeEnd / 60);
  ret.set(Calendar.MINUTE,currentTimeEnd % 60);
  ret.set(Calendar.SECOND,0);
  ret.set(Calendar.MILLISECOND,0);
  return ret;
}
Program: 116929
Project: 116929
Buggy source:
public Calendar getStartTime(){
  Calendar ret=(Calendar)currentDay.clone();
  ret.set(Calendar.HOUR_OF_DAY,currentTimeStart / 60);
  ret.set(Calendar.MINUTE,currentTimeEnd % 60);
  ret.set(Calendar.SECOND,0);
  ret.set(Calendar.MILLISECOND,0);
  return ret;
}

Fixed version (ground truth):
public Calendar getStartTime(){
  Calendar ret=(Calendar)currentDay.clone();
  ret.set(Calendar.HOUR_OF_DAY,currentTimeStart / 60);
  ret.set(Calendar.MINUTE,currentTimeStart % 60);
  ret.set(Calendar.SECOND,0);
  ret.set(Calendar.MILLISECOND,0);
  return ret;
}
Program: 116930
Project: 116930
Buggy source:
public void setMinimumTime(Calendar cal){
  currentDay=(Calendar)cal.clone();
  int min=cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
  if (min > maximumTime)   throw new IllegalArgumentException("String_Node_Str");
  minimumTime=min;
  if (currentTimeStart < minimumTime) {
    currentTimeStart=minimumTime;
  }
  if (currentTimeEnd < minimumTime) {
    currentTimeEnd=Math.min(maximumTime,minimumTime + minimumDuration);
  }
  refreshLabels();
}

Fixed version (ground truth):
public void setMinimumTime(Calendar cal){
  int min=cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
  if (min > maximumTime)   throw new IllegalArgumentException("String_Node_Str");
  minimumTime=min;
  if (currentTimeStart < minimumTime) {
    currentTimeStart=minimumTime;
  }
  if (currentTimeEnd < minimumTime) {
    currentTimeEnd=Math.min(maximumTime,minimumTime + minimumDuration);
  }
  refreshLabels();
  currentDay=(Calendar)cal.clone();
}
Program: 116931
Project: 116931
Buggy source:
public void setMaximumTime(Calendar cal){
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
public void setMaximumTime(Calendar cal){
  int max=cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
  if (max < minimumTime)   throw new IllegalArgumentException("String_Node_Str");
  maximumTime=max;
  if (currentTimeEnd > maximumTime) {
    currentTimeEnd=maximumTime;
  }
  if (currentTimeStart > maximumTime) {
    currentTimeStart=Math.max(minimumTime,maximumTime - minimumDuration);
  }
  currentDay=(Calendar)cal.clone();
}
Program: 116932
Project: 116932
Buggy source:
public void setMaxTime(Calendar time){
  this.maxTime=time;
}

Fixed version (ground truth):
public void setMaxTime(Calendar time){
  timePicker2.setMaximumTime(time);
}
Program: 116933
Project: 116933
Buggy source:
protected void setReserveMode(){
  refreshData();
  this.setBackgroundColor(getResources().getColor(R.color.FutuLightGreen));
  reserveButton.setEnabled(false);
  bookingMode.setVisibility(View.VISIBLE);
  normalMode.setVisibility(View.GONE);
}

Fixed version (ground truth):
protected void setReserveMode(){
  this.setBackgroundColor(getResources().getColor(R.color.FutuLightGreen));
  reserveButton.setEnabled(false);
  bookingMode.setVisibility(View.VISIBLE);
  normalMode.setVisibility(View.GONE);
}
Program: 116934
Project: 116934
Buggy source:
private void refreshData(){
  if (maxTime == null || minTime == null) {
    Reservation nextFreeTime=room.getNextFreeTime();
    timePicker.setMinTime(nextFreeTime.getBeginTime());
    timePicker.setMaxTime(nextFreeTime.getEndTime());
  }
 else {
    timePicker.setMinTime(minTime);
    timePicker.setMaxTime(maxTime);
  }
  Reservation nextFreeTime=room.getNextFreeTime();
  timePicker.setMinTime(nextFreeTime.getBeginTime());
  timePicker.setMaxTime(nextFreeTime.getEndTime());
  RoomsInfo info=RoomsInfo.getRoomsInfo(room);
  roomNameView.setText(info.getRoomName());
  if (info.getRoomNumber() == 0) {
    roomInfoView.setText("String_Node_Str" + info.getRoomSize());
  }
 else {
    roomInfoView.setText(Integer.toString(info.getRoomNumber()) + "String_Node_Str" + info.getRoomSize());
  }
  boolean bookable=false;
  if (room.isFree()) {
    int freeMinutes=room.minutesFreeFromNow();
    bookable=true;
    if (freeMinutes > 180) {
      roomStatusView.setText("String_Node_Str");
    }
 else     if (freeMinutes < 15) {
      roomStatusView.setText("String_Node_Str");
      bookable=false;
    }
 else {
      roomStatusView.setText("String_Node_Str" + Helpers.humanizeTimeSpan(freeMinutes));
    }
  }
 else {
    roomStatusView.setText("String_Node_Str");
  }
  if (bookable) {
    roomStatusView.setTextColor(getResources().getColor(R.color.StatusFreeColor));
    bookNowButton.setVisibility(View.VISIBLE);
  }
 else {
    roomStatusView.setTextColor(getResources().getColor(R.color.StatusReservedColor));
    bookNowButton.setVisibility(View.INVISIBLE);
  }
}

Fixed version (ground truth):
private void refreshData(){
  Reservation nextFreeTime=room.getNextFreeTime();
  timePicker.setMinTime(nextFreeTime.getBeginTime());
  timePicker.setMaxTime(nextFreeTime.getEndTime());
  timePicker2.setMinimumTime(nextFreeTime.getBeginTime());
  timePicker2.setMaximumTime(nextFreeTime.getEndTime());
  timePicker2.setEndTimeRelatively(60);
  RoomsInfo info=RoomsInfo.getRoomsInfo(room);
  roomNameView.setText(info.getRoomName());
  if (info.getRoomNumber() == 0) {
    roomInfoView.setText("String_Node_Str" + info.getRoomSize());
  }
 else {
    roomInfoView.setText(Integer.toString(info.getRoomNumber()) + "String_Node_Str" + info.getRoomSize());
  }
  boolean bookable=false;
  if (room.isFree()) {
    int freeMinutes=room.minutesFreeFromNow();
    bookable=true;
    if (freeMinutes > 180) {
      roomStatusView.setText("String_Node_Str");
    }
 else     if (freeMinutes < 15) {
      roomStatusView.setText("String_Node_Str");
      bookable=false;
    }
 else {
      roomStatusView.setText("String_Node_Str" + Helpers.humanizeTimeSpan(freeMinutes));
    }
  }
 else {
    roomStatusView.setText("String_Node_Str");
  }
  if (bookable) {
    roomStatusView.setTextColor(getResources().getColor(R.color.StatusFreeColor));
    bookNowButton.setVisibility(View.VISIBLE);
  }
 else {
    roomStatusView.setTextColor(getResources().getColor(R.color.StatusReservedColor));
    bookNowButton.setVisibility(View.INVISIBLE);
  }
}
Program: 116935
Project: 116935
Buggy source:
public void setMinTime(Calendar time){
  this.minTime=time;
}

Fixed version (ground truth):
public void setMinTime(Calendar time){
  timePicker2.setMinimumTime(time);
}
Program: 116936
Project: 116936
Buggy source:
public RoomReservationView(Context context,AttributeSet attrs){
  super(context,attrs);
  inflate(context,R.layout.lobby_reservation_row,this);
  cancelButton=findViewById(R.id.cancelButton);
  cancelButton.setOnClickListener(this);
  bookNowButton=findViewById(R.id.bookNowButton);
  bookNowButton.setOnClickListener(this);
  titleView=findViewById(R.id.titleLayout);
  titleView.setOnClickListener(this);
  reserveButton=findViewById(R.id.reserveButton);
  reserveButton.setOnClickListener(this);
  calendarButton=findViewById(R.id.calendarButton);
  calendarButton.setOnClickListener(this);
  bookingMode=findViewById(R.id.bookingMode);
  normalMode=findViewById(R.id.normalMode);
  nameField=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView1);
  nameField.setOnItemClickListener(this);
  nameField.setAdapter(new FumAddressBookAdapter(context));
  nameField.setOnFocusChangeListener(userNameFocusChangeListener);
  timePicker=(CustomTimeSpanPicker)findViewById(R.id.timeSpanPicker1);
  roomNameView=(TextView)findViewById(R.id.roomNameLabel);
  roomInfoView=(TextView)findViewById(R.id.roomInfoLabel);
  roomStatusView=(TextView)findViewById(R.id.roomStatusLabel);
}

Fixed version (ground truth):
public RoomReservationView(Context context,AttributeSet attrs){
  super(context,attrs);
  inflate(context,R.layout.lobby_reservation_row,this);
  cancelButton=findViewById(R.id.cancelButton);
  cancelButton.setOnClickListener(this);
  bookNowButton=findViewById(R.id.bookNowButton);
  bookNowButton.setOnClickListener(this);
  titleView=findViewById(R.id.titleLayout);
  titleView.setOnClickListener(this);
  reserveButton=findViewById(R.id.reserveButton);
  reserveButton.setOnClickListener(this);
  calendarButton=findViewById(R.id.calendarButton);
  calendarButton.setOnClickListener(this);
  bookingMode=findViewById(R.id.bookingMode);
  normalMode=findViewById(R.id.normalMode);
  nameField=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView1);
  nameField.setOnItemClickListener(this);
  nameField.setAdapter(new FumAddressBookAdapter(context));
  nameField.setOnFocusChangeListener(userNameFocusChangeListener);
  timePicker=(CustomTimeSpanPicker)findViewById(R.id.timeSpanPicker1);
  timePicker2=(CustomTimeSpanPicker2)findViewById(R.id.timeSpanPicker2);
  roomNameView=(TextView)findViewById(R.id.roomNameLabel);
  roomInfoView=(TextView)findViewById(R.id.roomInfoLabel);
  roomStatusView=(TextView)findViewById(R.id.roomStatusLabel);
}
Program: 116937
Project: 116937
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public JSONObject enrich(String metadataIn){
  String metadata=tldex.extract2LD(metadataIn);
  LOG.trace("String_Node_Str" + metadata);
  JSONObject output=new JSONObject();
  JSONObject payload=new JSONObject();
  Get get=new Get(metadata.getBytes());
  Result rs;
  try {
    rs=table.get(get);
    for (    KeyValue kv : rs.raw())     payload.put(metadata,new String(kv.getValue()));
    output.put("String_Node_Str",payload);
  }
 catch (  IOException e) {
    output.put(metadata,"String_Node_Str");
    e.printStackTrace();
  }
  return output;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public JSONObject enrich(String metadataIn){
  String metadata=tldex.extract2LD(metadataIn);
  LOG.trace("String_Node_Str" + metadata);
  JSONObject output=new JSONObject();
  JSONObject payload=new JSONObject();
  Get get=new Get(metadata.getBytes());
  Result rs;
  try {
    rs=table.get(get);
    for (    KeyValue kv : rs.raw())     payload.put(metadata,new String(kv.getValue()));
    output.put("String_Node_Str",payload);
  }
 catch (  IOException e) {
    payload.put(metadata,"String_Node_Str");
    output.put("String_Node_Str",payload);
    e.printStackTrace();
  }
  return output;
}
Program: 116939
Project: 116939
Buggy source:
private long getTimeStamp(String toParse,String delimiter) throws ParseException {
  String[] tokens=toParse.split("String_Node_Str");
  String timeStamp="String_Node_Str";
  String month=tokens[0].replace(delimiter,"String_Node_Str");
  String day=tokens[1];
  String time=tokens[2];
  long ts=convertToEpoch(month,day,time,true);
  return ts;
}

Fixed version (ground truth):
private long getTimeStamp(String toParse,String delimiter) throws ParseException {
  long ts=0;
  String month=null;
  String day=null;
  String time=null;
  Matcher tsMatcher=tsPattern.matcher(toParse);
  if (tsMatcher.find()) {
    month=tsMatcher.group(1);
    day=tsMatcher.group(2);
    time=tsMatcher.group(3);
  }
 else {
    _LOG.warn("String_Node_Str" + toParse);
    ts=convertToEpoch(month,day,time,true);
  }
  return ts;
}
Program: 116940
Project: 116940
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public JSONObject parse(byte[] msg){
  JSONObject outputMessage=new JSONObject();
  String toParse="String_Node_Str";
  try {
    toParse=new String(msg,"String_Node_Str");
    _LOG.debug("String_Node_Str" + toParse);
    parseMessage(toParse,outputMessage);
    outputMessage.put("String_Node_Str",System.currentTimeMillis());
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    return outputMessage;
  }
 catch (  Exception e) {
    e.printStackTrace();
    _LOG.error("String_Node_Str" + toParse);
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public JSONObject parse(byte[] msg){
  JSONObject outputMessage=new JSONObject();
  String toParse="String_Node_Str";
  try {
    toParse=new String(msg,"String_Node_Str");
    _LOG.debug("String_Node_Str" + toParse);
    parseMessage(toParse,outputMessage);
    outputMessage.put("String_Node_Str",System.currentTimeMillis());
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",outputMessage.remove("String_Node_Str"));
    outputMessage.put("String_Node_Str",toParse);
    return outputMessage;
  }
 catch (  Exception e) {
    e.printStackTrace();
    _LOG.error("String_Node_Str" + toParse);
    return null;
  }
}
Program: 116941
Project: 116941
Buggy source:
@Override public JSONObject parse(byte[] raw_message){
  String toParse="String_Node_Str";
  JSONObject toReturn;
  try {
    toParse=new String(raw_message,"String_Node_Str");
    System.out.println("String_Node_Str" + toParse);
    Match gm=grok.match(toParse);
    gm.captures();
    toReturn=new JSONObject();
    toReturn.putAll(gm.toMap());
    String str=toReturn.get("String_Node_Str").toString();
    String pattern=patternMap.get(str);
    Map<String,Object> response=getMap(pattern,toParse);
    toReturn.putAll(response);
    toReturn.put("String_Node_Str",convertToEpoch(toReturn.get("String_Node_Str").toString(),toReturn.get("String_Node_Str").toString(),toReturn.get("String_Node_Str").toString(),true));
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.put("String_Node_Str",toReturn.remove("String_Node_Str"));
    return toReturn;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
@Override public JSONObject parse(byte[] raw_message){
  String toParse="String_Node_Str";
  JSONObject toReturn;
  try {
    toParse=new String(raw_message,"String_Node_Str");
    System.out.println("String_Node_Str" + toParse);
    Match gm=grok.match(toParse);
    gm.captures();
    toReturn=new JSONObject();
    toReturn.putAll(gm.toMap());
    String str=toReturn.get("String_Node_Str").toString();
    String pattern=patternMap.get(str);
    Map<String,Object> response=getMap(pattern,toParse);
    toReturn.putAll(response);
    toReturn.put("String_Node_Str",convertToEpoch(toReturn.get("String_Node_Str").toString(),toReturn.get("String_Node_Str").toString(),toReturn.get("String_Node_Str").toString(),true));
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.remove("String_Node_Str");
    toReturn.put("String_Node_Str",toReturn.remove("String_Node_Str"));
    toReturn.put("String_Node_Str",toParse);
    return toReturn;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 116942
Project: 116942
Buggy source:
private boolean initializeAlertIndexing(String name){
  try {
    String messageUpstreamComponent=alertComponents.get(alertComponents.size() - 1);
    System.out.println("String_Node_Str" + name + "String_Node_Str"+ messageUpstreamComponent);
    Class loaded_class=Class.forName(config.getString("String_Node_Str"));
    IndexAdapter adapter=(IndexAdapter)loaded_class.newInstance();
    TelemetryIndexingBolt indexing_bolt=new TelemetryIndexingBolt().withIndexIP(config.getString("String_Node_Str")).withIndexPort(config.getInt("String_Node_Str")).withClusterName(config.getString("String_Node_Str")).withIndexName(config.getString("String_Node_Str")).withDocumentName(config.getString("String_Node_Str")).withBulk(config.getInt("String_Node_Str")).withIndexAdapter(adapter).withMetricConfiguration(config);
    String alerts_name=config.getString("String_Node_Str");
    builder.setBolt(alerts_name,indexing_bolt,config.getInt("String_Node_Str")).shuffleGrouping(messageUpstreamComponent,"String_Node_Str").setNumTasks(config.getInt("String_Node_Str"));
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean initializeAlertIndexing(String name){
  try {
    String messageUpstreamComponent=alertComponents.get(alertComponents.size() - 1);
    System.out.println("String_Node_Str" + name + "String_Node_Str"+ messageUpstreamComponent);
    Class loaded_class=Class.forName(config.getString("String_Node_Str"));
    IndexAdapter adapter=(IndexAdapter)loaded_class.newInstance();
    String dateFormat="String_Node_Str";
    if (config.containsKey("String_Node_Str")) {
      dateFormat=config.getString("String_Node_Str");
    }
    TelemetryIndexingBolt indexing_bolt=new TelemetryIndexingBolt().withIndexIP(config.getString("String_Node_Str")).withIndexPort(config.getInt("String_Node_Str")).withClusterName(config.getString("String_Node_Str")).withIndexName(config.getString("String_Node_Str")).withDocumentName(config.getString("String_Node_Str")).withIndexTimestamp(dateFormat).withBulk(config.getInt("String_Node_Str")).withIndexAdapter(adapter).withMetricConfiguration(config);
    String alerts_name=config.getString("String_Node_Str");
    builder.setBolt(alerts_name,indexing_bolt,config.getInt("String_Node_Str")).shuffleGrouping(messageUpstreamComponent,"String_Node_Str").setNumTasks(config.getInt("String_Node_Str"));
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
  return true;
}
Program: 116943
Project: 116943
Buggy source:
private boolean initializeErrorIndexBolt(String component_name){
  try {
    Class loaded_class=Class.forName(config.getString("String_Node_Str"));
    IndexAdapter adapter=(IndexAdapter)loaded_class.newInstance();
    TelemetryIndexingBolt indexing_bolt=new TelemetryIndexingBolt().withIndexIP(config.getString("String_Node_Str")).withIndexPort(config.getInt("String_Node_Str")).withClusterName(config.getString("String_Node_Str")).withIndexName(config.getString("String_Node_Str")).withDocumentName(config.getString("String_Node_Str")).withBulk(config.getInt("String_Node_Str")).withIndexAdapter(adapter).withMetricConfiguration(config);
    BoltDeclarer declarer=builder.setBolt(component_name,indexing_bolt,config.getInt("String_Node_Str")).setNumTasks(config.getInt("String_Node_Str"));
    for (    String component : errorComponents)     declarer.shuffleGrouping(component,"String_Node_Str");
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
private boolean initializeErrorIndexBolt(String component_name){
  try {
    Class loaded_class=Class.forName(config.getString("String_Node_Str"));
    IndexAdapter adapter=(IndexAdapter)loaded_class.newInstance();
    String dateFormat="String_Node_Str";
    if (config.containsKey("String_Node_Str")) {
      dateFormat=config.getString("String_Node_Str");
    }
    TelemetryIndexingBolt indexing_bolt=new TelemetryIndexingBolt().withIndexIP(config.getString("String_Node_Str")).withIndexPort(config.getInt("String_Node_Str")).withClusterName(config.getString("String_Node_Str")).withIndexName(config.getString("String_Node_Str")).withDocumentName(config.getString("String_Node_Str")).withIndexTimestamp(dateFormat).withBulk(config.getInt("String_Node_Str")).withIndexAdapter(adapter).withMetricConfiguration(config);
    BoltDeclarer declarer=builder.setBolt(component_name,indexing_bolt,config.getInt("String_Node_Str")).setNumTasks(config.getInt("String_Node_Str"));
    for (    String component : errorComponents)     declarer.shuffleGrouping(component,"String_Node_Str");
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
}
Program: 116944
Project: 116944
Buggy source:
public void prepare(Map stormConf,TopologyContext context,OutputCollector collector){
  this.collector=collector;
  this.conf=stormConf;
  if (conf.containsKey("String_Node_Str")) {
    this.numberOfCharsToUseForShuffleGrouping=Integer.valueOf(conf.get("String_Node_Str").toString());
  }
  Grouping._Fields a;
  if (conf.containsKey("String_Node_Str")) {
    String timePrecision=conf.get("String_Node_Str").toString();
    if (timePrecision.equalsIgnoreCase("String_Node_Str")) {
      timePrecisonDivisor=1000000L;
    }
 else     if (timePrecision.equalsIgnoreCase("String_Node_Str")) {
      timePrecisonDivisor=1000L;
    }
 else     if (timePrecision.equalsIgnoreCase("String_Node_Str")) {
      timePrecisonDivisor=1L;
    }
  }
}

Fixed version (ground truth):
public void prepare(Map stormConf,TopologyContext context,OutputCollector collector){
  this.collector=collector;
  this.conf=stormConf;
  if (conf.containsKey("String_Node_Str")) {
    this.numberOfCharsToUseForShuffleGrouping=Integer.valueOf(conf.get("String_Node_Str").toString());
  }
  Grouping._Fields a;
}
Program: 116946
Project: 116946
Buggy source:
@Override boolean initializeParsingBolt(String topology_name,String name){
  try {
    String messageUpstreamComponent=messageComponents.get(messageComponents.size() - 1);
    System.out.println("String_Node_Str" + name + "String_Node_Str"+ messageUpstreamComponent);
    builder.setBolt(name,new PcapParserBolt(),config.getInt("String_Node_Str")).setNumTasks(config.getInt("String_Node_Str")).shuffleGrouping(messageUpstreamComponent);
  }
 catch (  Exception e) {
    e.printStackTrace();
    System.exit(0);
  }
  return true;
}

Fixed version (ground truth):
@Override boolean initializeParsingBolt(String topology_name,String name){
  try {
    String messageUpstreamComponent=messageComponents.get(messageComponents.size() - 1);
    System.out.println("String_Node_Str" + name + "String_Node_Str"+ messageUpstreamComponent);
    PcapParserBolt pcapParser=new PcapParserBolt().withTsPrecision(config.getString("String_Node_Str"));
    builder.setBolt(name,pcapParser,config.getInt("String_Node_Str")).setNumTasks(config.getInt("String_Node_Str")).shuffleGrouping(messageUpstreamComponent);
  }
 catch (  Exception e) {
    e.printStackTrace();
    System.exit(0);
  }
  return true;
}