auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Plan optimize(final Collection<EvaluatorParameters> activeEvaluators, final int availableEvaluators) { if (callsSkipped < callsToSkip) { callsSkipped++; return PlanImpl.newBuilder().build(); } if (callsMade == maxCallsToMake) { return PlanImpl.newBuilder().build(); } final Iterator<EvaluatorParameters> evaluatorIterator = activeEvaluators.iterator(); final EvaluatorParameters evaluatorToDelete = evaluatorIterator.next(); final EvaluatorParameters dstEvaluator = evaluatorIterator.next(); <START> final DataInfo dataInfo = evaluatorToDelete.getDataInfos().iterator().next(); <END> final TransferStep transferStep = new TransferStepImpl( evaluatorToDelete.getId(), dstEvaluator.getId(), new DataInfoImpl(dataInfo.getDataType(), dataInfo.getNumUnits())); callsMade++; return PlanImpl.newBuilder() .addEvaluatorToDelete(evaluatorToDelete.getId()) .addTransferStep(transferStep) .build(); }</code><technical_language>this optimizer assume evaluator delete DataInfo</technical_language>

Target:
public Plan optimize(final Collection<EvaluatorParameters> activeEvaluators, final int availableEvaluators) { if (callsSkipped < callsToSkip) { callsSkipped++; return PlanImpl.newBuilder().build(); } if (callsMade == maxCallsToMake) { return PlanImpl.newBuilder().build(); } final List<EvaluatorParameters> evaluators = new ArrayList<>(activeEvaluators); Collections.sort(evaluators, new Comparator<EvaluatorParameters>() { @Override public int compare(final EvaluatorParameters o1, final EvaluatorParameters o2) { return o1.getId().compareTo(o2.getId()); } }); if (evaluators.size() < 2) { throw new RuntimeException("Cannot delete, because not enough evaluators " + evaluators.size()); } final EvaluatorParameters evaluatorToDelete = evaluators.get(0); final EvaluatorParameters dstEvaluator = evaluators.get(1); final List<TransferStep> transferSteps = new ArrayList<>(); for (final DataInfo dataInfo : evaluatorToDelete.getDataInfos()) { transferSteps.add(new TransferStepImpl( evaluatorToDelete.getId(), dstEvaluator.getId(), new DataInfoImpl(dataInfo.getDataType(), dataInfo.getNumUnits()))); } callsMade++; return PlanImpl.newBuilder() .addEvaluatorToDelete(evaluatorToDelete.getId()) .addTransferSteps(transferSteps) .build(); }
Source:
<code>private void copyStreams(InputStream from, OutputStream to) throws IOException{ try { byte[] buffer = new byte[4096]; int bytes_read; while ((bytes_read = from.read(buffer)) != -1) to.write(buffer, 0, bytes_read); } finally { if (from != null) try { from.close(); } catch (IOException e) { <START> } <END> if (to != null) try { to.close(); } catch (IOException e) { } } }</code><technical_language>Silent failing</technical_language>

Target:
private void copyStreams(InputStream from, OutputStream to) throws IOException{ try { byte[] buffer = new byte[4096]; int bytes_read; while ((bytes_read = from.read(buffer)) != -1) to.write(buffer, 0, bytes_read); } finally { if (from != null) from.close(); if (to != null) to.close(); } }
Source:
<code>public SshPairImpl get(String owner, String service, String name) throws ServerException, NotFoundException { requireNonNull(owner); requireNonNull(service); requireNonNull(name); try { EntityManager manager = managerProvider.get(); SshPairImpl result = <START> manager.find(SshPairImpl.class, new SshPairPrimaryKey(owner, service, name)); <END> if (result == null) { throw new NotFoundException(String.format("Ssh pair with service '%s' and name '%s' was not found.", service, name)); } return result; } catch (RuntimeException e) { throw new ServerException(e.getLocalizedMessage(), e); } }</code><technical_language>inline</technical_language>

Target:
public SshPairImpl get(String owner, String service, String name) throws ServerException, NotFoundException { requireNonNull(owner); requireNonNull(service); requireNonNull(name); try { SshPairImpl result = managerProvider.get().find(SshPairImpl.class, new SshPairPrimaryKey(owner, service, name)); if (result == null) { throw new NotFoundException(String.format("Ssh pair with service '%s' and name '%s' was not found.", service, name)); } return result; } catch (RuntimeException e) { throw new ServerException(e.getLocalizedMessage(), e); } }
Source:
<code><START> protected void run(CancellationTokenSource tokenSource, IProgressMonitor monitor) throws Exception { <END> final SubMonitor progress = SubMonitor.convert(monitor, this.builds.size() + 1); for (GradleBuild build : this.builds) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } synchronizeBuild(build, tokenSource, progress.newChild(1)); } }</code><technical_language>sense some common interface ToolingApiRunnable for this? CorePlugin.run(tapiRunnable), care of a token source for you</technical_language>

Target:
protected void run(CancellationTokenSource tokenSource, IProgressMonitor monitor) throws CoreException { final SubMonitor progress = SubMonitor.convert(monitor, this.builds.size() + 1); for (GradleBuild build : this.builds) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } synchronizeBuild(build, tokenSource, progress.newChild(1)); } }
Source:
<code>public String getBootType() { <START> if (bootType != null && !("bios".equalsIgnoreCase(bootType) || "uefi".equalsIgnoreCase(bootType))) { <END> throw new InvalidParameterValueException("Invalid Boot Type"); } return bootType; }</code><technical_language>I suggest boot type enum</technical_language>

Target:
private ApiConstants.BootType getBootType() { if (StringUtils.isNotBlank(bootType)) { try { String type = bootType.trim().toUpperCase(); return ApiConstants.BootType.valueOf(type); } catch (IllegalArgumentException e) { String errMesg = "Invalid bootType " + bootType + "Specified for vm " + getName() + " Valid values are: " + Arrays.toString(ApiConstants.BootType.values()); s_logger.warn(errMesg); throw new InvalidParameterValueException(errMesg); } } return null; }
Source:
<code>public static IfcfgConfigWriter getInstance() { if (instance == null) { instance = new IfcfgConfigWriter(); <START> } <END> return instance; }</code><technical_language>modifying this method...it synchronized avoid concurrency issues. update end date in copyright header for file change</technical_language>

Target:
public static synchronized IfcfgConfigWriter getInstance() { if (instance == null) { instance = new IfcfgConfigWriter(); } return instance; }
Source:
<code>private static VariantData processInfoValueFields(String value, String key, String separator, VariantData variantData) { String[] terms = value.split(separator); for (String term: terms) { String[] innerTerms = term.split(INFO_FIELD_VALUE_SEPARATOR); <START> String specificKey = key + INFO_FIELD_INNER_SEPARATOR + innerTerms[0]; <END> if (ArrayUtils.contains(VariantData.INFO_RESERVED, innerTerms[0])) { if (innerTerms.length > 1) { processMultiValueField(innerTerms[1], specificKey, ALT_VALUE_SEPARATOR, variantData); } else { processSingleValueField(INFO_FIELD_DEFAULT_VALUE, specificKey, variantData); } } } return variantData; }</code><technical_language>For performance, this moved if</technical_language>

Target:
private static VariantData processInfoValueFields(String value, String key, String separator, VariantData variantData) { String[] terms = value.split(separator); for (String term: terms) { String[] innerTerms = term.split(INFO_FIELD_VALUE_SEPARATOR); if (ArrayUtils.contains(VariantData.INFO_RESERVED, innerTerms[0])) { String specificKey = key + INFO_FIELD_INNER_SEPARATOR + innerTerms[0]; if (innerTerms.length > 1) { processMultiValueField(innerTerms[1], specificKey, ALT_VALUE_SEPARATOR, variantData); } else { processSingleValueField(INFO_FIELD_DEFAULT_VALUE, specificKey, variantData); } } } return variantData; }
Source:
<code>public long getShutdownMs() { <START> if (get(TASK_SHUTDOWN_MS) == null) return DEFAULT_TASK_SHUTDOWN_MS; <END> return Long.valueOf(get(TASK_SHUTDOWN_MS)); }</code><technical_language>If java 8 Optional here, consider this: String taskShutDownVal = get(TASK_SHUTDOWN_MS); if (null == taskShutDownVal) { ... } else { ...} is a minor (so optional for change :)), pattern in call get() function in of cases. I this get() is light, heavy in other cases. I suggest consider call a practice</technical_language>

Target:
public long getShutdownMs() { String shutdownMs = get(TASK_SHUTDOWN_MS); try { return Long.parseLong(shutdownMs); } catch (NumberFormatException nfe) { LOGGER.warn(String.format( "Unable to parse user-configure value for %s - %s. Using default value %d", TASK_SHUTDOWN_MS, shutdownMs, DEFAULT_TASK_SHUTDOWN_MS)); return DEFAULT_TASK_SHUTDOWN_MS; } }
Source:
<code>public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.equals(BuildConfig.SIGNUP_SUCCESS_REDIRECTION_URL)) { Timber.d("Overriding URL %s", url); Toast toast = Toast.makeText(SignupActivity.this, <START> R.string.sign_up_activity_account, Toast.LENGTH_LONG); <END> toast.show(); finish(); return true; } else { Timber.d("Not overriding URL, URL is: %s", url); return false; } }</code><technical_language>account_created</technical_language>

Target:
public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.equals(BuildConfig.SIGNUP_SUCCESS_REDIRECTION_URL)) { Timber.d("Overriding URL %s", url); Toast toast = Toast.makeText(SignupActivity.this, R.string.account_created, Toast.LENGTH_LONG); toast.show(); finish(); return true; } else { Timber.d("Not overriding URL, URL is: %s", url); return false; } }
Source:
<code>private int showKeySettings(int row) { for (String key : settings.getKeySettings()) { Label label = new Label(key); Label value = new Label(settings.getKeyCode(key).getName()); label.setTooltip(new Tooltip(settings.getDescription(key))); Button button = new Button(); button.setText("Change"); button.setOnAction(e -> { e.consume(); button.setText("Type new key"); button.setOnKeyPressed(k -> { KeyCode keyCode = k.getCode(); button.setText("Change"); value.setText(keyCode.getName()); settings.setKey(key, keyCode); <START> button.setOnKeyPressed(empty -> { }); <END> }); }); HBox box = new HBox(); box.setSpacing(20); box.getChildren().add(value); box.getChildren().add(button); gridPane.add(label, 0, row); gridPane.add(box, 1, row); row++; } return row; }</code><technical_language>set null instead of empty -> {}. <layout</technical_language>

Target:
private int showKeySettings(int row) { for (String key : settings.getKeySettings()) { Label label = new Label(key); Label value = new Label(settings.getKeyCode(key).getName()); label.setTooltip(new Tooltip(settings.getDescription(key))); Button button = new Button(); button.setText("Change"); button.setOnAction(e -> { e.consume(); button.setText("Type new key"); button.setOnKeyPressed(k -> { KeyCode keyCode = k.getCode(); button.setText("Change"); value.setText(keyCode.getName()); settings.setKey(key, keyCode); button.setOnKeyPressed(null); }); }); HBox box = new HBox(); box.setSpacing(20); box.getChildren().add(value); box.getChildren().add(button); gridPane.add(label, 0, row); gridPane.add(box, 1, row); row++; } return row; }
Source:
<code>public void removePatientFromCohort_shouldSaveCohortAfterRemovingPatient() throws Exception { executeDataSet(COHORT_XML); Patient patientToAddThenRemove = new Patient(4); service.addPatientToCohort(service.getCohort(2), patientToAddThenRemove); assertTrue(service.getCohort(2).contains(patientToAddThenRemove)); service.removePatientFromCohort(service.getCohort(2), patientToAddThenRemove); List<CohortMembership> memberList = service.getCohort(2) .getMembers().stream() <START> .filter(m -> m.getPatient() == patientToAddThenRemove) <END> .collect(Collectors.toList()); CohortMembership memberWithPatientToRemove = memberList.get(0); assertNotNull(memberWithPatientToRemove.getEndDate()); }</code><technical_language>== for object comparison? :)</technical_language>

Target:
public void removePatientFromCohort_shouldSaveCohortAfterRemovingPatient() throws Exception { executeDataSet(COHORT_XML); Patient patientToAddThenRemove = new Patient(4); service.addPatientToCohort(service.getCohort(2), patientToAddThenRemove); assertTrue(service.getCohort(2).contains(patientToAddThenRemove.getPatientId())); service.removePatientFromCohort(service.getCohort(2), patientToAddThenRemove); List<CohortMembership> memberList = service.getCohort(2) .getMembers().stream() .filter(m -> m.getPatient().getPatientId().equals(patientToAddThenRemove.getPatientId())) .collect(Collectors.toList()); CohortMembership memberWithPatientToRemove = memberList.get(0); assertNotNull(memberWithPatientToRemove.getEndDate()); }
Source:
<code>public boolean onContextItemSelected(MenuItem item) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); switch (item.getItemId()) { case 1: pokemonTeam.removePokemon(info.position); pokemonListAdapter.notifyDataSetChanged(); ((TeamBuildingActivity) getActivity()).updateList(); return true; case 2: selectedPos = info.position; Intent intent = new Intent(getActivity().getApplicationContext(), SearchableActivity.class); <START> intent.putExtra("Search Type", SearchableActivity.REQUEST_CODE_SEARCH_POKEMON); <END> startActivityForResult(intent, SearchableActivity.REQUEST_CODE_SEARCH_POKEMON); return true; default: return super.onContextItemSelected(item); } }</code><technical_language>in process of removing of hard-coded string. If anywhere, plz do a favor add a public final static String in original class this String</technical_language>

Target:
public boolean onContextItemSelected(MenuItem item) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); switch (item.getItemId()) { case 1: pokemonTeam.removePokemon(info.position); pokemonListAdapter.notifyDataSetChanged(); ((TeamBuildingActivity) getActivity()).updateList(); return true; case 2: selectedPos = info.position; Intent intent = new Intent(getActivity().getApplicationContext(), SearchableActivity.class); intent.putExtra(SearchableActivity.SEARCH_TYPE, SearchableActivity.REQUEST_CODE_SEARCH_POKEMON); startActivityForResult(intent, SearchableActivity.REQUEST_CODE_SEARCH_POKEMON); return true; default: return super.onContextItemSelected(item); } }
Source:
<code>public void init() { <START> String configPath = LocalConfig.getInstance().getUsrDir().getPath() + "/conf/oss.conf.d"; <END> load(FileSystems.getDefault().getPath(configPath)); }</code><technical_language>This be: new File(EngineLocalConfig.getInstance.getEtcDir(), "osinfo.conf.d")</technical_language>

Target:
public void init() { load( FileSystems.getDefault().getPath( EngineLocalConfig.getInstance().getEtcDir().getAbsolutePath(), "oss.conf.d" ) ); }
Source:
<code>private long getMultComplexity(long x) { <START> long x2 = (long) Math.pow(x, 2); <END> if (x <= 64) return x2; if (x <= 1024) return x2 / 4 + 96 * x - 3072; return x2 / 16 + 480 * x - 199680; }</code><technical_language>x * x here. Math.pow() is double function return incompatible result large numbers E.g. Integer.MAX_VALUE * Integer.MAX_VALUE != Math.pow(Integer.MAX_VALUE, 2) end in OOG, anyways..</technical_language>

Target:
private long getMultComplexity(long x) { long x2 = x * x; if (x <= 64) return x2; if (x <= 1024) return x2 / 4 + 96 * x - 3072; return x2 / 16 + 480 * x - 199680; }
Source:
<code>public void performStreamOperation(LuceneWork singleOperation, IndexingMonitor monitor, boolean forceAsync) { if ( singleOperation instanceof FlushLuceneWork ) { requestProcessor.awaitAsyncProcessingCompletion(); } BackendRequest<?> request = singleOperation.acceptIndexWorkVisitor( visitor, monitor ); if ( request != null ) { if ( forceAsync ) { requestProcessor.executeAsync( request ); } else { <START> requestProcessor.executeSync( Collections.<BackendRequest<?>>singletonList( request ) ); <END> } } }</code><technical_language>So, here, switching default behavior (when forceAsync is false) asynchronous synchronous. I in org.hibernate.search.indexes.spi.IndexManager.performStreamOperation(LuceneWork, IndexingMonitor, boolean), behavior forceAsync is false "will depend backend configuration". I guess async default if wanted to. I admit I grasp implications of change, though. concept of able execute "stream" operations asynchronously synchronously blurry me, I missing something. @Sanne , do think</technical_language>

Target:
public void performStreamOperation(LuceneWork singleOperation, IndexingMonitor monitor, boolean forceAsync) { BackendRequest<?> request = singleOperation.acceptIndexWorkVisitor( visitor, monitor ); if ( singleOperation instanceof FlushLuceneWork ) { requestProcessor.awaitAsyncProcessingCompletion(); executeBackendRequest( request, true ); } else { executeBackendRequest( request, false ); } }
Source:
<code>private String createOutput(final LnClientConnection conn, final List<ClassIdObisAttr> allObisCodes) throws ProtocolAdapterException, IOException, TimeoutException { String output = ""; int index = 1; for (final ClassIdObisAttr obisAttr : allObisCodes) { <START> LOGGER.info("Creating output for {}/{}", obisAttr.getObisCode().value(), index++, allObisCodes.size()); <END> output += this.getAllDataFromObisCode(conn, obisAttr); LOGGER.info("Length of output is now: {}", output.length()); } return output; }</code><technical_language>Change log level debug</technical_language>

Target:
private String createOutput(final LnClientConnection conn, final List<ClassIdObisAttr> allObisCodes) throws ProtocolAdapterException, IOException, TimeoutException { String output = ""; int index = 1; for (final ClassIdObisAttr obisAttr : allObisCodes) { LOGGER.debug("Creating output for {}/{}", obisAttr.getObisCode().value(), index++, allObisCodes.size()); output += this.getAllDataFromObisCode(conn, obisAttr); LOGGER.debug("Length of output is now: {}", output.length()); } return output; }
Source:
<code>public static AABB createEncompassing(Iterable<AABB> others) { Vector3f min; Vector3f max; Iterator<AABB> i = others.iterator(); if (i.hasNext()) { AABB next = i.next(); min = next.getMin(); max = next.getMax(); } else { return createEmpty(); } while (i.hasNext()) { AABB next = i.next(); Vector3f otherMin = next.getMin(); Vector3f otherMax = next.getMax(); min.min(otherMin); <START> max.max(otherMax); <END> } return new AABB(min, max); }</code><technical_language>This here</technical_language>

Target:
public static AABB createEncompassing(Iterable<AABB> others) { Vector3f min; Vector3f max; Iterator<AABB> i = others.iterator(); if (i.hasNext()) { AABB next = i.next(); min = next.getMin(); max = next.getMax(); } else { return createEmpty(); } while (i.hasNext()) { AABB next = i.next(); Vector3f otherMin = next.getMin(); Vector3f otherMax = next.getMax(); Vector3fUtil.min(min, otherMin, min); Vector3fUtil.max(max, otherMax, max); } return new AABB(min, max); }
Source:
<code>public boolean applicabilityExistsOnBranchView(BranchId branch, ArtifactId viewId, String applicability) { boolean exists = false; List<GammaId> tuples = new ArrayList<>(); queryFactory.tupleQuery().getTuple2GammaFromE1E2(CoreTupleTypes.ViewApplicability, branch, viewId, applicability, tuples::add); <START> if (!tuples.isEmpty()) { <END> exists = true; } return exists; }</code><technical_language>remove exists variable return !tuples.isEmpty();</technical_language>

Target:
public boolean applicabilityExistsOnBranchView(BranchId branch, ArtifactId viewId, String applicability) { List<GammaId> tuples = new ArrayList<>(); queryFactory.tupleQuery().getTuple2GammaFromE1E2(CoreTupleTypes.ViewApplicability, branch, viewId, applicability, tuples::add); return tuples.isEmpty(); }
Source:
<code>private synchronized Comparable<Object> foo() { return new Comparable<Object>() { @Override public int compareTo(Object o) { <START> value = 0; END> return 0; } }; }</code><technical_language>verified covered before. a regression</technical_language>

Target:
private void foo() { synchronized (new Object()) { Comparable<Object> cmp = new Comparable<Object>() { @Override public int compareTo(Object o) { value = 0; return 0; } }; } }
Source:
<code>private void removeTagFromChildrenCacheEntries(TagCacheEntry entry, CVSTag tag) { Iterator childrenIterator = entry.getChildrenIterator(); while (childrenIterator.hasNext()) { TagCacheEntry child = (TagCacheEntry) childrenIterator.next(); removeTagFromChildrenCacheEntries(child, tag); child.getTags().remove(tag); <START> if (child.getTags().size() == 0 && child.children.size() == 0) { <END> removeTagCacheEntry(child); } } }</code><technical_language>#isEmpty()</technical_language>

Target:
private void removeTagFromChildrenCacheEntries(TagCacheEntry entry, CVSTag tag) { Iterator childrenIterator = entry.getChildrenIterator(); while (childrenIterator.hasNext()) { TagCacheEntry child = (TagCacheEntry) childrenIterator.next(); removeTagFromChildrenCacheEntries(child, tag); child.getTags().remove(tag); if (child.isEmpty()) { removeTagCacheEntry(child); } } }
Source:
<code>protected void run() throws UnloggedFailure { if (!loader.isRemoteAdminEnabled()) { throw <START> die("remote installation is <END> disabled"); } if (names == null || names.isEmpty()) { loader.rescan(); } else { try { loader.reload(names); } catch (InvalidPluginException e) { throw die(e.getMessage()); } catch (PluginInstallException e) { throw die(e.getMessage()); } } }</code><technical_language>remote plugin administration</technical_language>

Target:
protected void run() throws UnloggedFailure { if (!loader.isRemoteAdminEnabled()) { throw die("remote plugin administration is disabled"); } if (names == null || names.isEmpty()) { loader.rescan(); } else { try { loader.reload(names); } catch (InvalidPluginException e) { throw die(e.getMessage()); } catch (PluginInstallException e) { throw die(e.getMessage()); } } }
Source:
<code>public void complete() { ITmfStateSystemBuilder stateSystem = getStateSystem(true); if(stateSystem == null) { return; } <START> stateSystem.closeHistory(getTrace().getEndTime().toNanos()); <END> }</code><technical_language>appears work, do a waitUntilBuilt(0) close if is built yet. Also, formatting in this file</technical_language>

Target:
public void complete() { ITmfStateSystemBuilder stateSystem = fStateSystem; if (stateSystem == null) { return; } if (!stateSystem.waitUntilBuilt(0)) { stateSystem.closeHistory(getTrace().getEndTime().toNanos()); } }
Source:
<code><START> private void startJob(ExecutorDriver driver, TaskInfo task, TaskDetails taskDetails) { <END> if (process == null) { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_ERROR, nullSlaveStatusDetails())); return; } NodeJobTask nodeJob = taskDetails.getNodeJobTask(); AbstractNodeJob job; switch (nodeJob.getJobType()) { case REPAIR: job = new NodeRepairJob(task.getTaskId()); break; case CLEANUP: job = new NodeCleanupJob(task.getTaskId(), executorService); break; default: return; } if (startJob(job)) { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_RUNNING, nullSlaveStatusDetails())); } else { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_ERROR, nullSlaveStatusDetails())); } }</code><technical_language>return points of startJob send some sort of taskStatus. Please change this method return TaskStatus driver, points sendStatusUpdate called</technical_language>

Target:
private void startJob(ExecutorDriver driver, TaskInfo task, TaskDetails taskDetails) { if (process == null) { serverProcessNotRunning(driver, task); return; } NodeJobTask nodeJob = taskDetails.getNodeJobTask(); AbstractNodeJob job; switch (nodeJob.getJobType()) { case REPAIR: job = new NodeRepairJob(task.getTaskId()); break; case CLEANUP: job = new NodeCleanupJob(task.getTaskId(), executorService); break; default: return; } TaskStatus taskStatus = startJob(task, job); driver.sendStatusUpdate(taskStatus); }
Source:
<code>public IdentityManager(final Context context, final AWSConfiguration awsConfiguration) { this.appContext = context.getApplicationContext(); this.awsConfiguration = awsConfiguration; <START> this.clientConfiguration = new ClientConfiguration().withUserAgent(awsConfiguration.getUserAgent()); <END> this.credentialsProviderHolder = new AWSCredentialsProviderHolder(); createCredentialsProvider(this.appContext, this.clientConfiguration, awsConfiguration.getUserAgentOverride()); this.awsKeyValueStore = new AWSKeyValueStore(appContext, SHARED_PREF_NAME, isPersistenceEnabled); }</code><technical_language>put override client config, here</technical_language>

Target:
public IdentityManager(final Context context, final AWSConfiguration awsConfiguration) { this.appContext = context.getApplicationContext(); this.awsConfiguration = awsConfiguration; this.clientConfiguration = new ClientConfiguration() .withUserAgent(awsConfiguration.getUserAgent()) .withUserAgentOverride(awsConfiguration.getUserAgentOverride()); this.credentialsProviderHolder = new AWSCredentialsProviderHolder(); createCredentialsProvider(this.appContext, this.clientConfiguration); this.awsKeyValueStore = new AWSKeyValueStore(appContext, SHARED_PREF_NAME, isPersistenceEnabled); }
Source:
<code>protected boolean responseHeader(HttpExchange exchange, HttpField field) { out: while (true) { ResponseState current = responseState.get(); switch (current) { case BEGIN: case HEADER: { if (updateResponseState(current, ResponseState.TRANSIENT)) break out; break; } default: { return false; } } } HttpResponse response = exchange.getResponse(); ResponseNotifier notifier = getHttpDestination().getResponseNotifier(); boolean process = notifier.notifyHeader(exchange.getConversation().getResponseListeners(), response, field); if (process) { <START> response.header(field); <END> HttpHeader fieldHeader = field.getHeader(); if (fieldHeader != null) { switch (fieldHeader) { case SET_COOKIE: case SET_COOKIE2: { URI uri = exchange.getRequest().getURI(); if (uri != null) storeCookie(uri, field); break; } default: { break; } } } } if (updateResponseState(ResponseState.TRANSIENT, ResponseState.HEADER)) return true; terminateResponse(exchange); return false; }</code><technical_language>calling a method is supposed deprecated</technical_language>

Target:
protected boolean responseHeader(HttpExchange exchange, HttpField field) { out: while (true) { ResponseState current = responseState.get(); switch (current) { case BEGIN: case HEADER: { if (updateResponseState(current, ResponseState.TRANSIENT)) break out; break; } default: { return false; } } } HttpResponse response = exchange.getResponse(); ResponseNotifier notifier = getHttpDestination().getResponseNotifier(); boolean process = notifier.notifyHeader(exchange.getConversation().getResponseListeners(), response, field); if (process) { response.addHeader(field); HttpHeader fieldHeader = field.getHeader(); if (fieldHeader != null) { switch (fieldHeader) { case SET_COOKIE: case SET_COOKIE2: { URI uri = exchange.getRequest().getURI(); if (uri != null) storeCookie(uri, field); break; } default: { break; } } } } if (updateResponseState(ResponseState.TRANSIENT, ResponseState.HEADER)) return true; terminateResponse(exchange); return false; }
Source:
<code>private void handleApprovalPageIfAny() { waitForPageToLoad(); if (getPageSource().contains(EXPECTED_SNIPPET_LOGIN_REDIRECT)) { <START> ThreadHelper.waitFor(500); <END> waitForPageToLoad(); } boolean isPageRequestingAccessApproval = getPageSource().contains(EXPECTED_SNIPPET_APPROVAL); if (isPageRequestingAccessApproval) { click(By.id("persist_checkbox")); click(By.id("approve_button")); waitForPageToLoad(); } }</code><technical_language>a big deal, of a proper wait instead</technical_language>

Target:
private void handleApprovalPageIfAny() { waitForPageToLoad(); waitForRedirectIfAny(); boolean isPageRequestingAccessApproval = getPageSource().contains(EXPECTED_SNIPPET_APPROVAL); if (isPageRequestingAccessApproval) { click(By.id("persist_checkbox")); click(By.id("approve_button")); waitForPageToLoad(); } }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FunctionSignature other = (FunctionSignature) obj; <START> return Arrays.equals(argTypes, other.argTypes) && name.equals(other.name); <END> }</code><technical_language>I swap order of conjuncts name.equals(other.name) is expensive</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof FunctionSignature)) return false; FunctionSignature other = (FunctionSignature) obj; return (name == other.name) && Arrays.equals(argTypes, other.argTypes); }
Source:
<code>public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { try { trustManager.checkClientTrusted(x509Certificates, s); } catch (Exception e) { String name = x509Certificates.length >= 1 ? x509Certificates[0].getSubjectDN().getName() : "NONAME"; <START> LOGGER.error("Client certificate was found to be invalid. Subject: Error: [{}].", name, e.getMessage(), e); <END> throw e; } }</code><technical_language>This PR good - a question remains this log message is sufficient difference a good certificate a bad one. For one, subject DN is bound a certificate created agent registered. log message talk certificate chain (which is verifying) dumping entire incoming certificate toString() helps toString() of CA certificate chain server is validating incoming certificate against? lines of (untested code, shows intent): java @Override public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { try { trustManager.checkClientTrusted(x509Certificates, s); } catch (Exception e) { LOGGER.error("Client certificate invalid", e); LOGGER.error("Client certificate chain:"); for (int i = 0; i < x509Certificates.length; i++) { X509Certificate x509Certificate = x509Certificates[i]; LOGGER.error("chain[" + i + "]:"); LOGGER.error(x509Certificate.toString()); } LOGGER.error("The accepted certificates are:"); X509Certificate[] acceptedIssuers = getAcceptedIssuers(); for (X509Certificate acceptedIssuer : acceptedIssuers) { LOGGER.error(acceptedIssuer.toString()); } throw e; } }</technical_language>

Target:
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { try { trustManager.checkClientTrusted(x509Certificates, s); } catch (Exception e) { LOGGER.error("Client certificate was found to be invalid", e); LOGGER.error("Client certificate chain:"); for (int i = 0; i < x509Certificates.length; i++) { X509Certificate x509Certificate = x509Certificates[i]; LOGGER.error("chain[{}]: {}", i, x509Certificate); } X509Certificate[] acceptedIssuers = getAcceptedIssuers(); if (acceptedIssuers == null || acceptedIssuers.length == 0) { LOGGER.error("There are no accepted issuers."); } else { LOGGER.error("The accepted certificates are:"); for (X509Certificate acceptedIssuer : acceptedIssuers) { LOGGER.error("{}", acceptedIssuer.toString()); } } throw e; } }
Source:
<code>public Stream<Stream<WebElement>> getRows() { return rows() <START> .map(el -> el.findElements(By.cssSelector("td")).stream()); <END> }</code><technical_language>Custom variants "td" customized</technical_language>

Target:
public Stream<Stream<WebElement>> getRows() { return rows() .map(row -> row.findElements(cellLocator()).stream()); }
Source:
<code>private static FilterState fromRelationshipDirection( RelationshipDirection direction ) { switch ( direction ) { case OUTGOING: return FilterState.OUTGOING; case INCOMING: return FilterState.INCOMING; case LOOP: return FilterState.LOOP; case ERROR: throw new IllegalArgumentException( "There has been a RelationshipDirection.ERROR" ); default: <START> throw new IllegalStateException( "Still poking my eye, dear checkstyle..." ); <END> } }</code><technical_language>Cute, more informative, including direction too</technical_language>

Target:
private static FilterState fromRelationshipDirection( RelationshipDirection direction ) { switch ( direction ) { case OUTGOING: return FilterState.OUTGOING; case INCOMING: return FilterState.INCOMING; case LOOP: return FilterState.LOOP; case ERROR: throw new IllegalArgumentException( "There has been a RelationshipDirection.ERROR" ); default: throw new IllegalStateException( format( "Still poking my eye, dear checkstyle... (cannot filter on direction '%s')", direction ) ); } }
Source:
<code>public Response toResponse(JsonMappingException exception) { return Response.status(Response.Status.BAD_REQUEST) <START> .entity(ImmutableMap.of("Error", exception.getMessage())) <END> .build(); }</code><technical_language>other places "error" case</technical_language>

Target:
public Response toResponse(JsonMappingException exception) { return Response.status(Response.Status.BAD_REQUEST) .entity(ImmutableMap.of( "error", exception.getMessage() == null ? "unknown json mapping exception" : exception.getMessage() )) .build(); }
Source:
<code>public Position withColumn(int column) { <START> return new Position(line, column); <END> }</code><technical_language>"this" line more evident</technical_language>

Target:
public Position withColumn(int column) { return new Position(this.line, column); }
Source:
<code>private ChargeEntity prepareChargeForAuthorisation(String chargeId) { try { ChargeEntity charge = chargeService.lockChargeForProcessing(chargeId, OperationType.AUTHORISATION); getPaymentProviderFor(charge) .generateTransactionId() .ifPresent(charge::setGatewayTransactionId); return charge; } catch (Exception e) { <START> throw e; <END> } }</code><technical_language>this added</technical_language>

Target:
private ChargeEntity prepareChargeForAuthorisation(String chargeId) { ChargeEntity charge = chargeService.lockChargeForProcessing(chargeId, OperationType.AUTHORISATION); getPaymentProviderFor(charge) .generateTransactionId() .ifPresent(charge::setGatewayTransactionId); return charge; }
Source:
<code>public static <T> TextElement<T> function(final Function<T, Text> function) { return new TextElement<T>() { @Override public Text create(T value) { <START> return Preconditions.checkNotNull(function.apply(value)); <END> } }; }</code><technical_language>I Preconditions is meant static imports, right</technical_language>

Target:
public static <T> TextElement<T> function(final Function<T, Text> function) { return function::apply; }
Source:
<code>public VmReplicateDiskParameters(Guid vdsId, Guid vmId, Guid storagePoolId, Guid srcStorageDomainId, Guid targetStorageDomainId, Guid imageGroupId, Guid imageId, String diskType) { super(vdsId, vmId); this.storagePoolId = storagePoolId; this.srcStorageDomainId = srcStorageDomainId; this.targetStorageDomainId = targetStorageDomainId; this.imageGroupId = imageGroupId; this.imageId = imageId; <START> this.diskType = Optional.ofNullable(diskType); <END> }</code><technical_language>cleaner store string this a simple-stupid POJO, optional "logic" used</technical_language>

Target:
public VmReplicateDiskParameters(Guid vdsId, Guid vmId, Guid storagePoolId, Guid srcStorageDomainId, Guid targetStorageDomainId, Guid imageGroupId, Guid imageId, String diskType) { super(vdsId, vmId); this.storagePoolId = storagePoolId; this.srcStorageDomainId = srcStorageDomainId; this.targetStorageDomainId = targetStorageDomainId; this.imageGroupId = imageGroupId; this.imageId = imageId; }
Source:
<code>private String connectionUrl() { <START> return String.format("jdbc:mysql://localhost/%s?useUnicode=true&characterEncoding=UTF-8", <END> DATABASE_NAME.getOr("activityinfo")); }</code><technical_language>I this broke sonar build: <LINK_0> If this source change intended, a Jekins configuration</technical_language>

Target:
private String connectionUrl() { return DATABASE_URL.getOr("jdbc:mysql://localhost/activityinfo_at?useUnicode=true&characterEncoding=UTF-8"); }
Source:
<code>public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues, final String namespace) { List<AttributeStatement> statements = new ArrayList<>(); final List<Attribute> attributes = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accessConstentValues)) { <START> attributes.add(createAttribute(null, NhincConstants.ACCESS_CONSENT_ATTR, namespace, accessConstentValues)); <END> } if (CollectionUtils.isNotEmpty(evidenceInstanceAccessConsentValues)) { attributes.add(createAttribute(null, NhincConstants.INST_ACCESS_CONSENT_ATTR, namespace, evidenceInstanceAccessConsentValues)); } if (CollectionUtils.isNotEmpty(attributes)) { statements = createAttributeStatement(attributes); } return statements; }</code><technical_language>ACCESS_CONSENT_ATTR INST_ACCESS_CONSENT_ATTR defined in SamlConstants NhincConstants. Remove NhincConstants</technical_language>

Target:
public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues, final String namespace) { List<AttributeStatement> statements = new ArrayList<>(); final List<Attribute> attributes = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accessConstentValues)) { attributes.add(createAttribute(null, SamlConstants.ACCESS_CONSENT_ATTR, namespace, accessConstentValues)); } if (CollectionUtils.isNotEmpty(evidenceInstanceAccessConsentValues)) { attributes.add(createAttribute(null, SamlConstants.INST_ACCESS_CONSENT_ATTR, namespace, evidenceInstanceAccessConsentValues)); } if (CollectionUtils.isNotEmpty(attributes)) { statements = createAttributeStatement(attributes); } return statements; }
Source:
<code>public void testInformationOfMeetingIsDisplayed() { HomeTabletPage home = new HomeTabletPage(); SchedulePage schedule = home .clickScheduleBtn() .clickOverMeetingCreated(subject); String actualOrganizer = schedule.getMeetingOrganizerValue(); String actualSubject = schedule.getMeetingSubjectValue(); String actualAttendee = schedule.getEmailAttendeeLblValue(attendee); String actualBody = schedule.getBodyTxtBoxValue(); <START> Assert.assertEquals(organizer, actualOrganizer); <END> Assert.assertEquals(subject, actualSubject); Assert.assertEquals(attendee, actualAttendee); Assert.assertEquals(body, actualBody); }</code><technical_language>structure of assert is (actual, expected) ...checks this in of TCs</technical_language>

Target:
public void testInformationOfMeetingIsDisplayed() { HomeTabletPage homeTabletPage = new HomeTabletPage(); SchedulePage schedulePage = homeTabletPage .clickScheduleBtn() .clickOverMeetingCreated(subject); String actualOrganizer = schedulePage.getMeetingOrganizerValue(); String actualSubject = schedulePage.getMeetingSubjectValue(); String actualAttendee = schedulePage.getEmailAttendeeLblValue(attendee); String actualBody = schedulePage.getBodyTxtBoxValue(); Assert.assertEquals(actualOrganizer, organizer); Assert.assertEquals(actualSubject, subject); Assert.assertEquals(actualAttendee, attendee); Assert.assertEquals(actualBody, body); }
Source:
<code>public void waitTextInHoverPopUpEqualsTo(String expectedText) { try { seleniumWebDriverHelper.waitVisibility(hoverPopup); } catch (TimeoutException ex) { <START> fail("Known issue <LINK_1>", ex); <END> } try { seleniumWebDriverHelper.waitTextEqualsTo(hoverPopup, expectedText); } catch (TimeoutException ex) { fail("Known issue <LINK_0>", ex); } }</code><technical_language>you, please, express if permanent failure random in error message</technical_language>

Target:
public void waitTextInHoverPopUpEqualsTo(String expectedText) { try { seleniumWebDriverHelper.waitVisibility(hoverPopup); } catch (TimeoutException ex) { fail("Known permanent failure: issue <LINK_1>", ex); } try { seleniumWebDriverHelper.waitTextEqualsTo(hoverPopup, expectedText); } catch (TimeoutException ex) { fail("Known permanent failure: issue <LINK_0>", ex); } }
Source:
<code>private ADBInfo createADB(String host, String port) throws URISyntaxException { <START> HashMap<String,String> env = new HashMap<String,String>(); <END> env.put("DOCKER_HOST","tcp://" + host + ":" + port); env.put("DOCKER_CERT_PATH","/home/rob/Downloads/cdk/github/openshift-vagrant/cdk-v2/.vagrant/machines/cdk/virtualbox/.docker"); env.put("DOCKER_TLS_VERIFY","1"); env.put("DOCKER_MACHINE_NAME","e5d7d0a"); return new ADBInfo(env); }</code><technical_language>new HashMap<>()</technical_language>

Target:
private ADBInfo createADB(String host, String port) throws URISyntaxException { HashMap<String,String> env = new HashMap<>(); env.put("DOCKER_HOST","tcp://" + host + ":" + port); env.put("DOCKER_CERT_PATH","/home/rob/Downloads/cdk/github/openshift-vagrant/cdk-v2/.vagrant/machines/cdk/virtualbox/.docker"); env.put("DOCKER_TLS_VERIFY","1"); env.put("DOCKER_MACHINE_NAME","e5d7d0a"); return new ADBInfo(env); }
Source:
<code>public void testSamePublicAndPrivateAddressOnSameNode() { <START> Node node = Node.newDefaultNode("foo1", "host").setNodeGroupPort(9410).setNodePublicHostname("host").setNodePublicPort(9410); <END> new ClusterValidator(newDefaultCluster(new Stripe(node))).validate(); }</code><technical_language>nodePort, nodeGroupPort</technical_language>

Target:
public void testSamePublicAndPrivateAddressOnSameNode() { Node node = Node.newDefaultNode("foo1", "host").setNodePort(9410).setNodePublicHostname("host").setNodePublicPort(9410); new ClusterValidator(newDefaultCluster(new Stripe(node))).validate(); }
Source:
<code>public static byte[] createQRCode(String text) { try { <START> System.out.println("Inside Try createQRCode"); <END> ByteArrayOutputStream baos = new ByteArrayOutputStream(); BitMatrix matrix = drawQRCode(text); MatrixToImageWriter.writeToStream(matrix, "png", baos); return baos.toByteArray(); } catch (WriterException | IOException e) { System.out.println("Inside catch createQRCode"); throw new IllegalStateException(e); } }</code><technical_language>remove System.out, submit test code</technical_language>

Target:
public static byte[] createQRCode(String text) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); BitMatrix matrix = drawQRCode(text); MatrixToImageWriter.writeToStream(matrix, "png", baos); return baos.toByteArray(); } catch (WriterException | IOException e) { throw new IllegalStateException(e); } }
Source:
<code><START> private String getJsonDiskDescription() { <END> Map<String, Object> description = new HashMap<>(); description.put(ImagesHandler.DISK_ALIAS, getParameters().getDiskInfo().getDiskAlias()); description.put(ImagesHandler.DISK_DESCRIPTION, getParameters().getDiskInfo().getDiskDescription()); try { return JsonHelper.mapToJson(description, false); } catch (IOException e) { log.errorFormat("Exception while generating json for disk. ERROR: {0}", e); AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.addCustomValue("DataCenterName", getStoragePool().getName()); auditLogableBase.addCustomValue("StorageDomainName", getStorageDomain().getName()); auditLogableBase.addCustomValue("DiskName", getParameters().getDiskInfo().getDiskAlias()); AuditLogDirector.log(auditLogableBase, AuditLogType.UPDATE_DESCRIPTION_FOR_DISK_FAILED); return StringUtils.EMPTY; } }</code><technical_language>static</technical_language>

Target:
private String getJsonDiskDescription() { try { return ImagesHandler.getJsonDiskDescription(getParameters().getDiskInfo().getDiskAlias(), getParameters().getDiskInfo().getDiskDescription()); } catch (IOException e) { log.errorFormat("Exception while generating json for disk. ERROR: {0}", e); AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.addCustomValue("DataCenterName", getStoragePool().getName()); auditLogableBase.addCustomValue("StorageDomainName", getStorageDomain().getName()); auditLogableBase.addCustomValue("DiskName", getParameters().getDiskInfo().getDiskAlias()); AuditLogDirector.log(auditLogableBase, AuditLogType.UPDATE_DESCRIPTION_FOR_DISK_FAILED); return StringUtils.EMPTY; } }
Source:
<code>public static AbstractTask getTaskByUrl(String taskUrl) { if (!Strings.isNullOrEmpty(taskUrl)) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); List<AbstractTask> sortedTasks = sortTasksByRepositoryUrl(tasks); <START> String oldRepositorUrl = null; <END> AbstractRepositoryConnector connector = null; TaskRepository repository = null; for (AbstractTask task : sortedTasks) { if (taskUrl.equals(task.getUrl())) { return task; } else { String repositoryUrl = task.getRepositoryUrl(); if (!repositoryUrl.equals(oldRepositorUrl)) { connector = TasksUi.getRepositoryManager().getRepositoryConnector(task.getConnectorKind()); repository = getRepository(task); } if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null && taskUrl.equals(url.toString())) { return task; } } oldRepositorUrl = repositoryUrl; } } } return null; }</code><technical_language>Instead of keeping track of this, compare task.getRepositoryUrl() repository.getUrl()</technical_language>

Target:
public static AbstractTask getTaskByUrl(String taskUrl) { if (!Strings.isNullOrEmpty(taskUrl)) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); List<AbstractTask> sortedTasks = sortTasksByRepositoryUrl(tasks); AbstractRepositoryConnector connector = null; TaskRepository repository = null; for (AbstractTask task : sortedTasks) { if (taskUrl.equals(task.getUrl())) { return task; } else { String repositoryUrl = task.getRepositoryUrl(); if (repository == null || !repositoryUrl.equals(repository.getUrl())) { connector = TasksUi.getRepositoryManager().getRepositoryConnector(task.getConnectorKind()); repository = getRepository(task); } if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null && taskUrl.equals(url.toString())) { return task; } } } } } return null; }
Source:
<code>public CacheSet<CacheEntry<K, V>> cacheEntrySet() { EncoderEntryMapper<K, V, CacheEntry<K, V>> cacheEntryMapper = EncoderEntryMapper.newCacheEntryMapper( <START> keyDataConversion, valueDataConversion, componentRegistry); <END> return new WriteableCacheSetMapper<>(super.cacheEntrySet(), cacheEntryMapper, e -> new CacheEntryWrapper<>(cacheEntryMapper.apply(e), e), this::toCacheEntry, this::keyToStorage); }</code><technical_language>I assumed pass entryFactory</technical_language>

Target:
public CacheSet<CacheEntry<K, V>> cacheEntrySet() { EncoderEntryMapper<K, V, CacheEntry<K, V>> cacheEntryMapper = EncoderEntryMapper.newCacheEntryMapper( keyDataConversion, valueDataConversion, entryFactory); return new WriteableCacheSetMapper<>(super.cacheEntrySet(), cacheEntryMapper, e -> new CacheEntryWrapper<>(cacheEntryMapper.apply(e), e), this::toCacheEntry, this::keyToStorage); }
Source:
<code>public void setDisplayMode(int displayMode) { mDisplayMode = displayMode; if ((mCFDataStale && (displayMode == DISP_MODE_CF)) || (mMoreDataStale && (displayMode == DISP_MODE_MORE))){ if (DBG) log("setDisplayMode: performing requested expansion."); if ( PhoneFactory.getDefaultPhone().getPhoneName().equals("CDMA") ) { <START> setAppState(AppState.INPUT_READY); <END> } else { if (Settings.System.getInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) <= 0 ) { setAppState(AppState.INITIAL_QUERY); int radioState = mPhone.getServiceState().getState(); if (radioState == ServiceState.STATE_IN_SERVICE) { if (displayMode == DISP_MODE_CF) { queryAllCFOptions(); } else { queryMoreOptions(); } } else if (radioState == ServiceState.STATE_POWER_OFF){ if (DBG) log("onCreate: radio not ready, waiting for signal."); mPhone.registerForServiceStateChanged(mNetworkServiceHandler, EVENT_SERVICE_STATE_CHANGED, null); } else { setAppState(AppState.NETWORK_ERROR, MSG_EXCEPTION); } } else { if (DBG) log("setDisplayMode: radio is off!"); setAppState(AppState.NETWORK_ERROR, MSG_RADIO_OFF); } } } }</code><technical_language>Is equivalent of airplane mode CDMA ? I if a distinction here</technical_language>

Target:
public void setDisplayMode(int displayMode) { mDisplayMode = displayMode; if ((mCFDataStale && (displayMode == DISP_MODE_CF)) || (mMoreDataStale && (displayMode == DISP_MODE_MORE))){ if (DBG) log("setDisplayMode: performing requested expansion."); if ( mPhone.getPhoneName().equals("CDMA") ) { setAppState(AppState.INPUT_READY); } else { if (Settings.System.getInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) <= 0 ) { setAppState(AppState.INITIAL_QUERY); int radioState = mPhone.getServiceState().getState(); if (radioState == ServiceState.STATE_IN_SERVICE) { if (displayMode == DISP_MODE_CF) { queryAllCFOptions(); } else { queryMoreOptions(); } } else if (radioState == ServiceState.STATE_POWER_OFF){ if (DBG) log("onCreate: radio not ready, waiting for signal."); mPhone.registerForServiceStateChanged(mNetworkServiceHandler, EVENT_SERVICE_STATE_CHANGED, null); } else { setAppState(AppState.NETWORK_ERROR, MSG_EXCEPTION); } } else { if (DBG) log("setDisplayMode: radio is off!"); setAppState(AppState.NETWORK_ERROR, MSG_RADIO_OFF); } } } }