auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testVariableLocalDir() throws Exception { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(VariableLocalConfig.class); StandardConfig config = ctx.getBean(StandardConfig.class); assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue(); List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList()); assertThat(sfCalls).containsExactly(1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1); File f1 = new File(tmpDir + File.separator + "foo" + File.separator + "f1"); assertThat(f1.exists()).isTrue(); File f2 = new File(tmpDir + File.separator + "baz" + File.separator + "f2"); assertThat(f2.exists()).isTrue(); File f3 = new File(tmpDir + File.separator + "fiz" + File.separator + "f3"); assertThat(f3.exists()).isTrue(); assertThat(f1.delete()).isTrue(); assertThat(f2.delete()).isTrue(); assertThat(f3.delete()).isTrue(); assertThat(f1.getParentFile().delete()).isTrue(); assertThat(f2.getParentFile().delete()).isTrue(); assertThat(f3.getParentFile().delete()).isTrue(); <START> assertThat(ctx.getBean("files", QueueChannel.class).getQueueSize()).isEqualTo(3); <END> ctx.close(); }</code><technical_language>test fails for regular basis: org.junit.ComparisonFailure: Expected :3 Actual :4 <Click difference> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) org.springframework.integration.ftp.inbound.RotatingServersTests.testVariableLocalDir(RotatingServersTests.java:144)</technical_language>

Target:
public void testVariableLocalDir() throws Exception { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(VariableLocalConfig.class); StandardConfig config = ctx.getBean(StandardConfig.class); assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue(); List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList()); assertThat(sfCalls).containsExactly(1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1); File f1 = new File(tmpDir + File.separator + "variable" + File.separator + "foo" + File.separator + "f1"); assertThat(f1.exists()).isTrue(); File f2 = new File(tmpDir + File.separator + "variable" + File.separator + "baz" + File.separator + "f2"); assertThat(f2.exists()).isTrue(); File f3 = new File(tmpDir + File.separator + "variable" + File.separator + "fiz" + File.separator + "f3"); assertThat(f3.exists()).isTrue(); assertThat(f1.delete()).isTrue(); assertThat(f2.delete()).isTrue(); assertThat(f3.delete()).isTrue(); assertThat(f1.getParentFile().delete()).isTrue(); assertThat(f2.getParentFile().delete()).isTrue(); assertThat(f3.getParentFile().delete()).isTrue(); assertThat(ctx.getBean("files", QueueChannel.class).getQueueSize()).isEqualTo(3); ctx.close(); }
Source:
<code>public void setup(OperatorContext context) { super.setup(context); intializeDSLContext(); if (scanService == null) { <START> scanService = Executors.newScheduledThreadPool(partitionCount); <END> } spinMillis = context.getValue(Context.OperatorContext.SPIN_MILLIS); execute = true; cause = new AtomicReference<Throwable>(); emitQueue = new LinkedBlockingDeque<>(queueCapacity); operatorId = context.getId(); windowManager.setup(context); }</code><technical_language>This means, if number of partitions set more one, a threadpool multiple threads created. I need a single thread</technical_language>

Target:
public void setup(OperatorContext context) { super.setup(context); intializeDSLContext(); if (scanService == null) { scanService = Executors.newScheduledThreadPool(1); } execute = true; emitQueue = new LinkedBlockingDeque<>(queueCapacity); operatorId = context.getId(); windowManager.setup(context); }
Source:
<code>private RawText getRawText(ObjectId id, Repository repo) throws IOException { <START> if (id.equals(ObjectId.zeroId())) return new RawText(new byte[] {}); <END> return new RawText(repo.openBlob(id).getCachedBytes()); }</code><technical_language>Style-nit: curly brackets wrap return next line</technical_language>

Target:
private RawText getRawText(ObjectId id, Repository repo) throws IOException { if (id.equals(ObjectId.zeroId())) { return new RawText(new byte[] {}); } return new RawText(repo.openBlob(id).getCachedBytes()); }
Source:
<code>public synchronized void save() throws IOException, FormValidation { if (! isIdOrFullnameAllowed(id)) { throw FormValidation.error(Messages.User_IllegalUsername(id)); } if (! isIdOrFullnameAllowed(fullName)) { throw FormValidation.error(Messages.User_IllegalFullname(fullName)); } if(BulkChange.contains(this)) return; synchronized (saving) { saving.add(this); } try { <START> getConfigFile().write(this); <END> } finally { synchronized (saving) { saving.remove(this); } } SaveableListener.fireOnChange(this, getConfigFile()); }</code><technical_language>move save/replacer logic a shared Impl class + Interface default methods? a common use-case for Jenkins reused in other model objects. in external class help, especially when/if starts working pluggable storage stories in core</technical_language>

Target:
public synchronized void save() throws IOException, FormValidation { if (! isIdOrFullnameAllowed(id)) { throw FormValidation.error(Messages.User_IllegalUsername(id)); } if (! isIdOrFullnameAllowed(fullName)) { throw FormValidation.error(Messages.User_IllegalFullname(fullName)); } if(BulkChange.contains(this)) return; getConfigFile().write(this); SaveableListener.fireOnChange(this, getConfigFile()); }
Source:
<code>public JmsConfiguration create() { final JmsConfiguration configuration = new JmsConfiguration(); <START> if (this.messageListener == null) { <END> configuration.setJmsTemplate(this.jmsTemplate()); } configuration.setRedeliveryPolicy(this.redeliveryPolicy()); if (this.messageListener != null) { configuration.setMessageListenerContainer(this.messageListenerContainer()); } return configuration; }</code><technical_language>Remove this if statement</technical_language>

Target:
public JmsConfiguration create() { final JmsConfiguration configuration = new JmsConfiguration(); configuration.setJmsTemplate(this.jmsTemplate()); configuration.setRedeliveryPolicy(this.redeliveryPolicy()); if (this.messageListener != null) { configuration.setMessageListenerContainer(this.messageListenerContainer()); } return configuration; }
Source:
<code>public Boolean isMavenInstalled() { <START> String oldProjectPath = projectPath; <END> projectPath = System.getProperty("user.home"); MavenResult res = excuteCommand("-version"); projectPath = oldProjectPath; if (res.isSuccess() && res.getOutput().contains("Apache Maven")) { return true; } else if (res.getOutput().contains("M2_HOME is set to an invalid directory")) { throw new IllegalStateException("M2_HOME variable is incorrect"); } return false; }</code><technical_language>This method check if maven-executable is present in ${karaf.data} (in correct version)</technical_language>

Target:
public Boolean isMavenInstalled() { if (new File(System.getProperty("karaf.data") + "/apache-maven-" + readMvnVersionFromPropFile()).exists()) { return true; } return false; }
Source:
<code>private List<Constraint> flowFromLearnedConstraints(ExplodedGraph.Node currentNode) { List<Constraint> learnedConstraints = currentNode.getLearnedConstraints().stream() .filter(lc -> lc.getSv().equals(symbolicValue)) .map(ExplodedGraph.Node.LearnedConstraint::getConstraint) .collect(Collectors.toList()); final ExplodedGraph.Node parent = currentNode.parent(); learnedConstraints.stream() .filter(addToFlow.and(Objects::nonNull)) .forEach(lc -> { flow.add(location(parent, learnedConstraintMessage(lc, currentNode, parent))); if (parent.programPoint.syntaxTree().is(Tree.Kind.METHOD_INVOCATION)) { List<MethodYield> usedMethodYields = currentNode.usedMethodYields(parent); <START> if (!usedMethodYields.isEmpty()) { <END> flow.addAll(flowFromMethodInvocation(usedMethodYields, parent)); } } }); return learnedConstraints; }</code><technical_language>I tend this check required if flowFromMethodInvocation return empty list</technical_language>

Target:
private List<Constraint> flowFromLearnedConstraints(ExplodedGraph.Node currentNode) { List<Constraint> learnedConstraints = currentNode.getLearnedConstraints().stream() .filter(lc -> lc.getSv().equals(symbolicValue)) .map(ExplodedGraph.Node.LearnedConstraint::getConstraint) .collect(Collectors.toList()); final ExplodedGraph.Node parent = currentNode.parent(); learnedConstraints.stream() .filter(addToFlow.and(Objects::nonNull)) .forEach(lc -> { flow.add(location(parent, learnedConstraintMessage(lc, currentNode, parent))); if (parent.programPoint.syntaxTree().is(Tree.Kind.METHOD_INVOCATION)) { MethodYield selectedMethodYields = currentNode.selectedMethodYield(parent); if (selectedMethodYields != null) { flow.addAll(flowFromMethodInvocation(selectedMethodYields, parent)); } } }); return learnedConstraints; }
Source:
<code>private void updateRepo(ObjectId tagId) throws TeamException { String refName = Constants.R_TAGS + tag.getTag(); try { RefUpdate tagRef = repo.updateRef(refName); tagRef.setNewObjectId(tagId); tagRef.setForceUpdate(shouldMoveTag); Result updateResult = tagRef.update(); <START> if (updateResult != Result.NEW && updateResult != Result.FORCED) { <END> throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure, tag.getTag(), updateResult)); } } catch (IOException e) { throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure, tag.getTag(), e.getMessage()), e); } }</code><technical_language>unrelated change</technical_language>

Target:
private void updateRepo(ObjectId tagId) throws TeamException { String refName = Constants.R_TAGS + tag.getTag(); try { RefUpdate tagRef = repo.updateRef(refName); tagRef.setNewObjectId(tagId); tagRef.setForceUpdate(shouldMoveTag); Result updateResult = tagRef.update(); if (updateResult != Result.NEW && updateResult != Result.FORCED) throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure, tag.getTag(), updateResult)); } catch (IOException e) { throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure, tag.getTag(), e.getMessage()), e); } }
Source:
<code>private ExtendSANStorageDomainParameters createParameters(Guid storageDomainId, List<LogicalUnit> newLuns, boolean force) { ExtendSANStorageDomainParameters params = new ExtendSANStorageDomainParameters(); params.setStorageDomainId(storageDomainId); Set<String> lunIds = <START> newLuns.stream().map(LogicalUnit::getId).collect(toCollection(HashSet::new)); <END> params.setLunIds(lunIds); params.setForce(force); return params; }</code><technical_language>Collectors.toSet()</technical_language>

Target:
private ExtendSANStorageDomainParameters createParameters(Guid storageDomainId, List<LogicalUnit> newLuns, boolean force) { ExtendSANStorageDomainParameters params = new ExtendSANStorageDomainParameters(); params.setStorageDomainId(storageDomainId); Set<String> lunIds = newLuns.stream().map(LogicalUnit::getId).collect(Collectors.toSet()); params.setLunIds(lunIds); params.setForce(force); return params; }
Source:
<code>public Set<AuthenticationHandler> resolve(final Set<AuthenticationHandler> candidateHandlers, final AuthenticationTransaction transaction) { final Set<Credential> supportedCreds = supported(transaction.getCredentials()); return candidateHandlers.stream().filter(h -> supportedCreds.stream().anyMatch(c -> h.supports(c))) <START> .collect(Collectors.toSet()); <END> }</code><technical_language>if matters, safe side, collect a set preserve order</technical_language>

Target:
public Set<AuthenticationHandler> resolve(final Set<AuthenticationHandler> candidateHandlers, final AuthenticationTransaction transaction) { final Set<Credential> supportedCreds = supported(transaction.getCredentials()); return candidateHandlers.stream().filter(h -> supportedCreds.stream().anyMatch(c -> h.supports(c))) .collect(Collectors.toCollection(LinkedHashSet::new)); }
Source:
<code>private void extractZipEntriesFromZipFile(Predicate<String> filter, Processor<ExtractedFile, Boolean> extractedFileConsumer, ZipFile zipFile) throws Exception { Enumeration<? extends ZipEntry> entries = zipFile.entries(); int numberOfFiles = 0; while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); numberOfFiles++; if (!entry.isDirectory() && filter.test(entry.getName())) { Amount progress = Amount.of(numberOfFiles).divideBy(Amount.of(zipFile.size())); boolean shouldContinue = extractedFileConsumer.apply(new ExtractedZipFile(entry, () -> { try { return zipFile.getInputStream(entry); } catch (IOException e) { <START> throw Exceptions.createHandled() <END> .error(e) .withSystemErrorMessage("Failed to unzip file from an archive: %s (%s)") .handle(); } }, progress)); if (!shouldContinue) { return; } } } }</code><technical_language>remove this error handling here? (as presumes createHandled)</technical_language>

Target:
private void extractZipEntriesFromZipFile(Predicate<String> filter, Processor<ExtractedFile, Boolean> extractedFileConsumer, ZipFile zipFile) throws Exception { Enumeration<? extends ZipEntry> entries = zipFile.entries(); int numberOfFiles = 0; while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); numberOfFiles++; if (!entry.isDirectory() && filter.test(entry.getName())) { Amount progress = Amount.of(numberOfFiles).divideBy(Amount.of(zipFile.size())); boolean shouldContinue = extractedFileConsumer.apply(new ExtractedZipFile(entry, () -> zipFile.getInputStream( entry), progress)); if (!shouldContinue) { return; } } } }
Source:
<code>public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setupWindow(); <START> View v = inflater.inflate(R.layout.panel_speed_popup_dialog_fragment, container, false); <END> try { float selectedPlaybackSpeed = NORMAL_PLAYBACK_SPEED; if (getArguments() != null) { selectedPlaybackSpeed = getArguments().getFloat(PLAYBACK_SPEED, NORMAL_PLAYBACK_SPEED); } SpeedAdapter adapter = new SpeedAdapter(getContext(), environment, selectedPlaybackSpeed) { @Override public void onItemClicked(Float speed) { if (callback != null) { callback.onItemClicked(speed); } dismiss(); } }; adapter.setItems(speeds); ListView list = (ListView) v.findViewById(R.id.speed_list); list.setAdapter(adapter); list.setOnItemClickListener(adapter); TextView tvCancel = (TextView) v.findViewById(R.id.tv_cancel); tvCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (callback != null) { callback.onCancelClicked(); } } }); } catch (Exception e) { e.printStackTrace(); } return v; }</code><technical_language>v renamed view follow adequate variable names</technical_language>

Target:
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setupWindow(); View view = inflater.inflate(R.layout.panel_speed_popup_dialog_fragment, container, false); float selectedPlaybackSpeed = VideoPlaybackSpeed.NORMAL.getSpeedValue(); if (getArguments() != null) { selectedPlaybackSpeed = getArguments().getFloat(PLAYBACK_SPEED, VideoPlaybackSpeed.NORMAL.getSpeedValue()); } SpeedAdapter adapter = new SpeedAdapter(getContext(), environment, selectedPlaybackSpeed) { @Override public void onItemClicked(Float speed) { if (callback != null) { callback.onItemClicked(speed); } dismiss(); } }; adapter.setItems(speeds); ListView list = (ListView) view.findViewById(R.id.speed_list); list.setAdapter(adapter); list.setOnItemClickListener(adapter); TextView tvCancel = (TextView) view.findViewById(R.id.tv_cancel); tvCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (callback != null) { callback.onCancelClicked(); } } }); return view; }
Source:
<code>public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { EditedStyleItem item = (value instanceof EditedStyleItem) ? (EditedStyleItem) value : null; final Component returnedComponent = myDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (item != null && item.getSourceStyle().equals(((AttributesTableModel) table.getModel()).getSelectedStyle())) { returnedComponent.setFont(table.getFont().deriveFont(Font.BOLD)); } else { returnedComponent.setFont(table.getFont()); } <START> if (item != null && !item.isPublicAttribute()) { returnedComponent.setForeground(JBColor.GRAY); } else { returnedComponent.setForeground(table.getForeground()); } <END> if (!(returnedComponent instanceof JComponent)) { return returnedComponent; } final JComponent jComponent = (JComponent)returnedComponent; Point mousePos = table.getMousePosition(); if (mousePos != null && item != null) { if (table.getCellRect(row, column, true).contains(mousePos)) { final ItemResourceValue resValue = ((EditedStyleItem)value).getItemResourceValue(); Configuration configuration = item.getSourceStyle().getConfiguration(); String toolTipText = ThemeEditorUtils.generateToolTipText(resValue, configuration.getModule(), configuration); jComponent.setToolTipText(toolTipText); } } else { jComponent.setToolTipText(null); } return returnedComponent; }</code><technical_language>returnedComponent.setForeground((item != null && !item.isPublicAttribute()) ? JBColor.GRAY : table.getForeground());</technical_language>

Target:
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { EditedStyleItem item = (value instanceof EditedStyleItem) ? (EditedStyleItem) value : null; final Component returnedComponent = myDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (item != null && item.getSourceStyle().equals(((AttributesTableModel) table.getModel()).getSelectedStyle())) { returnedComponent.setFont(table.getFont().deriveFont(Font.BOLD)); } else { returnedComponent.setFont(table.getFont()); } returnedComponent.setForeground((item != null && !item.isPublicAttribute()) ? JBColor.GRAY : table.getForeground()); if (!(returnedComponent instanceof JComponent)) { return returnedComponent; } final JComponent jComponent = (JComponent)returnedComponent; Point mousePos = table.getMousePosition(); if (mousePos != null && item != null) { if (table.getCellRect(row, column, true).contains(mousePos)) { final ItemResourceValue resValue = ((EditedStyleItem)value).getItemResourceValue(); Configuration configuration = item.getSourceStyle().getConfiguration(); String toolTipText = ThemeEditorUtils.generateToolTipText(resValue, configuration.getModule(), configuration); jComponent.setToolTipText(toolTipText); } } else { jComponent.setToolTipText(null); } return returnedComponent; }
Source:
<code>public ResponseEntity<?> updateTestEnvironment(@CookieValue(TestEnvUtils.SESSION_COOKIE) String sessionId, @PathVariable String envId, @RequestBody TestEnvironmentEntity testEnv, HttpServletResponse response) { if (!testEnvService.exists(envId)) throw ResourceNotFoundException.getTestEnvResourceNfe(); if (!testEnvService.existsWithSessionId(envId, sessionId)) throw new TestEnvironmentSessionNotFoundException(envId, sessionId); validateTestEnv(testEnv); TestEnvironmentEntity oldEnv = testEnvService.read(envId); testEnv.setEnvironmentId(envId); TestEnvironmentEntity updated = testEnvService.update(testEnv); if (updated.getStatus() == PENDING) { if (oldEnv.getStatus() == RUNNING) <START> jobExecutionService.finishExecution(envId, oldEnv.getRunningTestSuite().getTestSuiteId()); <END> else getTestSuiteNameToExecute(updated).ifPresent(testSuiteName -> setNextConfigToExecuteHeader(response, testSuiteName)); } if (updated.getStatus() == RUNNING) { jobExecutionService.startExecution(envId, testEnv.getRunningTestSuite().getTestSuiteId()); } response.addCookie(getSessionCookie(updated)); return ResponseEntity.accepted().build(); }</code><technical_language>is getTestSuiteNameToExecute in this case</technical_language>

Target:
public ResponseEntity<?> updateTestEnvironment(@CookieValue(TestEnvUtils.SESSION_COOKIE) String sessionId, @PathVariable String envId, @RequestBody TestEnvironmentEntity testEnv, HttpServletResponse response) { if (!testEnvService.exists(envId)) throw ResourceNotFoundException.getTestEnvResourceNfe(); if (!testEnvService.existsWithSessionId(envId, sessionId)) throw new TestEnvironmentSessionNotFoundException(envId, sessionId); validateTestEnv(testEnv); TestEnvironmentEntity oldEnv = testEnvService.read(envId); testEnv.setEnvironmentId(envId); TestEnvironmentEntity updated = testEnvService.update(testEnv); if (updated.getStatus() == PENDING) { getLoadScenarioNameToExecute(updated).ifPresent(loadScenarioName -> setNextConfigToExecuteHeader(response, loadScenarioName)); if (oldEnv.getStatus() == RUNNING) testExecutionService.finishExecution(envId, oldEnv.getRunningLoadScenario().getLoadScenarioId()); } if (oldEnv.getStatus() == PENDING && updated.getStatus() == RUNNING) { testExecutionService.startExecution(envId, testEnv.getRunningLoadScenario().getLoadScenarioId()); } response.addCookie(getSessionCookie(updated)); return ResponseEntity.accepted().build(); }
Source:
<code>protected boolean Validate(ParserSession PS, Schema ParentSchema) { if (_Validated == true) return true; int Errs = PS.getErrorCount(); _ParentSchema = ParentSchema; if (TextUtil.isNullOrEmpty(_Name) == true) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring an "+getWhat()+" without a name."); <START> else <END> { _OriginalName = _Name; LOG.debug(" Validating "+getWhat()+" " + getFullName() + "."); } if (ValidationHelper.isValidIdentifier(_Name) == false) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring "+getWhat()+" '" + getFullName() + "' with a name '"+_Name+"' which is not valid. "+ValidationHelper._ValidIdentifierMessage); if (TextUtil.isNullOrEmpty(_Description) == true) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring "+getWhat()+" '" + getFullName() + "' without a description name."); _BaseClassName = "TILDA__" + _Name.toUpperCase(); _AppDataClassName = _OriginalName+"_Data"; _AppFactoryClassName = _OriginalName+"_Factory"; _AppJsonClassName = _OriginalName+"_Json"; _Validated = Errs == PS.getErrorCount(); return _Validated; }</code><technical_language>Technically, a return, need for else</technical_language>

Target:
protected boolean Validate(ParserSession PS, Schema ParentSchema) { if (_Validated == true) return true; int Errs = PS.getErrorCount(); _ParentSchema = ParentSchema; if (TextUtil.isNullOrEmpty(_Name) == true) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring an "+getWhat()+" without a name."); _OriginalName = _Name; LOG.debug(" Validating "+getWhat()+" " + getFullName() + "."); if (ValidationHelper.isValidIdentifier(_Name) == false) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring "+getWhat()+" '" + getFullName() + "' with a name '"+_Name+"' which is not valid. "+ValidationHelper._ValidIdentifierMessage); if (TextUtil.isNullOrEmpty(_Description) == true) return PS.AddError("Schema '" + _ParentSchema.getFullName() + "' is declaring "+getWhat()+" '" + getFullName() + "' without a description name."); _BaseClassName = "TILDA__" + _Name.toUpperCase(); _AppDataClassName = _OriginalName+"_Data"; _AppFactoryClassName = _OriginalName+"_Factory"; _AppJsonClassName = _OriginalName+"_Json"; _Validated = Errs == PS.getErrorCount(); return _Validated; }
Source:
<code><START> void onNewTrainingCompletionDateClick() { <END> final LocalDate currentDate = mTrainingDate != null ? mTrainingDate : LocalDate.now(); new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() { public void onDateSet(final DatePicker view, final int year, final int month, final int day) { onChangeTrainingDate(new LocalDate(year, month + 1, day)); } }, currentDate.getYear(), currentDate.getMonthOfYear() - 1, currentDate.getDayOfMonth()).show(); }</code><technical_language>This is currently pulling training date, date for new training completion</technical_language>

Target:
void onNewTrainingCompletionDateClick() { final LocalDate currentDate = mNewCompletionDate != null ? mNewCompletionDate : LocalDate.now(); new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() { public void onDateSet(final DatePicker view, final int year, final int month, final int day) { onChangeNewCompletionDate(new LocalDate(year, month + 1, day)); } }, currentDate.getYear(), currentDate.getMonthOfYear() - 1, currentDate.getDayOfMonth()).show(); }
Source:
<code>public abstract T call() throws IOException, AbortedByHookException; <START> public abstract Hook getHookType(); <END> protected Repository getRepository() { return repo; }</code><technical_language>I drop enum this public abstract String getName();</technical_language>

Target:
public abstract T call() throws IOException, AbortedByHookException; public abstract String getHookName(); protected Repository getRepository() { return repo; }
Source:
<code>private Function<Throwable, Throwable> getThrowableFunction(CoreEvent event) { return throwable -> { Throwable cause = getMessagingExceptionCause(throwable); CoreEvent exceptionEvent = event; if (throwable instanceof MessagingException) { exceptionEvent = ((MessagingException) throwable).getEvent(); } return new MessagingException(exceptionEvent, new RetryPolicyExhaustedException(createStaticMessage(UNTIL_SUCCESSFUL_MSG_PREFIX, cause.getMessage()), <START> null, owner), <END> owner); }; }</code><technical_language>this done internally RetryPolicyExhaustedException? other for it</technical_language>

Target:
private Function<Throwable, Throwable> getThrowableFunction(CoreEvent event) { return throwable -> { Throwable cause = getMessagingExceptionCause(throwable); CoreEvent exceptionEvent = event; if (throwable instanceof MessagingException) { exceptionEvent = ((MessagingException) throwable).getEvent(); } return new MessagingException(exceptionEvent, new RetryPolicyExhaustedException(createStaticMessage(UNTIL_SUCCESSFUL_MSG_PREFIX, cause.getMessage()), owner), owner); }; }
Source:
<code>protected abstract Optional<String> updateBlob(@Nonnull B blob, @Nonnull String nextPhysicalId, long size, @Nullable String filename) throws Exception; public void updateContent(B blob, String filename, InputStream data, long contentLength) { String nextPhysicalId = keyGenerator.generateId(); try { getPhysicalSpace().upload(nextPhysicalId, data, contentLength); Optional<String> previousPhysicalId = updateBlob(blob, nextPhysicalId, contentLength, filename); if (previousPhysicalId.isPresent()) { blob.fetchVariants().forEach(BlobVariant::delete); getPhysicalSpace().delete(previousPhysicalId.get()); } <START> blobByPathCache.clear(); <END> } catch (Exception e) { try { getPhysicalSpace().delete(nextPhysicalId); } catch (Exception ex) { Exceptions.ignore(ex); } throw Exceptions.handle() .to(StorageUtils.LOG) .error(e) .withSystemErrorMessage("Layer 2: Cannot update the contents of %s in %s: %s (%s)", blob.getBlobKey(), spaceName) .handle(); } }</code><technical_language>s.a</technical_language>

Target:
protected abstract Optional<String> updateBlob(@Nonnull B blob, @Nonnull String nextPhysicalId, long size, @Nullable String filename) throws Exception; public void updateContent(B blob, String filename, InputStream data, long contentLength) { String nextPhysicalId = keyGenerator.generateId(); try { getPhysicalSpace().upload(nextPhysicalId, data, contentLength); Optional<String> previousPhysicalId = updateBlob(blob, nextPhysicalId, contentLength, filename); if (previousPhysicalId.isPresent()) { blob.fetchVariants().forEach(BlobVariant::delete); getPhysicalSpace().delete(previousPhysicalId.get()); } if (Strings.isFilled(filename)) { blobByPathCache.clear(); } } catch (Exception e) { try { getPhysicalSpace().delete(nextPhysicalId); } catch (Exception ex) { Exceptions.ignore(ex); } throw Exceptions.handle() .to(StorageUtils.LOG) .error(e) .withSystemErrorMessage("Layer 2: Cannot update the contents of %s in %s: %s (%s)", blob.getBlobKey(), spaceName) .handle(); } }
Source:
<code>public void put(Slice key, long timeBucket, Slice value) { BucketedValue bucketedValue = flash.get(key); if (bucketedValue == null) { bucketedValue = new BucketedValue(timeBucket, value); flash.put(key, bucketedValue); sizeInBytes.getAndAdd(key.length + value.length + Longs.BYTES); } else { if (timeBucket >= bucketedValue.getTimeBucket()) { int inc = null == bucketedValue.getValue() ? value.length : value.length - bucketedValue.getValue().length; sizeInBytes.getAndAdd(inc); bucketedValue.setTimeBucket(timeBucket); bucketedValue.setValue(value); } else { <START> LOG.warn("ignoring {}; existing {}", key, value, timeBucket, <END> bucketedValue.getValue(), bucketedValue.getTimeBucket()); } } }</code><technical_language>this raise exception instead of logging if put is applied</technical_language>

Target:
public void put(Slice key, long timeBucket, Slice value) { BucketedValue bucketedValue = flash.get(key); if (bucketedValue == null) { bucketedValue = new BucketedValue(timeBucket, value); flash.put(key, bucketedValue); sizeInBytes.getAndAdd(key.length + value.length + Longs.BYTES); } else { if (timeBucket >= bucketedValue.getTimeBucket()) { int inc = null == bucketedValue.getValue() ? value.length : value.length - bucketedValue.getValue().length; sizeInBytes.getAndAdd(inc); bucketedValue.setTimeBucket(timeBucket); bucketedValue.setValue(value); } else { throw new AssertionError("newer entry exists for " + key); } } }
Source:
<code>public ParameterWorkerMetrics buildParameterWorkerMetrics() { final Pair<Integer, Double> totalPullStat = summarizeAndResetStats(pullStats); final Pair<Integer, Double> totalPushStat = summarizeAndResetStats(pushStats); final Pair<Integer, Double> totalNetworkStat = summarizeAndResetStats(networkStats); final Pair<Integer, Double> totalWaitingStat = summarizeAndResetStats(waitingStats); final Pair<Integer, Double> totalSentBytesStat = summarizeAndResetStats(sentBytesStats); final Pair<Integer, Double> totalReceivedBytesStat = summarizeAndResetStats(receivedBytesStats); final Double receivedBytes = totalReceivedBytesStat.getRight(); final Double sentBytes = totalSentBytesStat.getRight(); return ParameterWorkerMetrics.newBuilder() .setNumThreads(numWorkerThreads) .setTotalPullCount(totalPullStat.getLeft()) .setTotalPullTimeSec(totalPullStat.getRight() / 1e9D) .setTotalPushCount(totalPushStat.getLeft()) .setTotalPushTimeSec(totalPushStat.getRight() / 1e9D) .setTotalNetworkStatCount(totalNetworkStat.getLeft()) .setTotalNetworkTimeSec(totalNetworkStat.getRight() / 1e9D) .setTotalWaitingStatCount(totalWaitingStat.getLeft()) .setTotalSentBytes(totalSentBytesStat.getRight().intValue()) .setTotalSentBytesStatCount(totalSentBytesStat.getLeft()) .setTotalReceivedBytes(totalReceivedBytesStat.getRight().intValue()) .setTotalReceivedBytesStatCount(totalReceivedBytesStat.getLeft()) <START> .setTotalWaitingTimeSec(totalWaitingStat.getRight() / 1e9D) <END> .build(); }</code><technical_language>Please move this line right .setTotalWaitingStatCount(totalWaitingStat.getLeft())</technical_language>

Target:
public ParameterWorkerMetrics buildParameterWorkerMetrics() { final Pair<Integer, Double> totalPullStat = summarizeAndResetStats(pullStats); final Pair<Integer, Double> totalPushStat = summarizeAndResetStats(pushStats); final Pair<Integer, Double> totalNetworkStat = summarizeAndResetStats(networkStats); final Pair<Integer, Double> totalWaitingStat = summarizeAndResetStats(waitingStats); final Pair<Integer, Double> totalSentBytesStat = summarizeAndResetStats(sentBytesStats); final Pair<Integer, Double> totalReceivedBytesStat = summarizeAndResetStats(receivedBytesStats); return ParameterWorkerMetrics.newBuilder() .setNumThreads(numWorkerThreads) .setTotalPullCount(totalPullStat.getLeft()) .setTotalPullTimeSec(totalPullStat.getRight() / 1e9D) .setTotalPushCount(totalPushStat.getLeft()) .setTotalPushTimeSec(totalPushStat.getRight() / 1e9D) .setTotalNetworkStatCount(totalNetworkStat.getLeft()) .setTotalNetworkTimeSec(totalNetworkStat.getRight() / 1e9D) .setTotalWaitingStatCount(totalWaitingStat.getLeft()) .setTotalWaitingTimeSec(totalWaitingStat.getRight() / 1e9D) .setTotalSentBytes(totalSentBytesStat.getRight().intValue()) .setTotalSentBytesStatCount(totalSentBytesStat.getLeft()) .setTotalReceivedBytes(totalReceivedBytesStat.getRight().intValue()) .setTotalReceivedBytesStatCount(totalReceivedBytesStat.getLeft()) .build(); }
Source:
<code>public Statement apply(FrameworkMethod method, Description description, Object target, Statement statement) { if (methodRules.isEmpty() && testRules.isEmpty()) { return statement; } Statement result = statement; for (RuleEntry ruleEntry : getSortedEntries()) { if (ruleEntry instanceof TestRuleEntry) { result = ((TestRuleEntry) ruleEntry).rule.apply(result, description); } else { result = ((MethodRuleEntry) ruleEntry).rule.apply(result, method, target); } <START> } <END> return result; }</code><technical_language>if replaced introducing apply(FrameworkMethod method, Description description, Object target, Statement statement) method in RuleEntry</technical_language>

Target:
public Statement apply(FrameworkMethod method, Description description, Object target, Statement statement) { if (methodRules.isEmpty() && testRules.isEmpty()) { return statement; } Statement result = statement; for (RuleEntry ruleEntry : getSortedEntries()) { if (ruleEntry.type == RuleEntry.TYPE_TEST_RULE) { result = ((TestRule) ruleEntry.rule).apply(result, description); } else { result = ((MethodRule) ruleEntry.rule).apply(result, method, target); } } return result; }
Source:
<code>public static Map<ArtifactMode, Double> scoreOrientationBiasMetricsOverContext(final List<SequencingArtifactMetrics.PreAdapterDetailMetrics> metrics) { Utils.nonNull(metrics, "Input metrics cannot be null"); final Map<ArtifactMode, Double> result = new HashMap<>(); final Map<ArtifactMode, RealMatrix> counts = countOrientationBiasMetricsOverContext(metrics); for (final ArtifactMode artifactMode : counts.keySet()) { final RealMatrix count = counts.get(artifactMode); final double totalBases = count.getEntry(PRO, REF) + count.getEntry(PRO, ALT) + count.getEntry(CON, REF) + count.getEntry(CON, ALT); final double rawScorePro = count.getEntry(PRO, ALT)/totalBases; final double rawScoreCon = count.getEntry(CON, ALT)/totalBases; final double rawScore = rawScorePro - rawScoreCon; <START> final double score = -10 * Math.log10(Math.max(rawScore, Math.pow(10, -10))); <END> result.put(artifactMode, score); } return result; }</code><technical_language>Math.pow(10, -10) is a magic constant</technical_language>

Target:
public static Map<Transition, Double> scoreOrientationBiasMetricsOverContext(final List<SequencingArtifactMetrics.PreAdapterDetailMetrics> metrics) { Utils.nonNull(metrics, "Input metrics cannot be null"); final Map<Transition, Double> result = new HashMap<>(); final Map<Transition, RealMatrix> counts = countOrientationBiasMetricsOverContext(metrics); for (final Transition transition : counts.keySet()) { final RealMatrix count = counts.get(transition); final double totalBases = count.getEntry(PRO, REF) + count.getEntry(PRO, ALT) + count.getEntry(CON, REF) + count.getEntry(CON, ALT); final double rawFractionPro = count.getEntry(PRO, ALT)/totalBases; final double rawFractionCon = count.getEntry(CON, ALT)/totalBases; final double baseScore = rawFractionPro - rawFractionCon; final double score = QualityUtils.phredScaleErrorRate(Math.max(baseScore, MAX_BASE_SCORE)); result.put(transition, score); } return result; }
Source:
<code>public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException { final Type elementType = persister.getElementType(); final List<Object> sn = (List<Object>) getSnapshot(); if ( sn.size() != bag.size() ) { return false; } final Map<Integer, List<Object>> hashToInstancesBag = groupByEqualityHash( bag, elementType ); <START> final Map<Integer, List<Object>> HashToInstancesSn = groupByEqualityHash( sn, elementType ); <END> if ( hashToInstancesBag.size() != HashToInstancesSn.size() ) { return false; } for ( Map.Entry<Integer, List<Object>> hashToInstancesBagEntry : hashToInstancesBag.entrySet() ) { final int hash = hashToInstancesBagEntry.getKey(); final List<Object> instancesBag = hashToInstancesBagEntry.getValue(); final List<Object> instancesSn = HashToInstancesSn.getOrDefault( hash, Collections.emptyList() ); if ( instancesBag.size() != instancesSn.size() ) { return false; } for ( Object instance : instancesBag ) { if ( countOccurrences( instance, instancesBag, elementType ) != countOccurrences( instance, instancesSn, elementType ) ) { return false; } } } return true; }</code><technical_language>Minor - hashToInstancesSn HashToInstancesSn</technical_language>

Target:
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException { final Type elementType = persister.getElementType(); final List<Object> sn = (List<Object>) getSnapshot(); if ( sn.size() != bag.size() ) { return false; } final Map<Integer, List<Object>> hashToInstancesBag = groupByEqualityHash( bag, elementType ); final Map<Integer, List<Object>> hashToInstancesSn = groupByEqualityHash( sn, elementType ); if ( hashToInstancesBag.size() != hashToInstancesSn.size() ) { return false; } for ( Map.Entry<Integer, List<Object>> hashToInstancesBagEntry : hashToInstancesBag.entrySet() ) { final Integer hash = hashToInstancesBagEntry.getKey(); final List<Object> instancesBag = hashToInstancesBagEntry.getValue(); final List<Object> instancesSn = hashToInstancesSn.get( hash ); if ( instancesSn == null || ( instancesBag.size() != instancesSn.size() ) ) { return false; } } for ( Map.Entry<Integer, List<Object>> hashToInstancesBagEntry : hashToInstancesBag.entrySet() ) { final Integer hash = hashToInstancesBagEntry.getKey(); final List<Object> instancesBag = hashToInstancesBagEntry.getValue(); final List<Object> instancesSn = hashToInstancesSn.get( hash ); for ( Object instance : instancesBag ) { if ( !expectOccurrences( instance, instancesBag, elementType, countOccurrences( instance, instancesSn, elementType ) ) ) { return false; } } } return true; }
Source:
<code>protected void addCookieRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.addCookieRequestHeader(HttpState, " + "HttpConnection)"); Header[] cookieheaders = getRequestHeaderGroup().getHeaders(HttpHeader.COOKIE); for (int i = 0; i < cookieheaders.length; i++) { Header cookieheader = cookieheaders[i]; if (cookieheader.isAutogenerated()) { getRequestHeaderGroup().removeHeader(cookieheader); } } CookieSpec matcher = getCookieSpec(state); String host = this.params.getVirtualHost(); if (host == null) { host = conn.getHost(); } Cookie[] cookies = matcher.match(host, conn.getPort(), getPath(), conn.isSecure(), state.getCookies()); if ((cookies != null) && (cookies.length > 0)) { if (getParams().isParameterTrue(HttpMethodParams.SINGLE_COOKIE_HEADER)) { <START> putAllCookiesInASingleHeader(host, matcher, cookies); <END> } else { for (int i = 0; i < cookies.length; i++) { String s = matcher.formatCookie(cookies[i]); getRequestHeaderGroup().addHeader(new Header(HttpHeader.COOKIE, s, true)); } } if (matcher instanceof CookieVersionSupport) { CookieVersionSupport versupport = (CookieVersionSupport) matcher; int ver = versupport.getVersion(); boolean needVersionHeader = false; for (int i = 0; i < cookies.length; i++) { if (ver != cookies[i].getVersion()) { needVersionHeader = true; } } if (needVersionHeader) { getRequestHeaderGroup().addHeader(versupport.getVersionHeader()); } } } }</code><technical_language>Consider spaces (instead of tabs) for indentation, format rest of file</technical_language>

Target:
protected void addCookieRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.addCookieRequestHeader(HttpState, " + "HttpConnection)"); Header[] cookieheaders = getRequestHeaderGroup().getHeaders("Cookie"); for (int i = 0; i < cookieheaders.length; i++) { Header cookieheader = cookieheaders[i]; if (cookieheader.isAutogenerated()) { getRequestHeaderGroup().removeHeader(cookieheader); } } CookieSpec matcher = getCookieSpec(state); String host = this.params.getVirtualHost(); if (host == null) { host = conn.getHost(); } Cookie[] cookies = matcher.match(host, conn.getPort(), getPath(), conn.isSecure(), state.getCookies()); if ((cookies != null) && (cookies.length > 0)) { if (getParams().isParameterTrue(HttpMethodParams.SINGLE_COOKIE_HEADER)) { putAllCookiesInASingleHeader(host, matcher, cookies); } else { for (int i = 0; i < cookies.length; i++) { String s = matcher.formatCookie(cookies[i]); getRequestHeaderGroup().addHeader(new Header(HttpHeader.COOKIE, s, true)); } } if (matcher instanceof CookieVersionSupport) { CookieVersionSupport versupport = (CookieVersionSupport) matcher; int ver = versupport.getVersion(); boolean needVersionHeader = false; for (int i = 0; i < cookies.length; i++) { if (ver != cookies[i].getVersion()) { needVersionHeader = true; } } if (needVersionHeader) { getRequestHeaderGroup().addHeader(versupport.getVersionHeader()); } } } }
Source:
<code>private WaitForDownloadService.ThenPerform.Action<Void> executeUpdateNotification(DownloadBatchStatus downloadBatchStatus) { return () -> { NotificationInformation notificationInformation = notificationCreator.createNotification(downloadBatchStatus); DownloadBatchStatus.Status status = downloadBatchStatus.status(); if (downloadBatchStatus.notificationSeen()) { Log.v("DownloadBatchStatus:", downloadBatchStatus.getDownloadBatchId(), "notification has already been seen."); return null; } downloadService.dismissStackedNotification(notificationInformation); if (status == DOWNLOADED) { notificationSeenPersistence.updateNotificationSeenAsync(downloadBatchStatus.getDownloadBatchId(), NOTIFICATION_SEEN); } <START> if (notificationInformation.notificationStackState() == STACK_NOTIFICATION_DISMISSIBLE) { <END> downloadService.stackNotification(notificationInformation); } else if (notificationInformation.notificationStackState() == STACK_NOTIFICATION_NOT_DISMISSIBLE) { downloadService.stackNotificationNotDismissible(notificationInformation); } else { downloadService.updateNotification(notificationInformation); } return null; }; }</code><technical_language>this is enum now, switch here</technical_language>

Target:
private WaitForDownloadService.ThenPerform.Action<Void> executeUpdateNotification(DownloadBatchStatus downloadBatchStatus) { return () -> { NotificationInformation notificationInformation = notificationCreator.createNotification(downloadBatchStatus); DownloadBatchStatus.Status status = downloadBatchStatus.status(); if (downloadBatchStatus.notificationSeen()) { Log.v("DownloadBatchStatus:", downloadBatchStatus.getDownloadBatchId(), "notification has already been seen."); return null; } downloadService.dismissStackedNotification(notificationInformation); if (status == DOWNLOADED) { notificationSeenPersistence.updateNotificationSeenAsync(downloadBatchStatus.getDownloadBatchId(), NOTIFICATION_SEEN); } switch (notificationInformation.notificationStackState()) { case SINGLE_PERSISTENT_NOTIFICATION: downloadService.updateNotification(notificationInformation); break; case STACK_NOTIFICATION_NOT_DISMISSIBLE: downloadService.stackNotificationNotDismissible(notificationInformation); break; case STACK_NOTIFICATION_DISMISSIBLE: downloadService.stackNotification(notificationInformation); break; default: String message = String.format( "%s: %s is not supported.", NotificationCustomizer.NotificationStackState.class.getSimpleName(), notificationInformation.notificationStackState() ); throw new IllegalArgumentException(message); } return null; }; }
Source:
<code>public void deleteGroup(Group group) { <START> GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.ID.eq(Math.toIntExact(group.getId()))); <END> r.delete(); }</code><technical_language>Do want switch this jooq pattern ClientDAO</technical_language>

Target:
public void deleteGroup(Group group) { dslContext.delete(GROUPS).where(GROUPS.ID.eq(Math.toIntExact(group.getId()))).execute(); }
Source:
<code>private void setComposite(Composite parent) throws IOException { container = new Composite(parent, SWT.NONE); Label lblSelectPattern = new Label(container, SWT.NONE); lblSelectPattern.setBounds(10, 20, 76, 15); lblSelectPattern.setText("Select Pattern"); combo = new Combo(container, SWT.READ_ONLY); combo.setBounds(88, 17, 199, 23); addPatternToCombo(combo); combo.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event event) { setPageComplete(getComboSelect()); canvas = new Canvas(container , SWT.NONE); canvas.setBounds(240, 130, 200, 160); ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.sirius.editor.diagram", comboSelection.getImagePath()); Image img = new Image(container.getDisplay(), image.getImageData()); canvas.setBackgroundImage(img); lblParagra = new Label(container, SWT.NONE); lblParagra.setBounds(10, 132, 206, 158); lblParagra.setText(comboSelection.getDescription()); ((InitializerConfigureClassDiagramPatternPage) getNextPage()).setSelectedPattern(getComboSelection()); <START> getContainer().updateButtons(); <END> } }); lblDescription = new Label(container, SWT.NONE); lblDescription.setBounds(10, 90, 76, 15); lblDescription.setText("Description:"); }</code><technical_language>note: cast leverage a ClassCastException (no instanceof check) try change next page (each pattern configuration page) if this is possible, require a configuration page create control method delegates construction pattern provider (instead of this provider returning page)</technical_language>

Target:
private void setComposite(Composite parent) throws IOException { container = new Composite(parent, SWT.NONE); Label lblSelectPattern = new Label(container, SWT.NONE); lblSelectPattern.setBounds(10, 20, 76, 15); lblSelectPattern.setText("Select Pattern"); combo = new Combo(container, SWT.READ_ONLY); combo.setBounds(88, 17, 199, 23); addPatternToCombo(combo); combo.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event event) { setPageComplete(getComboSelect()); canvas = new Canvas(container, SWT.NONE); canvas.setBounds(240, 130, 200, 160); ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.sirius.editor.diagram", comboSelection.getImagePath()); Image img = new Image(container.getDisplay(), image.getImageData()); canvas.setBackgroundImage(img); lblParagra = new Label(container, SWT.NONE); lblParagra.setBounds(10, 132, 206, 158); lblParagra.setText(comboSelection.getDescription()); ((ClassDiagramPatternConfigurationPage) getNextPage()).setSelectedPattern(getComboSelection()); getContainer().updateButtons(); } }); lblDescription = new Label(container, SWT.NONE); lblDescription.setBounds(10, 90, 76, 15); lblDescription.setText("Description:"); canFlipToNextPage(); }
Source:
<code>public void enableDefault() { if (getDefaultApi() == null) { return; } List<? extends CloudTestingType> appSupportedDomain = getAppSupportedDomain(); if (appSupportedDomain.contains(defaultApi)) { enable(defaultApi); } else if <START> (appSupportedDomain.size() > 0) { <END> enable(appSupportedDomain.get(0)); } }</code><technical_language>!isEmpty CL</technical_language>

Target:
public void enableDefault() { if (getDefaultApi() == null) { return; } List<? extends CloudTestingType> appSupportedDomain = getAppSupportedDomain(); if (appSupportedDomain.contains(defaultApi)) { enable(defaultApi); } else if (!appSupportedDomain.isEmpty()) { enable(appSupportedDomain.get(0)); } }