nus-yam/ex-repair huggingface dataset:
Program: 93229
Project: 93229
Buggy source:
@Override public Tuple<String,Iterable<Job>> listJobs(Map<Option,?> options) throws BigQueryException {
  try {
    JobList jobsList=bigquery.jobs().list(this.options.projectId()).setAllUsers(Option.ALL_USERS.getBoolean(options)).setFields(Option.FIELDS.getString(options)).setStateFilter(Option.STATE_FILTER.<List<String>>get(options)).setMaxResults(MAX_RESULTS.getLong(options)).setPageToken(PAGE_TOKEN.getString(options)).setProjection(DEFAULT_PROJECTION).execute();
    return Tuple.of(jobsList.getNextPageToken(),Iterables.transform(jobsList.getJobs(),new Function<JobList.Jobs,Job>(){
      @Override public Job apply(      JobList.Jobs f){
        return new Job().setConfiguration(f.getConfiguration()).setId(f.getId()).setJobReference(f.getJobReference()).setKind(f.getKind()).setStatistics(f.getStatistics()).setStatus(f.getStatus()).setUserEmail(f.getUserEmail());
      }
    }
));
  }
 catch (  IOException ex) {
    throw translate(ex);
  }
}

Fixed version (ground truth):
@Override public Tuple<String,Iterable<Job>> listJobs(Map<Option,?> options) throws BigQueryException {
  try {
    JobList jobsList=bigquery.jobs().list(this.options.projectId()).setAllUsers(Option.ALL_USERS.getBoolean(options)).setFields(Option.FIELDS.getString(options)).setStateFilter(Option.STATE_FILTER.<List<String>>get(options)).setMaxResults(MAX_RESULTS.getLong(options)).setPageToken(PAGE_TOKEN.getString(options)).setProjection(DEFAULT_PROJECTION).execute();
    Iterable<JobList.Jobs> jobs=jobsList.getJobs();
    return Tuple.of(jobsList.getNextPageToken(),Iterables.transform(jobs != null ? jobs : ImmutableList.<JobList.Jobs>of(),new Function<JobList.Jobs,Job>(){
      @Override public Job apply(      JobList.Jobs f){
        JobStatus statusPb=f.getStatus() != null ? f.getStatus() : new JobStatus();
        if (statusPb.getState() == null) {
          statusPb.setState(f.getState());
        }
        if (statusPb.getErrorResult() == null) {
          statusPb.setErrorResult(f.getErrorResult());
        }
        return new Job().setConfiguration(f.getConfiguration()).setId(f.getId()).setJobReference(f.getJobReference()).setKind(f.getKind()).setStatistics(f.getStatistics()).setStatus(f.getStatus()).setUserEmail(f.getUserEmail());
      }
    }
));
  }
 catch (  IOException ex) {
    throw translate(ex);
  }
}
Program: 93230
Project: 93230
Buggy source:
@Override public Job apply(JobList.Jobs f){
  return new Job().setConfiguration(f.getConfiguration()).setId(f.getId()).setJobReference(f.getJobReference()).setKind(f.getKind()).setStatistics(f.getStatistics()).setStatus(f.getStatus()).setUserEmail(f.getUserEmail());
}

Fixed version (ground truth):
@Override public Job apply(JobList.Jobs f){
  JobStatus statusPb=f.getStatus() != null ? f.getStatus() : new JobStatus();
  if (statusPb.getState() == null) {
    statusPb.setState(f.getState());
  }
  if (statusPb.getErrorResult() == null) {
    statusPb.setErrorResult(f.getErrorResult());
  }
  return new Job().setConfiguration(f.getConfiguration()).setId(f.getId()).setJobReference(f.getJobReference()).setKind(f.getKind()).setStatistics(f.getStatistics()).setStatus(f.getStatus()).setUserEmail(f.getUserEmail());
}
Program: 93231
Project: 93231
Buggy source:
private static boolean isLocalHost(String host){
  if (host != null) {
    try {
      String normalizedHost=host;
      if (!includesScheme(normalizedHost)) {
        normalizedHost="String_Node_Str" + normalizedHost;
      }
      InetAddress hostAddr=InetAddress.getByName(new URL(normalizedHost).getHost());
      return hostAddr.isAnyLocalAddress() || hostAddr.isLoopbackAddress();
    }
 catch (    UnknownHostException|MalformedURLException e) {
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean isLocalHost(String host){
  if (host != null) {
    try {
      String normalizedHost=host;
      if (!includesScheme(normalizedHost)) {
        normalizedHost="String_Node_Str" + normalizedHost;
      }
      InetAddress hostAddr=InetAddress.getByName(new URL(normalizedHost).getHost());
      return hostAddr.isAnyLocalAddress() || hostAddr.isLoopbackAddress();
    }
 catch (    Exception e) {
    }
  }
  return false;
}
Program: 93232
Project: 93232
Buggy source:
/** 
 * Returns the totalRetryPeriodMillis. Default value is   {@value #DEFAULT_TOTAL_RETRY_PERIOD_MILLIS}.
 */
public long getTotalRetryPeriodMillis(){
  return totalRetryPeriodMillis;
}

Fixed version (ground truth):
/** 
 * Returns the totalRetryPeriodMillis. Default value is  {@value #DEFAULT_TOTAL_RETRY_PERIOD_MILLIS}.
 */
public long getTotalRetryPeriodMillis(){
  return totalRetryPeriodMillis;
}
Program: 93233
Project: 93233
Buggy source:
private Storage.Objects.Delete deleteRequest(StorageObject blob,Map<Option,?> options) throws IOException {
  return storage.objects().delete(blob.getBucket(),blob.getName()).setIfMetagenerationMatch(IF_METAGENERATION_MATCH.getLong(options)).setIfMetagenerationNotMatch(IF_METAGENERATION_NOT_MATCH.getLong(options)).setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options)).setIfGenerationMatch(100L).setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
}

Fixed version (ground truth):
private Storage.Objects.Delete deleteRequest(StorageObject blob,Map<Option,?> options) throws IOException {
  return storage.objects().delete(blob.getBucket(),blob.getName()).setIfMetagenerationMatch(IF_METAGENERATION_MATCH.getLong(options)).setIfMetagenerationNotMatch(IF_METAGENERATION_NOT_MATCH.getLong(options)).setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options)).setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
}
Program: 93234
Project: 93234
Buggy source:
private Storage.Objects.Delete deleteRequest(StorageObject blob,Map<Option,?> options) throws IOException {
  return storage.objects().delete(blob.getBucket(),blob.getName()).setIfMetagenerationMatch(IF_METAGENERATION_MATCH.getLong(options)).setIfMetagenerationNotMatch(IF_METAGENERATION_NOT_MATCH.getLong(options)).setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options)).setIfGenerationMatch(100L).setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
}

Fixed version (ground truth):
private Storage.Objects.Delete deleteRequest(StorageObject blob,Map<Option,?> options) throws IOException {
  return storage.objects().delete(blob.getBucket(),blob.getName()).setIfMetagenerationMatch(IF_METAGENERATION_MATCH.getLong(options)).setIfMetagenerationNotMatch(IF_METAGENERATION_NOT_MATCH.getLong(options)).setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options)).setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
}
Program: 93235
Project: 93235
Buggy source:
@Override public Batch.Response submit(){
  validateActive();
  List<com.google.datastore.v1beta3.Mutation> mutationsPb=toMutationPbList();
  com.google.datastore.v1beta3.CommitRequest.Builder requestPb=com.google.datastore.v1beta3.CommitRequest.newBuilder();
  requestPb.setMode(com.google.datastore.v1beta3.CommitRequest.Mode.NON_TRANSACTIONAL);
  requestPb.addAllMutations(mutationsPb);
  com.google.datastore.v1beta3.CommitResponse responsePb=datastore.commit(requestPb.build());
  deactivate();
  return new ResponseImpl(responsePb,numAutoAllocatedIds());
}

Fixed version (ground truth):
@Override public Batch.Response submit(){
  validateActive();
  List<com.google.datastore.v1beta3.Mutation> mutationsPb=toMutationPbList();
  com.google.datastore.v1beta3.CommitRequest.Builder requestPb=com.google.datastore.v1beta3.CommitRequest.newBuilder();
  requestPb.setMode(com.google.datastore.v1beta3.CommitRequest.Mode.NON_TRANSACTIONAL);
  requestPb.addAllMutations(mutationsPb);
  com.google.datastore.v1beta3.CommitResponse responsePb=datastore.commit(requestPb.build());
  deactivate();
  return new ResponseImpl(responsePb,toAddAutoId().size());
}
Program: 93236
Project: 93236
Buggy source:
@Override public List<Key> generatedKeys(){
  Iterator<com.google.datastore.v1beta3.MutationResult> results=response.getMutationResultsList().iterator();
  List<Key> generated=new LinkedList<Key>();
  for (int i=0; i < numAutoAllocatedIds; i++) {
    generated.add(Key.fromPb(results.next().getKey()));
  }
  return generated;
}

Fixed version (ground truth):
@Override public List<Key> generatedKeys(){
  Iterator<com.google.datastore.v1beta3.MutationResult> results=response.getMutationResultsList().iterator();
  List<Key> generated=new ArrayList<>(numAutoAllocatedIds);
  for (int i=0; i < numAutoAllocatedIds; i++) {
    generated.add(Key.fromPb(results.next().getKey()));
  }
  return generated;
}
Program: 93238
Project: 93238
Buggy source:
@Override public Transaction.Response commit(){
  validateActive();
  List<com.google.datastore.v1beta3.Mutation> mutationsPb=toMutationPbList();
  com.google.datastore.v1beta3.CommitRequest.Builder requestPb=com.google.datastore.v1beta3.CommitRequest.newBuilder();
  requestPb.setMode(com.google.datastore.v1beta3.CommitRequest.Mode.TRANSACTIONAL);
  requestPb.setTransaction(transaction);
  requestPb.addAllMutations(mutationsPb);
  com.google.datastore.v1beta3.CommitResponse responsePb=datastore.commit(requestPb.build());
  deactivate();
  return new ResponseImpl(responsePb,numAutoAllocatedIds());
}

Fixed version (ground truth):
@Override public Transaction.Response commit(){
  validateActive();
  List<com.google.datastore.v1beta3.Mutation> mutationsPb=toMutationPbList();
  com.google.datastore.v1beta3.CommitRequest.Builder requestPb=com.google.datastore.v1beta3.CommitRequest.newBuilder();
  requestPb.setMode(com.google.datastore.v1beta3.CommitRequest.Mode.TRANSACTIONAL);
  requestPb.setTransaction(transaction);
  requestPb.addAllMutations(mutationsPb);
  com.google.datastore.v1beta3.CommitResponse responsePb=datastore.commit(requestPb.build());
  deactivate();
  return new ResponseImpl(responsePb,toAddAutoId().size());
}
Program: 93239
Project: 93239
Buggy source:
@Override public List<Key> generatedKeys(){
  Iterator<com.google.datastore.v1beta3.MutationResult> results=response.getMutationResultsList().iterator();
  List<Key> generated=new LinkedList<Key>();
  for (int i=0; i < numAutoAllocatedIds; i++) {
    generated.add(Key.fromPb(results.next().getKey()));
  }
  return generated;
}

Fixed version (ground truth):
@Override public List<Key> generatedKeys(){
  Iterator<com.google.datastore.v1beta3.MutationResult> results=response.getMutationResultsList().iterator();
  List<Key> generated=new ArrayList<>(numAutoAllocatedIds);
  for (int i=0; i < numAutoAllocatedIds; i++) {
    generated.add(Key.fromPb(results.next().getKey()));
  }
  return generated;
}
Program: 93240
Project: 93240
Buggy source:
public DefaultDatastoreRpc(DatastoreOptions options){
  if (options.host().contains("String_Node_Str")) {
    client=com.google.datastore.v1beta3.client.DatastoreFactory.get().create(new com.google.datastore.v1beta3.client.DatastoreOptions.Builder().projectId(options.projectId()).localHost(options.host()).initializer(options.httpRequestInitializer()).build());
  }
 else {
    client=com.google.datastore.v1beta3.client.DatastoreFactory.get().create(new com.google.datastore.v1beta3.client.DatastoreOptions.Builder().projectId(options.projectId()).initializer(options.httpRequestInitializer()).build());
  }
}

Fixed version (ground truth):
public DefaultDatastoreRpc(DatastoreOptions options){
  com.google.datastore.v1beta3.client.DatastoreOptions.Builder clientBuilder=new com.google.datastore.v1beta3.client.DatastoreOptions.Builder().projectId(options.projectId()).initializer(options.httpRequestInitializer());
  if (options.host() != null) {
    try {
      String normalizedHost=options.host();
      if (!normalizedHost.startsWith("String_Node_Str")) {
        normalizedHost="String_Node_Str" + normalizedHost;
      }
      InetAddress hostAddr=InetAddress.getByName(new URL(normalizedHost).getHost());
      if (hostAddr.isAnyLocalAddress() || hostAddr.isLoopbackAddress()) {
        clientBuilder=clientBuilder.localHost(options.host());
      }
    }
 catch (    UnknownHostException|MalformedURLException e) {
    }
  }
  client=com.google.datastore.v1beta3.client.DatastoreFactory.get().create(clientBuilder.build());
}
Program: 93241
Project: 93241
Buggy source:
BasePageFetcher(StorageOptions serviceOptions,String cursor,Map<StorageRpc.Option,?> optionMap){
  this.serviceOptions=serviceOptions;
  ImmutableMap.Builder<StorageRpc.Option,Object> builder=ImmutableMap.builder();
  builder.put(StorageRpc.Option.PAGE_TOKEN,cursor);
  for (  Map.Entry<StorageRpc.Option,?> option : optionMap.entrySet()) {
    if (option.getKey() != StorageRpc.Option.PAGE_TOKEN) {
      builder.put(option.getKey(),option.getValue());
    }
  }
  this.requestOptions=builder.build();
}

Fixed version (ground truth):
BasePageFetcher(StorageOptions serviceOptions,String cursor,Map<StorageRpc.Option,?> optionMap){
  this.serviceOptions=serviceOptions;
  ImmutableMap.Builder<StorageRpc.Option,Object> builder=ImmutableMap.builder();
  if (cursor != null) {
    builder.put(StorageRpc.Option.PAGE_TOKEN,cursor);
  }
  for (  Map.Entry<StorageRpc.Option,?> option : optionMap.entrySet()) {
    if (option.getKey() != StorageRpc.Option.PAGE_TOKEN) {
      builder.put(option.getKey(),option.getValue());
    }
  }
  this.requestOptions=builder.build();
}
Program: 93242
Project: 93242
Buggy source:
@Override public O options(){
  return options;
}

Fixed version (ground truth):
@Override public OptionsT options(){
  return options;
}
Program: 93243
Project: 93243
Buggy source:
protected BaseService(O options){
  this.options=options;
}

Fixed version (ground truth):
protected BaseService(OptionsT options){
  this.options=options;
}
Program: 93244
Project: 93244
Buggy source:
private Builder(){
  super(Type.BLOB);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.BLOB);
}
Program: 93245
Project: 93245
Buggy source:
private Builder(){
  super(Type.BOOLEAN);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.BOOLEAN);
}
Program: 93246
Project: 93246
Buggy source:
private Builder(){
  super(Type.DATE_TIME);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.DATE_TIME);
}
Program: 93247
Project: 93247
Buggy source:
public Builder(){
  super(Type.DOUBLE);
}

Fixed version (ground truth):
public Builder(){
  super(ValueType.DOUBLE);
}
Program: 93248
Project: 93248
Buggy source:
private Builder(){
  super(Type.ENTITY);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.ENTITY);
}
Program: 93249
Project: 93249
Buggy source:
public Builder(){
  super(Type.KEY);
}

Fixed version (ground truth):
public Builder(){
  super(ValueType.KEY);
}
Program: 93250
Project: 93250
Buggy source:
private Builder(){
  super(Type.LIST);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.LIST);
}
Program: 93251
Project: 93251
Buggy source:
private Builder(){
  super(Type.LONG);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.LONG);
}
Program: 93252
Project: 93252
Buggy source:
private Builder(){
  super(Type.NULL);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.NULL);
}
Program: 93253
Project: 93253
Buggy source:
private Builder(){
  super(Type.RAW_VALUE);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.RAW_VALUE);
}
Program: 93254
Project: 93254
Buggy source:
private Builder(){
  super(Type.STRING);
}

Fixed version (ground truth):
private Builder(){
  super(ValueType.STRING);
}
Program: 93255
Project: 93255
Buggy source:
public abstract Builder<?,?,?> toBuilder();

Fixed version (ground truth):
public abstract ValueBuilder<?,?,?> toBuilder();
Program: 93256
Project: 93256
Buggy source:
public final Type type(){
  return type;
}

Fixed version (ground truth):
public final ValueType type(){
  return valueType;
}
Program: 93257
Project: 93257
Buggy source:
@Override public int hashCode(){
  return Objects.hash(type,indexed,meaning,value);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(valueType,indexed,meaning,value);
}
Program: 93258
Project: 93258
Buggy source:
BaseBuilder(Type type){
  this.type=type;
}

Fixed version (ground truth):
BaseBuilder(ValueType valueType){
  this.valueType=valueType;
}
Program: 93259
Project: 93259
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public boolean equals(Object obj){
  if (obj == this) {
    return true;
  }
  if (!getClass().isInstance(obj)) {
    return false;
  }
  Value<V> other=(Value<V>)obj;
  return Objects.equals(type,other.type) && Objects.equals(indexed,other.indexed) && Objects.equals(meaning,other.meaning)&& Objects.equals(value,other.value);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public boolean equals(Object obj){
  if (obj == this) {
    return true;
  }
  if (!getClass().isInstance(obj)) {
    return false;
  }
  Value<V> other=(Value<V>)obj;
  return Objects.equals(valueType,other.valueType) && Objects.equals(indexed,other.indexed) && Objects.equals(meaning,other.meaning)&& Objects.equals(value,other.value);
}
Program: 93260
Project: 93260
Buggy source:
<P extends Value<V>,B extends BaseBuilder<V,P,B>>void Value(Builder<V,P,B> builder){
  type=builder.getType();
  indexed=builder.getIndexed();
  meaning=builder.getMeaning();
  value=builder.get();
}

Fixed version (ground truth):
<P extends Value<V>,B extends BaseBuilder<V,P,B>>Value(ValueBuilder<V,P,B> builder){
  valueType=builder.getValueType();
  indexed=builder.getIndexed();
  meaning=builder.getMeaning();
  value=builder.get();
}
Program: 93261
Project: 93261
Buggy source:
@Override public void setVisibility(int visibility){
  super.setVisibility(visibility);
  if (visibility == View.VISIBLE) {
    resetAnimation();
  }
 else   if (visibility == View.GONE || visibility == View.INVISIBLE) {
    stopAnimation();
  }
}

Fixed version (ground truth):
@Override public void setVisibility(int visibility){
  int currentVisibility=getVisibility();
  super.setVisibility(visibility);
  if (visibility != currentVisibility) {
    if (visibility == View.VISIBLE) {
      resetAnimation();
    }
 else     if (visibility == View.GONE || visibility == View.INVISIBLE) {
      stopAnimation();
    }
  }
}
Program: 93262
Project: 93262
Buggy source:
public void setStackMargin(int margin){
  mCardAnimator.setStackMargin(margin);
  mCardAnimator.initLayout();
}

Fixed version (ground truth):
public void setStackMargin(int margin){
  mStackMargin=margin;
  mCardAnimator.setStackMargin(mStackMargin);
  mCardAnimator.initLayout();
}
Program: 93263
Project: 93263
Buggy source:
private void applyParallax(){
  int[] location=new int[2];
  getLocationOnScreen(location);
  if (scrollSpaceY != 0) {
    float locationY=(float)location[1];
    float locationUsableY=locationY + heightImageView / 2;
    float scrollDeltaY=locationUsableY / screenHeight;
    float interpolatedScrollDeltaY=interpolator.getInterpolation(scrollDeltaY);
    if (reverseY)     setMyScrollY((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaY),-0.5f),0.5f) * -scrollSpaceY));
 else     setMyScrollY((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaY),-0.5f),0.5f) * scrollSpaceY));
  }
  if (scrollSpaceX != 0) {
    float locationX=(float)location[0];
    float locationUsableX=locationX + widthImageView / 2;
    float scrollDeltaX=locationUsableX / screenWidth;
    float interpolatedScrollDeltaX=interpolator.getInterpolation(scrollDeltaX);
    if (reverseX) {
      setMyScrollX((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaX),-0.5f),0.5f) * -scrollSpaceX));
    }
 else {
      setMyScrollX((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaX),-0.5f),0.5f) * scrollSpaceX));
    }
  }
}

Fixed version (ground truth):
private void applyParallax(){
  int[] location=new int[2];
  getLocationOnScreen(location);
  if (scrollSpaceY != 0) {
    float locationY=(float)location[1];
    float locationUsableY=locationY + heightImageView / 2;
    float scrollDeltaY=locationUsableY / screenHeight;
    float interpolatedScrollDeltaY=interpolator.getInterpolation(scrollDeltaY);
    if (reverseY)     setMyScrollY((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaY),-0.5f),0.5f) * -scrollSpaceY));
 else     setMyScrollY((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaY),-0.5f),0.5f) * scrollSpaceY));
  }
 else {
    setMyScrollY(0);
  }
  if (scrollSpaceX != 0) {
    float locationX=(float)location[0];
    float locationUsableX=locationX + widthImageView / 2;
    float scrollDeltaX=locationUsableX / screenWidth;
    float interpolatedScrollDeltaX=interpolator.getInterpolation(scrollDeltaX);
    if (reverseX) {
      setMyScrollX((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaX),-0.5f),0.5f) * -scrollSpaceX));
    }
 else {
      setMyScrollX((int)(Math.min(Math.max((0.5f - interpolatedScrollDeltaX),-0.5f),0.5f) * scrollSpaceX));
    }
  }
 else {
    setMyScrollX(0);
  }
}
Program: 93264
Project: 93264
Buggy source:
public void actionPerformed(AnActionEvent e){
  project=CommonDataKeys.PROJECT.getData(e.getDataContext());
  if (project == null) {
    return;
  }
  clickedFile=CommonDataKeys.VIRTUAL_FILE.getData(e.getDataContext());
  Log.i("String_Node_Str" + clickedFile.getPath());
  if (PropertiesComponent.getInstance().isValueSet(StorageDataKey.SettingLanguageEngine)) {
    defaultTranslationEngine=TranslationEngineType.fromName(PropertiesComponent.getInstance().getValue(StorageDataKey.SettingLanguageEngine));
  }
  try {
    androidStringsInStringFile=AndroidString.getAndroidStringsList(clickedFile.contentsToByteArray());
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  if (androidStringsInStringFile == null || androidStringsInStringFile.isEmpty()) {
    showErrorDialog(project,"String_Node_Str");
    return;
  }
  MultiSelectDialog multiSelectDialog=new MultiSelectDialog(project,String.format(LOCALIZATION_MSG,defaultTranslationEngine.getDisplayName()),LOCALIZATION_TITLE,OVERRIDE_EXITS_STRINGS,PropertiesComponent.getInstance(project).getBoolean(StorageDataKey.OverrideCheckBoxStatus,false),defaultTranslationEngine,false);
  multiSelectDialog.setOnOKClickedListener(this);
  multiSelectDialog.show();
}

Fixed version (ground truth):
public void actionPerformed(AnActionEvent e){
  project=CommonDataKeys.PROJECT.getData(e.getDataContext());
  if (project == null) {
    return;
  }
  clickedFile=CommonDataKeys.VIRTUAL_FILE.getData(e.getDataContext());
  Log.i("String_Node_Str" + clickedFile.getPath());
  if (PropertiesComponent.getInstance().isValueSet(StorageDataKey.SettingLanguageEngine)) {
    defaultTranslationEngine=TranslationEngineType.fromName(PropertiesComponent.getInstance().getValue(StorageDataKey.SettingLanguageEngine));
  }
  try {
    androidStringsInStringFile=AndroidString.getAndroidStringsList(clickedFile.contentsToByteArray());
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  for (int i=0; i < androidStringsInStringFile.size(); i++) {
    Log.i("String_Node_Str" + (i + 1) + "String_Node_Str"+ androidStringsInStringFile.get(i).toString());
  }
  if (androidStringsInStringFile == null || androidStringsInStringFile.isEmpty()) {
    showErrorDialog(project,"String_Node_Str");
    return;
  }
  MultiSelectDialog multiSelectDialog=new MultiSelectDialog(project,String.format(LOCALIZATION_MSG,defaultTranslationEngine.getDisplayName()),LOCALIZATION_TITLE,OVERRIDE_EXITS_STRINGS,PropertiesComponent.getInstance(project).getBoolean(StorageDataKey.OverrideCheckBoxStatus,false),defaultTranslationEngine,false);
  multiSelectDialog.setOnOKClickedListener(this);
  multiSelectDialog.show();
}
Program: 93265
Project: 93265
Buggy source:
public static InputStream doHttpPost(String url,String xmlBody,Header[] headers){
  try {
    HttpClient httpClient=new DefaultHttpClient();
    HttpPost httpPost=new HttpPost(url);
    httpPost.setHeaders(headers);
    httpPost.setEntity(new StringEntity(xmlBody,"String_Node_Str"));
    HttpResponse resp=httpClient.execute(httpPost);
    return resp.getEntity().getContent();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public static String doHttpPost(String url,String xmlBody,Header[] headers){
  try {
    HttpClient httpClient=new DefaultHttpClient();
    HttpPost httpPost=new HttpPost(url);
    httpPost.setHeaders(headers);
    httpPost.setEntity(new StringEntity(xmlBody,"String_Node_Str"));
    HttpResponse resp=httpClient.execute(httpPost);
    return StreamUtil.readText(resp.getEntity().getContent(),"String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}
Program: 93267
Project: 93267
Buggy source:
public static List<String> getTranslatedStringArrays(String accessToken,List<String> querys,SupportedLanguages from,SupportedLanguages to){
  String xmlBodyTop="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String xmlBodyMid="String_Node_Str";
  String xmlBodyBot="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  String xmlBodyStrings="String_Node_Str";
  for (  String query : querys) {
    xmlBodyStrings+=String.format(xmlBodyMid,query);
  }
  String xmlBody=String.format(xmlBodyTop,from.getLanguageCode()) + xmlBodyStrings + String.format(xmlBodyBot,to.getLanguageCode());
  Header[] headers=new Header[]{new BasicHeader("String_Node_Str","String_Node_Str" + accessToken),new BasicHeader("String_Node_Str","String_Node_Str")};
  InputStream postResult=HttpUtils.doHttpPost(TRANSLATE_URL,xmlBody,headers);
  List<TranslateArrayResponse> translateArrayResponses=BingResultParser.parseTranslateArrayResponse(postResult);
  List<String> result=new ArrayList<String>();
  for (  TranslateArrayResponse translateArrayResponse : translateArrayResponses) {
    result.add(translateArrayResponse.getTranslatedText());
  }
  return result;
}

Fixed version (ground truth):
public static List<String> getTranslatedStringArrays(String accessToken,List<String> querys,SupportedLanguages from,SupportedLanguages to){
  String xmlBodyTop="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String xmlBodyMid="String_Node_Str";
  String xmlBodyBot="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  for (int i=0; i < querys.size(); i++) {
    Log.i("String_Node_Str" + (i + 1) + "String_Node_Str"+ querys.get(i));
  }
  String xmlBodyStrings="String_Node_Str";
  for (  String query : querys) {
    xmlBodyStrings+=String.format(xmlBodyMid,query);
  }
  String xmlBody=String.format(xmlBodyTop,from.getLanguageCode()) + xmlBodyStrings + String.format(xmlBodyBot,to.getLanguageCode());
  Header[] headers=new Header[]{new BasicHeader("String_Node_Str","String_Node_Str" + accessToken),new BasicHeader("String_Node_Str","String_Node_Str")};
  Log.i("String_Node_Str" + xmlBody);
  String postResult=HttpUtils.doHttpPost(TRANSLATE_URL,xmlBody,headers);
  Log.i("String_Node_Str" + postResult);
  List<TranslateArrayResponse> translateArrayResponses=BingResultParser.parseTranslateArrayResponse(postResult);
  List<String> result=new ArrayList<String>();
  for (  TranslateArrayResponse translateArrayResponse : translateArrayResponses) {
    result.add(translateArrayResponse.getTranslatedText());
  }
  return result;
}
Program: 93268
Project: 93268
Buggy source:
public AndroidString(AndroidString androidString){
  this.key=androidString.getKey();
  this.value=androidString.getValue();
}

Fixed version (ground truth):
public AndroidString(){
}
Program: 93269
Project: 93269
Buggy source:
public static List<AndroidString> getAndroidStringsList(byte[] xmlContentByte){
  try {
    String fileContent=new String(xmlContentByte,"String_Node_Str");
    if (!fileContent.contains(KEY_STRING))     return null;
    String[] tokens=fileContent.split(SPLIT_KEY);
    List<AndroidString> result=new ArrayList<AndroidString>();
    for (int i=0; i < tokens.length; i++) {
      if (tokens[i].contains(KEY_STRING)) {
        int keyStartIndex=tokens[i].indexOf(KEY_START) + KEY_START.length();
        int keyEndIndex=tokens[i].indexOf(KEY_END);
        int valueEndIndex=tokens[i].indexOf(VALUE_END);
        if (keyStartIndex >= tokens[i].length() || keyEndIndex >= tokens[i].length() || (keyEndIndex + KEY_END.length()) >= tokens[i].length() || valueEndIndex >= tokens[i].length()) {
          continue;
        }
        String key=tokens[i].substring(keyStartIndex,keyEndIndex);
        String value=tokens[i].substring(keyEndIndex + KEY_END.length(),valueEndIndex);
        result.add(new AndroidString(key,value));
      }
    }
    return result;
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public static List<AndroidString> getAndroidStringsList(byte[] xmlContentByte){
  try {
    String fileContent=new String(xmlContentByte,"String_Node_Str");
    if (!fileContent.contains(KEY_STRING))     return null;
    String[] tokens=fileContent.split(SPLIT_KEY);
    List<AndroidString> result=new ArrayList<AndroidString>();
    for (int i=0; i < tokens.length; i++) {
      if (tokens[i].contains(KEY_STRING)) {
        int keyStartIndex=tokens[i].indexOf(KEY_START) + KEY_START.length();
        int keyEndIndex=tokens[i].indexOf(KEY_END);
        int valueEndIndex=tokens[i].indexOf(VALUE_END);
        if (keyStartIndex >= tokens[i].length() || keyEndIndex >= tokens[i].length() || (keyEndIndex + KEY_END.length()) >= tokens[i].length() || valueEndIndex >= tokens[i].length()) {
          continue;
        }
        String key=tokens[i].substring(keyStartIndex,keyEndIndex).trim();
        String value=tokens[i].substring(keyEndIndex + KEY_END.length(),valueEndIndex).trim();
        result.add(new AndroidString(key,value));
      }
    }
    return result;
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
  return null;
}
Program: 93270
Project: 93270
Buggy source:
private static List<AndroidString> getTargetAndroidStrings(List<AndroidString> sourceAndroidStrings,List<AndroidString> translatedAndroidStrings,String fileName,boolean override){
  VirtualFile existenceFile=LocalFileSystem.getInstance().findFileByPath(fileName);
  List<AndroidString> existenceAndroidStrings=null;
  if (existenceFile != null && !override) {
    try {
      existenceAndroidStrings=AndroidString.getAndroidStringsList(existenceFile.contentsToByteArray());
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    existenceAndroidStrings=new ArrayList<AndroidString>();
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + translatedAndroidStrings,"String_Node_Str" + existenceAndroidStrings);
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>(sourceAndroidStrings);
  for (  AndroidString androidString : targetAndroidStrings) {
    Log.i("String_Node_Str" + sourceAndroidStrings);
    if (!override) {
      String existenceValue=getAndroidStringValueInList(existenceAndroidStrings,androidString.getKey());
      if (existenceValue != null) {
        androidString.setValue(existenceValue);
      }
    }
    String translatedValue=getAndroidStringValueInList(translatedAndroidStrings,androidString.getKey());
    if (translatedValue != null) {
      androidString.setValue(translatedValue);
    }
    Log.i("String_Node_Str" + sourceAndroidStrings);
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + targetAndroidStrings);
  return targetAndroidStrings;
}

Fixed version (ground truth):
private static List<AndroidString> getTargetAndroidStrings(List<AndroidString> sourceAndroidStrings,List<AndroidString> translatedAndroidStrings,String fileName,boolean override){
  VirtualFile existenceFile=LocalFileSystem.getInstance().findFileByPath(fileName);
  List<AndroidString> existenceAndroidStrings=null;
  if (existenceFile != null && !override) {
    try {
      existenceAndroidStrings=AndroidString.getAndroidStringsList(existenceFile.contentsToByteArray());
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    existenceAndroidStrings=new ArrayList<AndroidString>();
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + translatedAndroidStrings,"String_Node_Str" + existenceAndroidStrings);
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>();
  for (int i=0; i < sourceAndroidStrings.size(); i++) {
    AndroidString string=sourceAndroidStrings.get(i);
    AndroidString resultString=new AndroidString(string);
    if (!override) {
      String existenceValue=getAndroidStringValueInList(existenceAndroidStrings,resultString.getKey());
      if (existenceValue != null) {
        resultString.setValue(existenceValue);
      }
    }
    String translatedValue=getAndroidStringValueInList(translatedAndroidStrings,resultString.getKey());
    if (translatedValue != null) {
      resultString.setValue(translatedValue);
    }
    targetAndroidStrings.add(resultString);
  }
  Log.i("String_Node_Str" + sourceAndroidStrings);
  return targetAndroidStrings;
}
Program: 93271
Project: 93271
Buggy source:
public AndroidString(String key,String value){
  this.key=key;
  this.value=value;
}

Fixed version (ground truth):
public AndroidString(AndroidString androidString){
  this.key=androidString.getKey();
  this.value=androidString.getValue();
}
Program: 93273
Project: 93273
Buggy source:
public static void i(String... params){
  if (params == null)   return;
  String out="String_Node_Str";
  for (int i=0; i < params.length; i++) {
    out+=params[i] + "String_Node_Str";
  }
  System.out.println(out);
}

Fixed version (ground truth):
public static void i(Object... params){
  if (params == null)   return;
  String out="String_Node_Str";
  for (int i=0; i < params.length; i++) {
    out+=params[i].toString() + "String_Node_Str";
  }
  System.out.println(out);
}
Program: 93274
Project: 93274
Buggy source:
private List<AndroidString> getTranslationEngineResult(@NotNull List<AndroidString> needToTranslatedString,@NotNull SupportedLanguages targetLanguageCode,@NotNull SupportedLanguages sourceLanguageCode,TranslationEngineType translationEngineType){
  List<String> querys=AndroidString.getAndroidStringValues(needToTranslatedString);
  List<String> result=null;
switch (translationEngineType) {
case Bing:
    String accessToken=BingTranslationApi.getAccessToken();
  if (accessToken == null) {
    errorMsg=BingIdInvalid;
    return null;
  }
result=BingTranslationApi.getTranslatedStringArrays(accessToken,querys,sourceLanguageCode,targetLanguageCode);
if ((result == null || result.isEmpty()) && !querys.isEmpty()) {
errorMsg=BingQuotaExceeded;
return null;
}
break;
case Google:
result=GoogleTranslationApi.getTranslationJSON(querys,targetLanguageCode,sourceLanguageCode);
if (result == null) {
errorMsg=GoogleErrorUnknown;
return null;
}
 else if (result.isEmpty() && !querys.isEmpty()) {
errorMsg=GoogleDailyLimitError;
return null;
}
break;
}
List<AndroidString> translatedAndroidStrings=new ArrayList<AndroidString>();
for (int i=0; i < needToTranslatedString.size(); i++) {
translatedAndroidStrings.add(new AndroidString(needToTranslatedString.get(i).getKey(),result.get(i)));
}
return translatedAndroidStrings;
}

Fixed version (ground truth):
private List<AndroidString> getTranslationEngineResult(@NotNull List<AndroidString> needToTranslatedString,@NotNull SupportedLanguages targetLanguageCode,@NotNull SupportedLanguages sourceLanguageCode,TranslationEngineType translationEngineType){
  List<String> querys=AndroidString.getAndroidStringValues(needToTranslatedString);
  List<String> result=null;
switch (translationEngineType) {
case Bing:
    String accessToken=BingTranslationApi.getAccessToken();
  if (accessToken == null) {
    errorMsg=BingIdInvalid;
    return null;
  }
result=BingTranslationApi.getTranslatedStringArrays2(accessToken,querys,sourceLanguageCode,targetLanguageCode);
if ((result == null || result.isEmpty()) && !querys.isEmpty()) {
errorMsg=BingQuotaExceeded;
return null;
}
break;
case Google:
result=GoogleTranslationApi.getTranslationJSON(querys,targetLanguageCode,sourceLanguageCode);
if (result == null) {
errorMsg=GoogleErrorUnknown;
return null;
}
 else if (result.isEmpty() && !querys.isEmpty()) {
errorMsg=GoogleDailyLimitError;
return null;
}
break;
}
List<AndroidString> translatedAndroidStrings=new ArrayList<AndroidString>();
for (int i=0; i < needToTranslatedString.size(); i++) {
translatedAndroidStrings.add(new AndroidString(needToTranslatedString.get(i).getKey(),result.get(i)));
}
return translatedAndroidStrings;
}
Program: 93275
Project: 93275
Buggy source:
private List<List<AndroidString>> splitAndroidString(List<AndroidString> origin,TranslationEngineType engineType){
  List<List<AndroidString>> splited=new ArrayList<List<AndroidString>>();
  int splitFragment=100;
switch (engineType) {
case Bing:
    splitFragment=100;
  break;
case Google:
splitFragment=50;
break;
}
if (origin.size() <= splitFragment) {
splited.add(origin);
}
 else {
int count=(origin.size() % splitFragment == 0) ? (origin.size() / splitFragment) : (origin.size() / splitFragment + 1);
for (int i=1; i <= count; i++) {
int end=i * splitFragment;
if (end > origin.size()) {
end=origin.size();
}
splited.add(origin.subList((i - 1) * splitFragment,end));
}
}
return splited;
}

Fixed version (ground truth):
private List<List<AndroidString>> splitAndroidString(List<AndroidString> origin,TranslationEngineType engineType){
  List<List<AndroidString>> splited=new ArrayList<List<AndroidString>>();
  int splitFragment=50;
switch (engineType) {
case Bing:
    splitFragment=50;
  break;
case Google:
splitFragment=50;
break;
}
if (origin.size() <= splitFragment) {
splited.add(origin);
}
 else {
int count=(origin.size() % splitFragment == 0) ? (origin.size() / splitFragment) : (origin.size() / splitFragment + 1);
for (int i=1; i <= count; i++) {
int end=i * splitFragment;
if (end > origin.size()) {
end=origin.size();
}
splited.add(origin.subList((i - 1) * splitFragment,end));
}
}
return splited;
}
Program: 93276
Project: 93276
Buggy source:
public static String doHttpGet(String url){
  try {
    HttpClient httpClient=new DefaultHttpClient();
    HttpGet httpGet=new HttpGet(url);
    HttpResponse resp=httpClient.execute(httpGet);
    return StreamUtil.readText(resp.getEntity().getContent(),"String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public static String doHttpGet(String url,Header[] headers){
  try {
    HttpClient httpClient=new DefaultHttpClient();
    HttpGet httpGet=new HttpGet(url);
    httpGet.setHeaders(headers);
    HttpResponse resp=httpClient.execute(httpGet);
    return StreamUtil.readText(resp.getEntity().getContent(),"String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}
Program: 93277
Project: 93277
Buggy source:
public static List<String> getTranslatedStringArrays(String accessToken,List<String> querys,SupportedLanguages from,SupportedLanguages to){
  String xmlBodyTop="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String xmlBodyMid="String_Node_Str";
  String xmlBodyBot="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  String xmlBodyStrings="String_Node_Str";
  for (  String query : querys) {
    xmlBodyStrings+=String.format(xmlBodyMid,query);
  }
  String xmlBody=String.format(xmlBodyTop,from.getLanguageCode()) + xmlBodyStrings + String.format(xmlBodyBot,to.getLanguageCode());
  Header[] headers=new Header[]{new BasicHeader("String_Node_Str","String_Node_Str" + accessToken),new BasicHeader("String_Node_Str","String_Node_Str")};
  Log.i("String_Node_Str" + accessToken);
  Log.i("String_Node_Str" + xmlBody);
  String postResult=HttpUtils.doHttpPost(TRANSLATE_URL,xmlBody,headers);
  Log.i("String_Node_Str" + postResult);
  List<TranslateArrayResponse> translateArrayResponses=BingResultParser.parseTranslateArrayResponse(postResult);
  List<String> result=new ArrayList<String>();
  for (  TranslateArrayResponse translateArrayResponse : translateArrayResponses) {
    result.add(translateArrayResponse.getTranslatedText());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @deprecated using @getTranslatedStringArrays2 now
 */
public static List<String> getTranslatedStringArrays(String accessToken,List<String> querys,SupportedLanguages from,SupportedLanguages to){
  String xmlBodyTop="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String xmlBodyMid="String_Node_Str";
  String xmlBodyBot="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  String xmlBodyStrings="String_Node_Str";
  for (  String query : querys) {
    xmlBodyStrings+=String.format(xmlBodyMid,query);
  }
  String xmlBody=String.format(xmlBodyTop,from.getLanguageCode()) + xmlBodyStrings + String.format(xmlBodyBot,to.getLanguageCode());
  Header[] headers=new Header[]{new BasicHeader("String_Node_Str","String_Node_Str" + accessToken),new BasicHeader("String_Node_Str","String_Node_Str")};
  Log.i("String_Node_Str" + accessToken);
  Log.i("String_Node_Str" + xmlBody);
  String postResult=HttpUtils.doHttpPost(TRANSLATE_URL,xmlBody,headers);
  Log.i("String_Node_Str" + postResult);
  List<TranslateArrayResponse> translateArrayResponses=BingResultParser.parseTranslateArrayResponse(postResult);
  List<String> result=new ArrayList<String>();
  for (  TranslateArrayResponse translateArrayResponse : translateArrayResponses) {
    result.add(translateArrayResponse.getTranslatedText());
  }
  return result;
}
Program: 93278
Project: 93278
Buggy source:
private static List<AndroidString> getTargetAndroidStrings(List<AndroidString> sourceAndroidStrings,List<AndroidString> translatedAndroidStrings,String fileName,boolean override){
  VirtualFile existenceFile=LocalFileSystem.getInstance().findFileByPath(fileName);
  List<AndroidString> existenceAndroidStrings=null;
  if (existenceFile != null && !override) {
    try {
      existenceAndroidStrings=AndroidString.getAndroidStringsList(existenceFile.contentsToByteArray());
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    existenceAndroidStrings=new ArrayList<AndroidString>();
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + translatedAndroidStrings,"String_Node_Str" + existenceAndroidStrings);
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>(sourceAndroidStrings);
  for (  AndroidString androidString : targetAndroidStrings) {
    if (!override) {
      String existenceValue=getAndroidStringValueInList(existenceAndroidStrings,androidString.getKey());
      if (existenceValue != null) {
        androidString.setValue(existenceValue);
      }
    }
    String translatedValue=getAndroidStringValueInList(translatedAndroidStrings,androidString.getKey());
    if (translatedValue != null) {
      androidString.setValue(translatedValue);
    }
  }
  Log.i("String_Node_Str" + targetAndroidStrings);
  return targetAndroidStrings;
}

Fixed version (ground truth):
private static List<AndroidString> getTargetAndroidStrings(List<AndroidString> sourceAndroidStrings,List<AndroidString> translatedAndroidStrings,String fileName,boolean override){
  VirtualFile existenceFile=LocalFileSystem.getInstance().findFileByPath(fileName);
  List<AndroidString> existenceAndroidStrings=null;
  if (existenceFile != null && !override) {
    try {
      existenceAndroidStrings=AndroidString.getAndroidStringsList(existenceFile.contentsToByteArray());
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    existenceAndroidStrings=new ArrayList<AndroidString>();
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + translatedAndroidStrings,"String_Node_Str" + existenceAndroidStrings);
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>(sourceAndroidStrings);
  for (  AndroidString androidString : targetAndroidStrings) {
    Log.i("String_Node_Str" + sourceAndroidStrings);
    if (!override) {
      String existenceValue=getAndroidStringValueInList(existenceAndroidStrings,androidString.getKey());
      if (existenceValue != null) {
        androidString.setValue(existenceValue);
      }
    }
    String translatedValue=getAndroidStringValueInList(translatedAndroidStrings,androidString.getKey());
    if (translatedValue != null) {
      androidString.setValue(translatedValue);
    }
    Log.i("String_Node_Str" + sourceAndroidStrings);
  }
  Log.i("String_Node_Str" + sourceAndroidStrings,"String_Node_Str" + targetAndroidStrings);
  return targetAndroidStrings;
}
Program: 93279
Project: 93279
Buggy source:
private List<AndroidString> filterAndroidString(List<AndroidString> origin,SupportedLanguages language,boolean override){
  List<AndroidString> result=new ArrayList<AndroidString>();
  VirtualFile targetStringFile=LocalFileSystem.getInstance().findFileByPath(getValueResourcePath(language));
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>();
  if (targetStringFile != null) {
    try {
      targetAndroidStrings=AndroidString.getAndroidStringsList(targetStringFile.contentsToByteArray());
    }
 catch (    IOException e1) {
      e1.printStackTrace();
    }
  }
  for (  AndroidString androidString : origin) {
    if (androidString.getKey().startsWith(Key.NO_NEED_TRANSLATION_ANDROID_STRING_PREFIX))     continue;
    if (!override && !targetAndroidStrings.isEmpty()) {
      if (isAndroidStringListContainsKey(targetAndroidStrings,androidString.getKey())) {
        continue;
      }
    }
    result.add(androidString);
  }
  return result;
}

Fixed version (ground truth):
private List<AndroidString> filterAndroidString(List<AndroidString> origin,SupportedLanguages language,boolean override){
  List<AndroidString> result=new ArrayList<AndroidString>();
  VirtualFile targetStringFile=LocalFileSystem.getInstance().findFileByPath(getValueResourcePath(language));
  List<AndroidString> targetAndroidStrings=new ArrayList<AndroidString>();
  if (targetStringFile != null) {
    try {
      targetAndroidStrings=AndroidString.getAndroidStringsList(targetStringFile.contentsToByteArray());
    }
 catch (    IOException e1) {
      e1.printStackTrace();
    }
  }
  String rulesString=PropertiesComponent.getInstance().getValue(StorageDataKey.SettingFilterRules);
  List<FilterRule> filterRules=new ArrayList<FilterRule>();
  if (rulesString == null) {
    filterRules.add(FilterRule.DefaultFilterRule);
  }
 else {
    filterRules=SerializeUtil.deserializeFilterRuleList(rulesString);
  }
  for (  AndroidString androidString : origin) {
    if (FilterRule.inFilterRule(androidString.getKey(),filterRules))     continue;
    if (!override && !targetAndroidStrings.isEmpty()) {
      if (isAndroidStringListContainsKey(targetAndroidStrings,androidString.getKey())) {
        continue;
      }
    }
    result.add(androidString);
  }
  return result;
}
Program: 93281
Project: 93281
Buggy source:
/** 
 * Computes a Point along the line segment with a given distance to the start Point.
 * @param distance distance from start point
 * @return point at given distance from start point
 */
public Point pointAlongLineSegment(double distance){
  if (start.x == end.x) {
    return new Point(start.x,start.y + distance);
  }
 else {
    double slope=(end.y - start.y) / (end.x - start.x);
    double dx=Math.sqrt((distance * distance) / (1 + (slope * slope)));
    if (end.x < start.x) {
      dx*=-1;
    }
    return new Point(start.x + dx,start.y + slope * dx);
  }
}

Fixed version (ground truth):
/** 
 * Computes a Point along the line segment with a given distance to the start Point.
 * @param distance distance from start point
 * @return point at given distance from start point
 */
public Point pointAlongLineSegment(double distance){
  if (start.x == end.x) {
    if (start.y > end.y) {
      return new Point(end.x,end.y + distance);
    }
 else {
      return new Point(start.x,start.y + distance);
    }
  }
 else {
    double slope=(end.y - start.y) / (end.x - start.x);
    double dx=Math.sqrt((distance * distance) / (1 + (slope * slope)));
    if (end.x < start.x) {
      dx*=-1;
    }
    return new Point(start.x + dx,start.y + slope * dx);
  }
}