Program: 163599
Project: 163599
Buggy source:
private void createAppModuleFolder(String buildToolsVer,String targetID) throws SketchException, IOException {
  File moduleFolder=new File(tmpFolder,"String_Node_Str");
  String minSdk;
  String tmplFile;
  if (appComponent == VR) {
    minSdk=min_sdk_gvr;
    tmplFile=VR_GRADLE_BUILD_TEMPLATE;
  }
 else {
    minSdk=min_sdk_fragment;
    tmplFile=APP_GRADLE_BUILD_TEMPLATE;
  }
  File appBuildTemplate=mode.getContentFile("String_Node_Str" + tmplFile);
  File appBuildFile=new File(moduleFolder,"String_Node_Str");
  HashMap<String,String> replaceMap=new HashMap<String,String>();
  replaceMap.put("String_Node_Str",Base.getToolsFolder().getPath());
  replaceMap.put("String_Node_Str",sdk.getTargetPlatform().getPath());
  replaceMap.put("String_Node_Str",buildToolsVer);
  replaceMap.put("String_Node_Str",getPackageName());
  replaceMap.put("String_Node_Str",minSdk);
  replaceMap.put("String_Node_Str",target_sdk);
  replaceMap.put("String_Node_Str",support_version);
  replaceMap.put("String_Node_Str",wear_version);
  replaceMap.put("String_Node_Str",gvr_sdk_version);
  replaceMap.put("String_Node_Str",manifest.getVersionCode());
  replaceMap.put("String_Node_Str",manifest.getVersionName());
  AndroidMode.createFileFromTemplate(appBuildTemplate,appBuildFile,replaceMap);
  writeFile(new File(moduleFolder,"String_Node_Str"),new String[]{"String_Node_Str"});
  File libsFolder=mkdirs(moduleFolder,"String_Node_Str");
  File mainFolder=new File(moduleFolder,"String_Node_Str");
  File resFolder=mkdirs(mainFolder,"String_Node_Str");
  File assetsFolder=mkdirs(mainFolder,"String_Node_Str");
  writeRes(resFolder);
  File tempManifest=new File(mainFolder,"String_Node_Str");
  manifest.writeCopy(tempManifest,sketchClassName);
  Util.copyFile(coreZipFile,new File(libsFolder,"String_Node_Str"));
  copyImportedLibs(libsFolder,assetsFolder);
  copyCodeFolder(libsFolder);
  copyWearLib(tmpFolder,libsFolder);
  copySupportLibs(tmpFolder,libsFolder);
  if (getAppComponent() == FRAGMENT) {
    File aarFile=new File(sdk.getSupportLibrary(),"String_Node_Str" + support_version + "String_Node_Str"+ support_version+ "String_Node_Str");
    Util.copyFile(aarFile,new File(libsFolder,aarFile.getName()));
  }
  if (getAppComponent() == VR) {
    copyGVRLibs(targetID,libsFolder);
  }
  final File sketchDataFolder=sketch.getDataFolder();
  if (sketchDataFolder.exists()) {
    Util.copyDir(sketchDataFolder,assetsFolder);
  }
  final File sketchResFolder=new File(sketch.getFolder(),"String_Node_Str");
  if (sketchResFolder.exists()) {
    Util.copyDir(sketchResFolder,resFolder);
  }
}

Fixed version (ground truth):
private void createAppModuleFolder(String buildToolsVer,String targetID) throws SketchException, IOException {
  File moduleFolder=new File(tmpFolder,"String_Node_Str");
  String minSdk;
  String tmplFile;
  if (appComponent == VR) {
    minSdk=min_sdk_gvr;
    tmplFile=VR_GRADLE_BUILD_TEMPLATE;
  }
 else {
    minSdk=min_sdk_fragment;
    tmplFile=APP_GRADLE_BUILD_TEMPLATE;
  }
  File appBuildTemplate=mode.getContentFile("String_Node_Str" + tmplFile);
  File appBuildFile=new File(moduleFolder,"String_Node_Str");
  HashMap<String,String> replaceMap=new HashMap<String,String>();
  replaceMap.put("String_Node_Str",Base.getToolsFolder().getPath().replace('\\','/'));
  replaceMap.put("String_Node_Str",sdk.getTargetPlatform().getPath().replace('\\','/'));
  replaceMap.put("String_Node_Str",buildToolsVer);
  replaceMap.put("String_Node_Str",getPackageName());
  replaceMap.put("String_Node_Str",minSdk);
  replaceMap.put("String_Node_Str",target_sdk);
  replaceMap.put("String_Node_Str",support_version);
  replaceMap.put("String_Node_Str",wear_version);
  replaceMap.put("String_Node_Str",gvr_sdk_version);
  replaceMap.put("String_Node_Str",manifest.getVersionCode());
  replaceMap.put("String_Node_Str",manifest.getVersionName());
  AndroidMode.createFileFromTemplate(appBuildTemplate,appBuildFile,replaceMap);
  writeFile(new File(moduleFolder,"String_Node_Str"),new String[]{"String_Node_Str"});
  File libsFolder=mkdirs(moduleFolder,"String_Node_Str");
  File mainFolder=new File(moduleFolder,"String_Node_Str");
  File resFolder=mkdirs(mainFolder,"String_Node_Str");
  File assetsFolder=mkdirs(mainFolder,"String_Node_Str");
  writeRes(resFolder);
  File tempManifest=new File(mainFolder,"String_Node_Str");
  manifest.writeCopy(tempManifest,sketchClassName);
  Util.copyFile(coreZipFile,new File(libsFolder,"String_Node_Str"));
  copyImportedLibs(libsFolder,assetsFolder);
  copyCodeFolder(libsFolder);
  copyWearLib(tmpFolder,libsFolder);
  copySupportLibs(tmpFolder,libsFolder);
  if (getAppComponent() == FRAGMENT) {
    File aarFile=new File(sdk.getSupportLibrary(),"String_Node_Str" + support_version + "String_Node_Str"+ support_version+ "String_Node_Str");
    Util.copyFile(aarFile,new File(libsFolder,aarFile.getName()));
  }
  if (getAppComponent() == VR) {
    copyGVRLibs(targetID,libsFolder);
  }
  final File sketchDataFolder=sketch.getDataFolder();
  if (sketchDataFolder.exists()) {
    Util.copyDir(sketchDataFolder,assetsFolder);
  }
  final File sketchResFolder=new File(sketch.getFolder(),"String_Node_Str");
  if (sketchResFolder.exists()) {
    Util.copyDir(sketchResFolder,resFolder);
  }
}