auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void skipRegistration(Server server) { addParamsToCDKLaunchConfig(server, "--skip-registration"); }

Target:
protected void skipRegistration(Server server) { addParamsToCDKLaunchConfig(server, SKIP_REGISTRATION); }
Source:
public JobPropertyImpl(Set<String> activeProcessNames) throws Descriptor.FormException, IOException { this.activeProcessNames.addAll(activeProcessNames); }

Target:
public JobPropertyImpl(Set<String> activeProcessNames) { this.activeProcessNames.addAll(activeProcessNames); }
Source:
public synchronized void destroy() { LOG.info("{} is stopping.", NAME); for (Listener listener : listeners) { try { LOG.info("Stopping listener.", listener.getName()); listener.stop(); } catch (InterruptedException e) { LOG.warn("Error while stopping listener.", e); } } listeners.clear(); for (AsyncDispatcher<?> dispatcher : dispatchers) { try { LOG.debug("Closing dispatcher.", dispatcher); } catch (Exception e) { LOG.warn("Error while closing dispatcher.", e); } } listeners.clear(); for (TelemetryMessageConsumer consumer : consumers) { try { LOG.info("Stopping consumer for protocol.", consumer.getProtocol().getName()); messageConsumerManager.unregisterConsumer(consumer); } catch (Exception e) { LOG.error("Error while stopping consumer.", e); } } consumers.clear(); LOG.info("{} is stopped.", NAME); }

Target:
public synchronized void destroy() { LOG.info("{} is stopping.", NAME); for (Listener listener : listeners) { try { LOG.info("Stopping listener.", listener.getName()); listener.stop(); } catch (InterruptedException e) { LOG.warn("Error while stopping listener.", e); } } listeners.clear(); for (AsyncDispatcher<?> dispatcher : dispatchers) { try { LOG.info("Closing dispatcher.", dispatcher); dispatcher.close(); } catch (Exception e) { LOG.warn("Error while closing dispatcher.", e); } } dispatchers.clear(); for (TelemetryMessageConsumer consumer : consumers) { try { LOG.info("Stopping consumer for protocol.", consumer.getProtocol().getName()); messageConsumerManager.unregisterConsumer(consumer); } catch (Exception e) { LOG.error("Error while stopping consumer.", e); } } consumers.clear(); LOG.info("{} is stopped.", NAME); }
Source:
public CRAMFileWriter(final OutputStream outputStream, final OutputStream indexOS, final ReferenceSource source, final SAMFileHeader samFileHeader, final String fileName) { this.outputStream = outputStream; this.samFileHeader = samFileHeader; this.fileName = fileName; initCRAMWriter(indexOS, source, samFileHeader, true); }

Target:
public CRAMFileWriter( final OutputStream outputStream, final OutputStream indexOS, final ReferenceSource source, final SAMFileHeader samFileHeader, final String fileName) { this(outputStream, indexOS, true, source, samFileHeader, fileName); }
Source:
public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> parameterValues, PatientCalculationContext context) { Program mchmsProgram = MetadataUtils.getProgram(Metadata.Program.MCHMS); Set<Integer> alive = alivePatients(cohort, context); Set<Integer> inMchmsProgram = CalculationUtils.patientsThatPass(Calculations.activeEnrollment(mchmsProgram, alive, context)); CalculationResultMap hivStatusObs = Calculations.lastObs(getConcept(Dictionary.HIV_STATUS), inMchmsProgram, context); CalculationResultMap hivTestDateObs = Calculations.lastObs(getConcept(Dictionary.DATE_OF_HIV_DIAGNOSIS), inMchmsProgram, context); CalculationResultMap ret = new CalculationResultMap(); CalculationResultMap crm = Calculations.lastEncounter(MetadataUtils.getEncounterType(Metadata.EncounterType.MCHMS_ENROLLMENT), cohort, context); boolean hivTestedAtEnrollment; for (Integer ptId : cohort) { hivTestedAtEnrollment = false; if (inMchmsProgram.contains(ptId)) { Concept hivStatus = EmrCalculationUtils.codedObsResultForPatient(hivStatusObs, ptId); Date hivTestDate = EmrCalculationUtils.datetimeObsResultForPatient(hivTestDateObs, ptId); if (hivStatus != null && !hivStatus.equals(Dictionary.getConcept(Dictionary.NOT_HIV_TESTED))) { if (hivTestDate != null) { Date enrollmentDate = ((Encounter) crm.get(ptId).getValue()).getDateCreated(); hivTestedAtEnrollment = (hivTestDate.before(enrollmentDate) || hivTestDate.equals(enrollmentDate)); } } } ret.put(ptId, new BooleanResult(hivTestedAtEnrollment, this, context)); } return ret; }

Target:
public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> parameterValues, PatientCalculationContext context) { Program mchmsProgram = MetadataUtils.getProgram(Metadata.Program.MCHMS); Set<Integer> alive = alivePatients(cohort, context); Set<Integer> inMchmsProgram = CalculationUtils.patientsThatPass(Calculations.activeEnrollment(mchmsProgram, alive, context)); CalculationResultMap hivStatusObs = Calculations.lastObs(getConcept(Dictionary.HIV_STATUS), inMchmsProgram, context); CalculationResultMap hivTestDateObs = Calculations.lastObs(getConcept(Dictionary.DATE_OF_HIV_DIAGNOSIS), inMchmsProgram, context); Concept notHivTestedConcept = Dictionary.getConcept(Dictionary.NOT_HIV_TESTED); CalculationResultMap ret = new CalculationResultMap(); CalculationResultMap crm = Calculations.lastEncounter(MetadataUtils.getEncounterType(Metadata.EncounterType.MCHMS_ENROLLMENT), cohort, context); for (Integer ptId : cohort) { boolean hivTestedAtEnrollment = false; if (inMchmsProgram.contains(ptId)) { Concept hivStatus = EmrCalculationUtils.codedObsResultForPatient(hivStatusObs, ptId); Date hivTestDate = EmrCalculationUtils.datetimeObsResultForPatient(hivTestDateObs, ptId); if (hivStatus != null && !hivStatus.equals(notHivTestedConcept)) { if (hivTestDate != null) { Date enrollmentDate = ((Encounter) crm.get(ptId).getValue()).getDateCreated(); hivTestedAtEnrollment = (hivTestDate.before(enrollmentDate) || hivTestDate.equals(enrollmentDate)); } } } ret.put(ptId, new BooleanResult(hivTestedAtEnrollment, this, context)); } return ret; }
Source:
public Socket connectSocket( final Socket sock, final String host, final int port, final InetAddress localAddress, int localPort, final HttpParams params ) throws IOException { if (host == null) { throw new IllegalArgumentException("Target host may not be null."); } if (params == null) { throw new IllegalArgumentException("Parameters may not be null."); } SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket()); if ((localAddress != null) || (localPort > 0)) { if (localPort < 0) localPort = 0; InetSocketAddress isa = new InetSocketAddress(localAddress, localPort); sslsock.bind(isa); } int connTimeout = HttpConnectionParams.getConnectionTimeout(params); int soTimeout = HttpConnectionParams.getSoTimeout(params); InetSocketAddress remoteAddress; if (nameResolver != null) { remoteAddress = new InetSocketAddress(nameResolver.resolve(host), port); } else { remoteAddress = new InetSocketAddress(host, port); } sslsock.connect(remoteAddress, connTimeout); sslsock.setSoTimeout(soTimeout); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { socketfactory.setHostname(sslsock, host); } try { hostnameVerifier.verify(host, sslsock); } catch (IOException iox) { try { sslsock.close(); } catch (Exception x) { } throw iox; } return sslsock; }

Target:
public Socket connectSocket( final Socket sock, final String host, final int port, final InetAddress localAddress, int localPort, final HttpParams params ) throws IOException { if (host == null) { throw new IllegalArgumentException("Target host may not be null."); } if (params == null) { throw new IllegalArgumentException("Parameters may not be null."); } SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket()); if ((localAddress != null) || (localPort > 0)) { if (localPort < 0) localPort = 0; InetSocketAddress isa = new InetSocketAddress(localAddress, localPort); sslsock.bind(isa); } int connTimeout = HttpConnectionParams.getConnectionTimeout(params); int soTimeout = HttpConnectionParams.getSoTimeout(params); InetSocketAddress remoteAddress; if (nameResolver != null) { remoteAddress = new InetSocketAddress(nameResolver.resolve(host), port); } else { remoteAddress = new InetSocketAddress(host, port); } sslsock.connect(remoteAddress, connTimeout); sslsock.setSoTimeout(soTimeout); setSocketHostname(sslsock, host); try { hostnameVerifier.verify(host, sslsock); } catch (IOException iox) { try { sslsock.close(); } catch (Exception x) { } throw iox; } return sslsock; }
Source:
public void createControl(final Composite parent) { super.createControl(parent); Composite composite = (Composite) getControl(); composite.setLayoutData(new GridData(SWT.FILL, SWT.DOWN, true, false)); GridLayout gridLayout = new GridLayout(1, false); composite.setLayout(gridLayout); setControl(composite); Group group = createGroup(composite, Messages.NattableConfigurationProjectCreationPage_nattableConfigurationFileNameLabel); nattableConfigurationFileName = new Text(group, SWT.BORDER); nattableConfigurationFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); nattableConfigurationFileName.addListener(SWT.Modify, fileNameModifyListener); setPageComplete(false); }

Target:
public void createControl(final Composite parent) { super.createControl(parent); final Composite composite = (Composite) getControl(); composite.setLayoutData(new GridData(SWT.FILL, SWT.DOWN, true, false)); final GridLayout gridLayout = new GridLayout(1, false); composite.setLayout(gridLayout); setControl(composite); final Group group = createGroup(composite, Messages.NattableConfigurationProjectCreationPage_nattableConfigurationFileNameLabel); nattableConfigurationFileName = new Text(group, SWT.BORDER); nattableConfigurationFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); nattableConfigurationFileName.addListener(SWT.Modify, fileNameModifyListener); setPageComplete(false); }
Source:
public static JDBCConfiguration asJDBCConfiguration(OxdServerConfiguration configuration) { try { JsonNode node = configuration.getStorageConfiguration(); if (node != null) { return Jackson2.createJsonMapper().treeToValue(node, JDBCConfiguration.class); } } catch (Exception e) { LOG.error("Failed to parse JDBCConfiguration.", e); } return new JDBCConfiguration(); }

Target:
public static JDBCConfiguration asJDBCConfiguration(OxdServerConfiguration configuration) throws Exception { try { JsonNode node = configuration.getStorageConfiguration(); if (node != null) { return Jackson2.createJsonMapper().treeToValue(node, JDBCConfiguration.class); } LOG.error("JDBC Configuration not provided."); throw new Exception("JDBC configuration not provided in `oxd-server.yml`."); } catch (Exception e) { LOG.error("Failed to parse JDBCConfiguration.", e); throw e; } }
Source:
public void removeVideoFromArticle() { String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis(); VisualEditorPageObject ve = new VisualEditorPageObject(driver).openVEOnArticle(wikiURL, articleName); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); VisualEditorAddMediaDialog mediaDialog = ve.clickVideoButton(); VisualEditorPageObject veNew = mediaDialog.addMediaByURL(VideoContent.NON_PREMIUM_VIDEO_URL); veNew.verifyVideos(1); veNew.verifyVEToolBarPresent(); VisualEditorSaveChangesDialog save = veNew.clickPublishButton(); ArticlePageObject article = save.savePage(); article.verifyVEPublishComplete(); ve.openVEOnArticle(wikiURL, articleName); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve.selectMediaAndDelete(); ve.verifyNoVideo(); save = ve.clickPublishButton(); article = save.savePage(); article.verifyVEPublishComplete(); }

Target:
public void removeVideoFromArticle() { String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis(); VisualEditorPageObject ve = new VisualEditorPageObject(driver).openVEOnArticle(wikiURL, articleName); VisualEditorPageObject veNew = ve.addVideoToContent(VideoContent.NON_PREMIUM_VIDEO_URL); veNew.verifyVideos(1); veNew.publish(); ve.openVEOnArticle(wikiURL, articleName); ve.verifyVEToolBarPresent(); ve.verifyEditorSurfacePresent(); ve.selectMediaAndDelete(); ve.verifyNoVideo(); ve.publish(); }
Source:
private DocumentRevisionTree getAllRevisionsOfDocumentInQueue(SQLDatabase db, String docId) throws DocumentNotFoundException, AttachmentException { String sql = "SELECT " + FULL_DOCUMENT_COLS + " FROM revs, docs " + "WHERE docs.docid=? AND revs.doc_id = docs.doc_id ORDER BY sequence ASC"; String[] args = {docId}; Cursor cursor = null; try { DocumentRevisionTree tree = new DocumentRevisionTree(); cursor = db.rawQuery(sql, args); while (cursor.moveToNext()) { long sequence = cursor.getLong(3); List<? extends Attachment> atts = attachmentManager.attachmentsForRevision(db,sequence); BasicDocumentRevision rev = getFullRevisionFromCurrentCursor(cursor, atts); logger.finer("Rev: " + rev); tree.add(rev); } return tree; } catch (SQLException e) { logger.log(Level.SEVERE, "Error getting all revisions of document", e); throw new DocumentNotFoundException("DocumentRevisionTree not found with id: " + docId, e); } finally { DatabaseUtils.closeCursorQuietly(cursor); } }

Target:
private DocumentRevisionTree getAllRevisionsOfDocumentInQueue(SQLDatabase db, String docId) throws DocumentNotFoundException, AttachmentException, DatastoreException { String sql = "SELECT " + FULL_DOCUMENT_COLS + " FROM revs, docs " + "WHERE docs.docid=? AND revs.doc_id = docs.doc_id ORDER BY sequence ASC"; String[] args = {docId}; Cursor cursor = null; try { DocumentRevisionTree tree = new DocumentRevisionTree(); cursor = db.rawQuery(sql, args); while (cursor.moveToNext()) { long sequence = cursor.getLong(3); List<? extends Attachment> atts = attachmentManager.attachmentsForRevision(db,sequence); BasicDocumentRevision rev = getFullRevisionFromCurrentCursor(cursor, atts); logger.finer("Rev: " + rev); tree.add(rev); } return tree; } catch (SQLException e) { logger.log(Level.SEVERE, "Error getting all revisions of document", e); throw new DatastoreException("DocumentRevisionTree not found with id: " + docId, e); } finally { DatabaseUtils.closeCursorQuietly(cursor); } }
Source:
public InputStream getHistoryGet(String parent, String basename, String rev) { String fullpath; try { fullpath = new File(parent, basename).getCanonicalPath(); } catch (IOException exp) { LOGGER.log(Level.SEVERE, "Failed to get canonical path: {0}", exp.getClass().toString()); return null; } InputStream ret = getHistoryRev(fullpath, rev); if (ret == null) { String origpath; try { origpath = findOriginalName(fullpath, rev); } catch (IOException exp) { LOGGER.log(Level.SEVERE, "Failed to get original revision: {0}", exp.getClass().toString()); return null; } if (origpath != null) { ret = getHistoryRev(origpath, rev); } } return ret; }

Target:
public InputStream getHistoryGet(String parent, String basename, String rev) { String fullpath; try { fullpath = new File(parent, basename).getCanonicalPath(); } catch (IOException exp) { LOGGER.log(Level.SEVERE, exp, new Supplier<String>() { @Override public String get() { return String.format("Failed to get canonical path: %s/%s", parent, basename); } }); return null; } InputStream ret = getHistoryRev(fullpath, rev); if (ret == null) { String origpath; try { origpath = findOriginalName(fullpath, rev); } catch (IOException exp) { LOGGER.log(Level.SEVERE, exp, new Supplier<String>() { @Override public String get() { return String.format("Failed to get original revision: %s/%s (revision %s)", parent, basename, rev); } }); return null; } if (origpath != null) { ret = getHistoryRev(origpath, rev); } } return ret; }
Source:
public static Set<String> findCaches(Properties properties) { Set<String> caches = new HashSet<>(); caches.add(properties.getProperty(ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(IMMUTABLE_ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(NATURAL_ID_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); if (properties.containsKey(PENDING_PUTS_CACHE_RESOURCE_PROP)) { caches.add(properties.getProperty(PENDING_PUTS_CACHE_RESOURCE_PROP)); } if (Boolean.parseBoolean(properties.getProperty(AvailableSettings.USE_QUERY_CACHE))) { caches.add(properties.getProperty(QUERY_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); caches.add(properties.getProperty(TIMESTAMPS_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); } int length = INFINISPAN_CONFIG_RESOURCE_PROP.length(); String customRegionPrefix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(0, length - 3) + properties.getProperty(AvailableSettings.CACHE_REGION_PREFIX, ""); String customRegionSuffix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(length - 4, length); for (String propertyName : properties.stringPropertyNames()) { if (propertyName.startsWith(customRegionPrefix) && propertyName.endsWith(customRegionSuffix)) { caches.add(properties.getProperty(propertyName)); } } return caches; }

Target:
public static Set<String> findCaches(Properties properties) { Set<String> caches = new HashSet<>(); caches.add(properties.getProperty(ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(IMMUTABLE_ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(NATURAL_ID_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); if (properties.containsKey(PENDING_PUTS_CACHE_RESOURCE_PROP)) { caches.add(properties.getProperty(PENDING_PUTS_CACHE_RESOURCE_PROP)); } if (Boolean.parseBoolean(properties.getProperty(AvailableSettings.USE_QUERY_CACHE))) { caches.add(properties.getProperty(QUERY_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); caches.add(properties.getProperty(TIMESTAMPS_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); } int length = INFINISPAN_CONFIG_RESOURCE_PROP.length(); String customRegionPrefix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(0, length - 3) + properties.getProperty(AvailableSettings.CACHE_REGION_PREFIX, ""); String customRegionSuffix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(length - 4, length); for (String propertyName : properties.stringPropertyNames()) { if (propertyName.startsWith(customRegionPrefix) && propertyName.endsWith(customRegionSuffix)) { caches.add(properties.getProperty(propertyName)); } } return caches; }
Source:
protected Pair<Boolean, VmJob> isMergeRunning() { VDSReturnValue vmStats = runVdsCommand( VDSCommandType.GetVmStats, new GetVmStatsVDSCommandParameters(getVdsDao().get(getParameters().getVdsId()), getParameters().getVmId())); VmJob vmJob = null; Pair<Boolean, VmJob> result = new Pair<>(false, vmJob); if (vmStats.getSucceeded()) { VmInternalData vmInternalData = (VmInternalData) vmStats.getReturnValue(); List<VmJob> vmJobs = vmInternalData.getVmStatistics().getVmJobs(); vmJob = vmJobs.stream(). filter(job -> job.getJobType() == VmJobType.BLOCK). map(job -> (VmBlockJob) job). filter(job -> job.getBlockJobType() == VmBlockJobType.COMMIT). filter(job -> job.getImageGroupId().equals(getParameters().getImageGroupId())). findFirst(). orElse(null); if (vmJob != null) { result.setFirst(true); } } return result; }

Target:
protected Pair<Boolean, VmBlockJob> isMergeRunning() { VDSReturnValue vmStats = runVdsCommand( VDSCommandType.GetVmStats, new GetVmStatsVDSCommandParameters(getVdsDao().get(getParameters().getVdsId()), getParameters().getVmId())); if (vmStats.getSucceeded()) { VmInternalData vmInternalData = (VmInternalData) vmStats.getReturnValue(); List<VmJob> vmJobs = vmInternalData.getVmStatistics().getVmJobs(); return vmJobs.stream(). filter(job -> job.getJobType() == VmJobType.BLOCK). map(job -> (VmBlockJob) job). filter(job -> job.getBlockJobType() == VmBlockJobType.COMMIT). filter(job -> job.getImageGroupId().equals(getParameters().getImageGroupId())). findFirst(). map(job -> new Pair<>(true, job)). orElse(new Pair<>(false, null)); } return new Pair<>(false, null); }
Source:
public void recordHealthCheck(@NotNull final String executorId, @NotNull final HealthCheckDetails details) { if (LOGGER.isDebugEnabled()) LOGGER.debug("> recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); if (!details.getHealthy()) { final Optional<CassandraNode> nodeOpt = headOption( from(clusterState.nodes()) .filter(cassandraNodeExecutorIdEq(executorId)) ); if (nodeOpt.isPresent()) { LOGGER.info( "health check result unhealthy for node: {}. Message: '{}'", nodeOpt.get().hasCassandraNodeExecutor() ? nodeOpt.get().getCassandraNodeExecutor().getExecutorId() : "??", details.getMsg() ); } } healthCheckHistory.record( HealthCheckHistoryEntry.newBuilder() .setExecutorId(executorId) .setTimestamp(clock.now().getMillis()) .setDetails(details) .build() ); if (LOGGER.isDebugEnabled()) { LOGGER.debug("< recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } }

Target:
public void recordHealthCheck(@NotNull final String executorId, @NotNull final HealthCheckDetails details) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("> recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } if (!details.getHealthy()) { final Optional<CassandraNode> nodeOpt = headOption( from(clusterState.nodes()) .filter(cassandraNodeExecutorIdEq(executorId)) ); if (nodeOpt.isPresent()) { LOGGER.info( "health check result unhealthy for node: {}. Message: '{}'", nodeOpt.get().hasCassandraNodeExecutor() ? nodeOpt.get().getCassandraNodeExecutor().getExecutorId() : nodeOpt.get().getHostname(), details.getMsg() ); } } healthCheckHistory.record(executorId, clock.now().getMillis(), details); if (LOGGER.isDebugEnabled()) { LOGGER.debug("< recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } }
Source:
protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, false); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { fFolderViewer.setInput(LTTngProfileViewer.getViewerInput()); } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); button.setEnabled(false); }

Target:
protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, false); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { fFolderViewer.setInput(LTTngProfileViewer.getViewerInput()); enableLocalButtons(); } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); button.setEnabled(false); }
Source:
public void execute() throws MojoExecutionException, MojoFailureException { if (!TARGET_DEFINITION_PACKAGING.equals(project.getPackaging())) { throw new MojoExecutionException("This goal can only be executed on projects with packaging type '" + TARGET_DEFINITION_PACKAGING + "'"); } File targetFile = new File(project.getBasedir(), project.getArtifactId() + FILE_EXTENSION); if (!targetFile.isFile()) { throw new MojoExecutionException("Expected target definition file '" + targetFile.getAbsolutePath() + "' could not be found."); } project.getArtifact().setFile(targetFile); }

Target:
public void execute() throws MojoExecutionException, MojoFailureException { File targetFile = new File(project.getBasedir(), project.getArtifactId() + FILE_EXTENSION); if (!targetFile.isFile()) { throw new MojoExecutionException("Expected target definition file '" + targetFile.getAbsolutePath() + "' could not be found."); } project.getArtifact().setFile(targetFile); }
Source:
public void charge(final String details, final Dollars amount) { new XemblyLine( this.directives.xset(String.format(". + %d", amount.points())) ).log(); this.wallet.charge(details, amount); }

Target:
public void charge(final String details, final Dollars amount) { this.wallet.charge(details, amount); new XemblyLine( new Directives() .xpath("/snapshot") .addIf("cost") .xset(String.format(". + %d", amount.points())) ).log(); }
Source:
public boolean checkout() throws IOException { toBeDeleted.clear(); if (headCommitTree != null) preScanTwoTrees(); else prescanOneTree(); if (!conflicts.isEmpty()) { if (failOnConflict) { dc.unlock(); throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()])); } else cleanUpConflicts(); } builder.finish(); File file=null; String last = ""; for (int i = removed.size(); i > 0; i--) { String r = removed.get(i - 1); file = new File(repo.getWorkTree(), r); if (!file.delete()) { if (file.exists()) toBeDeleted.add(r); } else { if (!isSamePrefix(r, last)) removeEmptyParents(file); last = r; } } if (file != null) removeEmptyParents(file); for (String path : updated.keySet()) { file = new File(repo.getWorkTree(), path); file.getParentFile().mkdirs(); file.createNewFile(); DirCacheEntry entry = dc.getEntry(path); checkoutEntry(repo, file, entry, config_filemode()); } if (!builder.commit()) { dc.unlock(); throw new IndexWriteException(); } return toBeDeleted.size() == 0; }

Target:
public boolean checkout() throws IOException { toBeDeleted.clear(); if (headCommitTree != null) preScanTwoTrees(); else prescanOneTree(); if (!conflicts.isEmpty()) { if (failOnConflict) { dc.unlock(); throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()])); } else cleanUpConflicts(); } builder.finish(); File file=null; String last = ""; for (int i = removed.size() - 1; i >= 0; i--) { String r = removed.get(i); file = new File(repo.getWorkTree(), r); if (!file.delete() && file.exists()) toBeDeleted.add(r); else { if (!isSamePrefix(r, last)) removeEmptyParents(file); last = r; } } if (file != null) removeEmptyParents(file); for (String path : updated.keySet()) { file = new File(repo.getWorkTree(), path); file.getParentFile().mkdirs(); file.createNewFile(); DirCacheEntry entry = dc.getEntry(path); checkoutEntry(repo, file, entry, config_filemode()); } if (!builder.commit()) { dc.unlock(); throw new IndexWriteException(); } return toBeDeleted.size() == 0; }
Source:
public static String toCallString(final int copyNumberState) { return String.valueOf(copyNumberState); }

Target:
private static String toCallString(final int copyNumberState) { return String.valueOf(copyNumberState); }
Source:
private synchronized void completePendingPullRequest(final int requestId, final K key, final V value, final long elapsedTimeInServer, final int numReceivedBytes) { if (isPullRequestStillPending(key, requestId)) { final PullRequest pullRequest = pendingPullRequests.remove(key); final boolean wasItWaiting = pullRequest.completePendingOps(value, elapsedTimeInServer, numReceivedBytes); if (wasItWaiting || pendingPullRequests.size() == maxPendingPullsPerThread - 1) { this.notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pullRequest for key: {0}, requestIdCounter: {1}", new Object[]{key, requestId}); } }

Target:
private synchronized void completePendingPullRequest(final int requestId, final K key, final V value, final long elapsedTimeInServer, final int numReceivedBytes) { if (isPullRequestStillPending(key, requestId)) { final PullRequest pullRequest = pendingPullRequests.remove(key); final boolean waitingPushExists = pullRequest.completePendingOps(value, elapsedTimeInServer, numReceivedBytes); if (waitingPushExists || pendingPullRequests.size() == maxPendingPullsPerThread - 1) { this.notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pullRequest for key: {0}, requestId: {1}", new Object[]{key, requestId}); } }
Source:
private Map<String, Float> executeDescriptionSearch(BranchContext context, TermFilter termFilter) { final SnomedDescriptionSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchDescription() .all() .filterByActive(true) .filterByTerm(termFilter) .setFields(SnomedDescriptionIndexEntry.Fields.ID, SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) .sortBy(SCORE); if (containsKey(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET)) { requestBuilder.filterByLanguageRefSets(getCollection(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET, String.class)); } applyIdFilter(requestBuilder, (rb, ids) -> rb.filterByConceptId(ids)); if (containsKey(OptionKey.DESCRIPTION_TYPE)) { final String type = getString(OptionKey.DESCRIPTION_TYPE); requestBuilder.filterByType(type); } if (containsKey(OptionKey.DESCRIPTION_SEMANTIC_TAG)) { final Collection<String> semanticTags = getCollection(OptionKey.DESCRIPTION_SEMANTIC_TAG, String.class); requestBuilder.filterBySemanticTags(semanticTags); } if (containsKey(OptionKey.PARSED_TERM)) { requestBuilder.withParsedTerm(); } final Collection<SnomedDescription> items = requestBuilder .build() .execute(context) .getItems(); final Map<String, Float> conceptMap = newHashMap(); for (SnomedDescription description : items) { if (!conceptMap.containsKey(description.getConceptId())) { conceptMap.put(description.getConceptId(), description.getScore()); } } return conceptMap; }

Target:
private Map<String, Float> executeDescriptionSearch(BranchContext context, TermFilter termFilter) { final SnomedDescriptionSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchDescription() .all() .filterByActive(true) .filterByTerm(termFilter) .setFields(SnomedDescriptionIndexEntry.Fields.ID, SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) .sortBy(SCORE); if (containsKey(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET)) { requestBuilder.filterByLanguageRefSets(getCollection(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET, String.class)); } applyIdFilter(requestBuilder, (rb, ids) -> rb.filterByConceptId(ids)); if (containsKey(OptionKey.DESCRIPTION_TYPE)) { final String type = getString(OptionKey.DESCRIPTION_TYPE); requestBuilder.filterByType(type); } if (containsKey(OptionKey.DESCRIPTION_SEMANTIC_TAG)) { final Collection<String> semanticTags = getCollection(OptionKey.DESCRIPTION_SEMANTIC_TAG, String.class); requestBuilder.filterBySemanticTags(semanticTags); } final Collection<SnomedDescription> items = requestBuilder .build() .execute(context) .getItems(); final Map<String, Float> conceptMap = newHashMap(); for (SnomedDescription description : items) { if (!conceptMap.containsKey(description.getConceptId())) { conceptMap.put(description.getConceptId(), description.getScore()); } } return conceptMap; }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((actionType == null) ? 0 : actionType.hashCode()); result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode()); result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + (isVisible ? 1231 : 1237); result = prime * result + ((jobSubjectEntities == null) ? 0 : jobSubjectEntities.hashCode()); result = prime * result + ((lastUpdateTime == null) ? 0 : lastUpdateTime.hashCode()); result = prime * result + ((ownerId == null) ? 0 : ownerId.hashCode()); result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((steps == null) ? 0 : steps.hashCode()); result = prime * result + (external ? 1231 : 1237); result = prime * result + (autoCleared ? 1231 : 1237); return result; }

Target:
public int hashCode() { int result = Objects.hashCode(id); return result; }
Source:
public Set<Locator> getLocators(RollupExecutionContext executionContext) { Set<Locator> locators = new HashSet<Locator>(); try { locators.addAll(IOContainer.fromConfig().getLocatorIO().getLocators(getShard())); locatorsPerShard.update(locators.size()); } catch (Throwable e) { executionContext.markUnsuccessful(e); log.error("Failed reading locators for slot: " + getParentSlot(), e); } return locators; }

Target:
public Set<Locator> getLocators(RollupExecutionContext executionContext) { Set<Locator> locators = new HashSet<Locator>(); try { locators.addAll(IOContainer.fromConfig().getLocatorIO().getLocators(getShard())); locatorsPerShard.update(locators.size()); } catch (Throwable e) { log.error("Failed reading locators for slot: " + getParentSlot(), e); executionContext.markUnsuccessful(e); } return locators; }
Source:
public void shouldExplorePetStoreYamlWithExamples() throws NullPointerException, IOException, SwaggerException { String test = "/PetStoreYamlExamples/"; String defnName = "defn.yaml"; this.nano.addHandler( new DefnServerHandler(test, defnName, "PetStore_defn_with_examples.yaml")); Requestor requestor = new Requestor(HttpSender.MANUAL_REQUEST_INITIATOR); HttpMessage defnMsg = this.getHttpMessage(test + defnName); SwaggerConverter converter = new SwaggerConverter( requestor.getResponseBody(defnMsg.getRequestHeader().getURI()), null); assertThat(converter.getErrorMessages(), is(empty())); final Map<String, String> accessedUrls = new HashMap<String, String>(); RequesterListener listener = new RequesterListener() { @Override public void handleMessage(HttpMessage message, int initiator) { accessedUrls.put( message.getRequestHeader().getMethod() + " " + message.getRequestHeader().getURI().toString(), message.getRequestBody().toString()); } }; requestor.addListener(listener); requestor.run(converter.getRequestModels()); System.out.println(accessedUrls.keySet()); assertTrue( "Should use OpenAPI Example Values in URL Path when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/store/order/42424242")); assertTrue( "Should use OpenAPI Example Values in URL Query when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/user/login?username=kermit&password=thefrog")); }

Target:
public void shouldExplorePetStoreYamlWithExamples() throws NullPointerException, IOException, SwaggerException { String test = "/PetStoreYamlExamples/"; String defnName = "defn.yaml"; this.nano.addHandler( new DefnServerHandler(test, defnName, "PetStore_defn_with_examples.yaml")); Requestor requestor = new Requestor(HttpSender.MANUAL_REQUEST_INITIATOR); HttpMessage defnMsg = this.getHttpMessage(test + defnName); SwaggerConverter converter = new SwaggerConverter( requestor.getResponseBody(defnMsg.getRequestHeader().getURI()), null); assertThat(converter.getErrorMessages(), is(empty())); final Map<String, String> accessedUrls = new HashMap<String, String>(); RequesterListener listener = new RequesterListener() { @Override public void handleMessage(HttpMessage message, int initiator) { accessedUrls.put( message.getRequestHeader().getMethod() + " " + message.getRequestHeader().getURI().toString(), message.getRequestBody().toString()); } }; requestor.addListener(listener); requestor.run(converter.getRequestModels()); assertTrue( "Should use OpenAPI Example Values in URL Path when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/store/order/42424242")); assertTrue( "Should use OpenAPI Example Values in URL Query when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/user/login?username=kermit&password=thefrog")); }
Source:
public Boolean getIgnorePrefix() { return !Boolean.FALSE.equals(ignorePrefix); }

Target:
public Boolean getIgnorePrefix() { return ignorePrefix(); }
Source:
public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<R>> fetchResultOperation, Supplier<Mono<T>> activationOperation, Function<Poller<T, R>, Mono<T>> cancelOperation) { Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); Objects.requireNonNull(fetchResultOperation, "'fetchResultOperation' cannot be null."); if (pollInterval.compareTo(Duration.ZERO) <= 0) { throw logger.logExceptionAsWarning(new IllegalArgumentException( "Negative or zero value for 'pollInterval' is not allowed.")); } this.pollInterval = pollInterval; this.fetchResultOperation = fetchResultOperation; this.pollOperation = Objects.requireNonNull(pollOperation, "'pollOperation' cannot be null."); final Mono<T> onActivation = activationOperation == null ? Mono.empty() : activationOperation.get().map(response -> { this.pollResponse = new PollResponse<>(OperationStatus.NOT_STARTED, response); return response; }); this.fluxHandle = asyncPollRequestWithDelay() .flux() .repeat() .takeUntil(pollResponse -> isComplete()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }

Target:
public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<R>> fetchResultOperation, Supplier<Mono<T>> activationOperation, Function<Poller<T, R>, Mono<T>> cancelOperation) { Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); Objects.requireNonNull(fetchResultOperation, "'fetchResultOperation' cannot be null."); if (pollInterval.compareTo(Duration.ZERO) <= 0) { throw logger.logExceptionAsWarning(new IllegalArgumentException( "Negative or zero value for 'pollInterval' is not allowed.")); } this.pollInterval = pollInterval; this.fetchResultOperation = fetchResultOperation; this.pollOperation = Objects.requireNonNull(pollOperation, "'pollOperation' cannot be null."); final Mono<T> onActivation = activationOperation == null ? Mono.empty() : activationOperation.get().doOnError(ex -> this.pollResponse = new PollResponse<>(FAILED, null)) .onErrorStop() .map(response -> { this.pollResponse = new PollResponse<>(OperationStatus.NOT_STARTED, response); return response; }); this.fluxHandle = asyncPollRequestWithDelay() .flux() .repeat() .takeUntil(pollResponse -> isComplete()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }
Source:
private String query(String request, Proxy proxy) throws QueryFailedException, HttpError { try { URL url = new URL(getUrlPrefix() + mHost + ":" + mPort + request); Log.d(Constants.TAG, "hkp keyserver query: " + url + " Proxy: " + proxy); OkHttpClient client = getClient(url, proxy); Response response = client.newCall(new Request.Builder().url(url).build()).execute(); String responseBody = response.body().string(); if (response.isSuccessful()) { return responseBody; } else { throw new HttpError(response.code(), responseBody); } } catch (IOException e) { e.printStackTrace(); throw new QueryFailedException("Keyserver '" + mHost + "' is unavailable. Check your Internet connection!" + proxy == null?"":" Using proxy " + proxy); } }

Target:
private String query(String request, Proxy proxy) throws QueryFailedException, HttpError { try { URL url = new URL(getUrlPrefix() + mHost + ":" + mPort + request); Log.d(Constants.TAG, "hkp keyserver query: " + url + " Proxy: " + proxy); OkHttpClient client = getClient(url, proxy); Response response = client.newCall(new Request.Builder().url(url).build()).execute(); String responseBody = response.body().string(); if (response.isSuccessful()) { return responseBody; } else { throw new HttpError(response.code(), responseBody); } } catch (IOException e) { Log.e(Constants.TAG, "IOException at HkpKeyserver", e); throw new QueryFailedException("Keyserver '" + mHost + "' is unavailable. Check your Internet connection!" + proxy == null?"":" Using proxy " + proxy); } }
Source:
private Map<String, FeedbackSessionResultsBundle> getFeedbackResultBundles( CourseRoster roster) throws EntityDoesNotExistException { Map<String, FeedbackSessionResultsBundle> feedbackResultBundles = new LinkedHashMap<String, FeedbackSessionResultsBundle>(); List<FeedbackSessionAttributes> fsList = logic .getFeedbackSessionsForCourse(courseId); Collections .sort(fsList, FeedbackSessionAttributes.compareByEndTimeDesc); for (FeedbackSessionAttributes fs : fsList) { if (!fs.isPublished()) continue; FeedbackSessionResultsBundle bundle = logic.getFeedbackSessionResultsForStudent( fs.feedbackSessionName, courseId, studentEmail, roster); if (bundle != null) { removeQuestionsAndResponsesWithoutFeedbackResponseComment(bundle); if (bundle.questions.size() != 0) { feedbackResultBundles.put(fs.feedbackSessionName, bundle); } } } return feedbackResultBundles; }

Target:
private Map<String, FeedbackSessionResultsBundle> getFeedbackResultBundles(CourseRoster roster) throws EntityDoesNotExistException { Map<String, FeedbackSessionResultsBundle> feedbackResultBundles = new LinkedHashMap<String, FeedbackSessionResultsBundle>(); List<FeedbackSessionAttributes> fsList = logic.getFeedbackSessionsForCourse(courseId); Collections.sort(fsList, SessionAttributes.DESCENDING_ORDER); for(FeedbackSessionAttributes fs : fsList){ if(!fs.isPublished()) continue; FeedbackSessionResultsBundle bundle = logic.getFeedbackSessionResultsForStudent(fs.feedbackSessionName, courseId, studentEmail, roster); if(bundle != null){ removeQuestionsAndResponsesWithoutFeedbackResponseComment(bundle); if(bundle.questions.size() != 0){ feedbackResultBundles.put(fs.feedbackSessionName, bundle); } } } return feedbackResultBundles; }
Source:
public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() { List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>(); preferences.getColumns().forEach(column -> { switch (column.getType()) { case GROUPS: columns.add(createGroupColumn(column)); break; case FILES: columns.add(createFilesColumn(column)); break; case LINKED_IDENTIFIER: columns.add(createIdentifierColumn(column)); break; case EXTRAFILE: if (!column.getQualifier().equals("")) { columns.add(createExtraFileColumn(column)); } break; case SPECIALFIELD: if (!column.getQualifier().equals("")) { Field field = FieldFactory.parseField(column.getQualifier()); if (field instanceof SpecialField) { columns.add(createSpecialFieldColumn(column)); } else { LOGGER.warn(Localization.lang("Special field type %0 is unknown. Using normal column type.", column.getQualifier())); columns.add(createFieldColumn(column)); } } break; default: case NORMALFIELD: if (!column.getQualifier().equals("")) { columns.add(createFieldColumn(column)); } break; } }); return columns; }

Target:
public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() { List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>(); preferences.getColumns().forEach(column -> { switch (column.getType()) { case GROUPS: columns.add(createGroupColumn(column)); break; case FILES: columns.add(createFilesColumn(column)); break; case LINKED_IDENTIFIER: columns.add(createIdentifierColumn(column)); break; case EXTRAFILE: if (!column.getQualifier().isBlank()) { columns.add(createExtraFileColumn(column)); } break; case SPECIALFIELD: if (!column.getQualifier().isBlank()) { Field field = FieldFactory.parseField(column.getQualifier()); if (field instanceof SpecialField) { columns.add(createSpecialFieldColumn(column)); } else { LOGGER.warn(Localization.lang("Special field type %0 is unknown. Using normal column type.", column.getQualifier())); columns.add(createFieldColumn(column)); } } break; default: case NORMALFIELD: if (!column.getQualifier().isBlank()) { columns.add(createFieldColumn(column)); } break; } }); return columns; }
Source:
public synchronized boolean isLastMQNotifLongAgo() { long delay = 18 * 3600; long threshold = sharedPreferences.getLong(getCurrentModeName() + LAST_MORNING_Q_TIMESTAMP, - delay) + delay; if (threshold < Calendar.getInstance().getTimeInMillis()) { Logger.d(TAG, "{} - Last MQ notif was yesterday", getCurrentModeName()); return true; } else { Logger.d(TAG, "{} - Last MQ notif was recent, do not notify", getCurrentModeName()); return false; } }

Target:
public synchronized boolean isLastMQNotifLongAgo() { long delay = 18 * 3600; long threshold = sharedPreferences.getLong(getCurrentModeName() + LAST_MORNING_Q_TIMESTAMP, - delay) + delay; if (threshold < Calendar.getInstance().getTimeInMillis()) { Logger.v(TAG, "{} - Last MQ notif was yesterday", getCurrentModeName()); return true; } else { Logger.v(TAG, "{} - Last MQ notif was recent, do not notify", getCurrentModeName()); return false; } }
Source:
private Class<?> getResponseType(MessageType messageType, Byte b) { Map<Byte, Class<?>> mapping = reverseResponseMappings.get(messageType); if (mapping == null) { throw new AssertionError("WAT, no mapping for " + messageType); } Class<?> responseType = mapping.get(b); if (responseType == null) { throw new AssertionError("WAT, no mapping for method " + b + " for messageType " + messageType); } return responseType; }

Target:
private Class<?> getResponseType(MessageType messageType, Byte b) { Map<Byte, Class<?>> mapping = reverseResponseMappings.get(messageType); if (mapping == null) { throw new AssertionError("No mapping for " + messageType); } Class<?> responseType = mapping.get(b); if (responseType == null) { throw new AssertionError("No mapping for method " + b + " for messageType " + messageType); } return responseType; }
Source:
public static void fillComposite(final Node root) { Control[] parentChildren = fproperties.getChildren(); for(int i = 0; i < parentChildren.length; i++) { parentChildren[i].dispose(); } createAnotherTable = true; fillCompositeWithRoot(root); currentTable[0] = null; sc.setContent(fproperties); sc.setExpandHorizontal(true); sc.setExpandVertical(true); sc.setMinSize(fproperties.computeSize(SWT.DEFAULT, SWT.DEFAULT)); }

Target:
private static void fillComposite(final Node root) { Control[] parentChildren = fproperties.getChildren(); for (int i = 0; i < parentChildren.length; i++) { parentChildren[i].dispose(); } createAnotherTable = true; fillCompositeWithRoot(root); currentTable[0] = null; sc.setContent(fproperties); sc.setExpandHorizontal(true); sc.setExpandVertical(true); sc.setMinSize(fproperties.computeSize(SWT.DEFAULT, SWT.DEFAULT)); }