nus-yam/ex-repair huggingface dataset:
Program: 93763
Project: 93763
Buggy source:
private void apkChoose(){
  final FileDialog fileDialog=new FileDialog(this,"String_Node_Str",FileDialog.LOAD);
  fileDialog.setFile("String_Node_Str");
  fileDialog.setAlwaysOnTop(true);
  fileDialog.setVisible(true);
  if (fileDialog.getFile() != null) {
    String apkPath=new File(fileDialog.getFile()).getAbsolutePath();
    if (apkPath.toLowerCase().endsWith("String_Node_Str")) {
      this.apkField.setBackground(SystemColor.GREEN);
      this.apkField.setText(apkPath);
      contSelectPanel.setVisible(true);
      this.pack();
      this.isValidApkToPatch=true;
      updateContainerBoxes(1);
    }
 else {
      this.apkField.setBackground(SystemColor.control);
      this.apkField.setText("String_Node_Str");
      this.isValidApkToPatch=false;
    }
  }
}

Fixed version (ground truth):
private void apkChoose(){
  final FileDialog fileDialog=new FileDialog(this,"String_Node_Str",FileDialog.LOAD);
  fileDialog.setAlwaysOnTop(true);
  fileDialog.setVisible(true);
  if (fileDialog.getDirectory() != null && fileDialog.getFiles() != null && fileDialog.getFiles().length == 1) {
    String apkPath=fileDialog.getFiles()[0].getAbsolutePath();
    if (apkPath.toLowerCase().endsWith("String_Node_Str")) {
      this.apkField.setBackground(SystemColor.GREEN);
      this.apkField.setText(apkPath);
      contSelectPanel.setVisible(true);
      this.pack();
      this.isValidApkToPatch=true;
      updateContainerBoxes(1);
    }
 else {
      this.apkField.setBackground(SystemColor.control);
      this.apkField.setText("String_Node_Str");
      this.isValidApkToPatch=false;
    }
  }
}
Program: 93764
Project: 93764
Buggy source:
final String getPackageNameWithAssociatedCertificate(String packageName){
  String currentPackageName=packageName;
  if (!packageNameToHasCertificateMap.containsKey(currentPackageName))   return "String_Node_Str";
  while (!packageNameToHasCertificateMap.get(currentPackageName))   currentPackageName=getUpALevel(currentPackageName);
  Log.d(TAG_PACKAGE_NAME_TRIE,packageName + "String_Node_Str" + packageName+ "String_Node_Str");
  return currentPackageName;
}

Fixed version (ground truth):
final String getPackageNameWithAssociatedCertificate(String packageName){
  String currentPackageName=packageName;
  if (!packageNameToHasCertificateMap.containsKey(currentPackageName))   return "String_Node_Str";
  while (!packageNameToHasCertificateMap.get(currentPackageName))   currentPackageName=getUpALevel(currentPackageName);
  Log.d(TAG_PACKAGE_NAME_TRIE,currentPackageName + "String_Node_Str" + packageName+ "String_Node_Str");
  return currentPackageName;
}
Program: 93770
Project: 93770
Buggy source:
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  super(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir(CERTIFICATE_DIR,ContextWrapper.MODE_PRIVATE);
  resDownloadFolder=parentContextWrapper.getDir(SecureLoaderFactory.RES_DOWNLOAD_DIR,ContextWrapper.MODE_PRIVATE);
  mPackageManager=parentContextWrapper.getPackageManager();
  mFileDownloader=new FileDownloader(parentContextWrapper);
  hasBeenWipedOut=false;
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  mDexClassLoader=new DexClassLoader(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir(CERTIFICATE_DIR,ContextWrapper.MODE_PRIVATE);
  resDownloadFolder=parentContextWrapper.getDir(SecureLoaderFactory.RES_DOWNLOAD_DIR,ContextWrapper.MODE_PRIVATE);
  mPackageManager=parentContextWrapper.getPackageManager();
  mFileDownloader=new FileDownloader(parentContextWrapper);
  hasBeenWipedOut=false;
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}
Program: 93774
Project: 93774
Buggy source:
/** 
 * When one of the two initial buttons in this activity is clicked  a different component is dynamically loaded and used to customize the rest of the layout.
 * @param view
 */
public void onBtnClick(View view){
  if (isSecureModeChosen) {
  }
 else {
    if (view.getId() == firstBtn.getId()) {
      mComponentModifier=retrieveComponentModifier(firstClassName);
      Log.i(TAG_DEX_SAMPLE,"String_Node_Str");
    }
 else {
      mComponentModifier=retrieveComponentModifier(secondClassName);
      Log.i(TAG_DEX_SAMPLE,"String_Node_Str");
    }
  }
  List<Button> buttonList=new ArrayList<Button>();
  buttonList.add(firstBtn);
  buttonList.add(secondBtn);
  buttonList.add(thirdBtn);
  mComponentModifier.customizeButtons(buttonList);
  mComponentModifier.customizeSwitch(switchSlider);
  mComponentModifier.customizeTextView(textView);
  Log.i(TAG_DEX_SAMPLE,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * When one of the two initial buttons in this activity is clicked  a different component is dynamically loaded and used to customize the rest of the layout.
 * @param view
 */
public void onBtnClick(View view){
  if (isSecureModeChosen) {
  }
 else {
    if (view.getId() == firstBtn.getId()) {
      mComponentModifier=retrieveComponentModifier(firstClassName);
      Log.d(TAG_DEX_SAMPLE,"String_Node_Str");
    }
 else {
      mComponentModifier=retrieveComponentModifier(secondClassName);
      Log.d(TAG_DEX_SAMPLE,"String_Node_Str");
    }
  }
  List<Button> buttonList=new ArrayList<Button>();
  buttonList.add(firstBtn);
  buttonList.add(secondBtn);
  buttonList.add(thirdBtn);
  mComponentModifier.customizeButtons(buttonList);
  mComponentModifier.customizeSwitch(switchSlider);
  mComponentModifier.customizeTextView(textView);
  Log.i(TAG_DEX_SAMPLE,"String_Node_Str");
}
Program: 93775
Project: 93775
Buggy source:
/** 
 * This effect is used to end the activity.
 * @param view
 */
public void onBtnClickExit(View view){
  toastHandler.post(new Runnable(){
    @Override public void run(){
      Toast.makeText(DexClassSampleActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
);
  Log.i(TAG_DEX_SAMPLE,"String_Node_Str" + R.string.title_activity_dex_class_sample + "String_Node_Str");
  finish();
}

Fixed version (ground truth):
/** 
 * This effect is used to end the activity.
 * @param view
 */
public void onBtnClickExit(View view){
  toastHandler.post(new Runnable(){
    @Override public void run(){
      Toast.makeText(DexClassSampleActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
);
  Log.d(TAG_DEX_SAMPLE,"String_Node_Str" + R.string.title_activity_dex_class_sample + "String_Node_Str");
  finish();
}
Program: 93779
Project: 93779
Buggy source:
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
switch (position) {
case DEX_CLASS_LOADER_APK:
    effectiveDexClassLoader=true;
  setUpDexClassLoader();
effectiveDexClassLoader=false;
Log.i(TAG_MAIN,"String_Node_Str");
break;
case DEX_CLASS_LOADER_JAR:
Intent dexClassLoaderIntent=new Intent(MainActivity.this,DexClassSampleActivity.class);
dexClassLoaderIntent.putExtra(IS_SECURE_LOADING_CHOSEN,false);
startActivity(dexClassLoaderIntent);
Log.i(TAG_MAIN,"String_Node_Str");
break;
case SECURE_DEX_CLASS_LOADER_APK:
effectiveSecureDexClassLoader=true;
setUpSecureDexClassLoader();
effectiveSecureDexClassLoader=false;
Log.i(TAG_MAIN,"String_Node_Str");
break;
case SECURE_DEX_CLASS_LOADER_JAR:
Intent secureDexClassLoaderIntent=new Intent(MainActivity.this,DexClassSampleActivity.class);
secureDexClassLoaderIntent.putExtra(IS_SECURE_LOADING_CHOSEN,true);
startActivity(secureDexClassLoaderIntent);
Log.i(TAG_MAIN,"String_Node_Str");
break;
case CREATE_PACK_CTX:
break;
default :
Log.d(TAG_MAIN,"String_Node_Str");
}
}

Fixed version (ground truth):
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
switch (position) {
case DEX_CLASS_LOADER_APK:
    effectiveDexClassLoader=true;
  Log.d(TAG_MAIN,"String_Node_Str");
setUpDexClassLoader();
effectiveDexClassLoader=false;
break;
case DEX_CLASS_LOADER_JAR:
Intent dexClassLoaderIntent=new Intent(MainActivity.this,DexClassSampleActivity.class);
dexClassLoaderIntent.putExtra(IS_SECURE_LOADING_CHOSEN,false);
Log.d(TAG_MAIN,"String_Node_Str");
startActivity(dexClassLoaderIntent);
break;
case SECURE_DEX_CLASS_LOADER_APK:
effectiveSecureDexClassLoader=true;
Log.d(TAG_MAIN,"String_Node_Str");
setUpSecureDexClassLoader();
effectiveSecureDexClassLoader=false;
break;
case SECURE_DEX_CLASS_LOADER_JAR:
Intent secureDexClassLoaderIntent=new Intent(MainActivity.this,DexClassSampleActivity.class);
secureDexClassLoaderIntent.putExtra(IS_SECURE_LOADING_CHOSEN,true);
Log.d(TAG_MAIN,"String_Node_Str");
startActivity(secureDexClassLoaderIntent);
break;
case CREATE_PACK_CTX:
break;
default :
Log.d(TAG_MAIN,"String_Node_Str");
}
}
Program: 93782
Project: 93782
Buggy source:
private String revertPackageNameToURL(String packageName){
  String urlString, firstLevelDomain, secondLevelDomain;
  int firstPointChar=packageName.indexOf('.');
  int secondPointChar=packageName.indexOf('.',firstPointChar + 1);
  firstLevelDomain=packageName.substring(0,firstPointChar);
  secondLevelDomain=packageName.substring(firstPointChar + 1,secondPointChar);
  urlString="String_Node_Str" + secondLevelDomain + firstLevelDomain+ packageName.substring(secondPointChar).replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str";
  return urlString;
}

Fixed version (ground truth):
private String revertPackageNameToURL(String packageName){
  String firstLevelDomain, secondLevelDomain;
  int firstPointChar=packageName.indexOf('.');
  if (firstPointChar == -1) {
    return "String_Node_Str" + packageName + "String_Node_Str";
  }
  firstLevelDomain=packageName.substring(0,firstPointChar);
  int secondPointChar=packageName.indexOf('.',firstPointChar + 1);
  if (secondPointChar == -1) {
    return "String_Node_Str" + packageName.substring(firstPointChar + 1) + "String_Node_Str"+ firstLevelDomain+ "String_Node_Str";
  }
  secondLevelDomain=packageName.substring(firstPointChar + 1,secondPointChar);
  return "String_Node_Str" + secondLevelDomain + "String_Node_Str"+ firstLevelDomain+ packageName.substring(secondPointChar).replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str";
}
Program: 93783
Project: 93783
Buggy source:
private String getPackageNameFromContainerPath(String containerPath){
  int extensionIndex=containerPath.lastIndexOf("String_Node_Str");
  String extension=containerPath.substring(extensionIndex);
  if (extension.equals("String_Node_Str")) {
    return mPackageManager.getPackageArchiveInfo(containerPath,0).packageName;
  }
  if (extension.equals("String_Node_Str")) {
    DexFile classesDexFile=null;
    String packageName;
    try {
      classesDexFile=new DexFile(containerPath);
      Enumeration<String> classesNames=classesDexFile.entries();
      String firstClassName=classesNames.nextElement().replaceAll(Pattern.quote(File.separator),"String_Node_Str");
      packageName=firstClassName.substring(0,firstClassName.lastIndexOf('.'));
    }
 catch (    IOException e) {
      return null;
    }
 finally {
      if (classesDexFile != null) {
        try {
          classesDexFile.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
    return packageName;
  }
  return null;
}

Fixed version (ground truth):
private String getPackageNameFromContainerPath(String containerPath){
  int extensionIndex=containerPath.lastIndexOf("String_Node_Str");
  String extension=containerPath.substring(extensionIndex);
  if (extension.equals("String_Node_Str")) {
    if (mPackageManager.getPackageArchiveInfo(containerPath,0) != null)     return mPackageManager.getPackageArchiveInfo(containerPath,0).packageName;
    return null;
  }
  if (extension.equals("String_Node_Str")) {
    DexFile classesDexFile=null;
    String packageName;
    try {
      classesDexFile=new DexFile(containerPath);
      Enumeration<String> classesNames=classesDexFile.entries();
      String firstClassName=classesNames.nextElement().replaceAll(Pattern.quote(File.separator),"String_Node_Str");
      packageName=firstClassName.substring(0,firstClassName.lastIndexOf('.'));
    }
 catch (    IOException e) {
      return null;
    }
 finally {
      if (classesDexFile != null) {
        try {
          classesDexFile.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
    return packageName;
  }
  return null;
}
Program: 93794
Project: 93794
Buggy source:
private FileDownloader(ContextWrapper parentContextWrapper){
  handler=new Handler();
  mContextWrapper=parentContextWrapper;
  mConnectivityManager=(ConnectivityManager)parentContextWrapper.getSystemService(Context.CONNECTIVITY_SERVICE);
}

Fixed version (ground truth):
FileDownloader(ContextWrapper parentContextWrapper){
  handler=new Handler();
  mContextWrapper=parentContextWrapper;
  mConnectivityManager=(ConnectivityManager)parentContextWrapper.getSystemService(Context.CONNECTIVITY_SERVICE);
}
Program: 93795
Project: 93795
Buggy source:
private boolean downloadCertificateRemotelyViaHttps(String packageName){
  String urlString=packageNameToCertificateMap.get(packageName);
  URL certificateRemoteURL;
  try {
    certificateRemoteURL=new URL(urlString);
  }
 catch (  MalformedURLException e) {
    return false;
  }
  String localCertPath=certificateFolder.getAbsolutePath() + "String_Node_Str" + packageName+ "String_Node_Str";
  return SecureLoaderFactory.FileDownloader.downloadRemoteUrl(certificateRemoteURL,localCertPath);
}

Fixed version (ground truth):
private boolean downloadCertificateRemotelyViaHttps(String packageName){
  String urlString=packageNameToCertificateMap.get(packageName);
  URL certificateRemoteURL;
  try {
    certificateRemoteURL=new URL(urlString);
  }
 catch (  MalformedURLException e) {
    return false;
  }
  String localCertPath=certificateFolder.getAbsolutePath() + "String_Node_Str" + packageName+ "String_Node_Str";
  return mFileDownloader.downloadRemoteUrl(certificateRemoteURL,localCertPath);
}
Program: 93796
Project: 93796
Buggy source:
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  super(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir("String_Node_Str",ContextWrapper.MODE_PRIVATE);
  mPackageManager=parentContextWrapper.getPackageManager();
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  super(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir("String_Node_Str",ContextWrapper.MODE_PRIVATE);
  mPackageManager=parentContextWrapper.getPackageManager();
  mFileDownloader=new FileDownloader(parentContextWrapper);
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}
Program: 93798
Project: 93798
Buggy source:
/** 
 * Creates a   {@code SecureLoaderFactory} used to check and generate instances from secure dynamic code loader classes. It requires a  {@link ContextWrapper} (i.e. the launching activity) which should be used to manage and retrieve internal directories  of the application.
 * @param parentContextWrapper The content wrapper coming from the launching Activity
 */
public SecureLoaderFactory(ContextWrapper parentContextWrapper){
  mContextWrapper=parentContextWrapper;
  FileDownloader=FileDownloader.getInstance(mContextWrapper);
}

Fixed version (ground truth):
/** 
 * Creates a   {@code SecureLoaderFactory} used to check and generate instances from secure dynamic code loader classes. It requires a  {@link ContextWrapper} (i.e. the launching activity) which should be used to manage and retrieve internal directories  of the application.
 * @param parentContextWrapper The content wrapper coming from the launching Activity
 */
public SecureLoaderFactory(ContextWrapper parentContextWrapper){
  mContextWrapper=parentContextWrapper;
  mFileDownloader=new FileDownloader(mContextWrapper);
}
Program: 93799
Project: 93799
Buggy source:
static FileDownloader getInstance(ContextWrapper parentContextWrapper){
  if (instance == null) {
    instance=new FileDownloader(parentContextWrapper);
  }
  return instance;
}

Fixed version (ground truth):
FileDownloader getInstance(ContextWrapper parentContextWrapper){
  if (instance == null) {
    instance=new FileDownloader(parentContextWrapper);
  }
  return instance;
}
Program: 93801
Project: 93801
Buggy source:
private boolean downloadCertificateRemotelyViaHttps(String packageName){
  NetworkInfo activeNetworkInfo=mConnectivityManager.getActiveNetworkInfo();
  if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
    String urlString=packageNameToCertificateMap.get(packageName);
    HttpsURLConnection urlConnection=null;
    InputStream inputStream=null;
    OutputStream outputStream=null;
    try {
      URL certificateURL=new URL(urlString);
      urlConnection=(HttpsURLConnection)certificateURL.openConnection();
      if (urlConnection.getResponseCode() == HttpsURLConnection.HTTP_OK) {
        Log.i(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str");
        inputStream=urlConnection.getInputStream();
        String downloadPath=certificateFolder.getAbsolutePath() + "String_Node_Str" + packageName+ "String_Node_Str";
        outputStream=new FileOutputStream(downloadPath);
        int read=0;
        byte[] bytes=new byte[1024];
        while ((read=inputStream.read(bytes)) > 0) {
          outputStream.write(bytes,0,read);
        }
        Log.i(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + downloadPath);
      }
    }
 catch (    MalformedURLException e) {
      return false;
    }
catch (    IOException e) {
      return false;
    }
 finally {
      Log.i(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str");
      if (urlConnection != null)       urlConnection.disconnect();
      if (inputStream != null) {
        try {
          inputStream.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (outputStream != null) {
        try {
          outputStream.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
 else       return false;
    }
    return true;
  }
  Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str");
  return false;
}

Fixed version (ground truth):
private boolean downloadCertificateRemotelyViaHttps(String packageName){
  String urlString=packageNameToCertificateMap.get(packageName);
  URL certificateRemoteURL;
  try {
    certificateRemoteURL=new URL(urlString);
  }
 catch (  MalformedURLException e) {
    return false;
  }
  String localCertPath=certificateFolder.getAbsolutePath() + "String_Node_Str" + packageName+ "String_Node_Str";
  return SecureLoaderFactory.FileDownloader.downloadRemoteUrl(certificateRemoteURL,localCertPath);
}
Program: 93802
Project: 93802
Buggy source:
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  super(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir("String_Node_Str",ContextWrapper.MODE_PRIVATE);
  mConnectivityManager=(ConnectivityManager)parentContextWrapper.getSystemService(Context.CONNECTIVITY_SERVICE);
  mPackageManager=parentContextWrapper.getPackageManager();
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
SecureDexClassLoader(String dexPath,String optimizedDirectory,String libraryPath,ClassLoader parent,ContextWrapper parentContextWrapper){
  super(dexPath,optimizedDirectory,libraryPath,parent);
  certificateFolder=parentContextWrapper.getDir("String_Node_Str",ContextWrapper.MODE_PRIVATE);
  mPackageManager=parentContextWrapper.getPackageManager();
  packageNameToCertificateMap=null;
  packageNameToContainerPathMap=new HashMap<String,String>();
  String[] pathStrings=dexPath.split(Pattern.quote(File.pathSeparator));
  for (  String currentPath : pathStrings) {
    String packageName=getPackageNameFromContainerPath(currentPath);
    if (packageName != null) {
      String previousPath=packageNameToContainerPathMap.put(packageName,currentPath);
      if (previousPath != null) {
        Log.w(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + packageName + "String_Node_Str"+ previousPath+ "String_Node_Str"+ currentPath+ "String_Node_Str");
      }
    }
  }
}
Program: 93803
Project: 93803
Buggy source:
void setCertificateLocationMap(Map<String,String> extPackageNameToCertificateMap){
  if (extPackageNameToCertificateMap == null)   packageNameToCertificateMap=new HashMap<String,String>();
 else   packageNameToCertificateMap=extPackageNameToCertificateMap;
  Iterator<String> packageNameIterator=packageNameToContainerPathMap.keySet().iterator();
  while (packageNameIterator.hasNext()) {
    String currentPackageName=packageNameIterator.next();
    if (packageNameToCertificateMap.get(currentPackageName) == null) {
      String certificateRemoteURL=revertPackageNameToURL(currentPackageName);
      packageNameToCertificateMap.put(currentPackageName,certificateRemoteURL);
      Log.i(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + currentPackageName + "String_Node_Str"+ certificateRemoteURL+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
void setCertificateLocationMap(Map<String,String> extPackageNameToCertificateMap){
  if (extPackageNameToCertificateMap == null)   packageNameToCertificateMap=new HashMap<String,String>();
 else   packageNameToCertificateMap=extPackageNameToCertificateMap;
  Iterator<String> packageNameIterator=packageNameToContainerPathMap.keySet().iterator();
  while (packageNameIterator.hasNext()) {
    String currentPackageName=packageNameIterator.next();
    if (packageNameToCertificateMap.get(currentPackageName) == null) {
      String certificateRemoteURL=revertPackageNameToURL(currentPackageName);
      packageNameToCertificateMap.put(currentPackageName,certificateRemoteURL);
      Log.d(TAG_SECURE_DEX_CLASS_LOADER,"String_Node_Str" + currentPackageName + "String_Node_Str"+ certificateRemoteURL+ "String_Node_Str");
    }
  }
}
Program: 93805
Project: 93805
Buggy source:
/** 
 * Creates a   {@code SecureLoaderFactory} used to check and generate instances from secure dynamic code loader classes. It requires a  {@link ContextWrapper} (i.e. the launching activity) which should be used to manage and retrieve internal directories  of the application.
 * @param parentContextWrapper The content wrapper coming from the launching Activity
 */
public SecureLoaderFactory(ContextWrapper parentContextWrapper){
  mContextWrapper=parentContextWrapper;
  mConnectivityManager=(ConnectivityManager)parentContextWrapper.getSystemService(Context.CONNECTIVITY_SERVICE);
}

Fixed version (ground truth):
/** 
 * Creates a   {@code SecureLoaderFactory} used to check and generate instances from secure dynamic code loader classes. It requires a  {@link ContextWrapper} (i.e. the launching activity) which should be used to manage and retrieve internal directories  of the application.
 * @param parentContextWrapper The content wrapper coming from the launching Activity
 */
public SecureLoaderFactory(ContextWrapper parentContextWrapper){
  mContextWrapper=parentContextWrapper;
  FileDownloader=FileDownloader.getInstance(mContextWrapper);
}
Program: 93807
Project: 93807
Buggy source:
@Override public void navigate(boolean requestFocus){
  if (element instanceof NavigationItem) {
    ((NavigationItem)element).navigate(requestFocus);
  }
}

Fixed version (ground truth):
@Override public void navigate(boolean requestFocus){
  element.navigate(requestFocus);
}
Program: 93808
Project: 93808
Buggy source:
@Override public String getAlphaSortKey(){
  return element instanceof PsiNamedElement ? ((PsiNamedElement)element).getName() : null;
}

Fixed version (ground truth):
@NotNull @Override public String getAlphaSortKey(){
  String name=element.getName();
  return name != null ? name : "String_Node_Str";
}
Program: 93809
Project: 93809
Buggy source:
@Override public TreeElement[] getChildren(){
  if (element instanceof SimpleFile) {
    SimpleProperty[] properties=PsiTreeUtil.getChildrenOfType(element,SimpleProperty.class);
    List<TreeElement> treeElements=new ArrayList<TreeElement>(properties.length);
    for (    SimpleProperty property : properties) {
      treeElements.add(new SimpleStructureViewElement(property));
    }
    return treeElements.toArray(new TreeElement[treeElements.size()]);
  }
 else {
    return EMPTY_ARRAY;
  }
}

Fixed version (ground truth):
@Override public TreeElement[] getChildren(){
  if (element instanceof SimpleFile) {
    SimpleProperty[] properties=PsiTreeUtil.getChildrenOfType(element,SimpleProperty.class);
    List<TreeElement> treeElements=new ArrayList<TreeElement>(properties.length);
    for (    SimpleProperty property : properties) {
      treeElements.add(new SimpleStructureViewElement((SimplePropertyImpl)property));
    }
    return treeElements.toArray(new TreeElement[treeElements.size()]);
  }
 else {
    return EMPTY_ARRAY;
  }
}
Program: 93810
Project: 93810
Buggy source:
@Override public boolean canNavigate(){
  return element instanceof NavigationItem && ((NavigationItem)element).canNavigate();
}

Fixed version (ground truth):
@Override public boolean canNavigate(){
  return element.canNavigate();
}
Program: 93811
Project: 93811
Buggy source:
@Override public ItemPresentation getPresentation(){
  return element instanceof NavigationItem ? ((NavigationItem)element).getPresentation() : null;
}

Fixed version (ground truth):
@NotNull @Override public ItemPresentation getPresentation(){
  ItemPresentation presentation=element.getPresentation();
  return presentation != null ? presentation : new PresentationData();
}
Program: 93812
Project: 93812
Buggy source:
public SimpleStructureViewElement(PsiElement element){
  this.element=element;
}

Fixed version (ground truth):
public SimpleStructureViewElement(NavigatablePsiElement element){
  this.element=element;
}
Program: 93813
Project: 93813
Buggy source:
@Override public boolean canNavigateToSource(){
  return element instanceof NavigationItem && ((NavigationItem)element).canNavigateToSource();
}

Fixed version (ground truth):
@Override public boolean canNavigateToSource(){
  return element.canNavigateToSource();
}
Program: 93814
Project: 93814
Buggy source:
@Nullable @Override public WordsScanner getWordsScanner(){
  return new DefaultWordsScanner(new SimpleLexerAdapter(),TokenSet.create(SimpleTypes.KEY),TokenSet.create(SimpleTypes.COMMENT),TokenSet.EMPTY);
  ;
}

Fixed version (ground truth):
@Nullable @Override public WordsScanner getWordsScanner(){
  return new DefaultWordsScanner(new SimpleLexerAdapter(),TokenSet.create(SimpleTypes.KEY),TokenSet.create(SimpleTypes.COMMENT),TokenSet.EMPTY);
}
Program: 93815
Project: 93815
Buggy source:
public void testCompletion(){
  myFixture.configureByFiles("String_Node_Str","String_Node_Str");
  myFixture.complete(CompletionType.BASIC,1);
  System.out.println(myFixture.getLookupElementStrings());
}

Fixed version (ground truth):
public void testCompletion(){
  myFixture.configureByFiles("String_Node_Str","String_Node_Str");
  myFixture.complete(CompletionType.BASIC,1);
  List<String> strings=myFixture.getLookupElementStrings();
  assertTrue(strings.containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(5,strings.size());
}
Program: 93817
Project: 93817
Buggy source:
@Override public void onAnimationEnd(Animation animation){
  DetailedActivity.super.onBackPressed();
  overridePendingTransition(0,0);
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  DetailedActivity.super.onBackPressed();
  overridePendingTransition(0,0);
}
Program: 93818
Project: 93818
Buggy source:
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public void call(final Bitmap bitmap){
  anim(ivDetailedCard,getPosition(getIntent()),true,new Animation.AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
      Animation trans=new TranslateAnimation(0,0,mLlDetailedDownloads.getHeight(),0);
      Animation scale=new ScaleAnimation(1.5f,1f,1.5f,1f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0f);
      AnimationSet set=new AnimationSet(true);
      set.addAnimation(scale);
      set.addAnimation(trans);
      set.setDuration(animation.getDuration() * 2);
      mLlDetailedDownloads.startAnimation(set);
    }
    @Override public void onAnimationEnd(    Animation animation){
      AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
  }
);
}

Fixed version (ground truth):
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public void call(final Bitmap bitmap){
  AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
  anim(getPosition(getIntent()),true,new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animation){
    }
    @Override public void onAnimationEnd(    Animator animation){
      AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
    }
    @Override public void onAnimationCancel(    Animator animation){
    }
    @Override public void onAnimationRepeat(    Animator animation){
    }
  }
,ivDetailedCard,mLlDetailedDownloads);
}
Program: 93819
Project: 93819
Buggy source:
@OnClick(R.id.iv_detailed_card) void download(final ImageView v){
  final File file=getFilesDir();
  Log.d(TAG,file.toString());
  PhotoViewActivity.startScaleActivity(v.getContext(),Position.from(v));
}

Fixed version (ground truth):
@OnClick(R.id.iv_detailed_card) void download(final ImageView v){
  Toast.makeText(DetailedActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
}
Program: 93820
Project: 93820
Buggy source:
@Override public void onAnimationRepeat(Animation animation){
}

Fixed version (ground truth):
@Override public void onAnimationRepeat(Animator animation){
}
Program: 93821
Project: 93821
Buggy source:
/** 
 * 动画封装，千万不要剁手改正负
 */
void anim(View view,Position position,boolean isEnter,Animation.AnimationListener listener){
  float delta=((float)(position.width)) / ((float)(position.heigth));
  float fromDelta, toDelta, fromY, toY;
  float delt_Y=position.top;
  float delt_X=position.left - view.getLeft();
  if (isEnter) {
    fromDelta=1f;
    toDelta=delta;
    fromY=delt_Y;
    toY=0;
  }
 else {
    fromDelta=delta;
    toDelta=1f;
    fromY=0;
    toY=delt_Y;
  }
  Animation anim=new ScaleAnimation(fromDelta,toDelta,fromDelta,toDelta,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0f);
  Animation trans=new TranslateAnimation(0,0f,fromY,toY);
  AnimationSet set=new AnimationSet(true);
  set.addAnimation(anim);
  set.addAnimation(trans);
  set.setFillEnabled(true);
  set.setFillAfter(true);
  set.setAnimationListener(listener);
  set.setDuration(AnimateUtils.ANIM_DORITION);
  view.startAnimation(set);
}

Fixed version (ground truth):
/** 
 * 动画封装，千万不要剁手改正负
 */
void anim(final Position position,final boolean isEnter,final Animator.AnimatorListener listener,View... views){
  if (isPlaying) {
    listener.onAnimationEnd(null);
    return;
  }
  float delta=((float)(position.width)) / ((float)(position.height));
  final float fromY, toY;
  float[] toDelta=new float[2];
  float[] fromDelta=new float[2];
  View view=views[0];
  float delt_Y=position.top;
  float delt_X=position.left - view.getLeft();
  if (isEnter) {
    fromDelta[0]=1f;
    toDelta[0]=delta;
    fromDelta[1]=2f;
    toDelta[1]=1f;
    fromY=delt_Y;
    toY=0;
  }
 else {
    fromDelta[0]=delta;
    toDelta[0]=1f;
    fromDelta[1]=1f;
    toDelta[1]=2f;
    fromY=0;
    toY=delt_Y;
  }
  view.setPivotX(view.getWidth() / 2);
  ObjectAnimator trans_Y=ObjectAnimator.ofFloat(view,View.TRANSLATION_Y,fromY,toY);
  ObjectAnimator scale_X=ObjectAnimator.ofFloat(view,View.SCALE_X,fromDelta[0],toDelta[0]);
  ObjectAnimator scale_Y=ObjectAnimator.ofFloat(view,View.SCALE_Y,fromDelta[0],toDelta[0]);
  ObjectAnimator scale_icn_X=ObjectAnimator.ofFloat(views[1],View.SCALE_X,fromDelta[1],toDelta[1]);
  ObjectAnimator scale_icn_Y=ObjectAnimator.ofFloat(views[1],View.SCALE_Y,fromDelta[1],toDelta[1]);
  AnimatorSet set=new AnimatorSet();
  set.playTogether(trans_Y,scale_X,scale_Y);
  set.playTogether(scale_icn_X,scale_icn_Y);
  set.setDuration(400);
  set.addListener(new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animation){
      listener.onAnimationStart(animation);
      isPlaying=true;
    }
    @Override public void onAnimationEnd(    Animator animation){
      listener.onAnimationEnd(animation);
      isPlaying=false;
    }
    @Override public void onAnimationCancel(    Animator animation){
      listener.onAnimationCancel(animation);
      isPlaying=false;
    }
    @Override public void onAnimationRepeat(    Animator animation){
      listener.onAnimationRepeat(animation);
    }
  }
);
  set.setInterpolator(new AccelerateInterpolator());
  set.start();
}
Program: 93822
Project: 93822
Buggy source:
@Override public void onSuccess(){
  Observable.just(ivDetailedCard).map(new Func1<ImageView,Bitmap>(){
    @Override public Bitmap call(    ImageView imageView){
      return ((BitmapDrawable)imageView.getDrawable()).getBitmap();
    }
  }
).map(new Func1<Bitmap,Bitmap>(){
    @Override public Bitmap call(    Bitmap bitmap){
      return Blur.fastblur(DetailedActivity.this,bitmap,20);
    }
  }
).subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<Bitmap>(){
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public void call(    final Bitmap bitmap){
      anim(ivDetailedCard,getPosition(getIntent()),true,new Animation.AnimationListener(){
        @Override public void onAnimationStart(        Animation animation){
          Animation trans=new TranslateAnimation(0,0,mLlDetailedDownloads.getHeight(),0);
          Animation scale=new ScaleAnimation(1.5f,1f,1.5f,1f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0f);
          AnimationSet set=new AnimationSet(true);
          set.addAnimation(scale);
          set.addAnimation(trans);
          set.setDuration(animation.getDuration() * 2);
          mLlDetailedDownloads.startAnimation(set);
        }
        @Override public void onAnimationEnd(        Animation animation){
          AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onSuccess(){
  Observable.just(ivDetailedCard).map(new Func1<ImageView,Bitmap>(){
    @Override public Bitmap call(    ImageView imageView){
      return ((BitmapDrawable)imageView.getDrawable()).getBitmap();
    }
  }
).map(new Func1<Bitmap,Bitmap>(){
    @Override public Bitmap call(    Bitmap bitmap){
      return Blur.fastblur(DetailedActivity.this,bitmap,20);
    }
  }
).subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<Bitmap>(){
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public void call(    final Bitmap bitmap){
      AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
      anim(getPosition(getIntent()),true,new Animator.AnimatorListener(){
        @Override public void onAnimationStart(        Animator animation){
        }
        @Override public void onAnimationEnd(        Animator animation){
          AnimateUtils.animateViewBitmap(ivDetailedCardBlur,bitmap);
        }
        @Override public void onAnimationCancel(        Animator animation){
        }
        @Override public void onAnimationRepeat(        Animator animation){
        }
      }
,ivDetailedCard,mLlDetailedDownloads);
    }
  }
);
}
Program: 93823
Project: 93823
Buggy source:
@Override public void onAnimationStart(Animation animation){
  mLlDetailedDownloads.animate().alpha(0f).setDuration(AnimateUtils.ANIM_DORITION).start();
  AnimateUtils.animateViewBitmap(ivDetailedCardBlur,null);
}

Fixed version (ground truth):
@Override public void onAnimationStart(Animator animation){
  AnimateUtils.animateViewBitmap(ivDetailedCardBlur,null);
}
Program: 93824
Project: 93824
Buggy source:
@Override public void onBackPressed(){
  if (alertView != null && alertView.isShowing()) {
    alertView.dismiss();
    return;
  }
  anim(ivDetailedCard,getPosition(getIntent()),false,new Animation.AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
      mLlDetailedDownloads.animate().alpha(0f).setDuration(AnimateUtils.ANIM_DORITION).start();
      AnimateUtils.animateViewBitmap(ivDetailedCardBlur,null);
    }
    @Override public void onAnimationEnd(    Animation animation){
      DetailedActivity.super.onBackPressed();
      overridePendingTransition(0,0);
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
  }
);
}

Fixed version (ground truth):
@Override public void onBackPressed(){
  if (alertView != null && alertView.isShowing()) {
    alertView.dismiss();
    return;
  }
  anim(getPosition(getIntent()),false,new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animation){
      AnimateUtils.animateViewBitmap(ivDetailedCardBlur,null);
    }
    @Override public void onAnimationEnd(    Animator animation){
      DetailedActivity.super.onBackPressed();
      overridePendingTransition(0,0);
    }
    @Override public void onAnimationCancel(    Animator animation){
    }
    @Override public void onAnimationRepeat(    Animator animation){
    }
  }
,ivDetailedCard,mLlDetailedDownloads);
}
Program: 93825
Project: 93825
Buggy source:
@Override public void onError(Throwable e){
  e.printStackTrace();
  if (mNavigationBar != null) {
    mNavigationBar.setProgress(false);
  }
  isLoadingMore=false;
}

Fixed version (ground truth):
@Override public void onError(Throwable e){
  e.printStackTrace();
  if (mNavigationBar != null) {
    mNavigationBar.setProgress(false);
  }
  isLoadingMore=false;
  Toast.makeText(MainActivity.this,e.getMessage(),Toast.LENGTH_SHORT).show();
}
Program: 93826
Project: 93826
Buggy source:
void loadPage(Map<String,Object> query){
  if (isLoadingMore) {
    return;
  }
  if (mNavigationBar != null) {
    mNavigationBar.setProgress(true);
  }
  if (query == null) {
    query=new HashMap<>();
  }
  if ((query.isEmpty()) || (!query.containsKey(ImageRepo.TAGS))) {
    query.put(ImageRepo.TAGS,ImageRepo.TAG_SAFE);
    query.put(ImageRepo.LIMIT,10);
  }
  RetrofitUtils.getCachedAdapter().create(ImageRepo.class).getImageList(query).subscribeOn(Schedulers.io()).flatMap(new Func1<List<ImageResult>,Observable<ImageResult>>(){
    @Override public Observable<ImageResult> call(    List<ImageResult> imageResults){
      return Observable.from(imageResults);
    }
  }
).observeOn(AndroidSchedulers.mainThread()).subscribe(new Subscriber<ImageResult>(){
    @Override public void onCompleted(){
      if (mRvFragCard != null && mRvFragCard.getAdapter() != null) {
        mRvFragCard.getAdapter().notifyDataSetChanged();
      }
      if (mNavigationBar != null) {
        mNavigationBar.setProgress(false);
      }
      isLoadingMore=false;
    }
    @Override public void onError(    Throwable e){
      e.printStackTrace();
      if (mNavigationBar != null) {
        mNavigationBar.setProgress(false);
      }
      isLoadingMore=false;
    }
    @Override public void onNext(    ImageResult imageResult){
      ((CardAdapter)mRvFragCard.getAdapter()).getData().add(imageResult);
    }
  }
);
}

Fixed version (ground truth):
void loadPage(Map<String,Object> query){
  if (isLoadingMore) {
    return;
  }
  if (mNavigationBar != null) {
    mNavigationBar.setProgress(true);
  }
  if (query == null) {
    query=new HashMap<>();
  }
  if ((query.isEmpty()) || (!query.containsKey(ImageRepo.TAGS))) {
    query.put(ImageRepo.TAGS,ImageRepo.TAG_SAFE);
    query.put(ImageRepo.LIMIT,10);
  }
  RetrofitUtils.getCachedAdapter().create(ImageRepo.class).getImageList(query).subscribeOn(Schedulers.io()).flatMap(new Func1<List<ImageResult>,Observable<ImageResult>>(){
    @Override public Observable<ImageResult> call(    List<ImageResult> imageResults){
      return Observable.from(imageResults);
    }
  }
).observeOn(AndroidSchedulers.mainThread()).subscribe(new Subscriber<ImageResult>(){
    @Override public void onCompleted(){
      if (mRvFragCard != null && mRvFragCard.getAdapter() != null) {
        mRvFragCard.getAdapter().notifyDataSetChanged();
      }
      if (mNavigationBar != null) {
        mNavigationBar.setProgress(false);
      }
      isLoadingMore=false;
    }
    @Override public void onError(    Throwable e){
      e.printStackTrace();
      if (mNavigationBar != null) {
        mNavigationBar.setProgress(false);
      }
      isLoadingMore=false;
      Toast.makeText(MainActivity.this,e.getMessage(),Toast.LENGTH_SHORT).show();
    }
    @Override public void onNext(    ImageResult imageResult){
      ((CardAdapter)mRvFragCard.getAdapter()).getData().add(imageResult);
    }
  }
);
}
Program: 93827
Project: 93827
Buggy source:
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  StatusbarUtils.from(this).setTransparentStatusbar(true).setLightStatusBar(false).process();
  setContentView(R.layout.activity_photoview);
  ButterKnife.bind(this);
  Picasso.with(this).load(R.drawable.place_holder).into(mIvPhoto,new Callback(){
    @Override public void onSuccess(){
      Position position=getPosition(getIntent());
      Log.d(TAG,position.toString());
      ((ViewGroup)mIvPhoto.getParent()).setClipChildren(false);
      float del_scale=((float)getWindowManager().getDefaultDisplay().getHeight()) / ((float)position.heigth);
      Log.d(TAG,del_scale + "String_Node_Str");
      Animation anim=new ScaleAnimation(1f,del_scale,1f,del_scale,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,((float)position.heigth) / (1f / ((float)position.top) + 1f / ((float)position.bottom)));
      anim.setDuration(3000);
      anim.setFillAfter(true);
      mIvPhoto.startAnimation(anim);
    }
    @Override public void onError(){
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  StatusbarUtils.from(this).setTransparentStatusbar(true).setLightStatusBar(false).process();
  setContentView(R.layout.activity_photoview);
  ButterKnife.bind(this);
  Picasso.with(this).load(R.drawable.place_holder).into(mIvPhoto,new Callback(){
    @Override public void onSuccess(){
      Position position=getPosition(getIntent());
      Log.d(TAG,position.toString());
      ((ViewGroup)mIvPhoto.getParent()).setClipChildren(false);
      float del_scale=((float)getWindowManager().getDefaultDisplay().getHeight()) / ((float)position.height);
      Log.d(TAG,del_scale + "String_Node_Str");
      Animation anim=new ScaleAnimation(1f,del_scale,1f,del_scale,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,((float)position.height) / (1f / ((float)position.top) + 1f / ((float)position.bottom)));
      anim.setDuration(3000);
      anim.setFillAfter(true);
      mIvPhoto.startAnimation(anim);
    }
    @Override public void onError(){
    }
  }
);
}
Program: 93828
Project: 93828
Buggy source:
@Override public void onSuccess(){
  Position position=getPosition(getIntent());
  Log.d(TAG,position.toString());
  ((ViewGroup)mIvPhoto.getParent()).setClipChildren(false);
  float del_scale=((float)getWindowManager().getDefaultDisplay().getHeight()) / ((float)position.heigth);
  Log.d(TAG,del_scale + "String_Node_Str");
  Animation anim=new ScaleAnimation(1f,del_scale,1f,del_scale,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,((float)position.heigth) / (1f / ((float)position.top) + 1f / ((float)position.bottom)));
  anim.setDuration(3000);
  anim.setFillAfter(true);
  mIvPhoto.startAnimation(anim);
}

Fixed version (ground truth):
@Override public void onSuccess(){
  Position position=getPosition(getIntent());
  Log.d(TAG,position.toString());
  ((ViewGroup)mIvPhoto.getParent()).setClipChildren(false);
  float del_scale=((float)getWindowManager().getDefaultDisplay().getHeight()) / ((float)position.height);
  Log.d(TAG,del_scale + "String_Node_Str");
  Animation anim=new ScaleAnimation(1f,del_scale,1f,del_scale,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,((float)position.height) / (1f / ((float)position.top) + 1f / ((float)position.bottom)));
  anim.setDuration(3000);
  anim.setFillAfter(true);
  mIvPhoto.startAnimation(anim);
}
Program: 93829
Project: 93829
Buggy source:
protected Position(Parcel in){
  this.left=in.readInt();
  this.right=in.readInt();
  this.top=in.readInt();
  this.bottom=in.readInt();
  this.width=in.readInt();
  this.heigth=in.readInt();
}

Fixed version (ground truth):
protected Position(Parcel in){
  this.left=in.readInt();
  this.right=in.readInt();
  this.top=in.readInt();
  this.bottom=in.readInt();
  this.width=in.readInt();
  this.height=in.readInt();
}
Program: 93830
Project: 93830
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + left + "String_Node_Str"+ right+ "String_Node_Str"+ top+ "String_Node_Str"+ bottom+ "String_Node_Str"+ width+ "String_Node_Str"+ heigth+ '}';
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + left + "String_Node_Str"+ right+ "String_Node_Str"+ top+ "String_Node_Str"+ bottom+ "String_Node_Str"+ width+ "String_Node_Str"+ height+ '}';
}