Source:
<code>public void performCommand(String[] cmd, int fd) { BufferedReader buffData = null; BufferedReader buffTemp = null; URI pathWorkDirURI = null; try { Process proc = null; RemoteConnection exeRC = null; try { pathWorkDirURI = new URI(pathWorkDir.toPortableString()); exeRC = new RemoteConnection(pathWorkDirURI); } catch (RemoteConnectionException e) { <START> e.printStackTrace(); <END> } catch (URISyntaxException e) { e.printStackTrace(); } IFileStore workDirStore = exeRC.getRmtFileProxy().getResource(pathWorkDirURI.getPath() + IPath.SEPARATOR); proc = RuntimeProcessFactory.getFactory().exec(cmd, null, workDirStore, project); StringBuffer data = new StringBuffer(); StringBuffer temp = new StringBuffer(); switch (fd) { case 2: buffData = new BufferedReader(new InputStreamReader(proc.getErrorStream())); buffTemp = new BufferedReader(new InputStreamReader(proc.getInputStream())); readStream(buffTemp, temp); readStream(buffData, data); break; case 1: default: buffData = new BufferedReader(new InputStreamReader(proc.getInputStream())); buffTemp = new BufferedReader(new InputStreamReader(proc.getErrorStream())); readStream(buffData, data); readStream(buffTemp, temp); break; } joinAll(); text = data.toString(); printToConsole(proc, temp.toString()); } catch (IOException e) { text = ""; } catch (InterruptedException e){ text = ""; }finally { try { if (buffData != null) { buffData.close(); } if (buffTemp != null) { buffTemp.close(); } } catch (IOException e) { } } }</code><technical_language>I printStackTrace. invisible users polutes log. Please find a properly handle exceptions ignore if sense. in case URISyntaxException is thrown exeRC initialed lines get a NPE (exeRC.getRmtFileProxy)</technical_language>

Target:
public void performCommand(String[] cmd, int fd) { BufferedReader buffData = null; BufferedReader buffTemp = null; URI pathWorkDirURI = null; try { Process proc = null; RemoteConnection exeRC = null; try { pathWorkDirURI = new URI(pathWorkDir.toPortableString()); exeRC = new RemoteConnection(pathWorkDirURI); } catch (RemoteConnectionException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } IFileStore workDirStore = exeRC.getRmtFileProxy().getResource(pathWorkDirURI.getPath() + IPath.SEPARATOR); proc = RuntimeProcessFactory.getFactory().exec(cmd, null, workDirStore, project); StringBuffer data = new StringBuffer(); StringBuffer temp = new StringBuffer(); switch (fd) { case 2: buffData = new BufferedReader(new InputStreamReader(proc.getErrorStream())); buffTemp = new BufferedReader(new InputStreamReader(proc.getInputStream())); readStream(buffTemp, temp); readStream(buffData, data); break; case 1: default: buffData = new BufferedReader(new InputStreamReader(proc.getInputStream())); buffTemp = new BufferedReader(new InputStreamReader(proc.getErrorStream())); readStream(buffData, data); readStream(buffTemp, temp); break; } joinAll(); text = data.toString(); printToConsole(proc, temp.toString()); } catch (IOException e) { text = ""; } catch (InterruptedException e){ text = ""; }finally { try { if (buffData != null) { buffData.close(); } if (buffTemp != null) { buffTemp.close(); } } catch (IOException e) { } } }