nus-yam/ex-repair huggingface dataset:
Program: 86922
Project: 86922
Buggy source:
@Override public void run(){
  if (initialized && startCount == 0) {
    if (!logger.isLogging() && !audible.isEnabled()) {
      Log.i(TAG,"String_Node_Str");
      notifications.stop();
      audible.stop();
      flightMode.stop();
      alti.stop();
      sensors.stop();
      location.stop();
      bluetooth.stop();
      initialized=false;
    }
 else {
      if (logger.isLogging()) {
        Log.w(TAG,"String_Node_Str");
      }
      if (audible.isEnabled()) {
        Log.w(TAG,"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (initialized && startCount == 0) {
    if (!logger.isLogging() && !audible.isEnabled()) {
      Log.i(TAG,"String_Node_Str");
      notifications.stop();
      audible.stop();
      flightMode.stop();
      alti.stop();
      sensors.stop();
      location.stop();
      logger.stop();
      bluetooth.stop();
      initialized=false;
    }
 else {
      if (logger.isLogging()) {
        Log.w(TAG,"String_Node_Str");
      }
      if (audible.isEnabled()) {
        Log.w(TAG,"String_Node_Str");
      }
    }
  }
}
Program: 86923
Project: 86923
Buggy source:
@Override public boolean onPreferenceClick(Preference preference){
  if (preference.getKey().equals("String_Node_Str")) {
    firebaseAnalytics.logEvent("String_Node_Str",null);
    startActivity(new Intent(getActivity(),SensorActivity.class));
  }
 else   if (preference.getKey().equals("String_Node_Str")) {
    final SettingsActivity activity=(SettingsActivity)getActivity();
    if (activity.isSignedIn()) {
      activity.clickSignOut();
    }
 else {
      activity.clickSignIn();
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onPreferenceClick(Preference preference){
  if (preference.getKey().equals("String_Node_Str")) {
    firebaseAnalytics.logEvent("String_Node_Str",null);
    startActivity(new Intent(getActivity(),SensorActivity.class));
  }
 else   if (preference.getKey().equals("String_Node_Str")) {
    final BaseActivity activity=(BaseActivity)getActivity();
    if (activity.isSignedIn()) {
      activity.clickSignOut();
    }
 else {
      activity.clickSignIn();
    }
  }
  return false;
}
Program: 86924
Project: 86924
Buggy source:
public TrackAdapter(Context context,List<TrackFile> tracks){
  this.tracks=tracks;
  inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  items=populateItems(tracks);
}

Fixed version (ground truth):
TrackAdapter(Context context,List<TrackFile> tracks){
  this.tracks=tracks;
  inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  items=populateItems(tracks);
}
Program: 86925
Project: 86925
Buggy source:
@Override public int compare(TrackFile track1,TrackFile track2){
  return -track1.getDate().compareTo(track2.getDate());
}

Fixed version (ground truth):
@Override public int compare(TrackFile track1,TrackFile track2){
  return -track1.getName().compareTo(track2.getName());
}
Program: 86926
Project: 86926
Buggy source:
public static synchronized List<TrackFile> getTracks(@NonNull Context context){
  final List<TrackFile> jumps=new ArrayList<>();
  final File logDir=getTrackDirectory(context);
  if (logDir != null) {
    final File[] files=logDir.listFiles();
    for (    File file : files) {
      if (!file.getName().equals(syncedDirectoryName)) {
        jumps.add(new TrackFile(file));
      }
    }
    Collections.sort(jumps,new Comparator<TrackFile>(){
      @Override public int compare(      TrackFile track1,      TrackFile track2){
        return -track1.getDate().compareTo(track2.getDate());
      }
    }
);
    return jumps;
  }
 else {
    Log.e(TAG,"String_Node_Str");
    return jumps;
  }
}

Fixed version (ground truth):
public static synchronized List<TrackFile> getTracks(@NonNull Context context){
  final List<TrackFile> tracks=new ArrayList<>();
  final File logDir=getTrackDirectory(context);
  if (logDir != null) {
    final File[] files=logDir.listFiles();
    for (    File file : files) {
      final String filename=file.getName();
      if (filename.startsWith("String_Node_Str") && filename.endsWith("String_Node_Str")) {
        tracks.add(new TrackFile(file));
      }
    }
    Collections.sort(tracks,new Comparator<TrackFile>(){
      @Override public int compare(      TrackFile track1,      TrackFile track2){
        return -track1.getName().compareTo(track2.getName());
      }
    }
);
    return tracks;
  }
 else {
    Log.e(TAG,"String_Node_Str");
    return tracks;
  }
}
Program: 86927
Project: 86927
Buggy source:
private void updateViews(){
  if (Convert.metric) {
    metricPreference.setSummary("String_Node_Str");
  }
 else {
    metricPreference.setSummary("String_Node_Str");
  }
  if (BluetoothService.preferenceEnabled) {
    bluetoothPreference.setSummary(BluetoothService.getStatusMessage());
  }
 else {
    bluetoothPreference.setSummary(R.string.pref_bluetooth_disabled);
    bluetoothDevicePreference.setEnabled(false);
  }
  if (BluetoothService.preferenceDeviceName != null) {
    bluetoothDevicePreference.setSummary(BluetoothService.preferenceDeviceName);
  }
 else   if (BluetoothService.preferenceDeviceId != null) {
    bluetoothDevicePreference.setSummary(BluetoothService.preferenceDeviceId);
  }
 else {
    bluetoothDevicePreference.setSummary(R.string.pref_bluetooth_device_description);
  }
  final SettingsActivity activity=(SettingsActivity)getActivity();
  if (activity.isSignedIn()) {
    signInPreference.setTitle(R.string.pref_sign_out);
    final String name=activity.getDisplayName();
    signInPreference.setSummary(getString(R.string.pref_sign_out_description) + "String_Node_Str" + name);
  }
 else {
    signInPreference.setTitle(R.string.pref_sign_in);
    signInPreference.setSummary(R.string.pref_sign_in_description);
  }
}

Fixed version (ground truth):
private void updateViews(){
  if (Convert.metric) {
    metricPreference.setSummary("String_Node_Str");
  }
 else {
    metricPreference.setSummary("String_Node_Str");
  }
  if (BluetoothService.preferenceEnabled) {
    bluetoothPreference.setSummary(BluetoothService.getStatusMessage());
    bluetoothDevicePreference.setEnabled(true);
  }
 else {
    bluetoothPreference.setSummary(R.string.pref_bluetooth_disabled);
    bluetoothDevicePreference.setEnabled(false);
  }
  if (BluetoothService.preferenceDeviceName != null) {
    bluetoothDevicePreference.setSummary(BluetoothService.preferenceDeviceName);
  }
 else   if (BluetoothService.preferenceDeviceId != null) {
    bluetoothDevicePreference.setSummary(BluetoothService.preferenceDeviceId);
  }
 else {
    bluetoothDevicePreference.setSummary(R.string.pref_bluetooth_device_description);
  }
  final SettingsActivity activity=(SettingsActivity)getActivity();
  if (activity.isSignedIn()) {
    signInPreference.setTitle(R.string.pref_sign_out);
    final String name=activity.getDisplayName();
    signInPreference.setSummary(getString(R.string.pref_sign_out_description) + "String_Node_Str" + name);
  }
 else {
    signInPreference.setTitle(R.string.pref_sign_in);
    signInPreference.setSummary(R.string.pref_sign_in_description);
  }
}
Program: 86928
Project: 86928
Buggy source:
public BluetoothRunnable(@NonNull BluetoothAdapter bluetoothAdapter){
  this.bluetoothAdapter=bluetoothAdapter;
}

Fixed version (ground truth):
BluetoothRunnable(@NonNull BluetoothAdapter bluetoothAdapter){
  this.bluetoothAdapter=bluetoothAdapter;
}
Program: 86929
Project: 86929
Buggy source:
public void addPoint(double x,double y){
}

Fixed version (ground truth):
public void addPoint(double x,double y){
  if (!Util.isReal(x) || !Util.isReal(y)) {
    Log.w(TAG,"String_Node_Str" + x + "String_Node_Str"+ y);
  }
  if (n < points.size()) {
    Point point=points.get(n);
    point.x=x;
    point.y=y;
  }
 else {
    points.add(new Point(x,y));
  }
  n++;
}
Program: 86930
Project: 86930
Buggy source:
/** 
 * Start the bluetooth service, and connect to gps receiver if selected
 * @return true iff bluetooth service started successfully
 */
private static boolean start(Activity activity){
  bluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  if (bluetoothAdapter == null) {
    Toast.makeText(activity,"String_Node_Str",Toast.LENGTH_LONG).show();
    return false;
  }
 else   if (!bluetoothAdapter.isEnabled()) {
    final Intent enableBluetoothIntent=new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
    activity.startActivityForResult(enableBluetoothIntent,ENABLE_BLUETOOTH_CODE);
    return false;
  }
 else {
    Log.i(TAG,"String_Node_Str");
    return connect();
  }
}

Fixed version (ground truth):
/** 
 * Start the bluetooth service, and connect to gps receiver if selected
 * @return true iff bluetooth service started successfully
 */
private static boolean start(Activity activity){
  bluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  if (bluetoothAdapter == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
 else   if (!bluetoothAdapter.isEnabled()) {
    final Intent enableBluetoothIntent=new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
    activity.startActivityForResult(enableBluetoothIntent,ENABLE_BLUETOOTH_CODE);
    return false;
  }
 else {
    Log.i(TAG,"String_Node_Str");
    return connect();
  }
}
Program: 86931
Project: 86931
Buggy source:
public static void startAsync(final Activity activity){
  if (isEnabled || isConnecting || isConnecting) {
    Log.e(TAG,"String_Node_Str");
  }
  isEnabled=true;
  isConnecting=true;
  new AsyncTask<Void,Void,Void>(){
    @Override protected Void doInBackground(    Void... params){
      Log.i(TAG,"String_Node_Str");
      if (BluetoothService.preferenceEnabled) {
        isConnected=BluetoothService.start(activity);
        isConnecting=false;
      }
      return null;
    }
  }
.execute();
}

Fixed version (ground truth):
public static void startAsync(final Activity activity){
  if (isEnabled || isConnecting || isConnecting) {
    Log.e(TAG,"String_Node_Str");
  }
  isEnabled=true;
  isConnecting=true;
  new AsyncTask<Void,Void,Void>(){
    @Override protected Void doInBackground(    Void... params){
      Log.i(TAG,"String_Node_Str");
      if (BluetoothService.preferenceEnabled) {
        isConnected=BluetoothService.start(activity);
        isConnecting=false;
      }
      return null;
    }
    @Override protected void onPostExecute(    Void param){
      if (BluetoothService.preferenceEnabled) {
        if (!isConnected) {
          Toast.makeText(activity,"String_Node_Str",Toast.LENGTH_LONG).show();
        }
      }
    }
  }
.execute();
}
Program: 86932
Project: 86932
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",x,y);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format(Locale.US,"String_Node_Str",x,y);
}
Program: 86933
Project: 86933
Buggy source:
public static String getLogTime(){
  if (db != null) {
    long nanoTime;
    if (db.stopTime == -1) {
      nanoTime=System.nanoTime() - db.startTime;
    }
 else {
      nanoTime=db.stopTime - db.startTime;
    }
    final long millis=(nanoTime / 1000000L) % 1000;
    final long seconds=(nanoTime / 1000000000L) % 60;
    final long minutes=nanoTime / 60000000000L;
    return String.format("String_Node_Str",minutes,seconds,millis);
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public static String getLogTime(){
  if (db != null) {
    long nanoTime;
    if (db.stopTime == -1) {
      nanoTime=System.nanoTime() - db.startTime;
    }
 else {
      nanoTime=db.stopTime - db.startTime;
    }
    final long millis=(nanoTime / 1000000L) % 1000;
    final long seconds=(nanoTime / 1000000000L) % 60;
    final long minutes=nanoTime / 60000000000L;
    return String.format(Locale.US,"String_Node_Str",minutes,seconds,millis);
  }
 else {
    return "String_Node_Str";
  }
}
Program: 86934
Project: 86934
Buggy source:
@Override public String toRow(){
  return String.format("String_Node_Str",nano,acc);
}

Fixed version (ground truth):
@Override public String toRow(){
  return String.format(Locale.US,"String_Node_Str",nano,acc);
}
Program: 86935
Project: 86935
Buggy source:
@Override public String toRow(){
  return String.format("String_Node_Str",nano,pressure);
}

Fixed version (ground truth):
@Override public String toRow(){
  return String.format(Locale.US,"String_Node_Str",nano,pressure);
}
Program: 86936
Project: 86936
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",nano,altitude);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format(Locale.US,"String_Node_Str",nano,altitude);
}
Program: 86937
Project: 86937
Buggy source:
@Override public String toRow(){
  return String.format("String_Node_Str",nano,gX,gY,gZ);
}

Fixed version (ground truth):
@Override public String toRow(){
  return String.format(Locale.US,"String_Node_Str",nano,gX,gY,gZ);
}
Program: 86938
Project: 86938
Buggy source:
@Override public String toRow(){
  final String sat_str=(numSat != -1) ? Integer.toString(numSat) : "String_Node_Str";
  final String vN_str=Util.isReal(vN) ? Double.toString(vN) : "String_Node_Str";
  final String vE_str=Util.isReal(vE) ? Double.toString(vE) : "String_Node_Str";
  return String.format("String_Node_Str",millis,latitude,longitude,altitude_gps,vN_str,vE_str,sat_str);
}

Fixed version (ground truth):
@Override public String toRow(){
  final String sat_str=(numSat != -1) ? Integer.toString(numSat) : "String_Node_Str";
  final String vN_str=Util.isReal(vN) ? Double.toString(vN) : "String_Node_Str";
  final String vE_str=Util.isReal(vE) ? Double.toString(vE) : "String_Node_Str";
  return String.format(Locale.US,"String_Node_Str",millis,latitude,longitude,altitude_gps,vN_str,vE_str,sat_str);
}
Program: 86939
Project: 86939
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",latitude,longitude,altitude_gps,vN,vE);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format(Locale.US,"String_Node_Str",latitude,longitude,altitude_gps,vN,vE);
}
Program: 86940
Project: 86940
Buggy source:
@Override public String toRow(){
  return String.format("String_Node_Str",nano,rotX,rotY,rotZ);
}

Fixed version (ground truth):
@Override public String toRow(){
  return String.format(Locale.US,"String_Node_Str",nano,rotX,rotY,rotZ);
}
Program: 86941
Project: 86941
Buggy source:
@Override public String toRow(){
  return String.format("String_Node_Str",nano,gX,gY,gZ,rotX,rotY,rotZ,acc);
}

Fixed version (ground truth):
@Override public String toRow(){
  return String.format(Locale.US,"String_Node_Str",nano,gX,gY,gZ,rotX,rotY,rotZ,acc);
}
Program: 86943
Project: 86943
Buggy source:
/** 
 * Set summaries and adjust defaults
 */
private void updateViews(){
  final String audibleMode=modePreference.getValue();
  final double min=Double.parseDouble(minPreference.getText());
  final double max=Double.parseDouble(maxPreference.getText());
  final double speechRate=Double.parseDouble(ratePreference.getText());
  updateAudibleMode(audibleMode,min,max);
  updateSpeechRate(speechRate);
}

Fixed version (ground truth):
/** 
 * Set summaries and adjust defaults
 */
private void updateViews(){
  final String audibleMode=modePreference.getValue();
  final double min=Util.parseDouble(minPreference.getText());
  final double max=Util.parseDouble(maxPreference.getText());
  final double speechRate=Util.parseDouble(ratePreference.getText());
  updateAudibleMode(audibleMode,min,max);
  updateSpeechRate(speechRate);
}
Program: 86945
Project: 86945
Buggy source:
@Override public boolean onPreferenceChange(Preference preference,Object value){
  if (preference.getKey().equals("String_Node_Str")) {
    final boolean audibleEnabled=(Boolean)value;
    if (audibleEnabled) {
      MyAudible.startAudible();
    }
 else {
      MyAudible.stopAudible();
    }
  }
 else   if (preference.getKey().equals("String_Node_Str")) {
    final String audibleMode=(String)value;
switch (audibleMode) {
case "String_Node_Str":
case "String_Node_Str":
      minPreference.setText("String_Node_Str");
    maxPreference.setText("String_Node_Str");
  break;
case "String_Node_Str":
minPreference.setText("String_Node_Str");
maxPreference.setText("String_Node_Str");
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
}
updateViews();
return true;
}

Fixed version (ground truth):
@Override public boolean onPreferenceChange(Preference preference,Object value){
  if (preference.getKey().equals("String_Node_Str")) {
    final boolean audibleEnabled=(Boolean)value;
    if (audibleEnabled) {
      MyAudible.startAudible();
    }
 else {
      MyAudible.stopAudible();
    }
  }
 else   if (preference.getKey().equals("String_Node_Str")) {
    final String audibleMode=(String)value;
switch (audibleMode) {
case "String_Node_Str":
      minPreference.setText("String_Node_Str");
    maxPreference.setText("String_Node_Str");
  break;
case "String_Node_Str":
minPreference.setText("String_Node_Str");
maxPreference.setText("String_Node_Str");
break;
case "String_Node_Str":
minPreference.setText("String_Node_Str");
maxPreference.setText("String_Node_Str");
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
}
updateViews();
return true;
}
Program: 86946
Project: 86946
Buggy source:
/** 
 * Set summaries and adjust defaults
 */
private void updateViews(){
  final String audibleMode=modePreference.getValue();
  final int modePreferenceIndex=modePreference.findIndexOfValue(audibleMode);
  final CharSequence modeValue=modePreferenceIndex >= 0 ? modePreference.getEntries()[modePreferenceIndex] : null;
  modePreference.setSummary(modeValue);
  final double min=Double.parseDouble(minPreference.getText());
  final double max=Double.parseDouble(maxPreference.getText());
  String units;
switch (audibleMode) {
case "String_Node_Str":
    minPreference.setTitle("String_Node_Str");
  maxPreference.setTitle("String_Node_Str");
minPreference.setSummary(String.format("String_Node_Str",min) + "String_Node_Str");
maxPreference.setSummary(String.format("String_Node_Str",max) + "String_Node_Str");
break;
case "String_Node_Str":
case "String_Node_Str":
minPreference.setTitle("String_Node_Str");
maxPreference.setTitle("String_Node_Str");
minPreference.setSummary(String.format("String_Node_Str",min) + "String_Node_Str");
maxPreference.setSummary(String.format("String_Node_Str",max) + "String_Node_Str");
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
}

Fixed version (ground truth):
/** 
 * Set summaries and adjust defaults
 */
private void updateViews(){
  final String audibleMode=modePreference.getValue();
  final int modePreferenceIndex=modePreference.findIndexOfValue(audibleMode);
  final CharSequence modeValue=modePreferenceIndex >= 0 ? modePreference.getEntries()[modePreferenceIndex] : null;
  modePreference.setSummary(modeValue);
  final double min=Double.parseDouble(minPreference.getText());
  final double max=Double.parseDouble(maxPreference.getText());
switch (audibleMode) {
case "String_Node_Str":
    minPreference.setTitle("String_Node_Str");
  maxPreference.setTitle("String_Node_Str");
minPreference.setSummary(String.format("String_Node_Str",min) + "String_Node_Str");
maxPreference.setSummary(String.format("String_Node_Str",max) + "String_Node_Str");
break;
case "String_Node_Str":
case "String_Node_Str":
minPreference.setTitle("String_Node_Str");
maxPreference.setTitle("String_Node_Str");
minPreference.setSummary(String.format("String_Node_Str",min) + "String_Node_Str");
maxPreference.setSummary(String.format("String_Node_Str",max) + "String_Node_Str");
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
}
Program: 86947
Project: 86947
Buggy source:
protected void handleSignInResult(GoogleSignInResult result){
  Log.d(TAG,"String_Node_Str" + result.isSuccess());
  final View signInPanel=findViewById(R.id.sign_in_panel);
  if (signInPanel != null) {
    findViewById(R.id.sign_in_button).setEnabled(true);
    findViewById(R.id.sign_in_spinner).setVisibility(View.GONE);
  }
  if (result.isSuccess()) {
    account=result.getSignInAccount();
    Log.i(TAG,"String_Node_Str" + account.getDisplayName());
    final String authCode=account.getServerAuthCode();
    Log.d(TAG,"String_Node_Str" + authCode);
    final String idToken=account.getIdToken();
    Log.d(TAG,"String_Node_Str" + idToken);
    if (signInPanel != null) {
      signInPanel.setVisibility(View.GONE);
    }
  }
 else {
    Log.e(TAG,"String_Node_Str");
    if (signInPanel != null) {
      signInPanel.setVisibility(View.VISIBLE);
    }
    if (userClickedSignIn) {
      Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    }
  }
}

Fixed version (ground truth):
protected void handleSignInResult(GoogleSignInResult result){
  Log.d(TAG,"String_Node_Str" + result.isSuccess());
  final View signInPanel=findViewById(R.id.sign_in_panel);
  if (signInPanel != null) {
    findViewById(R.id.sign_in_button).setEnabled(true);
    findViewById(R.id.sign_in_spinner).setVisibility(View.GONE);
  }
  if (result.isSuccess()) {
    account=result.getSignInAccount();
    Log.i(TAG,"String_Node_Str" + account.getDisplayName());
    final String authCode=account.getServerAuthCode();
    Log.d(TAG,"String_Node_Str" + authCode);
    final String idToken=account.getIdToken();
    Log.d(TAG,"String_Node_Str" + idToken);
    if (signInPanel != null) {
      signInPanel.setVisibility(View.GONE);
    }
    if (userClickedSignIn) {
      Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    }
  }
 else {
    Log.e(TAG,"String_Node_Str");
    if (signInPanel != null) {
      signInPanel.setVisibility(View.VISIBLE);
    }
    if (userClickedSignIn) {
      Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    }
  }
  userClickedSignIn=false;
}
Program: 86948
Project: 86948
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.menu_item_sensor_info:
    startActivity(new Intent(this,SensorActivity.class));
  return true;
case R.id.menu_item_sign_in:
clickSignIn();
return true;
case R.id.menu_item_sign_out:
clickSignOut();
return true;
default :
return super.onOptionsItemSelected(item);
}
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.menu_item_sensor_info:
    startActivity(new Intent(this,SensorActivity.class));
  return true;
case R.id.menu_item_sign_in:
clickSignIn();
return true;
case R.id.menu_item_sign_out:
clickSignOut();
if (menu != null) {
menu.findItem(R.id.menu_item_sign_in).setVisible(true);
menu.findItem(R.id.menu_item_sign_out).setVisible(false);
}
return true;
default :
return super.onOptionsItemSelected(item);
}
}
Program: 86949
Project: 86949
Buggy source:
private static String getMeasurement(){
  final String audibleMode=prefs.getString("String_Node_Str",null);
  String measurement="String_Node_Str";
switch (audibleMode) {
case "String_Node_Str":
    final double horizontalSpeed=MyLocationManager.groundSpeed;
  if (isReal(horizontalSpeed)) {
    measurement=String.format("String_Node_Str",horizontalSpeed);
  }
break;
case "String_Node_Str":
final double verticalSpeed=MyAltimeter.climb;
if (isReal(verticalSpeed)) {
measurement=String.format("String_Node_Str",verticalSpeed);
}
break;
case "String_Node_Str":
final double glideRatio=MyLocationManager.glide;
if (isReal(glideRatio)) {
measurement=String.format("String_Node_Str",glideRatio);
}
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
return measurement;
}

Fixed version (ground truth):
private static String getMeasurement(){
  final String audibleMode=prefs.getString("String_Node_Str","String_Node_Str");
  final float min=prefs.getFloat("String_Node_Str",60f);
  final float max=prefs.getFloat("String_Node_Str",120f);
  String measurement="String_Node_Str";
switch (audibleMode) {
case "String_Node_Str":
    final double horizontalSpeed=MyLocationManager.groundSpeed;
  if (isReal(horizontalSpeed) && min <= horizontalSpeed && horizontalSpeed <= max) {
    measurement=String.format("String_Node_Str",horizontalSpeed);
  }
 else {
    Log.w(TAG,"String_Node_Str" + horizontalSpeed);
  }
break;
case "String_Node_Str":
final double verticalSpeed=MyAltimeter.climb;
if (isReal(verticalSpeed) && min <= verticalSpeed && verticalSpeed <= max) {
measurement=String.format("String_Node_Str",verticalSpeed);
}
 else {
Log.w(TAG,"String_Node_Str" + verticalSpeed);
}
break;
case "String_Node_Str":
final double glideRatio=MyLocationManager.glide;
if (isReal(glideRatio) && min <= glideRatio && glideRatio <= max) {
measurement=String.format("String_Node_Str",glideRatio);
}
 else {
Log.w(TAG,"String_Node_Str" + glideRatio);
}
break;
default :
Log.e(TAG,"String_Node_Str" + audibleMode);
}
return measurement;
}
Program: 86950
Project: 86950
Buggy source:
public static void openTrackKml(Context context,final CloudData cloudData){
  Intent earthIntent=new Intent(android.content.Intent.ACTION_VIEW);
  earthIntent.setDataAndType(Uri.parse(cloudData.trackKml),"String_Node_Str");
  earthIntent.setClassName("String_Node_Str","String_Node_Str");
  context.startActivity(earthIntent);
}

Fixed version (ground truth):
/** 
 * Open track as KML 
 */
public static void openTrackKml(Context context,final CloudData cloudData){
  Intent earthIntent=new Intent(android.content.Intent.ACTION_VIEW);
  earthIntent.setDataAndType(Uri.parse(cloudData.trackKml),"String_Node_Str");
  earthIntent.setClassName("String_Node_Str","String_Node_Str");
  context.startActivity(earthIntent);
}
Program: 86951
Project: 86951
Buggy source:
public static void openTrackUrl(final Context context,final CloudData cloudData){
  final String url=cloudData.trackUrl;
  Log.i("String_Node_Str","String_Node_Str" + url);
  final Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(url));
  context.startActivity(browserIntent);
}

Fixed version (ground truth):
/** 
 * Open track url in browser 
 */
public static void openTrackUrl(final Context context,final CloudData cloudData){
  final String url=cloudData.trackUrl;
  Log.i("String_Node_Str","String_Node_Str" + url);
  final Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(url));
  context.startActivity(browserIntent);
}
Program: 86952
Project: 86952
Buggy source:
public static void shareTrack(Context context,Jump jump){
  final Intent intent=new Intent();
  intent.setAction(Intent.ACTION_SEND);
  intent.putExtra(Intent.EXTRA_STREAM,Uri.fromFile(jump.logFile));
  intent.setType("String_Node_Str");
  context.startActivity(intent);
}

Fixed version (ground truth):
/** 
 * Share jump log using android share options 
 */
public static void shareTrack(Context context,Jump jump){
  final CloudData cloudData=jump.getCloudData();
  if (cloudData != null) {
    final SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
    final String date=format.format(jump.getDate());
    final Intent intent=new Intent();
    intent.setAction(Intent.ACTION_SEND);
    intent.putExtra(Intent.EXTRA_SUBJECT,"String_Node_Str" + date);
    intent.putExtra(Intent.EXTRA_TEXT,jump.getCloudData().trackUrl);
    intent.setType("String_Node_Str");
    context.startActivity(Intent.createChooser(intent,"String_Node_Str"));
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
  }
}
Program: 86953
Project: 86953
Buggy source:
private void updateViews(){
  if (jump != null) {
    final TextView filenameLabel=(TextView)findViewById(R.id.filename);
    final TextView filesizeLabel=(TextView)findViewById(R.id.filesize);
    final Button openButton=(Button)findViewById(R.id.openButton);
    final Button mapButton=(Button)findViewById(R.id.mapButton);
    filenameLabel.setText(jump.getName());
    filesizeLabel.setText(jump.getSize());
    final CloudData cloudData=jump.getCloudData();
    if (cloudData != null) {
      openButton.setText("String_Node_Str");
      openButton.setCompoundDrawablesWithIntrinsicBounds(0,R.drawable.cloud,0,0);
      mapButton.setEnabled(true);
    }
 else {
      openButton.setText("String_Node_Str");
      openButton.setCompoundDrawablesWithIntrinsicBounds(0,R.drawable.upload_cloud,0,0);
      mapButton.setEnabled(false);
    }
  }
}

Fixed version (ground truth):
private void updateViews(){
  if (jump != null) {
    final TextView filenameLabel=(TextView)findViewById(R.id.filename);
    final TextView filesizeLabel=(TextView)findViewById(R.id.filesize);
    final Button openButton=(Button)findViewById(R.id.openButton);
    final Button mapButton=(Button)findViewById(R.id.mapButton);
    final Button shareButton=(Button)findViewById(R.id.shareButton);
    filenameLabel.setText(jump.getName());
    filesizeLabel.setText(jump.getSize());
    final CloudData cloudData=jump.getCloudData();
    if (cloudData != null) {
      openButton.setText("String_Node_Str");
      openButton.setCompoundDrawablesWithIntrinsicBounds(0,R.drawable.browser,0,0);
      mapButton.setEnabled(true);
      shareButton.setEnabled(true);
    }
 else {
      openButton.setText("String_Node_Str");
      openButton.setCompoundDrawablesWithIntrinsicBounds(0,R.drawable.upload_cloud,0,0);
      mapButton.setEnabled(false);
      shareButton.setEnabled(false);
    }
  }
}
Program: 86954
Project: 86954
Buggy source:
public void clickStop(View v){
  Log.i("String_Node_Str","String_Node_Str");
  logging=false;
  clock.setText("String_Node_Str");
  startButton.setEnabled(true);
  stopButton.setEnabled(false);
  jumpsButton.setEnabled(true);
  invalidateOptionsMenu();
  MyDatabase.stopLogging();
}

Fixed version (ground truth):
public void clickStop(View v){
  Log.i("String_Node_Str","String_Node_Str");
  logging=false;
  clock.setText("String_Node_Str");
  startButton.setEnabled(true);
  stopButton.setEnabled(false);
  jumpsButton.setEnabled(true);
  invalidateOptionsMenu();
  final Jump jump=MyDatabase.stopLogging();
  if (jump != null) {
    TheCloud.uploadAsync(jump,new TheCloud.Callback<CloudData>(){
      @Override public void call(      CloudData result){
        Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
    }
);
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
  }
}
Program: 86955
Project: 86955
Buggy source:
private void stop(){
  if (stopTime == -1) {
    stopTime=System.nanoTime();
    MyAltimeter.removeListener(this);
    MyLocationManager.removeListener(this);
    MySensorManager.removeListener(this);
    try {
      log.close();
    }
 catch (    IOException e) {
      Log.e("String_Node_Str","String_Node_Str" + logFile,e);
    }
    Log.i("String_Node_Str","String_Node_Str" + logFile.getName());
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
private File stop(){
  if (stopTime == -1) {
    stopTime=System.nanoTime();
    MyAltimeter.removeListener(this);
    MyLocationManager.removeListener(this);
    MySensorManager.removeListener(this);
    try {
      log.close();
      Log.i("String_Node_Str","String_Node_Str" + logFile.getName());
      return logFile;
    }
 catch (    IOException e) {
      Log.e("String_Node_Str","String_Node_Str" + logFile,e);
      return null;
    }
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
    return null;
  }
}
Program: 86956
Project: 86956
Buggy source:
public static synchronized void stopLogging(){
  if (db != null) {
    db.stop();
    db=null;
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
public static synchronized Jump stopLogging(){
  if (db != null) {
    final File logFile=db.stop();
    db=null;
    if (logFile != null) {
      return new Jump(logFile);
    }
 else {
      return null;
    }
  }
 else {
    Log.e("String_Node_Str","String_Node_Str");
    return null;
  }
}
Program: 86957
Project: 86957
Buggy source:
/** 
 * @see prefuse.render.Renderer#render(java.awt.Graphics2D,prefuse.visual.VisualItem)
 */
public void render(Graphics2D g,VisualItem item){
  super.render(g,item);
  if (m_curArrow != null && !isSelfEdge(item)) {
    g.setPaint(ColorLib.getColor(item.getFillColor()));
    g.fill(m_curArrow);
  }
}

Fixed version (ground truth):
/** 
 * @see prefuse.render.Renderer#render(java.awt.Graphics2D,prefuse.visual.VisualItem)
 */
@Override public void render(Graphics2D g,VisualItem item){
  Shape shape=getShape(item);
  if (shape != null)   drawShape(g,item,shape);
  if (m_curArrow != null && !isSelfEdge(item)) {
    g.setPaint(ColorLib.getColor(item.getFillColor()));
    g.fill(m_curArrow);
  }
}
Program: 86958
Project: 86958
Buggy source:
/** 
 * We could decide here not to check the existence of a mapping column and just assume the user will behave itself...but it's the safe thing  to do,  I suppose.
 * @param e
 * @param param
 * @param multiplier
 * @return 
 */
private float multiplyIfSameMapping(EdgeItem e,int param,float multiplier){
  ForceSimulator fsim=this.getForceSimulator();
  float val=fsim.getForces()[2].getParameter(param);
  if (e.getSourceNode().getColumnIndex("String_Node_Str") >= 0) {
    int sourceMap=e.getSourceNode().getInt("String_Node_Str");
    int targetMap=e.getTargetNode().getInt("String_Node_Str");
    if (sourceMap == targetMap) {
      return multiplier * val;
    }
  }
  return val;
}

Fixed version (ground truth):
/** 
 * We could decide here not to check the existence of a mapping column and just assume the user will behave itself...but it's the safe thing  to do,  I suppose.
 * @param e
 * @param param
 * @param multiplier
 * @return 
 */
private synchronized float multiplyIfSameMapping(EdgeItem e,int param,float multiplier){
  ForceSimulator fsim=this.getForceSimulator();
  float val=fsim.getForces()[2].getParameter(param);
  if (e.getSourceNode().getColumnIndex("String_Node_Str") >= 0) {
    int sourceMap=e.getSourceNode().getInt("String_Node_Str");
    int targetMap=e.getTargetNode().getInt("String_Node_Str");
    if (sourceMap == targetMap) {
      return multiplier * val;
    }
  }
  return val;
}
Program: 86959
Project: 86959
Buggy source:
private List<AssetNode> _breadcrumbByQuery(AssetId id){
  List<AssetNode> results=new ArrayList<AssetNode>();
  StatementParam breadcrumbParam=BREADCRUMBS_LOOKUP.newParam();
  breadcrumbParam.setLong(0,id.getId());
  for (  Row row : new IListIterable(ics.SQL(BREADCRUMBS_LOOKUP,breadcrumbParam,true))) {
    AssetId currentAssetId=AssetIdUtils.createAssetId(row.getString("String_Node_Str"),row.getLong("String_Node_Str"));
    SimpleAssetNode currentNode=new SimpleAssetNode(currentAssetId);
    SimpleAssetNode child=(SimpleAssetNode)results.get(0);
    child.setParent(currentNode);
    results.add(0,currentNode);
  }
  return results;
}

Fixed version (ground truth):
private List<AssetNode> _breadcrumbByQuery(AssetId id){
  List<AssetNode> results=new ArrayList<AssetNode>();
  StatementParam breadcrumbParam=BREADCRUMBS_LOOKUP.newParam();
  breadcrumbParam.setLong(0,id.getId());
  for (  Row row : new IListIterable(ics.SQL(BREADCRUMBS_LOOKUP,breadcrumbParam,true))) {
    AssetId currentAssetId=AssetIdUtils.createAssetId(row.getString("String_Node_Str"),row.getLong("String_Node_Str"));
    SimpleAssetNode currentNode=new SimpleAssetNode(currentAssetId);
    LogDep.logDep(ics,currentAssetId);
    TemplateAsset data=populateNodeData(currentAssetId);
    if (data == null) {
      throw new IllegalStateException("String_Node_Str" + id);
    }
    currentNode.setAsset(data);
    if (!results.isEmpty())     ((SimpleAssetNode)results.get(0)).setParent(currentNode);
    results.add(0,currentNode);
  }
  return results;
}
Program: 86960
Project: 86960
Buggy source:
/** 
 * Method to produce a   {@link tools.gsf.config.Factory} to access services that need access to ICS
 * @param ics Content Server context object
 * @return the Factory to create services that need access to ics.
 */
Factory getFactory(final ICS ics);

Fixed version (ground truth):
/** 
 * Method to produce a "tools.gsf.config.Factory" to access services that need access to ICS
 * @param ics Content Server context object
 * @return the Factory to create services that need access to ics.
 */
Factory getFactory(final ICS ics);
Program: 86961
Project: 86961
Buggy source:
/** 
 * @param context
 * @param app
 */
public GroovyWebContext(ServletContext context,AppContext app){
  super(context,app);
  classLoader=new GroovyClassLoader();
  this.servletContext=context;
  String path=context.getRealPath("String_Node_Str");
  classLoader.addClasspath(path);
}

Fixed version (ground truth):
/** 
 * @param context The ServletContext instance
 * @param app The AppContext instance
 */
public GroovyWebContext(ServletContext context,AppContext app){
  super(context,app);
  classLoader=new GroovyClassLoader();
  this.servletContext=context;
  String path=context.getRealPath("String_Node_Str");
  classLoader.addClasspath(path);
}
Program: 86962
Project: 86962
Buggy source:
public void inject(final Object target,final String pagename){
  if (target == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final Field[] fields=findFieldsWithAnnotation(target,Mapping.class);
  if (fields.length > 0) {
    AssetIdWithSite id=mappingService.resolveMapped(pagename);
    final Map<String,MappingValue> map=mappingService.readMapping(id);
    for (    final Field field : fields) {
      injectIntoField(target,map,field,id);
    }
  }
}

Fixed version (ground truth):
public void inject(final Object target,final String pagename){
  if (target == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final Field[] fields=findFieldsWithAnnotation(target,Mapping.class);
  if (fields.length > 0) {
    AssetIdWithSite id=mappingService.resolveMapped(pagename);
    if (id != null) {
      final Map<String,MappingValue> map=mappingService.readMapping(id);
      for (      final Field field : fields) {
        injectIntoField(target,map,field,id);
      }
    }
 else {
      LOG.error("String_Node_Str" + pagename + "String_Node_Str");
    }
  }
}
Program: 86963
Project: 86963
Buggy source:
private long lookupCSElement(String rootelement){
  StatementParam param=lookup_cselement.newParam();
  param.setString(0,rootelement);
  Row row=SqlHelper.selectSingle(ics,lookup_template,param);
  return row == null ? -1L : row.getLong("String_Node_Str");
}

Fixed version (ground truth):
private long lookupCSElement(String rootelement){
  StatementParam param=lookup_cselement.newParam();
  param.setString(0,rootelement);
  Row row=SqlHelper.selectSingle(ics,lookup_cselement,param);
  return row == null ? -1L : row.getLong("String_Node_Str");
}
Program: 86964
Project: 86964
Buggy source:
@Override public AssetIdWithSite resolveMapped(String pagename){
  MappingPageData pageData=readPageData(pagename);
  if (pageData.isSiteEntry()) {
    long eid=lookupCSElement(pageData.rootelement);
    if (eid > -1) {
      String site=ics.GetVar("String_Node_Str");
      if (StringUtils.isBlank(site)) {
        site=pageData.getSiteResarg();
      }
      if (StringUtils.isNotBlank(site)) {
        return new AssetIdWithSite("String_Node_Str",eid,site);
      }
    }
  }
 else {
    long tid=lookupTemplate(pageData.rootelement);
    if (tid > 0) {
      String site=ics.GetVar("String_Node_Str");
      if (StringUtils.isBlank(site)) {
        site=lookupSiteForTemplate(pageData);
      }
      if (StringUtils.isNotBlank(site)) {
        return new AssetIdWithSite("String_Node_Str",tid,site);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public AssetIdWithSite resolveMapped(String pagename){
  MappingPageData pageData=readPageData(pagename);
  if (pageData.isSiteEntry()) {
    LOG.debug("String_Node_Str");
    long eid=lookupCSElement(pageData.rootelement);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + pageData.rootelement + "String_Node_Str"+ eid);
    }
    if (eid > -1) {
      String site=ics.GetVar("String_Node_Str");
      LOG.debug("String_Node_Str" + site);
      if (StringUtils.isBlank(site)) {
        LOG.debug("String_Node_Str");
        site=pageData.getSiteResarg();
        LOG.debug("String_Node_Str" + site);
      }
      if (StringUtils.isNotBlank(site)) {
        return new AssetIdWithSite("String_Node_Str",eid,site);
      }
    }
  }
 else {
    LOG.debug("String_Node_Str");
    long tid=lookupTemplate(pageData.rootelement);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + pageData.rootelement + "String_Node_Str"+ tid);
    }
    if (tid > 0) {
      String site=ics.GetVar("String_Node_Str");
      LOG.debug("String_Node_Str" + site);
      if (StringUtils.isBlank(site)) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("String_Node_Str");
        }
        site=lookupSiteForTemplate(pageData);
        LOG.debug("String_Node_Str" + site);
      }
      if (StringUtils.isNotBlank(site)) {
        return new AssetIdWithSite("String_Node_Str",tid,site);
      }
    }
  }
  LOG.debug("String_Node_Str" + pagename + "String_Node_Str");
  return null;
}
Program: 86965
Project: 86965
Buggy source:
public void handleRequest(ICS ics){
  AssetId id=templateAssetAccess.currentId();
  TemplateAsset asset=templateAssetAccess.read(id);
  model.add("String_Node_Str",new ScatteredAsset(asset.getDelegate()));
}

Fixed version (ground truth):
public void handleRequest(ICS ics){
  AssetId id=templateAssetAccess.currentId();
  TemplateAsset asset=templateAssetAccess.read(id);
  model.add("String_Node_Str",new ScatteredAsset(asset.getDelegate()));
  LOG.info("String_Node_Str" + myRenderMode);
  LOG.info("String_Node_Str" + mappedAsset);
}
Program: 86966
Project: 86966
Buggy source:
@Override public Object load(ICS ics,String resourceName) throws Exception {
  if (!isLoaded) {
    bootEngine(ics,path);
    isLoaded=true;
  }
  if (logger.isDebugEnabled())   logger.debug("String_Node_Str" + resourceName);
  if (ics.IsElement(resourceName)) {
    final StatementParam param=stmt.newParam();
    param.setString(0,resourceName);
    Row row=SqlHelper.selectSingle(ics,stmt,param);
    String url=row.getString("String_Node_Str");
    String res1=row.getString("String_Node_Str");
    String res2=row.getString("String_Node_Str");
    Map<String,String> m=new HashMap<String,String>();
    Utilities.getParams(res1,m,false);
    Utilities.getParams(res2,m,false);
    String tid=m.get("String_Node_Str");
    String eid=m.get("String_Node_Str");
    if (StringUtils.isNotBlank(tid)) {
      LogDep.logDep(ics,"String_Node_Str",tid);
    }
    if (StringUtils.isNotBlank(tid)) {
      LogDep.logDep(ics,"String_Node_Str",eid);
    }
    if (url.endsWith("String_Node_Str")) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + resourceName + "String_Node_Str"+ url);
      }
      Class<?> x=getGroovyScriptEngine().loadScriptByName(url);
      return x.newInstance();
    }
 else {
      return super.load(ics,resourceName);
    }
  }
 else {
    return super.load(ics,resourceName);
  }
}

Fixed version (ground truth):
@Override public Object load(ICS ics,String resourceName) throws Exception {
  if (!isLoaded) {
    bootEngine(ics,path);
    isLoaded=true;
  }
  if (logger.isDebugEnabled())   logger.debug("String_Node_Str" + resourceName);
  if (ics.IsElement(resourceName)) {
    final StatementParam param=stmt.newParam();
    param.setString(0,resourceName);
    Row row=SqlHelper.selectSingle(ics,stmt,param);
    String url=row.getString("String_Node_Str");
    String res1=row.getString("String_Node_Str");
    String res2=row.getString("String_Node_Str");
    Map<String,String> m=new HashMap<String,String>();
    Utilities.getParams(res1,m,false);
    Utilities.getParams(res2,m,false);
    String tid=m.get("String_Node_Str");
    String eid=m.get("String_Node_Str");
    if (StringUtils.isNotBlank(tid)) {
      LogDep.logDep(ics,"String_Node_Str",tid);
    }
    if (StringUtils.isNotBlank(eid)) {
      LogDep.logDep(ics,"String_Node_Str",eid);
    }
    if (url.endsWith("String_Node_Str")) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + resourceName + "String_Node_Str"+ url);
      }
      Class<?> x=getGroovyScriptEngine().loadScriptByName(url);
      return x.newInstance();
    }
 else {
      return super.load(ics,resourceName);
    }
  }
 else {
    return super.load(ics,resourceName);
  }
}
Program: 86968
Project: 86968
Buggy source:
/** 
 * @param ics
 * @param id
 * @param deptype
 * @param locale
 * @param attr
 * @param attrType
 * @param ordering
 * @return IList with the attribute values.
 */
public static IList getAttributeValues(ICS ics,AssetId id,String deptype,String locale,String attr,String attrType,String ordering){
  SetAsset setAsset=new SetAsset();
  final String assetSetName="String_Node_Str" + ics.genID(false);
  setAsset.setName(assetSetName);
  setAsset.setType(id.getType());
  setAsset.setId(Long.toString(id.getId()));
  if (deptype != null) {
    setAsset.setDeptype(deptype);
  }
  if (locale != null) {
    setAsset.setLocale(locale);
  }
  setAsset.execute(ics);
  GetAttributeValues gav=new GetAttributeValues();
  gav.setName(assetSetName);
  gav.setAttribute(attr);
  if (attrType != null) {
    gav.setTypename(attrType);
  }
  if (ordering != null) {
    gav.setOrdering(ordering);
  }
  String listname=ics.genID(true);
  gav.setAttribute(listname);
  gav.execute(ics);
  IList result=ics.GetList(listname);
  ics.RegisterList(listname,null);
  return result;
}

Fixed version (ground truth):
/** 
 * @param ics
 * @param id
 * @param deptype
 * @param locale
 * @param attr
 * @param attrType
 * @param ordering
 * @return IList with the attribute values.
 */
public static IList getAttributeValues(ICS ics,AssetId id,String deptype,String locale,String attr,String attrType,String ordering){
  SetAsset setAsset=new SetAsset();
  final String assetSetName="String_Node_Str" + ics.genID(false);
  setAsset.setName(assetSetName);
  setAsset.setType(id.getType());
  setAsset.setId(Long.toString(id.getId()));
  if (deptype != null) {
    setAsset.setDeptype(deptype);
  }
  if (locale != null) {
    setAsset.setLocale(locale);
  }
  setAsset.execute(ics);
  GetAttributeValues gav=new GetAttributeValues();
  gav.setName(assetSetName);
  gav.setAttribute(attr);
  if (attrType != null) {
    gav.setTypename(attrType);
  }
  if (ordering != null) {
    gav.setOrdering(ordering);
  }
  String listname=ics.genID(true);
  gav.setListvarname(listname);
  gav.execute(ics);
  IList result=ics.GetList(listname);
  ics.RegisterList(listname,null);
  return result;
}
Program: 86969
Project: 86969
Buggy source:
private List<String> _lookupWraAssetTypes(){
  List<String> x=new ArrayList<String>();
  for (  Row r : SqlHelper.select(ics,"String_Node_Str","String_Node_Str")) {
    String type=r.getString("String_Node_Str");
    if (!SYSTEM_TYPES.contains(type)) {
      x.add(type);
    }
  }
  return x;
}

Fixed version (ground truth):
private List<String> _lookupWraAssetTypes(){
  List<String> x=new ArrayList<String>();
  for (  Row r : SqlHelper.select(ics,"String_Node_Str","String_Node_Str")) {
    String type=r.getString("String_Node_Str");
    if (!SYSTEM_TYPES.contains(type)) {
      x.add(type);
    }
    x.add("String_Node_Str");
  }
  return x;
}
Program: 86970
Project: 86970
Buggy source:
private List<String> _lookupWraAssetTypes(){
  List<String> x=new ArrayList<String>();
  for (  Row r : SqlHelper.select(ics,"String_Node_Str","String_Node_Str")) {
    String type=r.getString("String_Node_Str");
    if (!SYSTEM_TYPES.contains(type)) {
      x.add(type);
    }
    x.add("String_Node_Str");
  }
  return x;
}

Fixed version (ground truth):
private Collection<String> _lookupWraAssetTypes(){
  Set<String> x=new HashSet<String>();
  for (  Row r : SqlHelper.select(ics,"String_Node_Str","String_Node_Str")) {
    String type=r.getString("String_Node_Str");
    if (!SYSTEM_TYPES.contains(type)) {
      x.add(type);
    }
  }
  x.add("String_Node_Str");
  return x;
}