Program: 125809
Project: 125809
Buggy source:
private void exportStudioInfo(File dest){
  StringBuffer info=new StringBuffer();
  info.append("String_Node_Str").append(NEW_LINE);
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
    IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    String productName=brandingService.getFullProductName();
    String productInternalVersion=VersionUtils.getInternalVersion();
    info.append("String_Node_Str").append(productName).append(NEW_LINE);
    info.append("String_Node_Str").append(productInternalVersion).append(NEW_LINE);
  }
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  IPreferenceStore preferenceStore=CoreUIPlugin.getDefault().getPreferenceStore();
  String addons=preferenceStore.getString("String_Node_Str");
  JSONObject jsonObject=null;
  try {
    if (addons != null && !"String_Node_Str".equals(addons)) {
      jsonObject=new JSONObject(addons);
    }
  }
 catch (  JSONException e) {
    info.append("String_Node_Str").append(NEW_LINE);
  }
  if (jsonObject != null) {
    JSONArray jsonArray=jsonObject.names();
    if (jsonArray != null) {
      for (int i=0; i < jsonArray.length(); i++) {
        try {
          String addon=jsonArray.getString(i);
          info.append(addon).append(NEW_LINE);
        }
 catch (        JSONException e) {
          info.append("String_Node_Str").append(NEW_LINE);
        }
      }
    }
  }
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericService.class)) {
    IGenericService genericService=(IGenericService)GlobalServiceRegister.getDefault().getService(IGenericService.class);
    List<Map<String,String>> componentsInfo=genericService.getAllGenericComponentsInfo();
    for (    Map<String,String> componentInfo : componentsInfo) {
      for (      Map.Entry<String,String> entry : componentInfo.entrySet()) {
        info.append(entry.getKey()).append("String_Node_Str").append(entry.getValue()).append(BLANK);
      }
      info.append(NEW_LINE);
    }
    info.append(NEW_LINE);
  }
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
    ICoreTisService coreTisService=(ICoreTisService)GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
    List<IUpdateSiteBean> installedPatches=null;
    try {
      installedPatches=coreTisService.getPatchesInstalled();
    }
 catch (    BackingStoreException e) {
      info.append("String_Node_Str").append(NEW_LINE);
      ExceptionHandler.process(e);
    }
    if (installedPatches != null) {
      for (      IUpdateSiteBean patch : installedPatches) {
        info.append("String_Node_Str").append(patch.getGroupID()).append(BLANK);
        info.append("String_Node_Str").append(patch.getVersion()).append(BLANK);
        info.append("String_Node_Str").append(patch.getArtifactID()).append(NEW_LINE);
      }
    }
  }
  writeToFile(dest,"String_Node_Str",info);
}

Fixed version (ground truth):
private void exportStudioInfo(File dest){
  StringBuffer info=new StringBuffer();
  info.append("String_Node_Str").append(NEW_LINE);
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
    IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    String productName=brandingService.getFullProductName();
    String productInternalVersion=VersionUtils.getInternalVersion();
    info.append("String_Node_Str").append(productName).append(NEW_LINE);
    info.append("String_Node_Str").append(productInternalVersion).append(NEW_LINE);
  }
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  IPreferenceStore preferenceStore=PlatformUI.getPreferenceStore();
  String addons=preferenceStore.getString("String_Node_Str");
  JSONObject jsonObject=null;
  try {
    if (addons != null && !"String_Node_Str".equals(addons)) {
      jsonObject=new JSONObject(addons);
    }
  }
 catch (  JSONException e) {
    info.append("String_Node_Str").append(NEW_LINE);
  }
  if (jsonObject != null) {
    JSONArray jsonArray=jsonObject.names();
    if (jsonArray != null) {
      for (int i=0; i < jsonArray.length(); i++) {
        try {
          String addon=jsonArray.getString(i);
          info.append(addon).append(NEW_LINE);
        }
 catch (        JSONException e) {
          info.append("String_Node_Str").append(NEW_LINE);
        }
      }
    }
  }
  info.append(NEW_LINE);
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericService.class)) {
    IGenericService genericService=(IGenericService)GlobalServiceRegister.getDefault().getService(IGenericService.class);
    List<Map<String,String>> componentsInfo=genericService.getAllGenericComponentsInfo();
    for (    Map<String,String> componentInfo : componentsInfo) {
      for (      Map.Entry<String,String> entry : componentInfo.entrySet()) {
        info.append(entry.getKey()).append("String_Node_Str").append(entry.getValue()).append(BLANK);
      }
      info.append(NEW_LINE);
    }
    info.append(NEW_LINE);
  }
  info.append("String_Node_Str").append(NEW_LINE);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
    ICoreTisService coreTisService=(ICoreTisService)GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
    List<IUpdateSiteBean> installedPatches=null;
    try {
      installedPatches=coreTisService.getPatchesInstalled();
    }
 catch (    BackingStoreException e) {
      info.append("String_Node_Str").append(NEW_LINE);
      ExceptionHandler.process(e);
    }
    if (installedPatches != null) {
      for (      IUpdateSiteBean patch : installedPatches) {
        info.append("String_Node_Str").append(patch.getGroupID()).append(BLANK);
        info.append("String_Node_Str").append(patch.getVersion()).append(BLANK);
        info.append("String_Node_Str").append(patch.getArtifactID()).append(NEW_LINE);
      }
    }
  }
  writeToFile(dest,"String_Node_Str",info);
}