nus-yam/ex-repair huggingface dataset:
Program: 170984
Project: 170984
Buggy source:
static int getSecurity(@NonNull ScanResult result){
  if (result.capabilities.contains("String_Node_Str"))   return SECURITY_WEP;
 else   if (result.capabilities.contains("String_Node_Str"))   return SECURITY_PSK;
 else   if (result.capabilities.contains("String_Node_Str"))   return SECURITY_EAP;
  return SECURITY_NONE;
}

Fixed version (ground truth):
static String getSecurity(@NonNull ScanResult result){
  if (result.capabilities.contains(SECURITY_WEP))   return SECURITY_WEP;
 else   if (result.capabilities.contains(SECURITY_WPA))   return SECURITY_WPA;
 else   if (result.capabilities.contains(SECURITY_WPA2))   return SECURITY_WPA2;
 else   if (result.capabilities.contains(SECURITY_WPA_EAP))   return SECURITY_WPA_EAP;
 else   if (result.capabilities.contains(SECURITY_IEEE8021X))   return SECURITY_IEEE8021X;
 else   return SECURITY_NONE;
}
Program: 170986
Project: 170986
Buggy source:
@Nullable static WifiConfiguration getWifiConfiguration(@NonNull final WifiManager wifiMgr,@NonNull final ScanResult scanResult){
  final String ssid=convertToQuotedString(scanResult.SSID);
  if (ssid.isEmpty())   return null;
  final String bssid=scanResult.BSSID;
  if (bssid == null)   return null;
  final int security=getSecurity(scanResult);
  final List<WifiConfiguration> configurations=wifiMgr.getConfiguredNetworks();
  if (configurations == null)   return null;
  for (  final WifiConfiguration config : configurations) {
    if (bssid.equals(config.BSSID) || ssid.equals(config.SSID)) {
      final int configSecurity=getSecurity(config);
      if (security == configSecurity)       return config;
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable static WifiConfiguration getWifiConfiguration(@NonNull final WifiManager wifiMgr,@NonNull final ScanResult scanResult){
  final String ssid=convertToQuotedString(scanResult.SSID);
  if (ssid.isEmpty())   return null;
  final String bssid=scanResult.BSSID;
  if (bssid == null)   return null;
  final String security=getSecurity(scanResult);
  final List<WifiConfiguration> configurations=wifiMgr.getConfiguredNetworks();
  if (configurations == null)   return null;
  for (  final WifiConfiguration config : configurations) {
    if (bssid.equals(config.BSSID) || ssid.equals(config.SSID)) {
      final String configSecurity=getSecurity(config);
      if (security.equals(configSecurity))       return config;
    }
  }
  return null;
}
Program: 170987
Project: 170987
Buggy source:
public static boolean isAlreadyConnected(@Nullable WifiManager wifiManager,@Nullable String bssid){
  if (bssid != null && wifiManager != null) {
    if (wifiManager.getConnectionInfo() != null && wifiManager.getConnectionInfo().getBSSID() != null && Objects.equals(bssid,wifiManager.getConnectionInfo().getBSSID())) {
      wifiLog("String_Node_Str" + wifiManager.getConnectionInfo().getSSID() + "String_Node_Str"+ wifiManager.getConnectionInfo().getBSSID());
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isAlreadyConnected(@Nullable WifiManager wifiManager,@Nullable String bssid){
  if (bssid != null && wifiManager != null) {
    if (wifiManager.getConnectionInfo() != null && wifiManager.getConnectionInfo().getBSSID() != null && wifiManager.getConnectionInfo().getIpAddress() != 0 && Objects.equals(bssid,wifiManager.getConnectionInfo().getBSSID())) {
      wifiLog("String_Node_Str" + wifiManager.getConnectionInfo().getSSID() + "String_Node_Str"+ wifiManager.getConnectionInfo().getBSSID());
      return true;
    }
  }
  return false;
}
Program: 170989
Project: 170989
Buggy source:
@Override public void onReceive(Context context,@NonNull Intent intent){
  final String action=intent.getAction();
  if (Objects.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION,action)) {
    final SupplicantState state=intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE);
    final int supl_error=intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR,-1);
    if (state == null) {
      handler.removeCallbacks(handlerCallback);
      mWifiConnectionCallback.errorConnect();
      return;
    }
    wifiLog("String_Node_Str" + state);
switch (state) {
case COMPLETED:
case FOUR_WAY_HANDSHAKE:
      if (isAlreadyConnected(mWifiManager,of(mScanResult).next(scanResult -> scanResult.BSSID).get())) {
        handler.removeCallbacks(handlerCallback);
        mWifiConnectionCallback.successfulConnect();
      }
    break;
case DISCONNECTED:
  if (supl_error == WifiManager.ERROR_AUTHENTICATING) {
    wifiLog("String_Node_Str");
    handler.removeCallbacks(handlerCallback);
    mWifiConnectionCallback.errorConnect();
  }
 else {
    wifiLog("String_Node_Str");
    reEnableNetworkIfPossible(mWifiManager,mScanResult);
  }
}
}
}

Fixed version (ground truth):
@Override public void onReceive(Context context,@NonNull Intent intent){
  final String action=intent.getAction();
  wifiLog("String_Node_Str" + action);
  if (Objects.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION,action)) {
    if (isAlreadyConnected(mWifiManager,of(mScanResult).next(scanResult -> scanResult.BSSID).get())) {
      handler.removeCallbacks(handlerCallback);
      mWifiConnectionCallback.successfulConnect();
    }
  }
 else   if (Objects.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION,action)) {
    final SupplicantState state=intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE);
    final int supl_error=intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR,-1);
    if (state == null) {
      handler.removeCallbacks(handlerCallback);
      mWifiConnectionCallback.errorConnect();
      return;
    }
    wifiLog("String_Node_Str" + state);
switch (state) {
case COMPLETED:
case FOUR_WAY_HANDSHAKE:
      if (isAlreadyConnected(mWifiManager,of(mScanResult).next(scanResult -> scanResult.BSSID).get())) {
        handler.removeCallbacks(handlerCallback);
        mWifiConnectionCallback.successfulConnect();
      }
    break;
case DISCONNECTED:
  if (supl_error == WifiManager.ERROR_AUTHENTICATING) {
    wifiLog("String_Node_Str");
    handler.removeCallbacks(handlerCallback);
    mWifiConnectionCallback.errorConnect();
  }
 else {
    wifiLog("String_Node_Str");
    reEnableNetworkIfPossible(mWifiManager,mScanResult);
  }
}
}
}
Program: 170990
Project: 170990
Buggy source:
@Override public void onComplete(@NonNull Task<Location> task){
  if (task.isSuccessful() && task.getResult() != null) {
    Location location=task.getResult();
    HashMap loc=new HashMap();
    loc.put("String_Node_Str",location.getLatitude());
    loc.put("String_Node_Str",location.getLongitude());
    loc.put("String_Node_Str",location.getAccuracy());
    loc.put("String_Node_Str",location.getAltitude());
    if (result != null) {
      result.success(loc);
      return;
    }
    events.success(loc);
  }
 else {
    Log.w(METHOD_CHANNEL_NAME,"String_Node_Str");
    HashMap hash=new HashMap();
    if (result != null) {
      result.error("String_Node_Str","String_Node_Str",null);
      return;
    }
    events.error("String_Node_Str","String_Node_Str",null);
  }
}

Fixed version (ground truth):
@Override public void onComplete(@NonNull Task<Location> task){
  if (task.isSuccessful() && task.getResult() != null) {
    Location location=task.getResult();
    HashMap loc=new HashMap();
    loc.put("String_Node_Str",location.getLatitude());
    loc.put("String_Node_Str",location.getLongitude());
    loc.put("String_Node_Str",location.getAccuracy());
    loc.put("String_Node_Str",location.getAltitude());
    if (result != null) {
      result.success(loc);
      return;
    }
    events.success(loc);
  }
 else {
    Log.w(METHOD_CHANNEL_NAME,"String_Node_Str");
    HashMap hash=new HashMap();
    if (result != null) {
      result.error("String_Node_Str","String_Node_Str",null);
      return;
    }
  }
}
Program: 170991
Project: 170991
Buggy source:
private void getLastLocation(final Result result){
  Log.i(METHOD_CHANNEL_NAME,"String_Node_Str");
  mFusedLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>(){
    @Override public void onComplete(    @NonNull Task<Location> task){
      if (task.isSuccessful() && task.getResult() != null) {
        Location location=task.getResult();
        HashMap loc=new HashMap();
        loc.put("String_Node_Str",location.getLatitude());
        loc.put("String_Node_Str",location.getLongitude());
        loc.put("String_Node_Str",location.getAccuracy());
        loc.put("String_Node_Str",location.getAltitude());
        if (result != null) {
          result.success(loc);
          return;
        }
        events.success(loc);
      }
 else {
        Log.w(METHOD_CHANNEL_NAME,"String_Node_Str");
        HashMap hash=new HashMap();
        if (result != null) {
          result.error("String_Node_Str","String_Node_Str",null);
          return;
        }
        events.error("String_Node_Str","String_Node_Str",null);
      }
    }
  }
);
}

Fixed version (ground truth):
private void getLastLocation(final Result result){
  Log.i(METHOD_CHANNEL_NAME,"String_Node_Str");
  mFusedLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>(){
    @Override public void onComplete(    @NonNull Task<Location> task){
      if (task.isSuccessful() && task.getResult() != null) {
        Location location=task.getResult();
        HashMap loc=new HashMap();
        loc.put("String_Node_Str",location.getLatitude());
        loc.put("String_Node_Str",location.getLongitude());
        loc.put("String_Node_Str",location.getAccuracy());
        loc.put("String_Node_Str",location.getAltitude());
        if (result != null) {
          result.success(loc);
          return;
        }
        events.success(loc);
      }
 else {
        Log.w(METHOD_CHANNEL_NAME,"String_Node_Str");
        HashMap hash=new HashMap();
        if (result != null) {
          result.error("String_Node_Str","String_Node_Str",null);
          return;
        }
      }
    }
  }
);
}
Program: 170992
Project: 170992
Buggy source:
@Override public void onAnimationEnd(final Animation animation){
  if (listener != null) {
    listener.onDismiss();
  }
  destroy();
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  destroy();
}
Program: 170993
Project: 170993
Buggy source:
@Override public void onAnimationRepeat(final Animation animation){
}

Fixed version (ground truth):
@Override public void onAnimationRepeat(Animator animation){
}
Program: 170994
Project: 170994
Buggy source:
@Override public boolean onTouch(View view,MotionEvent motionEvent){
switch (motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
    initialDragX=motionEvent.getRawX();
  return true;
case MotionEvent.ACTION_UP:
if (!swipedOut) {
  view.animate().x(0).alpha(1).setDuration(200).start();
}
return true;
case MotionEvent.ACTION_MOVE:
float offset=motionEvent.getRawX() - initialDragX;
float alpha=1 - Math.abs(offset / viewWidth);
long duration=0;
if (Math.abs(offset) > dismissOffsetThreshold) {
offset=viewWidth * Math.signum(offset);
alpha=0;
duration=100;
swipedOut=true;
destroy();
}
view.animate().x(offset).alpha(alpha).setDuration(duration).start();
return true;
default :
return false;
}
}

Fixed version (ground truth):
@Override public boolean onTouch(View view,MotionEvent motionEvent){
switch (motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
    initialDragX=motionEvent.getRawX();
  return true;
case MotionEvent.ACTION_UP:
if (!swipedOut) {
  view.animate().x(0).alpha(1).setDuration(200).start();
}
return true;
case MotionEvent.ACTION_MOVE:
if (swipedOut) {
return true;
}
float offset=motionEvent.getRawX() - initialDragX;
float alpha=1 - Math.abs(offset / viewWidth);
long duration=0;
if (Math.abs(offset) > dismissOffsetThreshold) {
offset=viewWidth * Math.signum(offset);
alpha=0;
duration=200;
swipedOut=true;
}
view.animate().setListener(swipedOut ? getDestroyListener() : null).x(offset).alpha(alpha).setDuration(duration).start();
return true;
default :
return false;
}
}
Program: 170995
Project: 170995
Buggy source:
@Override public void onAnimationStart(final Animation animation){
}

Fixed version (ground truth):
@Override public void onAnimationStart(Animator animation){
}
Program: 170996
Project: 170996
Buggy source:
@GraphTransaction public AtlasGlossaryTerm updateTerm(AtlasGlossaryTerm atlasGlossaryTerm) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",atlasGlossaryTerm);
  }
  if (Objects.isNull(atlasGlossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (StringUtils.isEmpty(atlasGlossaryTerm.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (isNameInvalid(atlasGlossaryTerm.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.INVALID_DISPLAY_NAME);
  }
  AtlasGlossaryTerm storeObject=dataAccess.load(atlasGlossaryTerm);
  if (!storeObject.equals(atlasGlossaryTerm)) {
    try {
      atlasGlossaryTerm.setGuid(storeObject.getGuid());
      atlasGlossaryTerm.setQualifiedName(storeObject.getQualifiedName());
      storeObject=dataAccess.save(atlasGlossaryTerm);
    }
 catch (    AtlasBaseException e) {
      LOG.debug("String_Node_Str",e.getMessage());
    }
 finally {
      glossaryTermUtils.processTermRelations(storeObject,atlasGlossaryTerm,GlossaryUtils.RelationshipOperation.UPDATE);
    }
  }
  storeObject=dataAccess.load(atlasGlossaryTerm);
  setInfoForRelations(storeObject);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",storeObject);
  }
  return storeObject;
}

Fixed version (ground truth):
@GraphTransaction public AtlasGlossaryTerm updateTerm(AtlasGlossaryTerm atlasGlossaryTerm) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",atlasGlossaryTerm);
  }
  if (Objects.isNull(atlasGlossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (StringUtils.isEmpty(atlasGlossaryTerm.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (isNameInvalid(atlasGlossaryTerm.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.INVALID_DISPLAY_NAME);
  }
  AtlasGlossaryTerm storeObject=dataAccess.load(atlasGlossaryTerm);
  if (!storeObject.equals(atlasGlossaryTerm)) {
    try {
      atlasGlossaryTerm.setGuid(storeObject.getGuid());
      atlasGlossaryTerm.setQualifiedName(storeObject.getQualifiedName());
      storeObject=dataAccess.save(atlasGlossaryTerm);
    }
 catch (    AtlasBaseException e) {
      LOG.debug("String_Node_Str",e.getMessage());
    }
 finally {
      glossaryTermUtils.processTermRelations(storeObject,atlasGlossaryTerm,GlossaryUtils.RelationshipOperation.UPDATE);
      if (StringUtils.equals(storeObject.getQualifiedName(),atlasGlossaryTerm.getQualifiedName())) {
        storeObject=dataAccess.load(atlasGlossaryTerm);
      }
 else {
        atlasGlossaryTerm.setQualifiedName(storeObject.getQualifiedName());
        storeObject=dataAccess.save(atlasGlossaryTerm);
      }
    }
  }
  setInfoForRelations(storeObject);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",storeObject);
  }
  return storeObject;
}
Program: 170997
Project: 170997
Buggy source:
@GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryTerm);
  }
  if (Objects.isNull(glossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (Objects.isNull(glossaryTerm.getAnchor())) {
    throw new AtlasBaseException(AtlasErrorCode.MISSING_MANDATORY_ANCHOR);
  }
  if (StringUtils.isEmpty(glossaryTerm.getQualifiedName())) {
    if (StringUtils.isEmpty(glossaryTerm.getDisplayName())) {
      throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_QUALIFIED_NAME_CANT_BE_DERIVED);
    }
    if (isNameInvalid(glossaryTerm.getDisplayName())) {
      throw new AtlasBaseException(AtlasErrorCode.INVALID_DISPLAY_NAME);
    }
 else {
      glossaryTerm.setQualifiedName(glossaryTerm.getDisplayName());
    }
  }
  if (termExists(glossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_ALREADY_EXISTS,glossaryTerm.getQualifiedName());
  }
  AtlasGlossaryTerm storeObject=dataAccess.save(glossaryTerm);
  glossaryTermUtils.processTermRelations(storeObject,glossaryTerm,GlossaryUtils.RelationshipOperation.CREATE);
  storeObject=dataAccess.load(glossaryTerm);
  setInfoForRelations(storeObject);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",storeObject);
  }
  return storeObject;
}

Fixed version (ground truth):
@GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryTerm);
  }
  if (Objects.isNull(glossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (Objects.isNull(glossaryTerm.getAnchor())) {
    throw new AtlasBaseException(AtlasErrorCode.MISSING_MANDATORY_ANCHOR);
  }
  if (StringUtils.isEmpty(glossaryTerm.getQualifiedName())) {
    if (StringUtils.isEmpty(glossaryTerm.getDisplayName())) {
      throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_QUALIFIED_NAME_CANT_BE_DERIVED);
    }
    if (isNameInvalid(glossaryTerm.getDisplayName())) {
      throw new AtlasBaseException(AtlasErrorCode.INVALID_DISPLAY_NAME);
    }
 else {
      glossaryTerm.setQualifiedName(glossaryTerm.getDisplayName());
    }
  }
  if (termExists(glossaryTerm)) {
    throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_ALREADY_EXISTS,glossaryTerm.getQualifiedName());
  }
  AtlasGlossaryTerm storeObject=dataAccess.save(glossaryTerm);
  glossaryTermUtils.processTermRelations(storeObject,glossaryTerm,GlossaryUtils.RelationshipOperation.CREATE);
  if (StringUtils.equals(storeObject.getQualifiedName(),glossaryTerm.getQualifiedName())) {
    storeObject=dataAccess.load(glossaryTerm);
  }
 else {
    glossaryTerm.setQualifiedName(storeObject.getQualifiedName());
    storeObject=dataAccess.save(glossaryTerm);
  }
  setInfoForRelations(storeObject);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",storeObject);
  }
  return storeObject;
}
Program: 171000
Project: 171000
Buggy source:
@Override public AtlasEntity toEntity(final AtlasGlossaryTerm obj) throws AtlasBaseException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",obj);
  }
  Objects.requireNonNull(obj,"String_Node_Str");
  Objects.requireNonNull(obj.getQualifiedName(),"String_Node_Str");
  Objects.requireNonNull(obj.getAnchor(),"String_Node_Str");
  AtlasEntity ret=getDefaultAtlasEntity(obj);
  ret.setAttribute("String_Node_Str",obj.getQualifiedName());
  ret.setAttribute("String_Node_Str",obj.getDisplayName());
  ret.setAttribute("String_Node_Str",obj.getShortDescription());
  ret.setAttribute("String_Node_Str",obj.getLongDescription());
  ret.setAttribute("String_Node_Str",obj.getExamples());
  ret.setAttribute("String_Node_Str",obj.getAbbreviation());
  if (CollectionUtils.isNotEmpty(obj.getClassifications())) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
    ret.setClassifications(obj.getClassifications());
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",ret);
  }
  return ret;
}

Fixed version (ground truth):
@Override public AtlasEntity toEntity(final AtlasGlossaryTerm obj) throws AtlasBaseException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",obj);
  }
  Objects.requireNonNull(obj,"String_Node_Str");
  Objects.requireNonNull(obj.getQualifiedName(),"String_Node_Str");
  Objects.requireNonNull(obj.getAnchor(),"String_Node_Str");
  AtlasEntity ret=getDefaultAtlasEntity(obj);
  ret.setAttribute("String_Node_Str",obj.getQualifiedName());
  ret.setAttribute("String_Node_Str",obj.getDisplayName());
  ret.setAttribute("String_Node_Str",obj.getShortDescription());
  ret.setAttribute("String_Node_Str",obj.getLongDescription());
  ret.setAttribute("String_Node_Str",obj.getExamples());
  ret.setAttribute("String_Node_Str",obj.getAbbreviation());
  ret.setAttribute("String_Node_Str",obj.getUsage());
  if (CollectionUtils.isNotEmpty(obj.getClassifications())) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
    ret.setClassifications(obj.getClassifications());
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",ret);
  }
  return ret;
}
Program: 171005
Project: 171005
Buggy source:
@GraphTransaction public AtlasGlossaryCategory updateCategory(AtlasGlossaryCategory glossaryCategory) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryCategory);
  }
  if (Objects.isNull(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (StringUtils.isEmpty(glossaryCategory.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  AtlasGlossaryCategory existing=dataAccess.load(glossaryCategory);
  AtlasGlossaryCategory ret=glossaryCategory;
  if (!existing.equals(glossaryCategory)) {
    try {
      glossaryCategory.setGuid(existing.getGuid());
      glossaryCategory.setQualifiedName(existing.getQualifiedName());
      ret=dataAccess.save(glossaryCategory);
    }
 catch (    AtlasBaseException e) {
      LOG.debug("String_Node_Str",e.getMessage());
    }
 finally {
      glossaryCategoryUtils.processCategoryRelations(glossaryCategory,existing,GlossaryUtils.RelationshipOperation.UPDATE);
    }
  }
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",ret);
  }
  ret=dataAccess.load(glossaryCategory);
  setInfoForRelations(glossaryCategory);
  return ret;
}

Fixed version (ground truth):
@GraphTransaction public AtlasGlossaryCategory updateCategory(AtlasGlossaryCategory glossaryCategory) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryCategory);
  }
  if (Objects.isNull(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (StringUtils.isEmpty(glossaryCategory.getDisplayName())) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  AtlasGlossaryCategory existing=dataAccess.load(glossaryCategory);
  AtlasGlossaryCategory ret=glossaryCategory;
  if (!existing.equals(glossaryCategory)) {
    try {
      glossaryCategory.setGuid(existing.getGuid());
      glossaryCategory.setQualifiedName(existing.getQualifiedName());
      ret=dataAccess.save(glossaryCategory);
    }
 catch (    AtlasBaseException e) {
      LOG.debug("String_Node_Str",e.getMessage());
    }
 finally {
      glossaryCategoryUtils.processCategoryRelations(glossaryCategory,existing,GlossaryUtils.RelationshipOperation.UPDATE);
    }
  }
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",ret);
  }
  ret=dataAccess.load(glossaryCategory);
  setInfoForRelations(ret);
  return ret;
}
Program: 171006
Project: 171006
Buggy source:
@GraphTransaction public AtlasGlossaryCategory createCategory(AtlasGlossaryCategory glossaryCategory) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryCategory);
  }
  if (Objects.isNull(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (Objects.isNull(glossaryCategory.getAnchor())) {
    throw new AtlasBaseException(AtlasErrorCode.MISSING_MANDATORY_ANCHOR);
  }
  if (StringUtils.isEmpty(glossaryCategory.getQualifiedName())) {
    String displayName=glossaryCategory.getDisplayName();
    String glossaryName=glossaryCategory.getAnchor().getDisplayText();
    if (StringUtils.isEmpty(displayName) || StringUtils.isEmpty(glossaryName)) {
      throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_QUALIFIED_NAME_CANT_BE_DERIVED);
    }
 else {
      glossaryCategory.setQualifiedName(displayName + "String_Node_Str" + glossaryName);
    }
  }
  if (categoryExists(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_ALREADY_EXISTS,glossaryCategory.getQualifiedName());
  }
  AtlasGlossaryCategory saved=dataAccess.save(glossaryCategory);
  glossaryCategoryUtils.processCategoryRelations(glossaryCategory,saved,GlossaryUtils.RelationshipOperation.CREATE);
  saved=dataAccess.load(glossaryCategory);
  setInfoForRelations(glossaryCategory);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",saved);
  }
  return saved;
}

Fixed version (ground truth):
@GraphTransaction public AtlasGlossaryCategory createCategory(AtlasGlossaryCategory glossaryCategory) throws AtlasBaseException {
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",glossaryCategory);
  }
  if (Objects.isNull(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST,"String_Node_Str");
  }
  if (Objects.isNull(glossaryCategory.getAnchor())) {
    throw new AtlasBaseException(AtlasErrorCode.MISSING_MANDATORY_ANCHOR);
  }
  if (StringUtils.isEmpty(glossaryCategory.getQualifiedName())) {
    String displayName=glossaryCategory.getDisplayName();
    String glossaryName=glossaryCategory.getAnchor().getDisplayText();
    if (StringUtils.isEmpty(displayName) || StringUtils.isEmpty(glossaryName)) {
      throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_QUALIFIED_NAME_CANT_BE_DERIVED);
    }
 else {
      glossaryCategory.setQualifiedName(displayName + "String_Node_Str" + glossaryName);
    }
  }
  if (categoryExists(glossaryCategory)) {
    throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_ALREADY_EXISTS,glossaryCategory.getQualifiedName());
  }
  AtlasGlossaryCategory saved=dataAccess.save(glossaryCategory);
  glossaryCategoryUtils.processCategoryRelations(glossaryCategory,saved,GlossaryUtils.RelationshipOperation.CREATE);
  saved=dataAccess.load(glossaryCategory);
  setInfoForRelations(saved);
  if (DEBUG_ENABLED) {
    LOG.debug("String_Node_Str",saved);
  }
  return saved;
}
Program: 171007
Project: 171007
Buggy source:
protected AtlasBaseModelObject(){
}

Fixed version (ground truth):
public AtlasBaseModelObject(final AtlasBaseModelObject other){
  this.guid=other.guid;
}
Program: 171008
Project: 171008
Buggy source:
public AtlasGlossary(final AtlasGlossary other){
  super.setQualifiedName(other.getQualifiedName());
  super.setGuid(other.getGuid());
  super.setDisplayName(other.displayName);
  super.setShortDescription(other.shortDescription);
  super.setLongDescription(other.longDescription);
  this.language=other.language;
  this.usage=other.usage;
  this.terms=other.terms;
  this.categories=other.categories;
}

Fixed version (ground truth):
public AtlasGlossary(final AtlasGlossary other){
  super(other);
  super.setQualifiedName(other.getQualifiedName());
  super.setGuid(other.getGuid());
  super.setDisplayName(other.displayName);
  super.setShortDescription(other.shortDescription);
  super.setLongDescription(other.longDescription);
  this.language=other.language;
  this.usage=other.usage;
  this.terms=other.terms;
  this.categories=other.categories;
}
Program: 171009
Project: 171009
Buggy source:
@Override public String toString(){
  final StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append(super.toString());
  sb.append("String_Node_Str").append(termInfo);
  sb.append("String_Node_Str").append(categoryInfo);
  sb.append('}');
  return sb.toString();
}

Fixed version (ground truth):
@Override public StringBuilder toString(StringBuilder sb){
  sb.append("String_Node_Str");
  super.toString(sb);
  sb.append("String_Node_Str").append(termInfo);
  sb.append("String_Node_Str").append(categoryInfo);
  sb.append('}');
  return sb;
}
Program: 171010
Project: 171010
Buggy source:
@Override public String toString(){
  final StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(displayName).append('\'');
  sb.append("String_Node_Str").append(shortDescription).append('\'');
  sb.append("String_Node_Str").append(longDescription).append('\'');
  sb.append("String_Node_Str").append(classifications);
  sb.append("String_Node_Str").append(qualifiedName).append('\'');
  sb.append('}');
  return sb.toString();
}

Fixed version (ground truth):
@Override protected StringBuilder toString(final StringBuilder sb){
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(displayName).append('\'');
  sb.append("String_Node_Str").append(shortDescription).append('\'');
  sb.append("String_Node_Str").append(longDescription).append('\'');
  sb.append("String_Node_Str").append(classifications);
  sb.append("String_Node_Str").append(qualifiedName).append('\'');
  sb.append('}');
  return sb;
}
Program: 171011
Project: 171011
Buggy source:
public AtlasGlossaryCategory(){
}

Fixed version (ground truth):
public AtlasGlossaryCategory(final AtlasGlossaryCategory other){
  super(other);
  this.anchor=other.anchor;
  this.parentCategory=other.parentCategory;
  this.childrenCategories=other.childrenCategories;
  this.terms=other.terms;
}
Program: 171012
Project: 171012
Buggy source:
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),getDisplayName(),getShortDescription(),getLongDescription(),anchor,parentCategory,childrenCategories,terms,getClassifications());
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),anchor,parentCategory,childrenCategories,terms);
}
Program: 171013
Project: 171013
Buggy source:
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasGlossaryCategory))   return false;
  if (!super.equals(o))   return false;
  final AtlasGlossaryCategory category=(AtlasGlossaryCategory)o;
  return Objects.equals(getDisplayName(),category.getDisplayName()) && Objects.equals(getShortDescription(),category.getShortDescription()) && Objects.equals(getLongDescription(),category.getLongDescription())&& Objects.equals(anchor,category.anchor)&& Objects.equals(parentCategory,category.parentCategory)&& Objects.equals(childrenCategories,category.childrenCategories)&& Objects.equals(terms,category.terms)&& Objects.equals(getClassifications(),category.getClassifications());
}

Fixed version (ground truth):
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasGlossaryCategory))   return false;
  if (!super.equals(o))   return false;
  final AtlasGlossaryCategory category=(AtlasGlossaryCategory)o;
  return Objects.equals(anchor,category.anchor) && Objects.equals(parentCategory,category.parentCategory) && Objects.equals(childrenCategories,category.childrenCategories)&& Objects.equals(terms,category.terms);
}
Program: 171014
Project: 171014
Buggy source:
@Override protected StringBuilder toString(final StringBuilder sb){
  return sb == null ? new StringBuilder(toString()) : sb.append(toString());
}

Fixed version (ground truth):
@Override protected StringBuilder toString(final StringBuilder sb){
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(getDisplayName()).append('\'');
  sb.append("String_Node_Str").append(getShortDescription()).append('\'');
  sb.append("String_Node_Str").append(getLongDescription()).append('\'');
  sb.append("String_Node_Str").append(anchor);
  sb.append("String_Node_Str").append(parentCategory);
  sb.append("String_Node_Str").append(childrenCategories);
  sb.append("String_Node_Str").append(terms);
  sb.append("String_Node_Str").append(getClassifications());
  sb.append('}');
  return sb;
}
Program: 171015
Project: 171015
Buggy source:
public AtlasGlossaryTerm(){
}

Fixed version (ground truth):
public AtlasGlossaryTerm(final AtlasGlossaryTerm other){
  super(other);
  this.examples=other.examples;
  this.abbreviation=other.abbreviation;
  this.usage=other.usage;
  this.anchor=other.anchor;
  this.assignedEntities=other.assignedEntities;
  this.categories=other.categories;
  this.seeAlso=other.seeAlso;
  this.synonyms=other.synonyms;
  this.antonyms=other.antonyms;
  this.preferredTerms=other.preferredTerms;
  this.preferredToTerms=other.preferredToTerms;
  this.replacementTerms=other.replacementTerms;
  this.replacedBy=other.replacedBy;
  this.translationTerms=other.translationTerms;
  this.translatedTerms=other.translatedTerms;
  this.isA=other.isA;
  this.classifies=other.classifies;
  this.validValues=other.validValues;
  this.validValuesFor=other.validValuesFor;
  this.hasTerms=other.hasTerms;
}
Program: 171016
Project: 171016
Buggy source:
@Override protected StringBuilder toString(final StringBuilder sb){
  return sb == null ? new StringBuilder(toString()) : sb.append(toString());
}

Fixed version (ground truth):
@Override protected StringBuilder toString(final StringBuilder sb){
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(examples);
  sb.append("String_Node_Str").append(abbreviation).append('\'');
  sb.append("String_Node_Str").append(usage).append('\'');
  sb.append("String_Node_Str").append(anchor);
  sb.append("String_Node_Str").append(assignedEntities);
  sb.append("String_Node_Str").append(categories);
  sb.append("String_Node_Str").append(seeAlso);
  sb.append("String_Node_Str").append(synonyms);
  sb.append("String_Node_Str").append(antonyms);
  sb.append("String_Node_Str").append(preferredTerms);
  sb.append("String_Node_Str").append(preferredToTerms);
  sb.append("String_Node_Str").append(replacementTerms);
  sb.append("String_Node_Str").append(replacedBy);
  sb.append("String_Node_Str").append(translationTerms);
  sb.append("String_Node_Str").append(translatedTerms);
  sb.append("String_Node_Str").append(isA);
  sb.append("String_Node_Str").append(classifies);
  sb.append("String_Node_Str").append(validValues);
  sb.append("String_Node_Str").append(validValuesFor);
  sb.append('}');
  return sb;
}
Program: 171017
Project: 171017
Buggy source:
@Override public int hashCode(){
  return Objects.hash(glossaryGuid,displayText);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(glossaryGuid,relationGuid);
}
Program: 171018
Project: 171018
Buggy source:
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasGlossaryHeader))   return false;
  final AtlasGlossaryHeader that=(AtlasGlossaryHeader)o;
  return Objects.equals(glossaryGuid,that.glossaryGuid) && Objects.equals(relationGuid,that.relationGuid) && Objects.equals(displayText,that.displayText);
}

Fixed version (ground truth):
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasGlossaryHeader))   return false;
  final AtlasGlossaryHeader that=(AtlasGlossaryHeader)o;
  return Objects.equals(glossaryGuid,that.glossaryGuid) && Objects.equals(relationGuid,that.relationGuid);
}
Program: 171019
Project: 171019
Buggy source:
@Override public int hashCode(){
  return Objects.hash(categoryGuid,parentCategoryGuid,displayText,description);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(categoryGuid,parentCategoryGuid,relationGuid,description);
}
Program: 171020
Project: 171020
Buggy source:
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasRelatedCategoryHeader))   return false;
  final AtlasRelatedCategoryHeader that=(AtlasRelatedCategoryHeader)o;
  return Objects.equals(categoryGuid,that.categoryGuid) && Objects.equals(parentCategoryGuid,that.parentCategoryGuid) && Objects.equals(displayText,that.displayText)&& Objects.equals(description,that.description);
}

Fixed version (ground truth):
@Override public boolean equals(final Object o){
  if (this == o)   return true;
  if (!(o instanceof AtlasRelatedCategoryHeader))   return false;
  final AtlasRelatedCategoryHeader that=(AtlasRelatedCategoryHeader)o;
  return Objects.equals(categoryGuid,that.categoryGuid) && Objects.equals(parentCategoryGuid,that.parentCategoryGuid) && Objects.equals(relationGuid,that.relationGuid)&& Objects.equals(description,that.description);
}
Program: 171022
Project: 171022
Buggy source:
private void createCategoryRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedCategoryHeader> newChildren) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(newChildren)) {
    Set<AtlasRelatedCategoryHeader> existingChildren=existing.getChildrenCategories();
    for (    AtlasRelatedCategoryHeader child : newChildren) {
      if (Objects.nonNull(existingChildren) && existingChildren.contains(child)) {
        if (DEBUG_ENABLED) {
          LOG.debug("String_Node_Str",child.getCategoryGuid());
        }
        continue;
      }
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),child.getDisplayText());
      }
      createRelationship(defineCategoryHierarchyLink(existing.getGuid(),child));
    }
  }
}

Fixed version (ground truth):
private void createCategoryRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedCategoryHeader> newChildren) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(newChildren)) {
    Set<AtlasRelatedCategoryHeader> existingChildren=existing.getChildrenCategories();
    for (    AtlasRelatedCategoryHeader child : newChildren) {
      if (Objects.nonNull(existingChildren) && existingChildren.contains(child)) {
        if (DEBUG_ENABLED) {
          LOG.debug("String_Node_Str",child.getCategoryGuid());
        }
        continue;
      }
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),child.getDisplayText());
      }
      createRelationship(defineCategoryHierarchyLink(existing.getGuid(),child));
    }
  }
}
Program: 171024
Project: 171024
Buggy source:
private void deleteTermCategorizationRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    for (    AtlasRelatedTermHeader term : terms) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),term.getDisplayText());
      }
      relationshipStore.deleteById(term.getRelationGuid());
    }
  }
}

Fixed version (ground truth):
private void deleteTermCategorizationRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    for (    AtlasRelatedTermHeader term : terms) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),term.getDisplayText());
      }
      relationshipStore.deleteById(term.getRelationGuid());
    }
  }
}
Program: 171025
Project: 171025
Buggy source:
private void updateCategoryRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedCategoryHeader> toUpdate) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(toUpdate)) {
    for (    AtlasRelatedCategoryHeader categoryHeader : toUpdate) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),categoryHeader.getDisplayText());
      }
      AtlasRelationship childRelationship=relationshipStore.getById(categoryHeader.getRelationGuid());
      updateRelationshipAttributes(childRelationship,categoryHeader);
      relationshipStore.update(childRelationship);
    }
  }
}

Fixed version (ground truth):
private void updateCategoryRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedCategoryHeader> toUpdate) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(toUpdate)) {
    for (    AtlasRelatedCategoryHeader categoryHeader : toUpdate) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),categoryHeader.getDisplayText());
      }
      AtlasRelationship childRelationship=relationshipStore.getById(categoryHeader.getRelationGuid());
      updateRelationshipAttributes(childRelationship,categoryHeader);
      relationshipStore.update(childRelationship);
    }
  }
}
Program: 171027
Project: 171027
Buggy source:
private void createTermCategorizationRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    Set<AtlasRelatedTermHeader> existingTerms=existing.getTerms();
    for (    AtlasRelatedTermHeader term : terms) {
      if (Objects.isNull(term.getTermGuid())) {
        throw new AtlasBaseException(AtlasErrorCode.MISSING_TERM_ID_FOR_CATEGORIZATION);
      }
 else {
        if (Objects.nonNull(existingTerms) && existingTerms.contains(term)) {
          if (DEBUG_ENABLED) {
            LOG.debug("String_Node_Str",term.getTermGuid());
          }
          continue;
        }
        if (DEBUG_ENABLED) {
          LOG.debug("String_Node_Str",existing.getGuid(),term.getDisplayText());
        }
        createRelationship(defineCategorizedTerm(existing.getGuid(),term));
      }
    }
  }
}

Fixed version (ground truth):
private void createTermCategorizationRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    Set<AtlasRelatedTermHeader> existingTerms=existing.getTerms();
    for (    AtlasRelatedTermHeader term : terms) {
      if (Objects.isNull(term.getTermGuid())) {
        throw new AtlasBaseException(AtlasErrorCode.MISSING_TERM_ID_FOR_CATEGORIZATION);
      }
 else {
        if (Objects.nonNull(existingTerms) && existingTerms.contains(term)) {
          if (DEBUG_ENABLED) {
            LOG.debug("String_Node_Str",term.getTermGuid());
          }
          continue;
        }
        if (DEBUG_ENABLED) {
          LOG.debug("String_Node_Str",existing.getGuid(),term.getDisplayText());
        }
        createRelationship(defineCategorizedTerm(existing.getGuid(),term));
      }
    }
  }
}
Program: 171028
Project: 171028
Buggy source:
private void updateTermCategorizationRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    for (    AtlasRelatedTermHeader term : terms) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),term.getDisplayText());
      }
      AtlasRelationship relationship=relationshipStore.getById(term.getRelationGuid());
      updateRelationshipAttributes(relationship,term);
      relationshipStore.update(relationship);
    }
  }
}

Fixed version (ground truth):
private void updateTermCategorizationRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedTermHeader> terms) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(terms)) {
    for (    AtlasRelatedTermHeader term : terms) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),term.getDisplayText());
      }
      AtlasRelationship relationship=relationshipStore.getById(term.getRelationGuid());
      updateRelationshipAttributes(relationship,term);
      relationshipStore.update(relationship);
    }
  }
}
Program: 171029
Project: 171029
Buggy source:
private void deleteCategoryRelationships(AtlasGlossaryCategory existing,Set<AtlasRelatedCategoryHeader> existingChildren) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(existingChildren)) {
    for (    AtlasRelatedCategoryHeader child : existingChildren) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),child.getDisplayText());
      }
      relationshipStore.deleteById(child.getRelationGuid());
    }
  }
}

Fixed version (ground truth):
private void deleteCategoryRelationships(AtlasGlossaryCategory existing,Collection<AtlasRelatedCategoryHeader> existingChildren) throws AtlasBaseException {
  if (CollectionUtils.isNotEmpty(existingChildren)) {
    for (    AtlasRelatedCategoryHeader child : existingChildren) {
      if (DEBUG_ENABLED) {
        LOG.debug("String_Node_Str",existing.getDisplayName(),child.getDisplayText());
      }
      relationshipStore.deleteById(child.getRelationGuid());
    }
  }
}
Program: 171030
Project: 171030
Buggy source:
private static String readSolrXml() throws IOException {
  InputStream inputStream=getClassLoader().getResourceAsStream("String_Node_Str" + File.separator + SOLR_XML);
  if (inputStream == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return IOUtils.toString(inputStream,Charset.forName("String_Node_Str"));
}

Fixed version (ground truth):
private static String readSolrXml() throws IOException {
  String resName="String_Node_Str" + SOLR_XML;
  InputStream inputStream=LocalSolrRunner.class.getResourceAsStream(resName);
  if (inputStream == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return IOUtils.toString(inputStream,Charset.forName("String_Node_Str"));
}
Program: 171031
Project: 171031
Buggy source:
private static String[] readCollections(){
  try (InputStream inputStream=LocalSolrRunner.class.getResourceAsStream("String_Node_Str" + File.separator + COLLECTIONS_FILE);BufferedReader buffer=new BufferedReader(new InputStreamReader(inputStream))){
    return Pattern.compile("String_Node_Str").split(buffer.lines().collect(Collectors.joining("String_Node_Str")));
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private static String[] readCollections(){
  String resName="String_Node_Str" + COLLECTIONS_FILE;
  try {
    InputStream inputStream=LocalSolrRunner.class.getResourceAsStream(resName);
    InputStreamReader isr=new InputStreamReader(inputStream);
    BufferedReader buffer=new BufferedReader(isr);
    return Pattern.compile("String_Node_Str").split(buffer.lines().collect(Collectors.joining("String_Node_Str")));
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 171035
Project: 171035
Buggy source:
@Override public String getDslQueryUsingTypeNameClassification(String query,String typeName,String classification){
  final String whereDSLKeyword="String_Node_Str";
  final String limitDSLKeyword="String_Node_Str";
  final String whereFormat=whereDSLKeyword + "String_Node_Str";
  String queryStr=query == null ? "String_Node_Str" : query;
  if (StringUtils.isNotEmpty(typeName)) {
    if (StringUtils.isNotEmpty(query)) {
      String s=query.toLowerCase();
      if (!s.startsWith(whereDSLKeyword) && !s.startsWith(limitDSLKeyword)) {
        queryStr=String.format(whereFormat,query);
      }
    }
    queryStr=escapeTypeName(typeName) + "String_Node_Str" + queryStr;
  }
  if (StringUtils.isNotEmpty(classification)) {
    if (StringUtils.isEmpty(query)) {
      queryStr+=("String_Node_Str" + classification);
    }
  }
  return queryStr;
}

Fixed version (ground truth):
@Override public String getDslQueryUsingTypeNameClassification(String query,String typeName,String classification){
  final String whereDSLKeyword="String_Node_Str";
  final String isaDSLKeyword="String_Node_Str";
  final String isDSLKeyword="String_Node_Str";
  final String limitDSLKeyword="String_Node_Str";
  final String whereFormat=whereDSLKeyword + "String_Node_Str";
  String queryStr=query == null ? "String_Node_Str" : query;
  if (StringUtils.isNotEmpty(typeName)) {
    if (StringUtils.isNotEmpty(query)) {
      String s=query.toLowerCase();
      if (!s.startsWith(whereDSLKeyword) && !s.startsWith(limitDSLKeyword) && !s.startsWith(isaDSLKeyword)&& !s.startsWith(isDSLKeyword)) {
        queryStr=String.format(whereFormat,query);
      }
    }
    queryStr=escapeTypeName(typeName) + "String_Node_Str" + queryStr;
  }
  if (StringUtils.isNotEmpty(classification)) {
    if (StringUtils.isEmpty(query)) {
      queryStr+=String.format("String_Node_Str",queryStr,isaDSLKeyword,classification);
    }
  }
  return queryStr;
}