auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean processFile(String requestExtractFileName) { boolean processingSuccess = true; Object parsedFile; try { parsedFile = loadFile(requestExtractFileName); processingSuccess = requestExtractHeaderRowValidatesToFileContents(parsedFile); } catch (RuntimeException re) { LOG.error("Caught exception trying to load: " + requestExtractFileName, re); processingSuccess = false; } return processingSuccess; }

Target:
public boolean processFile(String requestExtractFileName) { boolean processingSuccess = true; Object parsedFile = loadFile(requestExtractFileName); List<ConcurRequestExtractFile> requestExtractFiles = (ArrayList<ConcurRequestExtractFile>) parsedFile; processingSuccess = getConcurRequestExtractFileValidationService().requestExtractHeaderRowValidatesToFileContents(requestExtractFiles); return processingSuccess; }
Source:
public void testInitiateConnection(long sid) throws Exception { LOG.debug("Opening channel to server " + sid); Socket sock = new Socket(); setSockOpts(sock); InetSocketAddress address; try { address = self.getVotingView().get(sid).electionAddr.getValidAddress(); } catch (NoRouteToHostException e) { address = self.getVotingView().get(sid).electionAddr.getOne(); } sock.connect(address, cnxTO); initiateConnection(sock, sid); }

Target:
public void testInitiateConnection(long sid) throws Exception { LOG.debug("Opening channel to server " + sid); Socket sock = new Socket(); setSockOpts(sock); InetSocketAddress address = self.getVotingView().get(sid).electionAddr.getReachableOrOne(); sock.connect(address, cnxTO); initiateConnection(sock, sid); }
Source:
public void testSetNewLogFileConfiguration() throws Exception { LogFileConfiguration config = new LogFileConfiguration(tempDirPath); final FileLogger fileLogger = Database.log.getFile(); fileLogger.setConfig(config); fileLogger.setConfig(null); fileLogger.setConfig(null); fileLogger.setConfig(config); fileLogger.setConfig(new LogFileConfiguration(tempDirPath + "/foo")); }

Target:
public void testSetNewLogFileConfiguration() throws Exception { LogFileConfiguration config = new LogFileConfiguration(tempDirPath); final FileLogger fileLogger = Database.log.getFile(); fileLogger.setConfig(config); assertEquals(fileLogger.getConfig(), config); fileLogger.setConfig(config); assertEquals(fileLogger.getConfig(), config); fileLogger.setConfig(null); assertNull(fileLogger.getConfig()); fileLogger.setConfig(null); assertNull(fileLogger.getConfig()); fileLogger.setConfig(config); assertEquals(fileLogger.getConfig(), config); fileLogger.setConfig(new LogFileConfiguration(tempDirPath + "/foo")); assertEquals(fileLogger.getConfig(), new LogFileConfiguration(tempDirPath + "/foo")); }
Source:
private MemoryImageBuilder createMemoryImageBuilder() { boolean archSupportSnapshot = isSnapshotSupportedByArchitecture(getVm().getClusterArch(), getVm().getVdsGroupCompatibilityVersion()); if (!FeatureSupported.memorySnapshot(getVm().getVdsGroupCompatibilityVersion()) || archSupportSnapshot) { return new NullableMemoryImageBuilder(); } if (getParameters().getSnapshotType() == SnapshotType.STATELESS) { return new StatelessSnapshotMemoryImageBuilder(getVm()); } if (getParameters().isSaveMemory() && isLiveSnapshotApplicable()) { return new LiveSnapshotMemoryImageBuilder(getVm(), getStorageDomainIdForVmMemory(), getStoragePool(), this); } return new NullableMemoryImageBuilder(); }

Target:
private MemoryImageBuilder createMemoryImageBuilder() { if (!isMemorySnapshotSupported()) { return new NullableMemoryImageBuilder(); } if (getParameters().getSnapshotType() == SnapshotType.STATELESS) { return new StatelessSnapshotMemoryImageBuilder(getVm()); } if (getParameters().isSaveMemory() && isLiveSnapshotApplicable()) { return new LiveSnapshotMemoryImageBuilder(getVm(), getStorageDomainIdForVmMemory(), getStoragePool(), this); } return new NullableMemoryImageBuilder(); }
Source:
private String columnsFromMetadata(String tableName) { List<String> columnNames = jdbc.query("select * from " + tableName + " where 1 = 0", columnNamesExtractor); return join(columnNames.toArray(), ","); }

Target:
private String columnsFromMetadata(String tableName) { List<String> columnNames = jdbc.query("select * from " + tableName + " where 1 = 0", columnNamesExtractor); return join(columnNames, ","); }
Source:
public void aboutToBeShown() { this.controller.onNewLabel(new IConsumer<String>() { @Override public void apply(String value) { EEFGroupLifecycleManager.this.section.setText(value); } }); this.controller.onValidation(new IConsumer<List<IValidationRuleResult>>() { @Override public void apply(List<IValidationRuleResult> validationRuleResults) { IMessageManager messageManager = page.getForm().getMessageManager(); for (IValidationRuleResult validationRuleResult : validationRuleResults) { if (validationRuleResult instanceof IInvalidValidationRuleResult) { IInvalidValidationRuleResult result = (IInvalidValidationRuleResult) validationRuleResult; messageManager.addMessage(result.getValidationRule(), result.getMessage(), result.getData(), result.getSeverity(), section); } else { messageManager.removeMessage(validationRuleResult.getValidationRule(), section); } } } }); for (ILifecycleManager lifecycleManager : lifecycleManagers) { lifecycleManager.aboutToBeShown(); } }

Target:
public void aboutToBeShown() { super.aboutToBeShown(); this.controller.onNewLabel(new IConsumer<String>() { @Override public void apply(String value) { EEFGroupLifecycleManager.this.section.setText(value); } }); for (ILifecycleManager lifecycleManager : lifecycleManagers) { lifecycleManager.aboutToBeShown(); } }
Source:
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { if (hostnameVerificationEnabled && shouldVerifyClientHostname) { performHostVerification(socket.getInetAddress(), chain[0]); } x509ExtendedTrustManager.checkClientTrusted(chain, authType, socket); }

Target:
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { x509ExtendedTrustManager.checkClientTrusted(chain, authType, socket); if (clientHostnameVerificationEnabled) { performHostVerification(socket.getInetAddress(), chain[0]); } }
Source:
public abstract void executeTask() throws MojoExecutionException, MojoFailureException; protected void resolveDocker() { if(dockerHost == null){ boolean isLinux = SystemUtils.IS_OS_LINUX; if(isLinux){ dockerHost = prompt("Please specify your Docker host URL (either 'tcp://' or 'unix://')", DEFAULT_HOST_LINUX); } else { dockerHost = prompt("Please specify you Docker Machine host URL (format is: 'tcp://{docker-machine url}')",""); } } DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder() .withDockerHost(dockerHost) .withApiVersion("1.23") .build(); docker = DockerClientBuilder.getInstance(config).build(); }

Target:
public abstract void executeTask() throws MojoExecutionException, MojoFailureException; protected void resolveDocker() { if(dockerHost == null){ boolean isLinux = SystemUtils.IS_OS_LINUX; if(isLinux){ dockerHost = prompt("Please specify your Docker host URL (either 'tcp://' or 'unix://')", DEFAULT_HOST_LINUX); } else { dockerHost = prompt("Please specify you Docker Machine host URL (format is: 'tcp://{docker-machine url}')",""); } } DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder() .withDockerHost(dockerHost) .withApiVersion("1.18") .build(); docker = DockerClientBuilder.getInstance(config).build(); }
Source:
void checkSetDataInProcessBeforeRemoval(int start, int end) { if (GTK.GTK4 || GTK.GTK_VERSION < OS.VERSION(3, 22, 0)) { return; } for (int i = start; i < end; i++) { TableItem item = items[i]; if (item != null && item.settingData) { String message = "Cannot remove a table item while its data is being set. " + "At item " + i + " in range [" + start + ", " + end + ")."; throw new SWTException(message); } } }

Target:
void checkSetDataInProcessBeforeRemoval(int start, int end) { for (int i = start; i < end; i++) { TableItem item = items[i]; if (item != null && item.settingData) { String message = "Cannot remove a table item while its data is being set. " + "At item " + i + " in range [" + start + ", " + end + ")."; throw new SWTException(message); } } }
Source:
public void testAssign() { classNames = Arrays.asList(OldPartitionAssignor.class.getName(), NewPartitionAssignor.class.getName()); List<ConsumerPartitionAssignor> assignors = getAssignorInstances(classNames, Collections.emptyMap()); ConsumerPartitionAssignor oldAssignor = assignors.get(0); ConsumerPartitionAssignor newAssignor = assignors.get(1); Map<String, Subscription> subscriptions = new HashMap<>(); subscriptions.put("C1", new Subscription(Arrays.asList("topic1"))); subscriptions.put("C2", new Subscription(Arrays.asList("topic1", "topic2"))); subscriptions.put("C3", new Subscription(Arrays.asList("topic2", "topic3"))); GroupSubscription groupSubscription = new GroupSubscription(subscriptions); Map<String, Assignment> oldAssignments = oldAssignor.assign(null, groupSubscription).groupAssignment(); Map<String, Assignment> newAssignments = newAssignor.assign(null, groupSubscription).groupAssignment(); for (Map.Entry<String, Assignment> entry : oldAssignments.entrySet()) { Assignment oldAssignment = entry.getValue(); Assignment newAssignment = newAssignments.get(entry.getKey()); assertEquals(oldAssignment.partitions(), newAssignment.partitions()); assertEquals(oldAssignment.userData(), newAssignment.userData()); } }

Target:
public void testAssign() { ConsumerPartitionAssignor adaptedAssignor = new PartitionAssignorAdapter(new OldPartitionAssignor()); Map<String, Subscription> subscriptions = new HashMap<>(); subscriptions.put("C1", new Subscription(Arrays.asList("topic1"))); subscriptions.put("C2", new Subscription(Arrays.asList("topic1", "topic2"))); subscriptions.put("C3", new Subscription(Arrays.asList("topic2", "topic3"))); GroupSubscription groupSubscription = new GroupSubscription(subscriptions); Map<String, Assignment> assignments = adaptedAssignor.assign(null, groupSubscription).groupAssignment(); assertEquals(assignments.get("C1").partitions(), Arrays.asList(new TopicPartition("topic1", 1))); assertEquals(assignments.get("C2").partitions(), Arrays.asList(new TopicPartition("topic1", 1), new TopicPartition("topic2", 1))); assertEquals(assignments.get("C3").partitions(), Arrays.asList(new TopicPartition("topic2", 1), new TopicPartition("topic3", 1))); }
Source:
public void testFindByStudyIdOrStudyName() { List<VariantSource> variantSourceMongoList = service.findByStudyIdOrStudyName(FIRST_STUDY_ID, FIRST_STUDY_ID); assertEquals(1, variantSourceMongoList.size()); variantSourceMongoList = service.findByStudyIdOrStudyName(SECOND_STUDY_ID, SECOND_STUDY_ID); assertEquals(2, variantSourceMongoList.size()); }

Target:
public void testFindByStudyIdOrStudyName() { List<VariantSource> variantSourceMongoList = service.findByStudyIdOrStudyName(FIRST_STUDY_ID, FIRST_STUDY_ID); assertEquals(1, variantSourceMongoList.size()); assertEquals(FIRST_STUDY_ID, variantSourceMongoList.get(0).getStudyId()); variantSourceMongoList = service.findByStudyIdOrStudyName(SECOND_STUDY_ID, SECOND_STUDY_ID); assertEquals(SECOND_STUDY_ID, variantSourceMongoList.get(0).getStudyId()); assertEquals(2, variantSourceMongoList.size()); }
Source:
private void unknownStateType() { assert false : "Unknown state type"; }

Target:
private AssertionError unknownStateType() { return new AssertionError("Unknown state type"); }
Source:
public static VariantContext liftVariant(final VariantContext source, final Interval target, final ReferenceSequence refSeq, final boolean writeOriginalPosition, final boolean writeOriginalAlleles){ if (target == null) { return null; } final VariantContextBuilder builder; if (target.isNegativeStrand()) { builder = reverseComplementVariantContext(source, target, refSeq); } else { builder = liftSimpleVariantContext(source, target); } if (builder == null) { return null; } builder.filters(source.getFilters()); builder.log10PError(source.getLog10PError()); builder.attributes(source.getAttributes()); builder.rmAttribute(SWAPPED_ALLELES); if (target.isNegativeStrand()) { builder.attribute(REV_COMPED_ALLELES, true); } else { builder.rmAttribute(REV_COMPED_ALLELES); } builder.id(source.getID()); if (writeOriginalPosition) { builder.attribute(LiftoverVcf.ORIGINAL_CONTIG, source.getContig()); builder.attribute(LiftoverVcf.ORIGINAL_START, source.getStart()); } if (writeOriginalAlleles && !source.getAlleles().equals(builder.getAlleles())) { List<String> alleles = new ArrayList<>(); source.getAlleles().forEach(a -> alleles.add(a.getDisplayString())); builder.attribute(LiftoverVcf.ORIGINAL_ALLELES, alleles); } return builder.make(); }

Target:
public static VariantContext liftVariant(final VariantContext source, final Interval target, final ReferenceSequence refSeq, final boolean writeOriginalPosition, final boolean writeOriginalAlleles){ if (target == null) { return null; } final VariantContextBuilder builder; if (target.isNegativeStrand()) { builder = reverseComplementVariantContext(source, target, refSeq); } else { builder = liftSimpleVariantContext(source, target); } if (builder == null) { return null; } builder.filters(source.getFilters()); builder.log10PError(source.getLog10PError()); builder.attributes(source.getAttributes()); builder.rmAttribute(SWAPPED_ALLELES); if (target.isNegativeStrand()) { builder.attribute(REV_COMPED_ALLELES, true); } else { builder.rmAttribute(REV_COMPED_ALLELES); } builder.id(source.getID()); if (writeOriginalPosition) { builder.attribute(LiftoverVcf.ORIGINAL_CONTIG, source.getContig()); builder.attribute(LiftoverVcf.ORIGINAL_START, source.getStart()); } if (writeOriginalAlleles && !source.getAlleles().equals(builder.getAlleles())) { builder.attribute(LiftoverVcf.ORIGINAL_ALLELES, allelesToStringList(source.getAlleles())); } return builder.make(); }
Source:
void makeRenderingCommands() { for (GridColumn<?> column : model.getColumns()) { if (bodyColumns.contains(column) || floatingColumns.contains(column)) { if (column instanceof HasMultipleDOMElementResources) { ((HasMultipleDOMElementResources) column).initialiseResources(); } } else if (column instanceof HasDOMElementResources) { ((HasDOMElementResources) column).destroyResources(); } } if (this.bodyColumns.size() > 0) { drawHeader(renderingInformation); if (model.getRowCount() > 0) { drawBody(renderingInformation); } } final int minVisibleRowIndex = renderingInformation.getMinVisibleRowIndex(); final int maxVisibleRowIndex = renderingInformation.getMaxVisibleRowIndex(); final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation(); final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation(); if (bodySelections != null) { addCommandToRenderQueue(bodySelections, renderSelectedRanges(bodyColumns, bodyBlockInformation.getX(), minVisibleRowIndex, maxVisibleRowIndex, bodyTransformer, renderingInformation)); } if (floatingBodySelections != null) { addCommandToRenderQueue(floatingBodySelections, renderSelectedRanges(floatingColumns, floatingBlockInformation.getX(), minVisibleRowIndex, maxVisibleRowIndex, floatingColumnsTransformer, renderingInformation)); } addCommandToRenderQueue(this, renderGridBoundary(renderingInformation)); if (isSelected) { assertSelectionWidget(); } }

Target:
private void makeRenderingCommands() { for (GridColumn<?> column : model.getColumns()) { if (bodyColumns.contains(column) || floatingColumns.contains(column)) { if (column instanceof HasMultipleDOMElementResources) { ((HasMultipleDOMElementResources) column).initialiseResources(); } } else if (column instanceof HasDOMElementResources) { ((HasDOMElementResources) column).destroyResources(); } } if (bodyColumns.size() > 0) { boundary = new Group(); drawHeader(renderingInformation); if (model.getRowCount() > 0) { drawBody(renderingInformation); } } final int minVisibleRowIndex = renderingInformation.getMinVisibleRowIndex(); final int maxVisibleRowIndex = renderingInformation.getMaxVisibleRowIndex(); final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation(); final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation(); if (bodySelections != null) { addCommandToRenderQueue(bodySelections, renderSelectedRanges(bodyColumns, bodyBlockInformation.getX(), minVisibleRowIndex, maxVisibleRowIndex, bodyTransformer, renderingInformation)); } if (floatingBodySelections != null) { addCommandToRenderQueue(floatingBodySelections, renderSelectedRanges(floatingColumns, floatingBlockInformation.getX(), minVisibleRowIndex, maxVisibleRowIndex, floatingColumnsTransformer, renderingInformation)); } if (boundary != null) { addCommandToRenderQueue(boundary, renderGridBoundary(renderingInformation)); } if (isSelected) { assertSelectionWidget(); } }
Source:
public RegistrationData findByEmail(Context context, String email) throws SQLException { CriteriaBuilder criteriaBuilder = getCriteriaBuilder(context); CriteriaQuery criteriaQuery = getCriteriaQuery(criteriaBuilder, RegistrationData.class); Root<RegistrationData> registrationDataRoot = criteriaQuery.from(RegistrationData.class); criteriaQuery.select(registrationDataRoot); criteriaQuery.where(criteriaBuilder.equal(registrationDataRoot.get(RegistrationData_.email), email)); return uniqueResult(context, criteriaQuery, true, RegistrationData.class, -1, -1); }

Target:
public RegistrationData findByEmail(Context context, String email) throws SQLException { CriteriaBuilder criteriaBuilder = getCriteriaBuilder(context); CriteriaQuery criteriaQuery = getCriteriaQuery(criteriaBuilder, RegistrationData.class); Root<RegistrationData> registrationDataRoot = criteriaQuery.from(RegistrationData.class); criteriaQuery.select(registrationDataRoot); criteriaQuery.where(criteriaBuilder.equal(registrationDataRoot.get(RegistrationData_.email), email)); return uniqueResult(context, criteriaQuery, false, RegistrationData.class, -1, -1); }
Source:
public List<T> actual() { checkNotNull(actual); return ImmutableList.copyOf(actual); }

Target:
public ImmutableList<T> actual() { checkNotNull(actual); return ImmutableList.copyOf(actual); }
Source:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case SPEECH_REQUEST_CODE: String searchInput = SpeechUtil.processSpeechResults(resultCode, data, this); newListInput.setText(searchInput); break; case IMPORT_FILE_REQUEST_CODE: if (resultCode == RESULT_OK) { String filePath = data.getStringExtra(FilePickerActivity.RESULT_FILE_PATH); if (!filePath.endsWith(".txt")) { UIUtils.showSnackbar(parent, getString(R.string.invalid_file)); } else { Intent intent = new Intent(this, ImportFromTextFileActivity.class); intent.putExtra(ImportFromTextFileActivity.FILE_PATH_KEY, filePath); startActivityForResult(intent, SAVE_IMPORT_REQUEST_CODE); } } break; case SAVE_IMPORT_REQUEST_CODE: if (resultCode == RESULT_OK) { nameListsAdapter.refresh(preferencesManager.getNameLists()); } break; } }

Target:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case SPEECH_REQUEST_CODE: String searchInput = SpeechUtil.processSpeechResult(resultCode, data, this); if (searchInput != null) { newListInput.setText(searchInput); } break; case IMPORT_FILE_REQUEST_CODE: if (resultCode == RESULT_OK) { String filePath = data.getStringExtra(FilePickerActivity.RESULT_FILE_PATH); if (!filePath.endsWith(".txt")) { UIUtils.showSnackbar(parent, getString(R.string.invalid_file)); } else { Intent intent = new Intent(this, ImportFromTextFileActivity.class); intent.putExtra(ImportFromTextFileActivity.FILE_PATH_KEY, filePath); startActivityForResult(intent, SAVE_IMPORT_REQUEST_CODE); } } break; case SAVE_IMPORT_REQUEST_CODE: if (resultCode == RESULT_OK) { nameListsAdapter.refresh(preferencesManager.getNameLists()); } break; } }
Source:
public void pipeline_02_03() throws Exception { Logger.getRootLogger().setLevel(Level.TRACE); final Configuration conf = new HdfsConfiguration(); conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1); final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(4).build(); try { cluster.setLeasePeriod(SOFT_LEASE_LIMIT, HARD_LEASE_LIMIT); cluster.waitActive(); final FileSystem fs = cluster.getFileSystem(); final Path p = new Path(DIR, "file1"); final int half = BLOCK_SIZE / 2; { final FSDataOutputStream out = fs.create(p, true, fs.getConf() .getInt(CommonConfigurationKeys.IO_FILE_BUFFER_SIZE_KEY, 4096), (short) 3, BLOCK_SIZE); write(out, 0, half); ((DFSOutputStream) out.getWrappedStream()).hflush(); } checkFile(p, half, conf); AppendTestUtil.LOG.info("leasechecker.interruptAndJoin()"); ((DistributedFileSystem) fs).dfs.getLeaseRenewer().interruptAndJoin(); { Thread.sleep(2 * SOFT_LEASE_LIMIT); final UserGroupInformation current = UserGroupInformation.getCurrentUser(); final UserGroupInformation ugi = UserGroupInformation .createUserForTesting(current.getShortUserName() + "x", new String[]{"supergroup"}); final DistributedFileSystem dfs = ugi.doAs(new PrivilegedExceptionAction<DistributedFileSystem>() { @Override public DistributedFileSystem run() throws Exception { return (DistributedFileSystem) FileSystem.newInstance(conf); } }); final FSDataOutputStream out = append(dfs, p); write(out, 0, half); out.close(); } checkFile(p, 2 * half, conf); } finally { cluster.shutdown(); } }

Target:
public void pipeline_02_03() throws Exception { final Configuration conf = new HdfsConfiguration(); conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1); final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(4).build(); try { cluster.setLeasePeriod(SOFT_LEASE_LIMIT, HARD_LEASE_LIMIT); cluster.waitActive(); final FileSystem fs = cluster.getFileSystem(); final Path p = new Path(DIR, "file1"); final int half = BLOCK_SIZE / 2; { final FSDataOutputStream out = fs.create(p, true, fs.getConf() .getInt(CommonConfigurationKeys.IO_FILE_BUFFER_SIZE_KEY, 4096), (short) 3, BLOCK_SIZE); write(out, 0, half); ((DFSOutputStream) out.getWrappedStream()).hflush(); } checkFile(p, half, conf); AppendTestUtil.LOG.info("leasechecker.interruptAndJoin()"); ((DistributedFileSystem) fs).dfs.getLeaseRenewer().interruptAndJoin(); { Thread.sleep(2 * SOFT_LEASE_LIMIT); final UserGroupInformation current = UserGroupInformation.getCurrentUser(); final UserGroupInformation ugi = UserGroupInformation .createUserForTesting(current.getShortUserName() + "x", new String[]{"supergroup"}); final DistributedFileSystem dfs = ugi.doAs(new PrivilegedExceptionAction<DistributedFileSystem>() { @Override public DistributedFileSystem run() throws Exception { return (DistributedFileSystem) FileSystem.newInstance(conf); } }); final FSDataOutputStream out = append(dfs, p); write(out, 0, half); out.close(); } checkFile(p, 2 * half, conf); } finally { cluster.shutdown(); } }
Source:
public void testValidateAttachements(){ NetworkAttachment attachement1 = new NetworkAttachment(); attachement1.setNetworkName("network1"); attachement1.setNicName("eth0"); NetworkAttachment attachement2 = new NetworkAttachment(); attachement2.setNetworkName("any2"); attachement2.setNicName("eth1"); List<NetworkAttachment> attachementList = Arrays.asList(attachement1, attachement2); Nic unmgmtNic = new Nic(); unmgmtNic.setName("eth0"); ValidationResult result = validator.validateAttachements(unmgmtNic, attachementList); assertThat(result, failsWith(EngineMessage.ACTION_TYPE_FAILED_HOST_NETWORK_ATTACHEMENT_ON_UNMANAGED_NETWORK, ReplacementUtils.createSetVariableString(NETWORK, "network1"), ReplacementUtils.createSetVariableString(NIC, "eth0"))); unmgmtNic.setName("eth7"); result = validator.validateAttachements(unmgmtNic, attachementList); assertTrue(result.isValid()); }

Target:
public void testValidateAttachements(){ String unmanagedNicName = "eth0"; NetworkAttachment attachement1 = new NetworkAttachment(); attachement1.setNetworkName("network1"); attachement1.setNicName(unmanagedNicName); NetworkAttachment attachement2 = new NetworkAttachment(); attachement2.setNetworkName("any2"); attachement2.setNicName("eth1"); List<NetworkAttachment> attachementList = Arrays.asList(attachement1, attachement2); Nic unmgmtNic = createNicWithNetworkImplementationDetails(unmanagedNicName, false); List<VdsNetworkInterface> existingInterfaces = Arrays.asList(unmgmtNic); Set<String> nicsWithUnmanagedNetworks = validator.filterNicsWithUnmanagedNetworks(existingInterfaces, Collections.emptySet()); assertEquals(1, nicsWithUnmanagedNetworks.size()); String filteredNicName = nicsWithUnmanagedNetworks.iterator().next(); assertEquals(filteredNicName, unmanagedNicName); ValidationResult result = validator.validateAttachements(filteredNicName, attachementList); assertThat(result, failsWith(EngineMessage.ACTION_TYPE_FAILED_HOST_NETWORK_ATTACHEMENT_ON_UNMANAGED_NETWORK, ReplacementUtils.createSetVariableString(NETWORK, "network1"), ReplacementUtils.createSetVariableString(NIC, "eth0"))); result = validator.validateAttachements("eth7", attachementList); assertTrue(result.isValid()); }
Source:
public TypeBinding getCollectionElementType(TypeBinding collectionType) { if (collectionType == null) return null; boolean isTargetJsr14 = this.scope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4; if (collectionType.isCapture()) { TypeBinding upperBound = ((CaptureBinding)collectionType).firstBound; if (upperBound != null && upperBound.isArrayType()) collectionType = upperBound; } if (collectionType.isArrayType()) { return ((ArrayBinding) collectionType).elementsType(); } else if (collectionType instanceof ReferenceBinding) { ReferenceBinding iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaLangIterable, false ); if (iterableType == null && isTargetJsr14) { iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaUtilCollection, false ); } checkIterable: { if (iterableType == null) return null; TypeBinding[] arguments = null; switch (iterableType.kind()) { case Binding.RAW_TYPE : return this.scope.getJavaLangObject(); case Binding.GENERIC_TYPE : arguments = iterableType.typeVariables(); break; case Binding.PARAMETERIZED_TYPE : arguments = ((ParameterizedTypeBinding)iterableType).arguments; break; default: return null; } if (arguments.length != 1) return null; return arguments[0]; } } return null; }

Target:
private TypeBinding getCollectionElementType(TypeBinding collectionType) { if (collectionType == null) return null; boolean isTargetJsr14 = this.scope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4; if (collectionType.isCapture()) { TypeBinding upperBound = ((CaptureBinding)collectionType).firstBound; if (upperBound != null && upperBound.isArrayType()) collectionType = upperBound; } if (collectionType.isArrayType()) { return ((ArrayBinding) collectionType).elementsType(); } else if (collectionType instanceof ReferenceBinding) { ReferenceBinding iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaLangIterable, false ); if (iterableType == null && isTargetJsr14) { iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaUtilCollection, false ); } checkIterable: { if (iterableType == null) return null; TypeBinding[] arguments = null; switch (iterableType.kind()) { case Binding.RAW_TYPE : return this.scope.getJavaLangObject(); case Binding.GENERIC_TYPE : arguments = iterableType.typeVariables(); break; case Binding.PARAMETERIZED_TYPE : arguments = ((ParameterizedTypeBinding)iterableType).arguments; break; default: return null; } if (arguments.length != 1) return null; return arguments[0]; } } return null; }
Source:
public Measurement(String name, double value) { this.name = name; this.value = value; }

Target:
public Measurement(String name, double value) { this(name, value, 3); }
Source:
public boolean checkStatus(T waitObject) { String crn = waitObject.getCrn(); EnvironmentStatus desiredStatus = waitObject.getDesiredStatus(); try { DetailedEnvironmentResponse environment = waitObject.getEndpoint().getByCrn(crn); String name = environment.getName(); EnvironmentStatus status = environment.getEnvironmentStatus(); LOGGER.info("Waiting for the '{}' state of '{}' '{}' environment. Actual state is: '{}'", desiredStatus, name, crn, status); if (environment.getEnvironmentStatus() == DELETE_FAILED) { LOGGER.error("Environment '{}' '{}' termination failed (status:'{}'), waiting is cancelled.", name, crn, status); throw new TestFailException(String.format("Environment '%s' '%s' termination failed. Status: '%s' statusReason: '%s'", name, crn, status, environment.getStatusReason())); } if (!status.equals(ARCHIVED)) { return false; } } catch (Exception e) { if (e instanceof NotFoundException) { LOGGER.warn("No environment found with crn '{}'", crn, e); } else { LOGGER.error("Environment termination failed: {}", e.getMessage(), e); throw new TestFailException(String.format("Environment termination failed: %s", e.getMessage())); } } return true; }

Target:
public boolean checkStatus(T waitObject) { String crn = waitObject.getCrn(); EnvironmentStatus desiredStatus = waitObject.getDesiredStatus(); try { DetailedEnvironmentResponse environment = waitObject.getEndpoint().getByCrn(crn); String name = environment.getName(); EnvironmentStatus status = environment.getEnvironmentStatus(); LOGGER.info("Waiting for the '{}' state of '{}' '{}' environment. Actual state is: '{}'", desiredStatus, name, crn, status); if (environment.getEnvironmentStatus() == DELETE_FAILED) { LOGGER.error("Environment '{}' '{}' termination failed (status:'{}'), waiting is cancelled.", name, crn, status); throw new TestFailException(String.format("Environment '%s' '%s' termination failed. Status: '%s' statusReason: '%s'", name, crn, status, environment.getStatusReason())); } if (!status.equals(ARCHIVED)) { return false; } } catch (NotFoundException e) { LOGGER.warn("No environment found with crn '{}'", crn, e); } catch (Exception e) { LOGGER.error("Environment termination failed: {}", e.getMessage(), e); throw new TestFailException(String.format("Environment termination failed: %s", e.getMessage())); } return true; }
Source:
public boolean onOptionsItemSelected(MenuItem item) { int menuId = item.getItemId(); switch (menuId) { case R.id.about_menu: this.getSupportFragmentManager() .beginTransaction() .replace(R.id.fragment_holder, new About(), FragmentTags.ABOUT) .addToBackStack(FragmentTags.ABOUT) .commit(); return true; case android.R.id.home: this.onBackPressed(); return true; } return super.onOptionsItemSelected(item); }

Target:
public boolean onOptionsItemSelected(MenuItem item) { int menuId = item.getItemId(); switch (menuId) { case R.id.about_menu: fragmentManager .beginTransaction() .replace(R.id.fragment_holder, new About(), FragmentTags.ABOUT) .addToBackStack(FragmentTags.ABOUT) .commit(); return true; } return super.onOptionsItemSelected(item); }
Source:
public int hashCode() { int result = _currentApiVersion != null ? _currentApiVersion.hashCode() : 0; result = 31 * result + (_apiRetryCount != null ? _apiRetryCount.hashCode() : 0); result = 31 * result + (_apiRetryInterval != null ? _apiRetryInterval.hashCode() : 0); return result; }

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_currentApiVersion != null ? _currentApiVersion.hashCode() : 0); result = 31 * result + (_apiRetryCount != null ? _apiRetryCount.hashCode() : 0); result = 31 * result + (_apiRetryInterval != null ? _apiRetryInterval.hashCode() : 0); return result; }
Source:
public void testAnnotatedMethodOk_annotatedJavascriptScriptMethod() throws Exception { webApp.setCrumbIssuer(new CrumbIssuer() { @Override public String issueCrumb(StaplerRequest request) { return "test"; } @Override public void validateCrumb(StaplerRequest request, String submittedCrumb) { } }); WebRequest settings = new WebRequest(new URL(j.getURL(), "testNewRulesOk/annotatedJavascriptScriptMethod/")); settings.setAdditionalHeader("Content-Type", "application/x-stapler-method-invocation"); settings.setHttpMethod(HttpMethod.POST); settings.setRequestBody(JSONArray.fromObject(Collections.emptyList()).toString()); assertReachableWithSettings(settings); }

Target:
public void testAnnotatedMethodOk_annotatedJavascriptScriptMethod() throws Exception { webApp.setCrumbIssuer(new CrumbIssuer() { @Override public String issueCrumb(StaplerRequest request) { return "test"; } @Override public void validateCrumb(StaplerRequest request, String submittedCrumb) { } }); WebRequest settings = new WebRequest(new URL(j.getURL(), "testNewRulesOk/annotatedJavascriptScriptMethod/")); settings.setAdditionalHeader("Content-Type", "application/x-stapler-method-invocation"); settings.setHttpMethod(HttpMethod.POST); settings.setRequestBody("[]"); assertReachableWithSettings(settings); }
Source:
protected QName getQname(String nameSpaceURI, String localPart) { QName xmlQname = null; xmlQname = new QName(nameSpaceURI, localPart); return xmlQname; }

Target:
protected QName getQname(String nameSpaceURI, String localPart) { return (new QName(nameSpaceURI, localPart)); }
Source:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { if (data.getData() == null && Build.VERSION.SDK_INT >= 16){ for( int i = 0; i < data.getClipData().getItemCount(); i++){ Intent intent = new Intent(); intent.setData(data.getClipData().getItemAt(i).getUri()); requestSimpleUpload(intent, resultCode); } }else { requestSimpleUpload(data, resultCode); } } else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { requestMultipleUpload(data, resultCode); } else if (requestCode == ACTION_MOVE_FILES && (resultCode == RESULT_OK || resultCode == MoveActivity.RESULT_OK_AND_MOVE)){ final Intent fData = data; final int fResultCode = resultCode; getHandler().postDelayed( new Runnable() { @Override public void run() { requestMoveOperation(fData, fResultCode); } }, DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS ); } }

Target:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { if (data.getData() == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN){ for( int i = 0; i < data.getClipData().getItemCount(); i++){ Intent intent = new Intent(); intent.setData(data.getClipData().getItemAt(i).getUri()); requestSimpleUpload(intent, resultCode); } }else { requestSimpleUpload(data, resultCode); } } else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { requestMultipleUpload(data, resultCode); } else if (requestCode == ACTION_MOVE_FILES && resultCode == RESULT_OK){ final Intent fData = data; final int fResultCode = resultCode; getHandler().postDelayed( new Runnable() { @Override public void run() { requestMoveOperation(fData, fResultCode); } }, DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS ); } }
Source:
public void testClose() throws IOException { initialize(); List<RequestInfo> requestInfoList = new ArrayList<RequestInfo>(); { networkClient.close(); try { networkClient.sendAndPoll(requestInfoList); requestInfoList.clear(); Assert.fail("Polling after close should throw"); } catch (IllegalStateException e) { } } }

Target:
public void testClose() throws IOException { List<RequestInfo> requestInfoList = new ArrayList<RequestInfo>(); networkClient.close(); try { networkClient.sendAndPoll(requestInfoList); Assert.fail("Polling after close should throw"); } catch (IllegalStateException e) { } }
Source:
private void checkCriticalComponents() { if (this.isEnabled) { boolean failure = false; for (CriticalComponentImpl csi : this.criticalServiceList) { if (csi.isTimedOut()) { failure = true; logger.warn("Critical service failed -> SYSTEM REBOOT", csi.getName()); break; } } if (!failure && !this.watchdogToStop) { refreshWatchdog(); } else { try { performWatchdogActions(); } catch (KuraException e) { logger.error("Failed to perform watchdog actions.", e); } } } else { if (this.configEnabled) { refreshWatchdog(); this.isEnabled = true; } } }

Target:
private void checkCriticalComponents() { if (this.enabled) { boolean failure = false; for (CriticalComponentImpl csi : this.criticalComponentList) { if (csi.isTimedOut()) { failure = true; logger.warn("Critical service failed -> SYSTEM REBOOT", csi.getName()); break; } } if (!failure && !this.watchdogToStop) { refreshWatchdog(); } else { try { performWatchdogActions(); } catch (KuraException e) { logger.error("Failed to perform watchdog actions.", e); } } } else { if (this.configEnabled) { refreshWatchdog(); this.enabled = true; } } }
Source:
public void run() { fetchGamesFromLobby() .ifPresent( lobbyGames -> { final Map<String, LobbyGame> knownGames = localGamesFetcher.get(); findNewGames(knownGames.keySet(), lobbyGames) .forEach( gameListing -> lobbyGameBroadcaster.gameUpdated( gameListing.getGameId(), gameListing.getLobbyGame())); findUpdatedGames(knownGames, lobbyGames) .forEach( gameListing -> lobbyGameBroadcaster.gameUpdated( gameListing.getGameId(), gameListing.getLobbyGame())); findRemovedGames(knownGames.keySet(), lobbyGames) .forEach(lobbyGameBroadcaster::gameRemoved); }); }

Target:
public void run() { fetchGamesFromLobby() .ifPresent( lobbyGames -> { final Map<String, LobbyGame> knownGames = localGamesFetcher.get(); findNewGames(knownGames.keySet(), lobbyGames) .forEach(lobbyGameBroadcaster::gameUpdated); findUpdatedGames(knownGames, lobbyGames) .forEach(lobbyGameBroadcaster::gameUpdated); findRemovedGames(knownGames.keySet(), lobbyGames) .forEach(lobbyGameBroadcaster::gameRemoved); }); }
Source:
static Properties getKMSProperties(String key, int keySize) { Properties properties = new Properties(); properties.setProperty("kms.default.key", key); properties.setProperty("kms.key.size.in.chars", "" + keySize); properties.setProperty("clustermap.cluster.name", "dev"); properties.setProperty("clustermap.datacenter.name", "DC1"); properties.setProperty("clustermap.host.name", "localhost"); return properties; }

Target:
static Properties getKMSProperties(String key, int keySize) { Properties properties = new Properties(); properties.setProperty("kms.default.container.key", key); properties.setProperty("kms.random.key.size.in.bits", Integer.toString(keySize)); properties.setProperty("clustermap.cluster.name", "dev"); properties.setProperty("clustermap.datacenter.name", "DC1"); properties.setProperty("clustermap.host.name", "localhost"); return properties; }
Source:
void checkCanEdit(QGateWithOrgDto qualityGate) { checkNotBuiltInt(qualityGate); userSession.checkPermission(ADMINISTER_QUALITY_GATES, qualityGate.getOrganizationUuid()); }

Target:
void checkCanEdit(QGateWithOrgDto qualityGate) { checkNotBuiltIn(qualityGate); userSession.checkPermission(ADMINISTER_QUALITY_GATES, qualityGate.getOrganizationUuid()); }
Source:
protected void browseButtonClicked() { DirectoryDialogConfiguration directoryDialogConfiguration = new DirectoryDialogConfiguration.Builder() .withInitialDirectory(initialPath).build(); dialogService.showDirectorySelectionDialog(directoryDialogConfiguration).ifPresent(selectedDirectory -> { texDirectory.set(selectedDirectory.toAbsolutePath().toString()); preferencesService.setWorkingDir(selectedDirectory.toAbsolutePath()); }); }

Target:
public void browseButtonClicked() { DirectoryDialogConfiguration directoryDialogConfiguration = new DirectoryDialogConfiguration.Builder() .withInitialDirectory(Paths.get(texDirectory.get())).build(); dialogService.showDirectorySelectionDialog(directoryDialogConfiguration).ifPresent(selectedDirectory -> { texDirectory.set(selectedDirectory.toAbsolutePath().toString()); preferencesService.setWorkingDir(selectedDirectory.toAbsolutePath()); }); }
Source:
public void testWrapUnwrap() { byte[] nullArray = RLP.encodeElement(new byte[] {}); byte[] singleZero = RLP.encodeElement(new byte[] {0}); byte[] singleByte = RLP.encodeElement(new byte[] {1}); byte[] shortItem = RLP.encodeElement(new byte[] {(byte) 0x81}); byte[] longItemData = new byte[57]; new Random().nextBytes(longItemData); byte[] longItem = RLP.encodeElement(longItemData); byte[] shortList = RLP.encodeList(shortItem, shortItem, shortItem); byte[] longList = RLP.encodeList(longItem, longItem, longItem); byte[] encoded = RLP.wrapList(nullArray, singleZero, singleByte, shortItem, longItem, shortList, longList); RLPList decoded = RLP.unwrapList(encoded); assertArrayEquals(nullArray, decoded.get(0).getRLPData()); assertArrayEquals(singleZero, decoded.get(1).getRLPData()); assertArrayEquals(singleByte, decoded.get(2).getRLPData()); assertArrayEquals(shortItem, decoded.get(3).getRLPData()); assertArrayEquals(longItem, decoded.get(4).getRLPData()); assertArrayEquals(shortList, decoded.get(5).getRLPData()); assertArrayEquals(longList, decoded.get(6).getRLPData()); }

Target:
public void testWrapUnwrap() { byte[] shortItemData = new byte[] {(byte) 0x81}; byte[] longItemData = new byte[57]; new Random().nextBytes(longItemData); byte[] nullArray = RLP.encodeElement(new byte[] {}); byte[] singleZero = RLP.encodeElement(new byte[] {0}); byte[] singleByte = RLP.encodeElement(new byte[] {1}); byte[] shortItem = RLP.encodeElement(shortItemData); byte[] longItem = RLP.encodeElement(longItemData); byte[] shortList = RLP.encodeList(shortItem, shortItem, shortItem); byte[] longList = RLP.encodeList(longItem, longItem, longItem); byte[] encoded = RLP.wrapList(nullArray, singleZero, singleByte, shortItem, longItem, shortList, longList, shortItemData, longItemData); RLPList decoded = RLP.unwrapList(encoded); assertArrayEquals(nullArray, decoded.get(0).getRLPData()); assertArrayEquals(singleZero, decoded.get(1).getRLPData()); assertArrayEquals(singleByte, decoded.get(2).getRLPData()); assertArrayEquals(shortItem, decoded.get(3).getRLPData()); assertArrayEquals(longItem, decoded.get(4).getRLPData()); assertArrayEquals(shortList, decoded.get(5).getRLPData()); assertArrayEquals(longList, decoded.get(6).getRLPData()); assertArrayEquals(shortItemData, decoded.get(7).getRLPData()); assertArrayEquals(longItemData, decoded.get(8).getRLPData()); }
Source:
public <T> T getDeserializedObject(Class<T> objectType) { Objects.requireNonNull(objectSerializer, "No serializer set for deserializing event data payload."); if (deserialized != null) { if (objectType.isInstance(deserialized)) { return objectType.cast(deserialized); }; } T typedDeserializedObject = objectSerializer.deserialize(new ByteArrayInputStream(eventData.getBody()), objectType).block(); deserialized = typedDeserializedObject; return typedDeserializedObject; }

Target:
public <T> Mono<T> getDeserializedObject(Class<T> objectType) { if (this.serializer == null) { return monoError(logger, new NullPointerException("No serializer set for deserializing EventData payload.")); } if (objectType == null) { return monoError(logger, new IllegalArgumentException("objectType cannot be null.")); } return serializer.deserialize(new ByteArrayInputStream(eventData.getBody()), objectType); }
Source:
DropDownMenu updateContextMenu(DropDownMenu dropDownMenu, List<ActionButtonDefinition<T>> actions, boolean removeOldItems) { if (removeOldItems) { ElementTooltipUtils.destroyMenuItemTooltips(dropDownMenu); dropDownMenu.clear(); closeOtherPopups(); } for (final ActionButtonDefinition<T> buttonDef : actions) { if (buttonDef instanceof UiMenuBarButtonDefinition) { UiMenuBarButtonDefinition<T> menuBarDef = (UiMenuBarButtonDefinition<T>) buttonDef; DropDownHeader subMenuHeader = new DropDownHeader(buttonDef.getText()); dropDownMenu.add(new Divider()); subMenuHeader.setVisible(buttonDef.isVisible(getSelectedItems())); dropDownMenu.add(subMenuHeader); updateContextMenu(dropDownMenu, menuBarDef.getSubActions(), false); } else { AnchorListItem item = new AnchorListItem(buttonDef.getText()); item.addClickHandler(e -> { buttonDef.onClick(getSelectedItems()); }); updateMenuItem(item, buttonDef); dropDownMenu.add(item); } } return dropDownMenu; }

Target:
private DropDownMenu updateContextMenu(DropDownMenu dropDownMenu, List<ActionButtonDefinition<T>> actions, boolean removeOldItems) { if (removeOldItems) { ElementTooltipUtils.destroyMenuItemTooltips(dropDownMenu); dropDownMenu.clear(); closeOtherPopups(); } for (final ActionButtonDefinition<T> buttonDef : actions) { if (buttonDef instanceof UiMenuBarButtonDefinition) { UiMenuBarButtonDefinition<T> menuBarDef = (UiMenuBarButtonDefinition<T>) buttonDef; DropDownHeader subMenuHeader = new DropDownHeader(buttonDef.getText()); dropDownMenu.add(new Divider()); subMenuHeader.setVisible(buttonDef.isVisible(getSelectedItems())); dropDownMenu.add(subMenuHeader); updateContextMenu(dropDownMenu, menuBarDef.getSubActions(), false); } else { AnchorListItem item = new AnchorListItem(buttonDef.getText()); item.addClickHandler(e -> buttonDef.onClick(getSelectedItems())); updateMenuItem(item, buttonDef); dropDownMenu.add(item); } } return dropDownMenu; }
Source:
public void testParseHeaders1() { HashMap<String, String> map = HttpDigestAuthFilter.parseHeaders(Arrays.asList(new String[]{ "basic toto=tutu", "basic toto=\"tutu\"" })); assertNull(map); }

Target:
public void testParseHeaders1() throws Exception { HttpDigestAuthFilter f = new HttpDigestAuthFilter("foo", "bar"); Method method = HttpDigestAuthFilter.class.getDeclaredMethod("parseAuthHeaders", List.class); method.setAccessible(true); DigestScheme ds = (DigestScheme) method.invoke(f, Arrays.asList(new String[]{ "basic toto=tutu", "basic toto=\"tutu\"" })); Assert.assertNull(ds); }
Source:
public STORAGE_PROPERTY_QUERY() { }

Target:
public STORAGE_PROPERTY_QUERY() { super(); }
Source:
public static SecureRandom getSecureRandomInstance() { try { return SecureRandom.getInstance("SHA1PRNG", "SUN"); } catch (NoSuchAlgorithmException | NoSuchProviderException e) { throw CryptoException.gettingRandomInstance(e); } }

Target:
static SecureRandom getSecureRandomInstance() { try { return SecureRandom.getInstance("SHA1PRNG", "SUN"); } catch (NoSuchAlgorithmException | NoSuchProviderException e) { throw CryptoException.gettingRandomInstance(e); } }
Source:
private boolean isValidateOnly(HttpServletRequest request) { return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM)); }

Target:
protected boolean isValidateOnly(HttpServletRequest request) { return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM)); }
Source:
public Number getLineRoundLimit() { if (paint.get("line-round_limit") != null) { return (Number) paint.get("line-round-limit"); } else { return 1.05; } }

Target:
public Number getLineRoundLimit() { if (paint.get("line-round-limit") != null) { return (Number) paint.get("line-round-limit"); } else { return 1.05; } }
Source:
protected List<Menu> findMatches() { Menu popupMenu = UIThreadRunnable.syncExec(new WidgetResult<Menu>() { @Override public Menu run() { Menu menu = control.getMenu(); if(menu == null) { if(control instanceof NatTable) menu = getNatTableMenu(); } if (menu != null) { menu.notifyListeners(SWT.Show, createEvent(menu)); } return menu; } }); if (popupMenu != null) { return Collections.singletonList(popupMenu); } return Collections.<Menu>emptyList(); }

Target:
protected List<Menu> findMatches() { Menu popupMenu = UIThreadRunnable.syncExec(new WidgetResult<Menu>() { @Override public Menu run() { Menu menu = control.getMenu(); if (menu == null) { if (control instanceof NatTable) { menu = getNatTableMenu(); } } if (menu != null) { menu.notifyListeners(SWT.Show, createEvent(menu)); } return menu; } }); if (popupMenu != null) { return Collections.singletonList(popupMenu); } return Collections.<Menu> emptyList(); }