nus-yam/ex-repair huggingface dataset:
Program: 24429
Project: 24429
Buggy source:
/** 
 * Start merging the video files
 */
private void mergeVideoIntoOneFile(){
  previewCameraLayout.removeAllViews();
  File dir=new File(folderPath);
  if (!dir.exists()) {
    dir.mkdirs();
  }
  videofile=new File(dir,fileName + "String_Node_Str");
  VideoMerger videoMerger=new VideoMerger(CuxtomCamActivity.this,videoFiles,videofile);
  videoMerger.setVideoMergeListener(new OnVideoListener(){
    @Override public void onVideoMerged(){
      Intent intent=new Intent();
      intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
      intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
      setResult(RESULT_OK,intent);
      MediaScannerConnection.scanFile(getApplicationContext(),new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
    }
    @Override public void onVideoMergeFailed(    Exception e){
    }
  }
);
  videoMerger.execute();
}

Fixed version (ground truth):
/** 
 * Start merging the video files
 */
private void mergeVideoIntoOneFile(){
  previewCameraLayout.removeAllViews();
  File dir=new File(folderPath);
  if (!dir.exists()) {
    dir.mkdirs();
  }
  videofile=new File(dir,fileName + "String_Node_Str");
  VideoMerger videoMerger=new VideoMerger(CuxtomCamActivity.this,videoFiles,videofile);
  videoMerger.setVideoMergeListener(new OnVideoListener(){
    @Override public void onVideoMerged(){
      Intent intent=new Intent();
      intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
      intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
      setResult(RESULT_OK,intent);
      MediaScannerConnection.scanFile(getApplicationContext(),new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
    }
    @Override public void onVideoMergeFailed(    Exception e){
      Log.e("String_Node_Str",e.getMessage());
    }
  }
);
  videoMerger.execute();
}
Program: 24430
Project: 24430
Buggy source:
@Override public void onVideoMergeFailed(Exception e){
}

Fixed version (ground truth):
@Override public void onVideoMergeFailed(Exception e){
  Log.e("String_Node_Str",e.getMessage());
}
Program: 24432
Project: 24432
Buggy source:
@Override public void run(){
  Log.e("String_Node_Str","String_Node_Str");
  long currentFileSize=0;
  if (finalVideoFile.exists())   currentFileSize=finalVideoFile.length();
  while (finalVideoFileSize != currentFileSize) {
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
    if (finalVideoFile.exists()) {
      currentFileSize=finalVideoFile.length();
      Log.e("String_Node_Str","String_Node_Str" + finalVideoFileSize + "String_Node_Str"+ currentFileSize);
      int progress=(int)(currentFileSize * 100 / finalVideoFileSize);
      publishProgress(progress);
    }
  }
  Log.e("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void run(){
  fileSizeCheckerThread=true;
  Log.e("String_Node_Str","String_Node_Str");
  long currentFileSize=0;
  if (finalVideoFile.exists())   currentFileSize=finalVideoFile.length();
  while (currentFileSize < finalVideoFileSize) {
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
    if (finalVideoFile.exists()) {
      currentFileSize=finalVideoFile.length();
      Log.e("String_Node_Str","String_Node_Str" + finalVideoFileSize + "String_Node_Str"+ currentFileSize);
      int progress=(int)(currentFileSize * 100 / finalVideoFileSize);
      publishProgress(progress);
    }
    if (currentFileSize >= finalVideoFileSize)     break;
  }
  fileSizeCheckerThread=false;
  Log.e("String_Node_Str","String_Node_Str");
}
Program: 24433
Project: 24433
Buggy source:
@Override public synchronized void surfaceChanged(SurfaceHolder holder,int format,int width,int height){
  if (mHolder.getSurface() == null) {
    return;
  }
  if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
    try {
      Parameters mParameters=mCamera.getParameters();
      mCamera.stopPreview();
      List<Camera.Size> pictureSizes=mParameters.getSupportedPictureSizes();
      List<int[]> fps=mParameters.getSupportedPreviewFpsRange();
      Camera.Size picturesize=pictureSizes.get(0);
      mParameters.setPictureSize(picturesize.width,picturesize.height);
      mParameters.setPreviewFpsRange(fps.get(5)[0],fps.get(5)[1]);
      onOrientationChanged(mParameters,Configuration.ORIENTATION_LANDSCAPE);
      mCamera.setParameters(mParameters);
      mCamera.setPreviewDisplay(mHolder);
      mCamera.startPreview();
    }
 catch (    Exception e) {
      Log.e(TAG,"String_Node_Str" + e.getMessage());
    }
  }
  if (mCallback != null)   mCallback.onCameraInit();
}

Fixed version (ground truth):
@Override public synchronized void surfaceChanged(SurfaceHolder holder,int format,int width,int height){
  if (mHolder.getSurface() == null) {
    return;
  }
  if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
    try {
      mCamera.stopPreview();
      mCamera.setPreviewDisplay(holder);
    }
 catch (    Exception e) {
      Log.e(TAG + "String_Node_Str",e.getMessage());
    }
    Parameters mParameters=mCamera.getParameters();
    List<Camera.Size> pictureSizes=mParameters.getSupportedPictureSizes();
    List<int[]> fps=mParameters.getSupportedPreviewFpsRange();
    Camera.Size picturesize=pictureSizes.get(0);
    mParameters.setPictureSize(picturesize.width,picturesize.height);
    mParameters.setPreviewFpsRange(fps.get(5)[0],fps.get(5)[1]);
    onOrientationChanged(mParameters,Configuration.ORIENTATION_LANDSCAPE);
    mCamera.setParameters(mParameters);
    mCamera.startPreview();
  }
  if (mCallback != null)   mCallback.onCameraInit();
}
Program: 24434
Project: 24434
Buggy source:
@Override public void surfaceCreated(SurfaceHolder holder){
  if (mCamera != null) {
    try {
      if (mCamera.getParameters().isZoomSupported()) {
        mCamera.setZoomChangeListener(this);
        zoomOffset=mCamera.getParameters().getMaxZoom() / 5;
      }
      mCamera.setPreviewDisplay(holder);
      mCamera.startPreview();
      mCamera.lock();
    }
 catch (    IOException e) {
      Log.e("String_Node_Str",e.getMessage());
    }
  }
}

Fixed version (ground truth):
@Override public void surfaceCreated(SurfaceHolder holder){
  if (mCamera != null) {
    try {
      if (mCamera.getParameters().isZoomSupported()) {
        mCamera.setZoomChangeListener(this);
        zoomOffset=mCamera.getParameters().getMaxZoom() / 5;
      }
      mCamera.setPreviewDisplay(holder);
      mCamera.startPreview();
    }
 catch (    IOException e) {
      Log.e("String_Node_Str",e.getMessage());
    }
  }
}
Program: 24435
Project: 24435
Buggy source:
/** 
 * Ignore swipe down event
 */
@Override public boolean onKeyUp(int keyCode,KeyEvent event){
  if (keyCode == KEY_SWIPE_DOWN) {
    if (videofile != null) {
      mExecutorService.shutdown();
      recorder.stop();
      mCamera.stopPreview();
      videofile.delete();
    }
    setResult(RESULT_CANCELED);
    finish();
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Ignore swipe down event
 */
@Override public boolean onKeyUp(int keyCode,KeyEvent event){
  if (keyCode == KEY_SWIPE_DOWN) {
    if (videofile != null) {
      mExecutorService.shutdown();
      recorder.stop();
      mCamera.stopPreview();
      videofile.delete();
    }
    setResult(RESULT_CANCELED);
    releaseMediaRecorder();
    finish();
    return true;
  }
  return false;
}
Program: 24436
Project: 24436
Buggy source:
/** 
 * Handle glass tap gestures
 */
@Override public synchronized boolean onGesture(Gesture g){
switch (g) {
case TAP:
    if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
      mOverlay.setMode(CameraOverlay.Mode.FOCUS);
      mCamera.takePicture(null,null,mPictureCallback);
      mSoundEffects.shutter();
    }
 else {
      recorder.stop();
      mExecutorService.shutdown();
      mSoundEffects.camcorderStop();
      mCamera.stopPreview();
      mOverlay.setMode(Mode.PLAIN);
      Intent intent=new Intent();
      intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
      intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
      setResult(RESULT_OK,intent);
      MediaScannerConnection.scanFile(getApplicationContext(),new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
    }
  return true;
case SWIPE_RIGHT:
if (enablezoom) mPreview.zoomIn();
return true;
case SWIPE_LEFT:
if (enablezoom) mPreview.zoomOut();
return true;
default :
return false;
}
}

Fixed version (ground truth):
/** 
 * Handle glass tap gestures
 */
@Override public synchronized boolean onGesture(Gesture g){
switch (g) {
case TAP:
    if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
      mOverlay.setMode(CameraOverlay.Mode.FOCUS);
      mCamera.takePicture(null,null,mPictureCallback);
      mSoundEffects.shutter();
    }
 else {
      try {
        recorder.stop();
      }
 catch (      Exception e) {
        Log.e("String_Node_Str",e.getMessage());
      }
      mExecutorService.shutdown();
      mCamera.stopPreview();
      mSoundEffects.camcorderStop();
      mOverlay.setMode(Mode.PLAIN);
      Intent intent=new Intent();
      intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
      intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
      setResult(RESULT_OK,intent);
      MediaScannerConnection.scanFile(getApplicationContext(),new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
    }
  return true;
case SWIPE_RIGHT:
if (enablezoom) mPreview.zoomIn();
return true;
case SWIPE_LEFT:
if (enablezoom) mPreview.zoomOut();
return true;
default :
return false;
}
}
Program: 24437
Project: 24437
Buggy source:
@Override public void run(){
  mSoundEffects.camcorder();
  startVideoRecorder();
  initVideoRecordingUI();
}

Fixed version (ground truth):
@Override public void run(){
  startVideoRecorder();
  mSoundEffects.camcorder();
  initVideoRecordingUI();
}
Program: 24438
Project: 24438
Buggy source:
private void releaseMediaRecorder(){
  if (recorder != null) {
    recorder.reset();
    recorder.release();
    recorder=null;
  }
}

Fixed version (ground truth):
private void releaseMediaRecorder(){
  if (recorder != null) {
    recorder.reset();
    recorder.release();
    recorder=null;
    mCamera=null;
  }
}
Program: 24440
Project: 24440
Buggy source:
@Override public void onInfo(MediaRecorder mr,int what,int extra){
  if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
    mExecutorService.shutdown();
    mSoundEffects.camcorderStop();
    mCamera.stopPreview();
    mOverlay.setMode(Mode.PLAIN);
    Intent intent=new Intent();
    intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
    intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
    setResult(RESULT_OK,intent);
    MediaScannerConnection.scanFile(CuxtomCamActivity.this,new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
  }
}

Fixed version (ground truth):
@Override public void onInfo(MediaRecorder mr,int what,int extra){
  if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
    mExecutorService.shutdown();
    mCamera.stopPreview();
    mSoundEffects.camcorderStop();
    mOverlay.setMode(Mode.PLAIN);
    Intent intent=new Intent();
    intent.putExtra(CuxtomIntent.FILE_PATH,videofile.getPath());
    intent.putExtra(CuxtomIntent.FILE_TYPE,FILE_TYPE.VIDEO);
    setResult(RESULT_OK,intent);
    MediaScannerConnection.scanFile(CuxtomCamActivity.this,new String[]{videofile.getPath()},null,CuxtomCamActivity.this);
  }
}
Program: 24441
Project: 24441
Buggy source:
@Override public void onCameraInit(){
  if (cameraMode == CAMERA_MODE.VIDEO_MODE) {
    mOverlay.setMode(Mode.RECORDING);
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        mSoundEffects.camcorder();
        startVideoRecorder();
        initVideoRecordingUI();
      }
    }
,1000);
  }
}

Fixed version (ground truth):
@Override public void onCameraInit(){
  if (cameraMode == CAMERA_MODE.VIDEO_MODE) {
    mOverlay.setMode(Mode.RECORDING);
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        startVideoRecorder();
        mSoundEffects.camcorder();
        initVideoRecordingUI();
      }
    }
,1000);
  }
}
Program: 24442
Project: 24442
Buggy source:
/** 
 * Load UI according to the seetings
 */
private void loadUI(){
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  previewCameraLayout=new RelativeLayout(this);
  previewCameraLayout.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT,android.view.ViewGroup.LayoutParams.MATCH_PARENT));
  mCamera=getCameraInstance();
  mPreview=new CameraPreview(this,mCamera,cameraMode,new Handler());
  mPreview.setCameraListener(this);
  mOverlay=new CameraOverlay(this);
  previewCameraLayout.addView(mPreview);
  previewCameraLayout.addView(mOverlay);
  setContentView(previewCameraLayout);
  tv_recordingDuration=new TextView(this);
  mGestureDetector=new GestureDetector(this);
  mGestureDetector.setBaseListener(this);
}

Fixed version (ground truth):
/** 
 * Load UI according to the settings provided by calling activity
 */
private void loadUI(){
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  previewCameraLayout=new RelativeLayout(this);
  previewCameraLayout.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT,android.view.ViewGroup.LayoutParams.MATCH_PARENT));
  mCamera=getCameraInstance();
  mPreview=new CameraPreview(this,mCamera,cameraMode,new Handler());
  mPreview.setCameraListener(this);
  mOverlay=new CameraOverlay(this);
  previewCameraLayout.addView(mPreview);
  previewCameraLayout.addView(mOverlay);
  setContentView(previewCameraLayout);
  tv_recordingDuration=new TextView(this);
  mGestureDetector=new GestureDetector(this);
  mGestureDetector.setBaseListener(this);
}
Program: 24443
Project: 24443
Buggy source:
/** 
 * Load all the extra values that have been sent by the calling activity
 * @param intent containing extras
 */
private void loadExtras(Intent intent){
  if (intent.hasExtra(CuxtomIntent.FOLDER_PATH)) {
    folderPath=intent.getStringExtra(CuxtomIntent.FOLDER_PATH);
    createSubDirectory();
  }
 else {
    folderPath=Environment.getExternalStorageDirectory() + File.separator + Environment.DIRECTORY_PICTURES+ File.separator+ DEFAULT_DIRECTORY;
    createSubDirectory();
  }
  if (intent.hasExtra(CuxtomIntent.CAMERA_MODE)) {
    cameraMode=intent.getIntExtra(CuxtomIntent.CAMERA_MODE,CAMERA_MODE.PHOTO_MODE);
  }
 else {
    cameraMode=CAMERA_MODE.PHOTO_MODE;
  }
  if (intent.hasExtra(CuxtomIntent.FILE_NAME)) {
    fileName=intent.getStringExtra(CuxtomIntent.FILE_NAME);
  }
 else {
    String timeStamp=new SimpleDateFormat("String_Node_Str").format(new Date());
    if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
      fileName="String_Node_Str" + timeStamp;
    }
 else {
      fileName="String_Node_Str" + timeStamp;
    }
  }
  if (cameraMode == CAMERA_MODE.VIDEO_MODE && intent.hasExtra(CuxtomIntent.VIDEO_DURATION)) {
    video_duration=intent.getIntExtra(CuxtomIntent.VIDEO_DURATION,3600);
  }
 else {
    video_duration=3600;
  }
  if (intent.hasExtra(CuxtomIntent.ENABLE_ZOOM)) {
    enablezoom=intent.getBooleanExtra(CuxtomIntent.ENABLE_ZOOM,true);
  }
 else {
    enablezoom=true;
  }
}

Fixed version (ground truth):
/** 
 * Load all the extra values that have been sent by the calling activity
 * @param intent containing extras
 */
private void loadExtras(Intent intent){
  if (intent.hasExtra(CuxtomIntent.CAMERA_MODE)) {
    cameraMode=intent.getIntExtra(CuxtomIntent.CAMERA_MODE,CAMERA_MODE.PHOTO_MODE);
  }
 else {
    cameraMode=CAMERA_MODE.PHOTO_MODE;
  }
  if (intent.hasExtra(CuxtomIntent.FOLDER_PATH)) {
    folderPath=intent.getStringExtra(CuxtomIntent.FOLDER_PATH);
  }
 else {
    folderPath=Environment.getExternalStorageDirectory() + File.separator + Environment.DIRECTORY_PICTURES+ File.separator+ DEFAULT_DIRECTORY;
    createSubDirectory();
  }
  if (intent.hasExtra(CuxtomIntent.FILE_NAME)) {
    fileName=intent.getStringExtra(CuxtomIntent.FILE_NAME);
  }
 else {
    String timeStamp=new SimpleDateFormat("String_Node_Str").format(new Date());
    if (cameraMode == CAMERA_MODE.PHOTO_MODE) {
      fileName="String_Node_Str" + timeStamp;
    }
 else {
      fileName="String_Node_Str" + timeStamp;
    }
  }
  if (cameraMode == CAMERA_MODE.VIDEO_MODE && intent.hasExtra(CuxtomIntent.VIDEO_DURATION)) {
    video_duration=intent.getIntExtra(CuxtomIntent.VIDEO_DURATION,3600);
  }
 else {
    video_duration=3600;
  }
  if (intent.hasExtra(CuxtomIntent.ENABLE_ZOOM)) {
    enablezoom=intent.getBooleanExtra(CuxtomIntent.ENABLE_ZOOM,true);
  }
 else {
    enablezoom=true;
  }
}
Program: 24444
Project: 24444
Buggy source:
protected String resolveExpression(String expression){
  return valueResolver.resolveStringValue(expression);
}

Fixed version (ground truth):
/** 
 * Will replace property placeholders with their values, e.g. ${serverUrl}/customer with http://example.com/js/customer if serverUrl is a property that the application context resolves to http://example.com.js
 * @param expression
 * @return
 */
protected String resolveExpression(String expression){
  return valueResolver.resolveStringValue(expression);
}
Program: 24445
Project: 24445
Buggy source:
@Override public boolean isVertexValueCorrect(LongWritable vertexId,VertexValue value){
  return value.matchedID != vertexId.get();
}

Fixed version (ground truth):
@Override public boolean isVertexValueCorrect(LongWritable vertexId,VertexValue value){
  return value.getMatchedID() != vertexId.get();
}
Program: 24446
Project: 24446
Buggy source:
@Override public boolean isVertexValueCorrect(LongWritable vertexId,VertexValue value){
  return value.matchedID != vertexId.get();
}

Fixed version (ground truth):
@Override public boolean isVertexValueCorrect(LongWritable vertexId,VertexValue value){
  return value.getMatchedID() != vertexId.get();
}
Program: 24447
Project: 24447
Buggy source:
/** 
 * Whether the given vertex is a neighbor of a vertex that has been configured to be debugged. If so then the given vertex will also be debugged.
 * @param vertex a vertex.
 * @return whether the vertex is a neighbor of vertex that should bedebugged.
 */
private void addVertexToVerticesToDebugSetIfNeighbor(Vertex<I,V,E> vertex){
  for (  Edge<I,E> edge : vertex.getEdges()) {
    if (verticesToDebugSet.contains(edge.getTargetVertexId())) {
      verticesToDebugSet.add(vertex.getId());
    }
  }
}

Fixed version (ground truth):
/** 
 * Whether the given vertex is a neighbor of a vertex that has been configured to be debugged. If so then the given vertex will also be debugged.
 * @param vertex a vertex.
 */
private void addVertexToVerticesToDebugSetIfNeighbor(Vertex<I,V,E> vertex){
  for (  Edge<I,E> edge : vertex.getEdges()) {
    if (verticesToDebugSet.contains(edge.getTargetVertexId())) {
      verticesToDebugSet.add(vertex.getId());
    }
  }
}
Program: 24448
Project: 24448
Buggy source:
@SuppressWarnings("String_Node_Str") private void insertIDIntoVerticesToDebugSetIfLongOrInt(Class<?> idType,String idString){
  if (LongWritable.class.isAssignableFrom(idType)) {
    verticesToDebugSet.add((I)new LongWritable(Long.valueOf(idString)));
  }
 else   if (IntWritable.class.isAssignableFrom(idType)) {
    verticesToDebugSet.add((I)new IntWritable(Integer.valueOf(idString)));
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Add given string to the vertex set for debugging.
 * @param idType type of vertex id
 * @param idString string representation of the vertex to add
 */
@SuppressWarnings("String_Node_Str") private void insertIDIntoVerticesToDebugSetIfLongOrInt(Class<?> idType,String idString){
  if (LongWritable.class.isAssignableFrom(idType)) {
    verticesToDebugSet.add((I)new LongWritable(Long.valueOf(idString)));
  }
 else   if (IntWritable.class.isAssignableFrom(idType)) {
    verticesToDebugSet.add((I)new IntWritable(Integer.valueOf(idString)));
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
}
Program: 24449
Project: 24449
Buggy source:
/** 
 * Whether the specified vertex should be debugged.
 * @param vertex a vertex.
 * @return whether the vertex should be debugged.
 */
public boolean shouldDebugVertex(Vertex<I,V,E> vertex,long superstepNo){
  if (vertex.isHalted()) {
    return false;
  }
  if (debugAllVertices) {
    return true;
  }
  if (verticesToDebugSet == null) {
    return false;
  }
 else {
    if (superstepNo == 0 && debugNeighborsOfVerticesToDebug) {
      addVertexToVerticesToDebugSetIfNeighbor(vertex);
    }
    return verticesToDebugSet.contains(vertex.getId());
  }
}

Fixed version (ground truth):
/** 
 * Whether the specified vertex should be debugged.
 * @param vertex a vertex.
 * @param superstepNo the superstep number.
 * @return whether the vertex should be debugged.
 */
public boolean shouldDebugVertex(Vertex<I,V,E> vertex,long superstepNo){
  if (vertex.isHalted()) {
    return false;
  }
  if (debugAllVertices) {
    return true;
  }
  if (verticesToDebugSet == null) {
    return false;
  }
 else {
    if (superstepNo == 0 && debugNeighborsOfVerticesToDebug) {
      addVertexToVerticesToDebugSetIfNeighbor(vertex);
    }
    return verticesToDebugSet.contains(vertex.getId());
  }
}
Program: 24450
Project: 24450
Buggy source:
@Override public void preSuperstep(){
  phase=Phase.values()[((IntWritable)getAggregatedValue(GraphColoringMaster.PHASE)).get()];
  colorToAssign=((IntWritable)getAggregatedValue(GraphColoringMaster.COLOR_TO_ASSIGN)).get();
  System.out.println(getSuperstep() + "String_Node_Str" + phase+ "String_Node_Str"+ colorToAssign);
}

Fixed version (ground truth):
@Override public void preSuperstep(){
  phase=Phase.values()[((IntWritable)getAggregatedValue(GraphColoringMaster.PHASE)).get()];
  colorToAssign=((IntWritable)getAggregatedValue(GraphColoringMaster.COLOR_TO_ASSIGN)).get();
}
Program: 24451
Project: 24451
Buggy source:
protected void setVertexColor(Vertex<LongWritable,VertexValue,NullWritable> vertex,int colorToAssign){
  VertexValue value=vertex.getValue();
  value.setColor(colorToAssign);
  vertex.setValue(value);
}

Fixed version (ground truth):
/** 
 * Set the vertex color.
 * @param vertex the vertex
 * @param colorToAssign the color
 */
protected void setVertexColor(Vertex<LongWritable,VertexValue,NullWritable> vertex,int colorToAssign){
  VertexValue value=vertex.getValue();
  value.setColor(colorToAssign);
  vertex.setValue(value);
}
Program: 24452
Project: 24452
Buggy source:
protected void setVertexState(Vertex<LongWritable,VertexValue,NullWritable> vertex,State newState){
  VertexValue value=vertex.getValue();
  value.setState(newState);
  vertex.setValue(value);
}

Fixed version (ground truth):
/** 
 * Set the vertex state.
 * @param vertex the vertex
 * @param newState the new state
 */
protected void setVertexState(Vertex<LongWritable,VertexValue,NullWritable> vertex,State newState){
  VertexValue value=vertex.getValue();
  value.setState(newState);
  vertex.setValue(value);
}
Program: 24453
Project: 24453
Buggy source:
@Override public void compute(){
  if (phase != null) {
switch (phase) {
case LOTTERY:
      phase=Phase.CONFLICT_RESOLUTION;
    break;
case CONFLICT_RESOLUTION:
  phase=Phase.EDGE_CLEANING;
break;
case EDGE_CLEANING:
long numUnknown=((LongWritable)getAggregatedValue(NUM_VERTICES_UNKNOWN)).get();
if (numUnknown == 0) {
setAggregatedValue(COLOR_TO_ASSIGN,new IntWritable(++colorToAssign));
phase=Phase.COLOR_ASSIGNMENT;
}
 else {
phase=Phase.LOTTERY;
}
break;
case COLOR_ASSIGNMENT:
System.out.println(getSuperstep() + "String_Node_Str" + phase+ "String_Node_Str"+ colorToAssign);
long numColored=((LongWritable)getAggregatedValue(NUM_VERTICES_COLORED)).get();
if (numColored == getTotalNumVertices()) {
haltComputation();
return;
}
phase=Phase.LOTTERY;
break;
default :
throw new IllegalStateException();
}
}
 else {
phase=Phase.LOTTERY;
}
setAggregatedValue(PHASE,new IntWritable(phase.ordinal()));
}

Fixed version (ground truth):
@Override public void compute(){
  if (phase != null) {
switch (phase) {
case LOTTERY:
      phase=Phase.CONFLICT_RESOLUTION;
    break;
case CONFLICT_RESOLUTION:
  phase=Phase.EDGE_CLEANING;
break;
case EDGE_CLEANING:
long numUnknown=((LongWritable)getAggregatedValue(NUM_VERTICES_UNKNOWN)).get();
if (numUnknown == 0) {
setAggregatedValue(COLOR_TO_ASSIGN,new IntWritable(++colorToAssign));
phase=Phase.COLOR_ASSIGNMENT;
}
 else {
phase=Phase.LOTTERY;
}
break;
case COLOR_ASSIGNMENT:
long numColored=((LongWritable)getAggregatedValue(NUM_VERTICES_COLORED)).get();
if (numColored == getTotalNumVertices()) {
haltComputation();
return;
}
phase=Phase.LOTTERY;
break;
default :
throw new IllegalStateException();
}
}
 else {
phase=Phase.LOTTERY;
}
setAggregatedValue(PHASE,new IntWritable(phase.ordinal()));
}
Program: 24454
Project: 24454
Buggy source:
/** 
 * Constructs a match granting or denying message.
 * @param vertex Sending vertex
 * @param isGranting True iff it is a granting message
 */
public Message(Vertex<LongWritable,VertexValue,NullWritable> vertex,boolean isGranting){
  this(vertex,new BooleanWritable(isGranting));
}

Fixed version (ground truth):
/** 
 * Constructs a match granting or denying message.
 * @param vertex Sending vertex
 * @param isGranting True iff it is a granting message
 */
public Message(Vertex<LongWritable,VertexValue,NullWritable> vertex,boolean isGranting){
  this(vertex);
  type=isGranting ? Type.REQUEST_GRANTED : Type.REQUEST_DENIED;
}
Program: 24455
Project: 24455
Buggy source:
public LongWritable getSenderVertex(){
  return senderVertex;
}

Fixed version (ground truth):
public long getSenderVertex(){
  return senderVertex;
}
Program: 24456
Project: 24456
Buggy source:
public void setMatchedVertex(LongWritable matchedVertex){
  this.matchedVertex=matchedVertex;
}

Fixed version (ground truth):
/** 
 * Sets matched vertex.
 * @param matchedVertex Matched vertex id
 */
public void setMatchedVertex(long matchedVertex){
  this.matched=true;
  this.matchedVertex=matchedVertex;
}
Program: 24457
Project: 24457
Buggy source:
public LongWritable getMatchedVertex(){
  return matchedVertex;
}

Fixed version (ground truth):
public long getMatchedVertex(){
  return matchedVertex;
}
Program: 24458
Project: 24458
Buggy source:
@Override public void compute(Vertex<LongWritable,VertexValue,NullWritable> vertex,Iterable<Message> messages) throws IOException {
  int phase=(int)(getSuperstep() % 4);
switch (phase) {
case 0:
    if (isUnmatchedLeft(vertex)) {
      sendMessageToAllEdges(vertex,createRequestMessage(vertex));
      vertex.voteToHalt();
    }
  break;
case 1:
if (isUnmatchedRight(vertex)) {
  int i=0;
  for (  Message msg : messages) {
    Message reply=(i == 0) ? createGrantingMessage(vertex) : createDenyingMessage(vertex);
    sendMessage(msg.getSenderVertex(),reply);
    ++i;
  }
  vertex.voteToHalt();
}
break;
case 2:
if (isUnmatchedLeft(vertex)) {
for (Message msg : messages) {
if (msg.isGranting().get()) {
  sendMessage(msg.getSenderVertex(),createGrantingMessage(vertex));
  vertex.getValue().setMatchedVertex(msg.getSenderVertex());
  break;
}
}
}
break;
case 3:
if (isUnmatchedRight(vertex)) {
for (Message msg : messages) {
vertex.getValue().setMatchedVertex(msg.getSenderVertex());
break;
}
vertex.voteToHalt();
}
break;
default :
throw new IllegalStateException("String_Node_Str" + phase);
}
}

Fixed version (ground truth):
@Override public void compute(Vertex<LongWritable,VertexValue,NullWritable> vertex,Iterable<Message> messages) throws IOException {
  int phase=(int)(getSuperstep() % 4);
switch (phase) {
case 0:
    if (isUnmatchedLeft(vertex)) {
      sendMessageToAllEdges(vertex,createRequestMessage(vertex));
      vertex.voteToHalt();
    }
  break;
case 1:
if (isUnmatchedRight(vertex)) {
  int i=0;
  for (  Message msg : messages) {
    Message reply=(i == 0) ? createGrantingMessage(vertex) : createDenyingMessage(vertex);
    sendMessage(new LongWritable(msg.getSenderVertex()),reply);
    ++i;
  }
  vertex.voteToHalt();
}
break;
case 2:
if (isUnmatchedLeft(vertex)) {
for (Message msg : messages) {
if (msg.isGranting()) {
  sendMessage(new LongWritable(msg.getSenderVertex()),createGrantingMessage(vertex));
  vertex.getValue().setMatchedVertex(msg.getSenderVertex());
  break;
}
}
}
break;
case 3:
if (isUnmatchedRight(vertex)) {
for (Message msg : messages) {
vertex.getValue().setMatchedVertex(msg.getSenderVertex());
break;
}
vertex.voteToHalt();
}
break;
default :
throw new IllegalStateException("String_Node_Str" + phase);
}
}
Program: 24459
Project: 24459
Buggy source:
@Override public void readFields(DataInput in) throws IOException {
  if (in.readBoolean()) {
    senderVertex=new LongWritable();
    senderVertex.readFields(in);
  }
 else {
    senderVertex=null;
  }
  if (in.readBoolean()) {
    isGranting=new BooleanWritable();
    isGranting.readFields(in);
  }
 else {
    isGranting=null;
  }
}

Fixed version (ground truth):
@Override public void readFields(DataInput in) throws IOException {
  senderVertex=in.readLong();
  type=Type.values()[in.readInt()];
}
Program: 24460
Project: 24460
Buggy source:
public BooleanWritable isGranting(){
  return isGranting;
}

Fixed version (ground truth):
public boolean isGranting(){
  return type.equals(Type.REQUEST_GRANTED);
}
Program: 24461
Project: 24461
Buggy source:
/** 
 * @param vertex The vertex to test
 * @return Whether the vertex has a match
 */
private boolean hasNotMatchedYet(Vertex<LongWritable,VertexValue,NullWritable> vertex){
  return vertex.getValue().matchedVertex == null;
}

Fixed version (ground truth):
/** 
 * @param vertex The vertex to test
 * @return Whether the vertex has a match
 */
private boolean hasNotMatchedYet(Vertex<LongWritable,VertexValue,NullWritable> vertex){
  return !vertex.getValue().isMatched();
}
Program: 24462
Project: 24462
Buggy source:
@Override public String toString(){
  if (isGranting == null) {
    return "String_Node_Str" + senderVertex;
  }
 else   if (isGranting.get()) {
    return "String_Node_Str" + senderVertex;
  }
 else {
    return "String_Node_Str" + senderVertex;
  }
}

Fixed version (ground truth):
@Override public String toString(){
  return type + "String_Node_Str" + senderVertex;
}
Program: 24463
Project: 24463
Buggy source:
@Override public void write(DataOutput out) throws IOException {
  out.writeBoolean(senderVertex != null);
  if (senderVertex != null) {
    senderVertex.write(out);
  }
  out.writeBoolean(isGranting != null);
  if (isGranting != null) {
    isGranting.write(out);
  }
}

Fixed version (ground truth):
@Override public void write(DataOutput out) throws IOException {
  out.writeLong(senderVertex);
  out.writeInt(type.ordinal());
}
Program: 24464
Project: 24464
Buggy source:
@Override public void compute(Vertex<LongWritable,VertexValue,NullWritable> vertex,Iterable<Message> messages) throws IOException {
  int phase=(int)(getSuperstep() % 4);
switch (phase) {
case 0:
    if (isUnmatchedLeft(vertex)) {
      sendMessageToAllEdges(vertex,createRequestMessage(vertex));
      vertex.voteToHalt();
    }
  break;
case 1:
if (isUnmatchedRight(vertex)) {
  int i=0;
  for (  Message msg : messages) {
    Message reply=(i == 0) ? createGrantingMessage(vertex) : createDenyingMessage(vertex);
    sendMessage(new LongWritable(msg.getSenderVertex()),reply);
    ++i;
  }
  vertex.voteToHalt();
}
break;
case 2:
if (isUnmatchedLeft(vertex)) {
for (Message msg : messages) {
if (msg.isGranting()) {
  sendMessage(new LongWritable(msg.getSenderVertex()),createGrantingMessage(vertex));
  vertex.getValue().setMatchedVertex(msg.getSenderVertex());
  break;
}
}
}
break;
case 3:
if (isUnmatchedRight(vertex)) {
for (Message msg : messages) {
vertex.getValue().setMatchedVertex(msg.getSenderVertex());
break;
}
vertex.voteToHalt();
}
break;
default :
throw new IllegalStateException("String_Node_Str" + phase);
}
}

Fixed version (ground truth):
@Override public void compute(Vertex<LongWritable,VertexValue,NullWritable> vertex,Iterable<Message> messages) throws IOException {
  int phase=(int)(getSuperstep() % 4);
switch (phase) {
case 0:
    if (isLeft(vertex)) {
      if (isNotMatchedYet(vertex)) {
        sendMessageToAllEdges(vertex,createRequestMessage(vertex));
        vertex.voteToHalt();
      }
    }
  break;
case 1:
if (isRight(vertex)) {
  if (isNotMatchedYet(vertex)) {
    int i=0;
    for (    Message msg : messages) {
      Message reply=(i == 0) ? createGrantingMessage(vertex) : createDenyingMessage(vertex);
      sendMessage(new LongWritable(msg.getSenderVertex()),reply);
      ++i;
    }
    vertex.voteToHalt();
  }
}
break;
case 2:
if (isLeft(vertex)) {
if (isNotMatchedYet(vertex)) {
for (Message msg : messages) {
  if (msg.isGranting()) {
    sendMessage(new LongWritable(msg.getSenderVertex()),createGrantingMessage(vertex));
    vertex.getValue().setMatchedVertex(msg.getSenderVertex());
    break;
  }
}
}
}
break;
case 3:
if (isRight(vertex)) {
if (isNotMatchedYet(vertex)) {
for (Message msg : messages) {
vertex.getValue().setMatchedVertex(msg.getSenderVertex());
break;
}
vertex.voteToHalt();
}
}
break;
default :
throw new IllegalStateException("String_Node_Str" + phase);
}
}
Program: 24465
Project: 24465
Buggy source:
/** 
 * Converts the message integrity violation wrapper to JSON.
 * @param msgIntegrityViolationWrapper {@link MsgIntegrityViolationWrapper}object.
 * @return message integrity violation data stored as json.
 */
public static JSONObject msgIntegrityToJson(MsgIntegrityViolationWrapper msgIntegrityViolationWrapper) throws JSONException {
  JSONObject scenarioObj=new JSONObject();
  ArrayList<JSONObject> violationsList=new ArrayList<JSONObject>();
  scenarioObj.put("String_Node_Str",msgIntegrityViolationWrapper.getSuperstepNo());
  for (  Object msgWrapper : msgIntegrityViolationWrapper.getExtendedOutgoingMessageWrappers()) {
    ExtendedOutgoingMessageWrapper extendedOutgoingMessageWrapper=(ExtendedOutgoingMessageWrapper)msgWrapper;
    JSONObject violationObj=new JSONObject();
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.srcId);
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.destinationId);
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.message);
    violationsList.add(violationObj);
  }
  scenarioObj.put("String_Node_Str",violationsList);
  return scenarioObj;
}

Fixed version (ground truth):
/** 
 * Converts the message integrity violation wrapper to JSON.
 * @param msgIntegrityViolationWrapper {@link MsgIntegrityViolationWrapper}object.
 * @return message integrity violation data stored as json.
 */
public static JSONObject msgIntegrityToJson(MsgIntegrityViolationWrapper msgIntegrityViolationWrapper) throws JSONException {
  JSONObject scenarioObj=new JSONObject();
  ArrayList<JSONObject> violationsList=new ArrayList<JSONObject>();
  scenarioObj.put("String_Node_Str",msgIntegrityViolationWrapper.getSuperstepNo());
  for (  Object msgWrapper : msgIntegrityViolationWrapper.getExtendedOutgoingMessageWrappers()) {
    ExtendedOutgoingMessageWrapper extendedOutgoingMessageWrapper=(ExtendedOutgoingMessageWrapper)msgWrapper;
    JSONObject violationObj=new JSONObject();
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.getSrcId());
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.getDestinationId());
    violationObj.put("String_Node_Str",extendedOutgoingMessageWrapper.getMessage());
    violationsList.add(violationObj);
  }
  scenarioObj.put("String_Node_Str",violationsList);
  return scenarioObj;
}
Program: 24467
Project: 24467
Buggy source:
public boolean hasExceptionWrapper(){
  return exceptionWrapper != null;
}

Fixed version (ground truth):
/** 
 * Checks if this has an exception wrapper.
 * @return True if this has an exception wrapper.
 */
public boolean hasExceptionWrapper(){
  return exceptionWrapper != null;
}
Program: 24468
Project: 24468
Buggy source:
public GiraphMasterScenarioWrapper(String masterClassUnderTest){
  this.masterClassUnderTest=masterClassUnderTest;
  this.commonVertexMasterContextWrapper=new CommonVertexMasterContextWrapper();
  this.exceptionWrapper=null;
}

Fixed version (ground truth):
/** 
 * Constructor with a MasterCompute class name.
 * @param masterClassUnderTest The MasterCompute class name.
 */
public GiraphMasterScenarioWrapper(String masterClassUnderTest){
  this.masterClassUnderTest=masterClassUnderTest;
  this.commonVertexMasterContextWrapper=new CommonVertexMasterContextWrapper();
  this.exceptionWrapper=null;
}
Program: 24469
Project: 24469
Buggy source:
/** 
 * Returns the HDFS FileSystem reference. Note: We assume that the classpath contains the Hadoop's conf directory or the core-site.xml and hdfs-site.xml configuration directories.
 * @return a {@link FileSystem} object to be used to read from HDFS.
 */
public static FileSystem getFileSystem() throws IOException {
  Configuration configuration=new Configuration();
  return FileSystem.get(configuration);
}

Fixed version (ground truth):
/** 
 * Returns the HDFS FileSystem reference. Note: We assume that the classpath contains the Hadoop's conf directory or the core-site.xml and hdfs-site.xml configuration directories.
 * @return a {@link FileSystem} object to be used to read from HDFS.
 */
public static FileSystem getFileSystem() throws IOException {
  if (FILE_SYSTEM_CACHED == null) {
    Configuration configuration=new Configuration();
    FILE_SYSTEM_CACHED=FileSystem.get(configuration);
  }
  return FILE_SYSTEM_CACHED;
}
Program: 24470
Project: 24470
Buggy source:
/** 
 * @param jobId id of the job, whose jar path will be returned.
 * @return a url wrapped inside an array for convenience.
 */
public static URL[] getCachedJobJarPath(String jobId){
  Path jarSignaturePath=new Path(DebuggerUtils.getTraceFileRoot(jobId) + "String_Node_Str" + "String_Node_Str");
  try {
    FileSystem fs=getFileSystem();
    List<String> lines=IOUtils.readLines(fs.open(jarSignaturePath));
    if (lines.size() > 0) {
      String jarSignature=lines.get(0);
      File localFile=new File(DebuggerUtils.JARCACHE_LOCAL + "String_Node_Str" + jarSignature+ "String_Node_Str");
      if (!localFile.exists()) {
        Path hdfsPath=new Path(fs.getUri().resolve(DebuggerUtils.JARCACHE_HDFS + "String_Node_Str" + jarSignature+ "String_Node_Str"));
        Logger.getLogger(ServerUtils.class).info("String_Node_Str" + hdfsPath + "String_Node_Str"+ localFile);
        localFile.getParentFile().mkdirs();
        fs.copyToLocalFile(hdfsPath,new Path(localFile.toURI()));
      }
      return new URL[]{localFile.toURI().toURL()};
    }
  }
 catch (  IOException e) {
    LOG.warn("String_Node_Str" + e.toString());
  }
  return new URL[0];
}

Fixed version (ground truth):
/** 
 * @param jobId id of the job, whose jar path will be returned.
 * @return a url wrapped inside an array for convenience.
 */
public static URL[] getCachedJobJarPath(String jobId){
  Path jarSignaturePath=new Path(DebuggerUtils.getTraceFileRoot(jobId) + "String_Node_Str" + "String_Node_Str");
  try {
    FileSystem fs=getFileSystem();
    try (FSDataInputStream jarSignatureInput=fs.open(jarSignaturePath)){
      List<String> lines=IOUtils.readLines(jarSignatureInput);
      if (lines.size() > 0) {
        String jarSignature=lines.get(0);
        File localFile=new File(DebuggerUtils.JARCACHE_LOCAL + "String_Node_Str" + jarSignature+ "String_Node_Str");
        if (!localFile.exists()) {
          Path hdfsPath=new Path(fs.getUri().resolve(DebuggerUtils.JARCACHE_HDFS + "String_Node_Str" + jarSignature+ "String_Node_Str"));
          Logger.getLogger(ServerUtils.class).info("String_Node_Str" + hdfsPath + "String_Node_Str"+ localFile);
          localFile.getParentFile().mkdirs();
          fs.copyToLocalFile(hdfsPath,new Path(localFile.toURI()));
        }
        return new URL[]{localFile.toURI().toURL()};
      }
    }
   }
 catch (  IOException e) {
    LOG.warn("String_Node_Str" + e.toString());
  }
  return new URL[0];
}
Program: 24471
Project: 24471
Buggy source:
/** 
 * Loads a protocol buffer stored in a file into this wrapper object.
 * @param fileName the full path of the file where the protocol buffer isstored.
 */
public void load(String fileName) throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException {
  loadFromProto(parseProtoFromInputStream(new FileInputStream(fileName)));
}

Fixed version (ground truth):
/** 
 * Loads a protocol buffer stored in a file into this wrapper object.
 * @param fileName the full path of the file where the protocol buffer isstored.
 */
public void load(String fileName) throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException {
  try (FileInputStream inputStream=new FileInputStream(fileName)){
    loadFromProto(parseProtoFromInputStream(inputStream));
  }
 }
Program: 24472
Project: 24472
Buggy source:
/** 
 * Adds data stored in the given master scenario wrapper to the context.
 * @param commonVertexMasterContextWrapper {@link CommonVertexMasterContextWrapper} object.
 */
public void addCommonMasterVertexContext(CommonVertexMasterContextWrapper commonVertexMasterContextWrapper){
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getSuperstepNoWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumVerticesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumEdgesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getPreviousAggregatedValues());
  List<Config> configs=new ArrayList<>();
  if (commonVertexMasterContextWrapper.getConfig() != null) {
    for (    Map.Entry<String,String> entry : commonVertexMasterContextWrapper.getConfig()) {
      configs.add(new Config(entry.getKey(),entry.getValue()));
    }
  }
  context.put("String_Node_Str",configs);
}

Fixed version (ground truth):
/** 
 * Adds data stored in the given master scenario wrapper to the context.
 * @param commonVertexMasterContextWrapper {@link CommonVertexMasterContextWrapper} object.
 */
public void addCommonMasterVertexContext(CommonVertexMasterContextWrapper commonVertexMasterContextWrapper){
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getSuperstepNoWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumVerticesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumEdgesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getPreviousAggregatedValues());
  List<Config> configs=new ArrayList<>();
  if (commonVertexMasterContextWrapper.getConfig() != null) {
    for (    Map.Entry<String,String> entry : (Iterable<Map.Entry<String,String>>)commonVertexMasterContextWrapper.getConfig()) {
      configs.add(new Config(entry.getKey(),entry.getValue()));
    }
  }
  context.put("String_Node_Str",configs);
}
Program: 24473
Project: 24473
Buggy source:
public void addCommonMasterVertexContext(CommonVertexMasterContextWrapper commonVertexMasterContextWrapper){
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getSuperstepNoWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumVerticesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumEdgesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getPreviousAggregatedValues());
  List<Config> configs=new ArrayList<>();
  if (commonVertexMasterContextWrapper.getConfig() != null) {
    for (    Entry<String,String> entry : commonVertexMasterContextWrapper.getConfig()) {
      configs.add(new Config(entry.getKey(),entry.getValue()));
    }
  }
  context.put("String_Node_Str",configs);
}

Fixed version (ground truth):
public void addCommonMasterVertexContext(CommonVertexMasterContextWrapper commonVertexMasterContextWrapper){
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getSuperstepNoWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumVerticesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getTotalNumEdgesWrapper());
  context.put("String_Node_Str",commonVertexMasterContextWrapper.getPreviousAggregatedValues());
  List<Config> configs=new ArrayList<>();
  if (commonVertexMasterContextWrapper.getConfig() != null) {
    for (    Map.Entry<String,String> entry : commonVertexMasterContextWrapper.getConfig()) {
      configs.add(new Config(entry.getKey(),entry.getValue()));
    }
  }
  context.put("String_Node_Str",configs);
}
Program: 24475
Project: 24475
Buggy source:
public boolean shouldDebugSuperstep(long superstepNo){
  return superstepsToDebugSet == null || superstepsToDebugSet.contains(superstepNo);
}

Fixed version (ground truth):
/** 
 * Whether vertices should be debugged in the specified superstep.
 * @param superstepNo superstep number.
 * @return whether the superstep should be debugged.
 */
public boolean shouldDebugSuperstep(long superstepNo){
  return superstepsToDebugSet == null || superstepsToDebugSet.contains(superstepNo);
}
Program: 24476
Project: 24476
Buggy source:
private boolean isVertexANeighborOfAVertexToDebug(Vertex<I,V,E> vertex){
  for (  Edge<I,E> edge : vertex.getEdges()) {
    if (verticesToDebugSet.contains(edge.getTargetVertexId())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Whether the given vertex is a neighbor of a vertex that has been configured to be debugged. If so then the given vertex will also be debugged.
 * @param vertex a vertex.
 * @return whether the vertex is a neighbor of vertex that should bedebugged.
 */
private boolean isVertexANeighborOfAVertexToDebug(Vertex<I,V,E> vertex){
  for (  Edge<I,E> edge : vertex.getEdges()) {
    if (verticesToDebugSet.contains(edge.getTargetVertexId())) {
      return true;
    }
  }
  return false;
}
Program: 24477
Project: 24477
Buggy source:
public boolean isVertexValueCorrect(I vertexId,V value){
  return true;
}

Fixed version (ground truth):
/** 
 * @param vertexId id of the vertex.
 * @param value value of the vertex.
 * @return whether this vertex's value is correct, i.e, does not violate aconstraint.
 */
public boolean isVertexValueCorrect(I vertexId,V value){
  return true;
}
Program: 24478
Project: 24478
Buggy source:
public boolean shouldCheckMessageIntegrity(){
  return false;
}

Fixed version (ground truth):
/** 
 * @return whether message integrity constraints should be checked, i.e.,whether Graft should call the  {@link #isMessageCorrect(WritableComparable,WritableComparable,Writable)} method on this message.
 */
public boolean shouldCheckMessageIntegrity(){
  return false;
}
Program: 24479
Project: 24479
Buggy source:
public boolean shouldCheckVertexValueIntegrity(){
  return false;
}

Fixed version (ground truth):
/** 
 * @return whether a vertex value integrity constraints should be checked,i.e., whether Graft should call the  {@link #isVertexValueCorrect(WritableComparable,Writable) method on this vertex.}
 */
public boolean shouldCheckVertexValueIntegrity(){
  return false;
}
Program: 24480
Project: 24480
Buggy source:
public boolean shouldDebugVertex(Vertex<I,V,E> vertex){
  if (debugAllVertices) {
    return true;
  }
  if (verticesToDebugSet == null) {
    return false;
  }
 else {
    return verticesToDebugSet.contains(vertex.getId()) || debugNeighborsOfVerticesToDebug && isVertexANeighborOfAVertexToDebug(vertex);
  }
}

Fixed version (ground truth):
/** 
 * Whether the specified vertex should be debugged.
 * @param vertex a vertex.
 * @return whether the vertex should be debugged.
 */
public boolean shouldDebugVertex(Vertex<I,V,E> vertex){
  if (debugAllVertices) {
    return true;
  }
  if (verticesToDebugSet == null) {
    return false;
  }
 else {
    return verticesToDebugSet.contains(vertex.getId()) || debugNeighborsOfVerticesToDebug && isVertexANeighborOfAVertexToDebug(vertex);
  }
}
Program: 24481
Project: 24481
Buggy source:
public boolean isMessageCorrect(I srcId,I dstId,M1 message){
  return true;
}

Fixed version (ground truth):
/** 
 * @param srcId source id of the message.
 * @param dstId destination id of the message.
 * @param message message sent between srcId and dstId.
 * @return whether this message is correct, i.e, does not violate aconstraint.
 */
public boolean isMessageCorrect(I srcId,I dstId,M1 message){
  return true;
}