Program: 59069
Project: 59069
Buggy source:
public static void loadAllPathwaysByType(final IGeneralManager generalManager,final PathwayDatabase pathwayDatabase){
  GLCanvasRemoteRendering3D tmpGLRemoteRendering3D=null;
  for (  GLEventListener tmpGLEventListener : generalManager.getViewGLCanvasManager().getAllGLEventListeners()) {
    if (tmpGLEventListener instanceof GLCanvasRemoteRendering3D) {
      tmpGLRemoteRendering3D=((GLCanvasRemoteRendering3D)tmpGLEventListener);
      tmpGLRemoteRendering3D.enableBusyMode(true);
      break;
    }
  }
  BufferedReader file=null;
  String sLine=null;
  String sFileName="String_Node_Str";
  String sPathwayPath=pathwayDatabase.getXMLPath();
  float fProgressFactor=0;
  if (pathwayDatabase.getName().equals("String_Node_Str")) {
    sFileName=generalManager.getCaleydoHomePath() + PATHWAY_LIST_KEGG;
    fProgressFactor=100f / APPROX_PATHWAY_COUNT_KEGG;
    generalManager.getSWTGUIManager().setProgressBarTextFromExternalThread("String_Node_Str");
  }
 else   if (pathwayDatabase.getName().equals("String_Node_Str")) {
    sFileName=generalManager.getCaleydoHomePath() + PATHWAY_LIST_BIOCARTA;
    fProgressFactor=100f / APPROX_PATHWAY_COUNT_BIOCARTA;
    generalManager.getSWTGUIManager().setProgressBarTextFromExternalThread("String_Node_Str");
  }
  int iPathwayIndex=0;
  try {
    if (generalManager.getClass().getClassLoader().getResourceAsStream(sFileName) != null) {
      file=new BufferedReader(new InputStreamReader(generalManager.getClass().getClassLoader().getResourceAsStream(sFileName)));
    }
 else {
      file=new BufferedReader(new FileReader(sFileName));
    }
    StringTokenizer tokenizer;
    String sPathwayName;
    PathwayGraph tmpPathwayGraph;
    while ((sLine=file.readLine()) != null) {
      tokenizer=new StringTokenizer(sLine,"String_Node_Str");
      sPathwayName=tokenizer.nextToken();
      if (!sPathwayName.endsWith("String_Node_Str") && !sLine.contains("String_Node_Str"))       continue;
      generalManager.getXmlParserManager().parseXmlFileByName(sPathwayPath + sPathwayName);
      tmpPathwayGraph=generalManager.getPathwayManager().getCurrenPathwayGraph();
      tmpPathwayGraph.setWidth(StringConversionTool.convertStringToInt(tokenizer.nextToken(),-1));
      tmpPathwayGraph.setHeight(StringConversionTool.convertStringToInt(tokenizer.nextToken(),-1));
      int iImageWidth=tmpPathwayGraph.getWidth();
      int iImageHeight=tmpPathwayGraph.getHeight();
      if (iImageWidth == -1 || iImageHeight == -1)       generalManager.getLogger().log(Level.INFO,"String_Node_Str" + iImageWidth + "String_Node_Str"+ iImageHeight);
      iPathwayIndex++;
      if (iPathwayIndex % 10 == 0) {
        generalManager.getSWTGUIManager().setProgressBarPercentageFromExternalThread((int)(fProgressFactor * iPathwayIndex));
      }
    }
  }
 catch (  FileNotFoundException e) {
    throw new CaleydoRuntimeException("String_Node_Str" + sFileName + "String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  }
catch (  IOException e) {
    throw new CaleydoRuntimeException("String_Node_Str" + sFileName,CaleydoRuntimeExceptionType.DATAHANDLING);
  }
  if (tmpGLRemoteRendering3D != null)   tmpGLRemoteRendering3D.enableBusyMode(false);
}

Fixed version (ground truth):
public static void loadAllPathwaysByType(final IGeneralManager generalManager,final PathwayDatabase pathwayDatabase){
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + pathwayDatabase.getName() + "String_Node_Str");
  GLCanvasRemoteRendering3D tmpGLRemoteRendering3D=null;
  for (  GLEventListener tmpGLEventListener : generalManager.getViewGLCanvasManager().getAllGLEventListeners()) {
    if (tmpGLEventListener instanceof GLCanvasRemoteRendering3D) {
      tmpGLRemoteRendering3D=((GLCanvasRemoteRendering3D)tmpGLEventListener);
      tmpGLRemoteRendering3D.enableBusyMode(true);
      break;
    }
  }
  BufferedReader file=null;
  String sLine=null;
  String sFileName="String_Node_Str";
  String sPathwayPath=pathwayDatabase.getXMLPath();
  float fProgressFactor=0;
  if (pathwayDatabase.getName().equals("String_Node_Str")) {
    sFileName=generalManager.getCaleydoHomePath() + PATHWAY_LIST_KEGG;
    fProgressFactor=100f / APPROX_PATHWAY_COUNT_KEGG;
    generalManager.getSWTGUIManager().setProgressBarTextFromExternalThread("String_Node_Str");
  }
 else   if (pathwayDatabase.getName().equals("String_Node_Str")) {
    sFileName=generalManager.getCaleydoHomePath() + PATHWAY_LIST_BIOCARTA;
    fProgressFactor=100f / APPROX_PATHWAY_COUNT_BIOCARTA;
    generalManager.getSWTGUIManager().setProgressBarTextFromExternalThread("String_Node_Str");
  }
  int iPathwayIndex=0;
  try {
    if (generalManager.getClass().getClassLoader().getResourceAsStream(sFileName) != null) {
      file=new BufferedReader(new InputStreamReader(generalManager.getClass().getClassLoader().getResourceAsStream(sFileName)));
    }
 else {
      file=new BufferedReader(new FileReader(sFileName));
    }
    StringTokenizer tokenizer;
    String sPathwayName;
    PathwayGraph tmpPathwayGraph;
    while ((sLine=file.readLine()) != null) {
      tokenizer=new StringTokenizer(sLine,"String_Node_Str");
      sPathwayName=tokenizer.nextToken();
      if (!sPathwayName.endsWith("String_Node_Str") && !sLine.contains("String_Node_Str"))       continue;
      generalManager.getXmlParserManager().parseXmlFileByName(sPathwayPath + sPathwayName);
      tmpPathwayGraph=generalManager.getPathwayManager().getCurrenPathwayGraph();
      tmpPathwayGraph.setWidth(StringConversionTool.convertStringToInt(tokenizer.nextToken(),-1));
      tmpPathwayGraph.setHeight(StringConversionTool.convertStringToInt(tokenizer.nextToken(),-1));
      int iImageWidth=tmpPathwayGraph.getWidth();
      int iImageHeight=tmpPathwayGraph.getHeight();
      if (iImageWidth == -1 || iImageHeight == -1)       generalManager.getLogger().log(Level.INFO,"String_Node_Str" + iImageWidth + "String_Node_Str"+ iImageHeight);
      iPathwayIndex++;
      if (iPathwayIndex % 10 == 0) {
        generalManager.getSWTGUIManager().setProgressBarPercentageFromExternalThread((int)(fProgressFactor * iPathwayIndex));
      }
    }
  }
 catch (  FileNotFoundException e) {
    throw new CaleydoRuntimeException("String_Node_Str" + sFileName + "String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  }
catch (  IOException e) {
    throw new CaleydoRuntimeException("String_Node_Str" + sFileName,CaleydoRuntimeExceptionType.DATAHANDLING);
  }
  if (tmpGLRemoteRendering3D != null)   tmpGLRemoteRendering3D.enableBusyMode(false);
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + pathwayDatabase.getName() + "String_Node_Str");
}