Program: 93394
Project: 93394
Buggy source:
@Override public void createPartControl(final Composite parent){
  final Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout(SWT.VERTICAL));
  createButton("String_Node_Str",container,new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      try {
        final WebServiceClient c=new WebServiceClient(ClientConfiguration.create(COUCH_BASEURL));
        final Bundle setupBundle=ensureIsNotNull(Platform.getBundle("String_Node_Str"));
        final File setupBasedir=FileLocator.getBundleFile(setupBundle);
        ensureIsDirectory(setupBasedir);
        final File couchdbBasedir=new File(setupBasedir.getAbsoluteFile(),"String_Node_Str");
        ensureIsDirectory(couchdbBasedir);
        for (        final File db : couchdbBasedir.listFiles()) {
          findOrCreateDatabase(db.getName(),c);
          final Iterator<File> it=iterateFiles(db,TrueFileFilter.INSTANCE,TrueFileFilter.INSTANCE);
          while (it.hasNext()) {
            putDocument(c,couchdbBasedir,it.next());
          }
        }
      }
 catch (      final Exception e1) {
        e1.printStackTrace();
      }
    }
    private void putDocument(    final WebServiceClient c,    final File couchdbBasedir,    final File contentFile) throws IOException {
      String path=removeStart(contentFile.getAbsolutePath(),couchdbBasedir.getAbsolutePath() + "String_Node_Str");
      path=StringUtils.removeEnd(path,"String_Node_Str");
      try {
        final String content=Files.toString(contentFile,Charsets.UTF_8);
        c.createRequestBuilder(path).type(MediaType.TEXT_PLAIN_TYPE).put(content);
      }
 catch (      final Exception e) {
        System.out.printf("String_Node_Str",contentFile,e.getMessage());
      }
    }
    private void findOrCreateDatabase(    final String databaseName,    final WebServiceClient c){
      try {
        final TransactionResult doGetRequest=c.doGetRequest(databaseName,TransactionResult.class);
        System.out.println(doGetRequest);
      }
 catch (      final NotFoundException nfe) {
        c.doPutRequest(databaseName,"String_Node_Str",TransactionResult.class);
      }
    }
  }
);
  createButton("String_Node_Str",container,new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      new WorkspaceJob("String_Node_Str"){
        @Override public IStatus runInWorkspace(        final IProgressMonitor monitor) throws CoreException {
          monitor.beginTask("String_Node_Str",5);
          try {
{
              final File out=new File(ServerConfiguration.getDataBasedir(),"String_Node_Str");
              out.mkdirs();
              final AlgorithmParameters arguments=new AlgorithmParameters();
              arguments.setOut(out);
              arguments.setForce(true);
              monitor.subTask("String_Node_Str");
              final Injector injector=Guice.createInjector(new CouchGuiceModule(arguments));
              injector.getInstance(ModelSpecsGenerator.class).execute();
              monitor.worked(1);
              monitor.subTask("String_Node_Str");
              injector.getInstance(Algorithm.class).run();
              monitor.worked(2);
            }
{
              monitor.subTask("String_Node_Str");
              final org.eclipse.recommenders.mining.extdocs.AlgorithmParameters arguments=new org.eclipse.recommenders.mining.extdocs.AlgorithmParameters();
              final Injector injector=Guice.createInjector(new org.eclipse.recommenders.mining.extdocs.couch.CouchGuiceModule(arguments));
              injector.getInstance(org.eclipse.recommenders.mining.extdocs.Algorithm.class).run();
              monitor.worked(2);
            }
          }
 catch (          final Exception x) {
            x.printStackTrace();
            return new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",x);
          }
 finally {
            monitor.done();
          }
          return Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
}

Fixed version (ground truth):
@Override public void createPartControl(final Composite parent){
  final Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout(SWT.VERTICAL));
  createButton("String_Node_Str",container,new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      try {
        final WebServiceClient c=new WebServiceClient(ClientConfiguration.create(COUCH_BASEURL));
        final Bundle setupBundle=ensureIsNotNull(Platform.getBundle("String_Node_Str"));
        final File setupBasedir=FileLocator.getBundleFile(setupBundle);
        ensureIsDirectory(setupBasedir);
        final File couchdbBasedir=new File(setupBasedir.getAbsoluteFile(),"String_Node_Str");
        ensureIsDirectory(couchdbBasedir);
        for (        final File db : couchdbBasedir.listFiles()) {
          findOrCreateDatabase(db.getName(),c);
          final Iterator<File> it=iterateFiles(db,TrueFileFilter.INSTANCE,TrueFileFilter.INSTANCE);
          while (it.hasNext()) {
            putDocument(c,couchdbBasedir,it.next());
          }
        }
      }
 catch (      final Exception e1) {
        e1.printStackTrace();
      }
    }
    private void putDocument(    final WebServiceClient c,    final File couchdbBasedir,    final File contentFile) throws IOException {
      String path=removeStart(contentFile.getAbsolutePath(),couchdbBasedir.getAbsolutePath());
      path=path.replace("String_Node_Str","String_Node_Str");
      path=StringUtils.removeStart(path,"String_Node_Str");
      path=StringUtils.removeEnd(path,"String_Node_Str");
      try {
        final String content=Files.toString(contentFile,Charsets.UTF_8);
        c.createRequestBuilder(path).type(MediaType.TEXT_PLAIN_TYPE).put(content);
      }
 catch (      final Exception e) {
        System.out.printf("String_Node_Str",contentFile,e.getMessage());
      }
    }
    private void findOrCreateDatabase(    final String databaseName,    final WebServiceClient c){
      try {
        final TransactionResult doGetRequest=c.doGetRequest(databaseName,TransactionResult.class);
        System.out.println(doGetRequest);
      }
 catch (      final NotFoundException nfe) {
        c.doPutRequest(databaseName,"String_Node_Str",TransactionResult.class);
      }
    }
  }
);
  createButton("String_Node_Str",container,new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      new WorkspaceJob("String_Node_Str"){
        @Override public IStatus runInWorkspace(        final IProgressMonitor monitor) throws CoreException {
          monitor.beginTask("String_Node_Str",5);
          try {
{
              final File out=new File(ServerConfiguration.getDataBasedir(),"String_Node_Str");
              out.mkdirs();
              final AlgorithmParameters arguments=new AlgorithmParameters();
              arguments.setOut(out);
              arguments.setForce(true);
              monitor.subTask("String_Node_Str");
              final Injector injector=Guice.createInjector(new CouchGuiceModule(arguments));
              injector.getInstance(ModelSpecsGenerator.class).execute();
              monitor.worked(1);
              monitor.subTask("String_Node_Str");
              injector.getInstance(Algorithm.class).run();
              monitor.worked(2);
            }
{
              monitor.subTask("String_Node_Str");
              final org.eclipse.recommenders.mining.extdocs.AlgorithmParameters arguments=new org.eclipse.recommenders.mining.extdocs.AlgorithmParameters();
              final Injector injector=Guice.createInjector(new org.eclipse.recommenders.mining.extdocs.couch.CouchGuiceModule(arguments));
              injector.getInstance(org.eclipse.recommenders.mining.extdocs.Algorithm.class).run();
              monitor.worked(2);
            }
          }
 catch (          final Exception x) {
            x.printStackTrace();
            return new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",x);
          }
 finally {
            monitor.done();
          }
          return Status.OK_STATUS;
        }
      }
.schedule();
    }
  }
);
}