auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private FavouritePoint getPersonalPoint(PersonalFavouritePoint.PointType pointType) { FavouritePoint personalPoint = null; for (FavouritePoint fp : cachedPersonalFavoritePoints) { if (fp instanceof PersonalFavouritePoint) { if (((PersonalFavouritePoint) fp).getType() == pointType) { <START> personalPoint = fp; <END> } } } return personalPoint; }</code><technical_language>return fp;</technical_language>

Target:
private FavouritePoint getPersonalPoint(PersonalFavouritePoint.PointType pointType) { for (FavouritePoint fp : cachedPersonalFavoritePoints) { if (((PersonalFavouritePoint) fp).getType() == pointType) { return fp; } } return null; }
Source:
<code><START> public RequestScopeAwareListeningExecutorService createChangeUpdateExecutor( <END> @GerritServerConfig Config config) { ListeningExecutorService e; int poolSize = config.getInt("receive", null, "changeUpdateThreads", 1); if (poolSize <= 1) { e = MoreExecutors.sameThreadExecutor(); } else { e = MoreExecutors.listeningDecorator( MoreExecutors.getExitingExecutorService( new ThreadPoolExecutor(1, poolSize, 10, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(poolSize), new ThreadFactoryBuilder() .setNameFormat("ChangeUpdate-%d") .setDaemon(true) .build(), new ThreadPoolExecutor.CallerRunsPolicy()))); } return new RequestScopeAwareListeningExecutorService(e, poolSize > 1); }</code><technical_language>return ListeningExecutorService</technical_language>

Target:
public ListeningExecutorService createChangeUpdateExecutor(@GerritServerConfig Config config) { int poolSize = config.getInt("receive", null, "changeUpdateThreads", 1); if (poolSize <= 1) { return MoreExecutors.sameThreadExecutor(); } return MoreExecutors.listeningDecorator( MoreExecutors.getExitingExecutorService( new ThreadPoolExecutor(1, poolSize, 10, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(poolSize), new ThreadFactoryBuilder() .setNameFormat("ChangeUpdate-%d") .setDaemon(true) .build(), new ThreadPoolExecutor.CallerRunsPolicy()))); }
Source:
<code>public void onCommand(ProtocolRead c) throws IOException, Exception { try { myPlant.sendCommandAsync(OWNUtilities.createFrame(c), 1); } catch (MalformedCommandOPEN ex) { <START> logger.error("onCommand error : {}", ex.getMessage()); <END> } }</code><technical_language>This a WARN instead of ERROR</technical_language>

Target:
public void onCommand(ProtocolRead c) throws IOException, Exception { try { myPlant.sendCommandAsync(OWNUtilities.createFrame(c), 1); } catch (MalformedCommandOPEN ex) { logger.warn("onCommand error : {}", ex.getMessage()); } }
Source:
<code>public String toString(){ StringBuilder sbuilder = new StringBuilder(); sbuilder.append('{'); <START> sbuilder.append(kmer + " " + et); <END> sbuilder.append('}'); return sbuilder.toString(); }</code><technical_language>If want benefit of stringbuilder, write sbuilder.append(kmer.toString()).append(' ').append(et.toString()). Otherwise, is string cat</technical_language>

Target:
public String toString(){ StringBuilder sbuilder = new StringBuilder(); sbuilder.append('{'); sbuilder.append(kmer).append(" ").append(et); sbuilder.append('}'); return sbuilder.toString(); }
Source:
<code>public void testFetchingShippingRatesWithNullCheckoutToken() throws InterruptedException { <START> final CountDownLatch latch = new CountDownLatch(1); <END> try { buyClient.getShippingRates(null, null); } catch (NullPointerException e) { latch.countDown(); return; } latch.await(); fail("Expected a NullPointerException"); }</code><technical_language>need</technical_language>

Target:
public void testFetchingShippingRatesWithNullCheckoutToken() throws InterruptedException { try { buyClient.getShippingRates(null, null); } catch (NullPointerException e) { return; } fail("Expected a NullPointerException"); }
Source:
<code>public List<ProxiedPlayer> matchPlayer(String partialName) { List<ProxiedPlayer> matched = new ArrayList<ProxiedPlayer>(); for (ProxiedPlayer iPlayer : this.getPlayers()) { String iterPlayerName = iPlayer.getName(); if (partialName.equalsIgnoreCase(iterPlayerName)) { matched.add(iPlayer); break; } <START> if (iterPlayerName.toLowerCase().contains(partialName.toLowerCase())) { <END> matched.add(iPlayer); } } return matched; }</code><technical_language>starts more sense</technical_language>

Target:
public List<ProxiedPlayer> matchPlayer(String partialName) { List<ProxiedPlayer> matched = new ArrayList<ProxiedPlayer>(); for (ProxiedPlayer iPlayer : this.getPlayers()) { String iterPlayerName = iPlayer.getName(); if (partialName.equalsIgnoreCase(iterPlayerName)) { matched.add(iPlayer); break; } if (iterPlayerName.toLowerCase().startsWith(partialName.toLowerCase())) { matched.add(iPlayer); } } return matched; }
Source:
<code>public boolean hasProperty(String name) { <START> for (Property property : this.properties) { <END> if (property.getName().equals(name)) { return true; } } return false; }</code><technical_language>If Java 8 used, this method reduced to: return this.properties.stream().filter(p -> p.getName().equals(name)).findFirst().isPresent();</technical_language>

Target:
public boolean hasProperty(String name) { return this.properties.stream().filter(p -> p.getName().equals(name)).findFirst().isPresent(); }
Source:
<code>private ObjectNode _createScopeMappingsNode() { ObjectMapper mapper = new ObjectMapper(); ObjectNode propertiesNode = mapper.createObjectNode(); propertiesNode.put(RecordType.SCOPE.getName(), _createFieldNode(FIELD_TYPE_TEXT)); propertiesNode.put("mts", _createFieldNodeNoAnalyzer(FIELD_TYPE_DATE)); <START> <END> ObjectNode typeNode = mapper.createObjectNode(); typeNode.put("properties", propertiesNode); ObjectNode mappingsNode = mapper.createObjectNode(); mappingsNode.put(SCOPE_TYPE_NAME, typeNode); return mappingsNode; }</code><technical_language>creating a fresh new index, add "cts" field, worry updating mappings rest call</technical_language>

Target:
private ObjectNode _createScopeMappingsNode() { ObjectMapper mapper = new ObjectMapper(); ObjectNode propertiesNode = mapper.createObjectNode(); propertiesNode.put(RecordType.SCOPE.getName(), _createFieldNode(FIELD_TYPE_TEXT)); propertiesNode.put("mts", _createFieldNodeNoAnalyzer(FIELD_TYPE_DATE)); propertiesNode.put("cts", _createFieldNodeNoAnalyzer(FIELD_TYPE_DATE)); ObjectNode typeNode = mapper.createObjectNode(); typeNode.put("properties", propertiesNode); ObjectNode mappingsNode = mapper.createObjectNode(); mappingsNode.put(SCOPE_TYPE_NAME, typeNode); return mappingsNode; }
Source:
<code>private void writeElement(XMLWriter writer, AntTaskElement task) { assertTrue("Task " + task + " should have an even number of properties", (task.attributes.size() % 2) == 0); writer.start(task.name); for (Iterator<String> iter = task.attributes.iterator(); iter.hasNext();) writer.attribute(iter.next(), iter.next()); for (AntTaskElement <START> antTaskElement : <END> task.elements) writeElement(writer, antTaskElement); writer.end(); }</code><technical_language>rename element</technical_language>

Target:
private void writeElement(XMLWriter writer, AntTaskElement task) { assertTrue("Task " + task + " should have an even number of properties", (task.attributes.size() % 2) == 0); writer.start(task.name); for (Iterator<String> iter = task.attributes.iterator(); iter.hasNext();) writer.attribute(iter.next(), iter.next()); for (AntTaskElement element : task.elements) writeElement(writer, element); writer.end(); }
Source:
<code>private void encryptPlainSnapshots() throws Exception { Set<Long> snapshotIDs = getSnapshots(); if (snapshotIDs == null || snapshotIDs.isEmpty()) { return; } Long[] snapshots = snapshotIDs.toArray(new Long[] {}); for (Long snapshot : snapshots) { File fSnapshot = getSnapshotFile(snapshot); <START> if (fSnapshot == null || !fSnapshot.exists()) { <END> throw new KuraException(KuraErrorCode.CONFIGURATION_SNAPSHOT_NOT_FOUND, snapshot); } XmlComponentConfigurations xmlConfigs = null; FileReader fr = null; BufferedReader br = null; try { fr = new FileReader(fSnapshot); br = new BufferedReader(fr); String line = ""; StringBuilder entireFile = new StringBuilder(); while ((line = br.readLine()) != null) { entireFile.append(line); } xmlConfigs = XmlUtil.unmarshal(entireFile.toString(), XmlComponentConfigurations.class); } finally { if (br != null) { br.close(); } if (fr != null) { fr.close(); } } List<ComponentConfigurationImpl> configs = xmlConfigs.getConfigurations(); encryptConfigs(configs); writeSnapshot(snapshot, xmlConfigs); } }</code><technical_language>this a genuine internal error (maybe KuraErrorCode.CONFIGURATION_ERROR). I return KuraErrorCode.CONFIGURATION_SNAPSHOT_NOT_FOUND if I a snapshot ID a parameter a method snapshot find</technical_language>

Target:
private void encryptPlainSnapshots() throws Exception { Set<Long> snapshotIDs = getSnapshots(); if (snapshotIDs == null || snapshotIDs.isEmpty()) { return; } Long[] snapshots = snapshotIDs.toArray(new Long[] {}); for (Long snapshot : snapshots) { File fSnapshot = getSnapshotFile(snapshot); if (fSnapshot == null || !fSnapshot.exists()) { throw new KuraException(KuraErrorCode.CONFIGURATION_ERROR, snapshot); } XmlComponentConfigurations xmlConfigs = null; FileReader fr = null; BufferedReader br = null; try { fr = new FileReader(fSnapshot); br = new BufferedReader(fr); String line = ""; StringBuilder entireFile = new StringBuilder(); while ((line = br.readLine()) != null) { entireFile.append(line); } xmlConfigs = XmlUtil.unmarshal(entireFile.toString(), XmlComponentConfigurations.class); } finally { if (br != null) { br.close(); } if (fr != null) { fr.close(); } } List<ComponentConfigurationImpl> configs = xmlConfigs.getConfigurations(); encryptConfigs(configs); writeSnapshot(snapshot, xmlConfigs); } }
Source:
<code>private void emitCollectionBinding(StringBuilder builder, CollectionBinding binding, int[] ids) { builder.append(" target.").append(binding.getName()).append(" = "); switch (binding.getKind()) { case ARRAY: builder.append("Finder.arrayOf("); break; case LIST: builder.append("Finder.listOf("); break; default: throw new IllegalStateException("Unknown kind: " + binding.getKind()); } for (int i = 0; i < ids.length; i++) { if (i > 0) { builder.append(','); } builder.append("\n "); <START> if (!binding.getType().equals(VIEW_TYPE)) { <END> builder.append("finder.cast("); } if (binding.isRequired()) { builder.append("finder.findRequiredView(source, ") .append(ids[i]) .append(", \"") .append(binding.getName()) .append("\")"); } else { builder.append("finder.findOptionalView(source, ") .append(ids[i]) .append(")"); } if (!binding.getType().equals(VIEW_TYPE)) { builder.append(", " + ids[i]); builder.append(", " + binding.getType() + ".class"); builder.append(")"); } } builder.append("\n );"); }</code><technical_language>extract this binding a requiresCast() method? I duplicated logic over</technical_language>

Target:
private void emitCollectionBinding(StringBuilder builder, CollectionBinding binding, int[] ids) { builder.append(" target.").append(binding.getName()).append(" = "); switch (binding.getKind()) { case ARRAY: builder.append("Finder.arrayOf("); break; case LIST: builder.append("Finder.listOf("); break; default: throw new IllegalStateException("Unknown kind: " + binding.getKind()); } for (int i = 0; i < ids.length; i++) { if (i > 0) { builder.append(','); } builder.append("\n "); if (binding.requiresCast()) { builder.append("finder.castView("); } if (binding.isRequired()) { builder.append("finder.findRequiredView(source, ") .append(ids[i]) .append(", \"") .append(binding.getName()) .append("\")"); } else { builder.append("finder.findOptionalView(source, ") .append(ids[i]) .append(")"); } if (binding.requiresCast()) { builder.append(", " + ids[i]); builder.append(", " + binding.getType() + ".class"); builder.append(")"); } } builder.append("\n );"); }
Source:
<code>private <T> void cancelQuery(Query<T> query, String cancelUrl) { Runnable cancelRunnable = () -> { try { Future<StatusResponseHolder> responseFuture = httpClient.go( new Request(HttpMethod.DELETE, new URL(cancelUrl)) .setContent(objectMapper.writeValueAsBytes(query)) .setHeader(HttpHeaders.Names.CONTENT_TYPE, isSmile ? SmileMediaTypes.APPLICATION_JACKSON_SMILE : MediaType.APPLICATION_JSON), StatusResponseHandler.getInstance(), Duration.standardSeconds(1)); Runnable checkRunnable = () -> { try { if (!responseFuture.isDone()) { log.error("Error cancelling query[%s]: ", query); } StatusResponseHolder response = responseFuture.get(); if (response.getStatus().getCode() >= 500) { log.error("Error cancelling query[%s]: queriable node returned status[%d] [%s].", query, response.getStatus().getCode(), response.getStatus().getReasonPhrase()); } } catch (ExecutionException | InterruptedException e) { log.error("Error cancelling query[%s]: ", query); } }; queryCancellationExecutor.schedule(checkRunnable, 5, TimeUnit.SECONDS); } catch (IOException e) { <START> log.error("Error cancelling query[%s]: ", query); <END> } }; queryCancellationExecutor.submit(cancelRunnable); }</code><technical_language>Please add e argument log.error(): log.error(e, "Error cancelling query[%s]: ", query)</technical_language>

Target:
private <T> void cancelQuery(Query<T> query, String cancelUrl) { Runnable cancelRunnable = () -> { try { Future<StatusResponseHolder> responseFuture = httpClient.go( new Request(HttpMethod.DELETE, new URL(cancelUrl)) .setContent(objectMapper.writeValueAsBytes(query)) .setHeader(HttpHeaders.Names.CONTENT_TYPE, isSmile ? SmileMediaTypes.APPLICATION_JACKSON_SMILE : MediaType.APPLICATION_JSON), StatusResponseHandler.getInstance(), Duration.standardSeconds(1)); Runnable checkRunnable = () -> { try { if (!responseFuture.isDone()) { log.error("Error cancelling query[%s]", query); } StatusResponseHolder response = responseFuture.get(); if (response.getStatus().getCode() >= 500) { log.error("Error cancelling query[%s]: queriable node returned status[%d] [%s].", query, response.getStatus().getCode(), response.getStatus().getReasonPhrase()); } } catch (ExecutionException | InterruptedException e) { log.error(e, "Error cancelling query[%s]", query); } }; queryCancellationExecutor.schedule(checkRunnable, 5, TimeUnit.SECONDS); } catch (IOException e) { log.error(e, "Error cancelling query[%s]", query); } }; queryCancellationExecutor.submit(cancelRunnable); }
Source:
<code><START> public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) <END> { Block block = world.getBlock(x, y, z); if (block == null) return null; if (block == this.dSlabs) block = this.slabs; int meta = world.getBlockMetadata(x, y, z) & 7; return new ItemStack(block, 1, meta); }</code><technical_language>Do implement deprecated API, alternative</technical_language>

Target:
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock(x, y, z); if (block == null) return null; if (block.field_150004_a) block = this.slabs; int meta = world.getBlockMetadata(x, y, z) & 7; return new ItemStack(block, 1, meta); }
Source:
<code>protected void updateValues(AbsTmfStatisticsTree statsData, ITmfTrace trace, TmfTimeRange timeRange, boolean isGlobal) { ITmfStatistics stats = trace.getStatistics(); ITmfTimestamp start = timeRange.getStartTime().normalize(0, -9); <START> ITmfTimestamp end = timeRange.getEndTime().normalize(0, -9); <END> String name = trace.getName(); long globalTotal = stats.getEventsInRange(start, end); statsData.setTotal(name, isGlobal, globalTotal); Map<String, Long> map = stats.getEventTypesInRange(start, end); for (Map.Entry<String, Long> entry : map.entrySet()) { statsData.setTypeCount(name, entry.getKey(), isGlobal, entry.getValue()); } }</code><technical_language>local constant TIME_SCALE</technical_language>

Target:
protected void updateValues(AbsTmfStatisticsTree statsData, ITmfTrace trace, TmfTimeRange timeRange, boolean isGlobal) { ITmfStatistics stats = trace.getStatistics(); ITmfTimestamp start = timeRange.getStartTime().normalize(0, TIME_SCALE); ITmfTimestamp end = timeRange.getEndTime().normalize(0, TIME_SCALE); String name = trace.getName(); long globalTotal = stats.getEventsInRange(start, end); statsData.setTotal(name, isGlobal, globalTotal); Map<String, Long> map = stats.getEventTypesInRange(start, end); for (Map.Entry<String, Long> entry : map.entrySet()) { statsData.setTypeCount(name, entry.getKey(), isGlobal, entry.getValue()); } }
Source:
<code>private String getServiceHost(final ServiceParams serviceParams) throws MalformedURLException { final TermNode hostNode = serviceParams.get(ENDPOINT_KEY, null); if (hostNode == null) { throw new IllegalArgumentException("Service name (mwapi:endpoint) should be supplied"); } serviceParams.clear(ENDPOINT_KEY); if (!hostNode.isConstant()) { throw new IllegalArgumentException("Endpoint name should be a constant"); } final Value v = hostNode.getValue(); final String endpointHost; if (v instanceof URI) { <START> endpointHost = new URL(v.stringValue()).getHost(); <END> } else { endpointHost = v.stringValue(); } if (!config.validEndpoint(endpointHost)) { throw new IllegalArgumentException("Host " + endpointHost + " is not allowed"); } return endpointHost; }</code><technical_language>if v implements URI correctly, v.getHost() work, need converting a URL. do URI -> URL conversion, toURL() method used</technical_language>

Target:
private String getServiceHost(final ServiceParams serviceParams) throws MalformedURLException { final TermNode hostNode = serviceParams.get(ENDPOINT_KEY, null); Preconditions.checkNotNull(hostNode, "Service name (mwapi:endpoint) should be supplied"); Preconditions.checkArgument(hostNode.isConstant(), "Endpoint name should be a constant"); serviceParams.clear(ENDPOINT_KEY); final Value v = hostNode.getValue(); final String endpointHost; if (v instanceof URI) { endpointHost = new URL(v.stringValue()).getHost(); } else { endpointHost = v.stringValue(); } if (!config.validEndpoint(endpointHost)) { throw new IllegalArgumentException("Host " + endpointHost + " is not allowed"); } return endpointHost; }
Source:
<code>private GitResourceVariantTreeProvider createTreeProvider() throws Exception { testRepo.appendContentAndCommit(iProject, file1, INITIAL_CONTENT_1, "first file - initial commit"); testRepo.appendContentAndCommit(iProject, file2, INITIAL_CONTENT_2, "second file - initial commit"); testRepo.createBranch(MASTER, BASE); testRepo.createAndCheckoutBranch(MASTER, BRANCH); setContentsAndCommit(testRepo, iFile2, BRANCH_CHANGES + INITIAL_CONTENT_2, "branch commit"); testRepo.checkoutBranch(MASTER); setContentsAndCommit(testRepo, iFile1, INITIAL_CONTENT_1 + MASTER_CHANGES, "master commit"); iProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); try (RevWalk walk = new RevWalk(repo)) { RevTree baseTree = walk.parseTree(repo.resolve(BASE)); RevTree sourceTree = walk.parseTree(repo.resolve(MASTER)); <START> RevTree remoteTree = walk.parseTree(repo.resolve(BRANCH)); <END> TreeWalk tw = new NameConflictTreeWalk(repo); tw.addTree(baseTree); tw.addTree(sourceTree); tw.addTree(remoteTree); return new TreeWalkResourceVariantTreeProvider(repo, tw, 0, 1, 2); } }</code><technical_language>close try block line 283 need revwalk longer</technical_language>

Target:
private GitResourceVariantTreeProvider createTreeProvider() throws Exception { testRepo.appendContentAndCommit(iProject, file1, INITIAL_CONTENT_1, "first file - initial commit"); testRepo.appendContentAndCommit(iProject, file2, INITIAL_CONTENT_2, "second file - initial commit"); testRepo.createBranch(MASTER, BASE); testRepo.createAndCheckoutBranch(MASTER, BRANCH); setContentsAndCommit(testRepo, iFile2, BRANCH_CHANGES + INITIAL_CONTENT_2, "branch commit"); testRepo.checkoutBranch(MASTER); setContentsAndCommit(testRepo, iFile1, INITIAL_CONTENT_1 + MASTER_CHANGES, "master commit"); iProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); try (RevWalk walk = new RevWalk(repo)) { RevTree baseTree = walk.parseTree(repo.resolve(BASE)); RevTree sourceTree = walk.parseTree(repo.resolve(MASTER)); RevTree remoteTree = walk.parseTree(repo.resolve(BRANCH)); TreeWalk tw = new TreeWalk(repo); tw.addTree(baseTree); tw.addTree(sourceTree); tw.addTree(remoteTree); return new TreeWalkResourceVariantTreeProvider(repo, tw, 0, 1, 2); } }
Source:
<code><START> public void stop() { <END> if (trace) { log.tracef("Stopping LocalTopologyManager on %s", transport.getAddress()); } running = false; for (LocalCacheStatus cache : runningCaches.values()) { cache.getTopologyUpdatesExecutor().shutdownNow(); } withinThreadExecutor.shutdown(); persistentUUIDManager.removePersistentAddressMapping(persistentUUID); }</code><technical_language>proper dependency graphs avoid "conjured" numbers</technical_language>

Target:
public void stop() { if (trace) { log.tracef("Stopping LocalTopologyManager on %s", transport.getAddress()); } running = false; for (LocalCacheStatus cache : runningCaches.values()) { cache.getTopologyUpdatesExecutor().shutdownNow(); } withinThreadExecutor.shutdown(); }
Source:
<code>private List<GlusterVolumeEntity> getEligibleVolumesList(Set<GlusterVolumeEntity> upVolumesWithSuggestedCapacityAndNotInMasterCluster, Set<GlusterVolumeEntity> existingSessionSlaveVolumes) { List<GlusterVolumeEntity> eligibleVolumes = new ArrayList<GlusterVolumeEntity>(); <START> upVolumesWithSuggestedCapacityAndNotInMasterCluster.removeAll(existingSessionSlaveVolumes); <END> eligibleVolumes.addAll(upVolumesWithSuggestedCapacityAndNotInMasterCluster); return eligibleVolumes; }</code><technical_language>return upVolumesWithSuggestedCapacityAndNotInMasterCluster</technical_language>

Target:
private Set<GlusterVolumeEntity> getEligibleVolumesList(Set<GlusterVolumeEntity> upVolumesWithSuggestedCapacityAndNotInMasterCluster, Set<GlusterVolumeEntity> existingSessionSlaveVolumes) { upVolumesWithSuggestedCapacityAndNotInMasterCluster.removeAll(existingSessionSlaveVolumes); return upVolumesWithSuggestedCapacityAndNotInMasterCluster; }
Source:
<code>public void visitBinaryExpression(BinaryExpressionTree tree) { if (tree.is(CONDITIONAL_AND, CONDITIONAL_OR) && !ignored.contains(tree)) { List<SyntaxToken> flatOperators = new ArrayList<>(); <START> flattenLogicalExpression(0, flatOperators, tree); <END> increaseComplexityByOne(flatOperators.get(0)); for (int i = 1; i < flatOperators.size(); i++) { SyntaxToken previous = flatOperators.get(i - 1); SyntaxToken current = flatOperators.get(i); if (!sameOperators(previous, current)) { increaseComplexityByOne(current); } } } super.visitBinaryExpression(tree); }</code><technical_language>Magic number</technical_language>

Target:
public void visitBinaryExpression(BinaryExpressionTree tree) { if (tree.is(CONDITIONAL_AND, CONDITIONAL_OR) && !ignored.contains(tree)) { List<BinaryExpressionTree> flattenedLogicalExpressions = flattenLogicalExpression(tree).collect(Collectors.toList()); BinaryExpressionTree previous = null; for (BinaryExpressionTree current : flattenedLogicalExpressions) { if (previous == null || !previous.is(current.kind())) { increaseComplexityByOne(current.operatorToken()); } previous = current; } } super.visitBinaryExpression(tree); }
Source:
<code>public String getSparkUIUrl() { if (sparkUrl != null) { return sparkUrl; } String sparkUrlProp = property.getProperty("zeppelin.spark.uiWebUrl", ""); <START> if (!sparkUrlProp.isEmpty()) { <END> return sparkUrlProp; } if (sparkVersion.newerThanEquals(SparkVersion.SPARK_2_0_0)) { Option<String> uiWebUrlOption = (Option<String>) Utils.invokeMethod(sc, "uiWebUrl"); if (uiWebUrlOption.isDefined()) { return uiWebUrlOption.get(); } } else { Option<SparkUI> sparkUIOption = (Option<SparkUI>) Utils.invokeMethod(sc, "ui"); if (sparkUIOption.isDefined()) { return (String) Utils.invokeMethod(sparkUIOption.get(), "appUIAddress"); } } return null; }</code><technical_language>check for isBlank <LINK_0></technical_language>

Target:
public String getSparkUIUrl() { if (sparkUrl != null) { return sparkUrl; } String sparkUrlProp = property.getProperty("zeppelin.spark.uiWebUrl", ""); if (!StringUtils.isBlank(sparkUrlProp)) { return sparkUrlProp; } if (sparkVersion.newerThanEquals(SparkVersion.SPARK_2_0_0)) { Option<String> uiWebUrlOption = (Option<String>) Utils.invokeMethod(sc, "uiWebUrl"); if (uiWebUrlOption.isDefined()) { return uiWebUrlOption.get(); } } else { Option<SparkUI> sparkUIOption = (Option<SparkUI>) Utils.invokeMethod(sc, "ui"); if (sparkUIOption.isDefined()) { return (String) Utils.invokeMethod(sparkUIOption.get(), "appUIAddress"); } } return null; }
Source:
<code>public long getUpTimeSeconds() { <START> return (System.currentTimeMillis() - started) / 1000; <END> }</code><technical_language>TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - started)</technical_language>

Target:
public long getUpTimeSeconds() { return TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - started); }
Source:
<code>private void chooseNames() { names.clearAnimation(); textToSpeechManager.stopSpeaking(); if (listState.getNumNames() > 0) { List<String> chosenNames = listState.chooseNames(settings); chosenNamesText = NameUtils.flattenListToString(chosenNames, settings); names.setAlpha(0.0f); names.setText(chosenNamesText); if (isMediaVolumeMuted()) { <START> handleNamesAnimations(300); <END> } else { playSound(); } } else { UIUtils.showLongToast(R.string.no_names_left, this); } }</code><technical_language>do need 300ms delay muted? I feel names animate in ASAP if volume? Also, get 300</technical_language>

Target:
private void chooseNames() { names.clearAnimation(); textToSpeechManager.stopSpeaking(); if (listState.getNumNames() > 0) { List<String> chosenNames = listState.chooseNames(settings); chosenNamesText = NameUtils.flattenListToString(chosenNames, settings); names.setAlpha(0.0f); names.setText(chosenNamesText); if (((AudioManager) getSystemService(Context.AUDIO_SERVICE)).getStreamVolume(AudioManager.STREAM_MUSIC) == 0) { playNamesAnimation(getResources().getInteger(R.integer.default_anim_length)); } else { playSound(); } } else { UIUtils.showLongToast(R.string.no_names_left, this); } }
Source:
<code>public CryptographyAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? ConfigurationManager.getConfiguration().clone() : configuration; if (jsonWebKey == null && Strings.isNullOrEmpty(keyId)) { throw new IllegalStateException("Json Web Key or jsonWebKey identifier are required to create cryptography client"); } if (pipeline != null) { if(jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } } if (credential == null) { throw new IllegalStateException(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.CREDENTIAL_REQUIRED)); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); <START> policies.add(retryPolicy); <END> policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(httpLogDetailLevel)); HttpPipeline pipeline = HttpPipeline.builder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); if(jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } }</code><technical_language>Need add addBeforeRetryPolicies() addAfterRetryPolicies() for tracing implementation included in pipeline</technical_language>

Target:
public CryptographyAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? ConfigurationManager.getConfiguration().clone() : configuration; if (jsonWebKey == null && Strings.isNullOrEmpty(keyId)) { throw new IllegalStateException("Json Web Key or jsonWebKey identifier are required to create cryptography client"); } if (pipeline != null) { if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } } if (credential == null) { throw new IllegalStateException("Key Vault credentials " + "are required to build the Cryptography async client"); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogDetailLevel)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } }
Source:
<code>private static PredicateLeaf.Type toOrcType(DataType type) { LogicalTypeRoot ltype = type.getLogicalType().getTypeRoot(); switch (ltype){ case TINYINT: case SMALLINT: case INTEGER: case BIGINT: return PredicateLeaf.Type.LONG; case FLOAT: case DOUBLE: return PredicateLeaf.Type.FLOAT; case BOOLEAN: return PredicateLeaf.Type.BOOLEAN; case VARCHAR: return PredicateLeaf.Type.STRING; case TIMESTAMP_WITHOUT_TIME_ZONE: case TIMESTAMP_WITH_LOCAL_TIME_ZONE: <START> case TIMESTAMP_WITH_TIME_ZONE: <END> return PredicateLeaf.Type.TIMESTAMP; case DATE: return PredicateLeaf.Type.DATE; case BINARY: return PredicateLeaf.Type.DECIMAL; default: return null; } }</code><technical_language>Remove this TIMESTAMP_WITH_TIME_ZONE</technical_language>

Target:
private static PredicateLeaf.Type toOrcType(DataType type) { LogicalTypeRoot ltype = type.getLogicalType().getTypeRoot(); switch (ltype) { case TINYINT: case SMALLINT: case INTEGER: case BIGINT: return PredicateLeaf.Type.LONG; case FLOAT: case DOUBLE: return PredicateLeaf.Type.FLOAT; case BOOLEAN: return PredicateLeaf.Type.BOOLEAN; case CHAR: case VARCHAR: return PredicateLeaf.Type.STRING; case TIMESTAMP_WITHOUT_TIME_ZONE: return PredicateLeaf.Type.TIMESTAMP; case DATE: return PredicateLeaf.Type.DATE; case DECIMAL: return PredicateLeaf.Type.DECIMAL; default: return null; } }
Source:
<code>public ResponseEntity<?> addProfile(@AuthenticationPrincipal User user, @Validated @RequestBody ProfileDTO input) { if (checkAllowedToEditProfile(user, input)) { User changedUser = userService.addProfile(user.getId(), input); return createResponseEntity(HttpStatus.OK, "Profile successfully changed", changedUser.getProfile()); } else { <START> return createResponseEntity(HttpStatus.BAD_REQUEST, "Unable to change date during event", user.getProfile()); <END> } }</code><technical_language>permitted maybe? request is valid</technical_language>

Target:
public ResponseEntity<?> addProfile(@AuthenticationPrincipal User user, @Validated @RequestBody ProfileDTO input) { if (allowedToEditProfile(user, input)) { User changedUser = userService.addProfile(user.getId(), input); return createResponseEntity(HttpStatus.OK, "Profile successfully changed", changedUser.getProfile()); } else { return createResponseEntity(HttpStatus.BAD_REQUEST, "Not permitted to change date during event", user.getProfile()); } }
Source:
<code>private void testTransformers(ModelTestControllerVersion controllerVersion, ModelVersion agroalVersion, String xmlResource) throws Exception { KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()); builder.createLegacyKernelServicesBuilder(createAdditionalInitialization(), controllerVersion, agroalVersion) .addMavenResourceURL(getExtensionMavenGAV(controllerVersion)) .skipReverseControllerCheck() .dontPersistXml(); KernelServices mainServices = builder.build(); assertTrue(mainServices.isSuccessfulBoot()); assertTrue(mainServices.getLegacyServices(agroalVersion).isSuccessfulBoot()); List<ModelNode> ops = builder.parseXmlResource(xmlResource); System.out.println("ops = " + ops); <START> PathAddress subsystemAddress = PathAddress.pathAddress(SUBSYSTEM, AgroalExtension.SUBSYSTEM_NAME); <END> ModelTestUtils.checkFailedTransformedBootOperations(mainServices, agroalVersion, ops, new FailedOperationTransformationConfig() .addFailedAttribute(subsystemAddress, new FailedOperationTransformationConfig.NewAttributesConfig( XADataSourceDefinition.RECOVERY_USERNAME_ATTRIBUTE, XADataSourceDefinition.RECOVERY_PASSWORD_ATTRIBUTE, XADataSourceDefinition.RECOVERY_AUTHENTICATION_CONTEXT, XADataSourceDefinition.RECOVERY_CREDENTIAL_REFERENCE)) .addFailedAttribute(subsystemAddress, new CorrectToFalse( XADataSourceDefinition.RECOVERY)) ); }</code><technical_language>fixed <LINK_0> need rename this variable append path for xa-datasource children. afraid I remember if this stuff allows wildcards not. If need append proper resulting path element configuration</technical_language>

Target:
private void testTransformers(ModelTestControllerVersion controllerVersion, ModelVersion agroalVersion, String xmlResource) throws Exception { KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()); builder.createLegacyKernelServicesBuilder(createAdditionalInitialization(), controllerVersion, agroalVersion) .addMavenResourceURL(getExtensionMavenGAV(controllerVersion)) .skipReverseControllerCheck() .dontPersistXml(); KernelServices mainServices = builder.build(); assertTrue(mainServices.isSuccessfulBoot()); assertTrue(mainServices.getLegacyServices(agroalVersion).isSuccessfulBoot()); List<ModelNode> ops = builder.parseXmlResource(xmlResource); System.out.println("ops = " + ops); PathAddress subsystemAddress = PathAddress.pathAddress(SUBSYSTEM, AgroalExtension.SUBSYSTEM_NAME); ModelTestUtils.checkFailedTransformedBootOperations(mainServices, agroalVersion, ops, new FailedOperationTransformationConfig() .addFailedAttribute(subsystemAddress.append("xa-datasource"), new DiscardedAttribute( XADataSourceDefinition.RECOVERY_USERNAME_ATTRIBUTE, XADataSourceDefinition.RECOVERY_PASSWORD_ATTRIBUTE, XADataSourceDefinition.RECOVERY_AUTHENTICATION_CONTEXT, XADataSourceDefinition.RECOVERY_CREDENTIAL_REFERENCE)) .addFailedAttribute(subsystemAddress.append("xa-datasource"), new CorrectToFalse( XADataSourceDefinition.RECOVERY)) ); }
Source:
<code>public boolean canTakeStack(EntityPlayer playerIn) { boolean result = net.minecraftforge.event.ForgeEventFactory.onCanTakeItem(playerIn, this.getStack()); <START> return result && !this.getItemHandler().extractItem(index, 1, true).isEmpty(); <END> }</code><technical_language>useful for event a "vanilla result" reference</technical_language>

Target:
public boolean canTakeStack(EntityPlayer playerIn) { boolean vanillaResult = !this.getItemHandler().extractItem(index, 1, true).isEmpty(); return net.minecraftforge.event.ForgeEventFactory.onCanTakeItem(this.getStack(), this, this.inventory, playerIn, vanillaResult); }
Source:
<code>private String addSiblingTag(String parentAlias, DetailedSample sample) throws IOException { SampleClass sc = sample.getSampleClass(); <START> if (sc == null || sc.getSuffix() == null) { throw new InvalidParameterException("Unexpected null SampleClass or suffix"); } <END> final String suffix; if (SampleTissueProcessing.CATEGORY_NAME.equals(sc.getSampleCategory()) && SampleTissuePiece.SUBCATEGORY_NAME.equals(sc.getSampleSubcategory())) { suffix = ((SampleTissuePiece) sample).getTissuePieceType().getAbbreviation(); } else { suffix = sc.getSuffix(); } String partialAlias = parentAlias + SEPARATOR + suffix; if (sample.getSiblingNumber() == null) { if (siblingNumberGenerator == null) { throw new IllegalStateException("No SiblingNumberGenerator configured"); } sample.setSiblingNumber(siblingNumberGenerator.getNextSiblingNumber(SampleImpl.class, partialAlias)); } String siblingNum = sample.getSiblingNumber().toString(); if (isTissueProcessingSample(sample)) { while (siblingNum.length() < 2) siblingNum = "0" + siblingNum; } return partialAlias + siblingNum; }</code><technical_language>check for null SampleClass stay here, check for null suffix moved else block sample classes of Tissue Piece subcategory need a suffix</technical_language>

Target:
private String addSiblingTag(String parentAlias, DetailedSample sample) throws IOException { SampleClass sc = sample.getSampleClass(); if (sc == null) { throw new InvalidParameterException("Unexpected null SampleClass"); } final String suffix; if (SampleTissueProcessing.CATEGORY_NAME.equals(sc.getSampleCategory()) && SampleTissuePiece.SUBCATEGORY_NAME.equals(sc.getSampleSubcategory())) { suffix = ((SampleTissuePiece) sample).getTissuePieceType().getAbbreviation(); } else { suffix = sc.getSuffix(); } if (suffix == null) { throw new InvalidParameterException("Unexpected null suffix"); } String partialAlias = parentAlias + SEPARATOR + suffix; if (sample.getSiblingNumber() == null) { if (siblingNumberGenerator == null) { throw new IllegalStateException("No SiblingNumberGenerator configured"); } sample.setSiblingNumber(siblingNumberGenerator.getNextSiblingNumber(SampleImpl.class, partialAlias)); } String siblingNum = sample.getSiblingNumber().toString(); if (isTissueProcessingSample(sample)) { while (siblingNum.length() < 2) siblingNum = "0" + siblingNum; } return partialAlias + siblingNum; }
Source:
<code>public void onNewImageFromCamera() { <START> if (navigator.isSdkAboveOrEqualM() && !navigator.doIHavePermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { <END> navigator.askForPermission(new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, PERMISSION_EXTERNAL_STORAGE_NEW_IMAGE_CAMERA); } else { interactor.createFile(this, CREATE_FILE_TAKE_PHOTO, null); } }</code><technical_language>copy-paste sections starting clutter presenter. Please try extract a common denominator (e.g. a function) reduce repeating code snippets</technical_language>

Target:
public void onNewImageFromCamera() { interactor.createFile(this, CREATE_FILE_TAKE_PHOTO, null); }
Source:
<code>public void moveShareableDiskToGlusterDomain() { initializeCommand(ImageOperation.Move); initShareableDiskImage(); initGlusterDomain(); <START> assertFalse(command.canDoAction()); <END> }</code><technical_language>please check correct message is returned..see done in other checks</technical_language>

Target:
public void moveShareableDiskToGlusterDomain() { initializeCommand(ImageOperation.Move); initSrcStorageDomain(); initShareableDiskImage(); initGlusterDomain(); assertFalse(command.canDoAction()); assertTrue(command.getReturnValue() .getCanDoActionMessages() .contains(VdcBllMessages.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS.toString())); }
Source:
<code>private boolean hasJdtCoreSettingsChange(SimpleLookupTable deltas) { Object resourceDelta = deltas.get(this.currentProject); if (resourceDelta instanceof IResourceDelta) { IResourceDelta delta = (IResourceDelta) resourceDelta; class CheckForJdtCoreSettingsFileChange implements IResourceDeltaVisitor { boolean hasJdtCoreSettingsChange = false; @Override public boolean visit(IResourceDelta childDelta) throws CoreException { IResource resource = childDelta.getResource(); IPath resourcePath = resource.getProjectRelativePath(); String resourceFilename = resourcePath.lastSegment(); <START> if ("org.eclipse.jdt.core.prefs".equals(resourceFilename)) { END> this.hasJdtCoreSettingsChange = true; return false; } return true; } } try { CheckForJdtCoreSettingsFileChange visitor = new CheckForJdtCoreSettingsFileChange(); delta.accept(visitor); return visitor.hasJdtCoreSettingsChange; } catch (CoreException e) { Util.log(e, "Failed to check whether deltas contain JDT preference changes"); } } return false; }</code><technical_language>String prefs = JavaProject.DEFAULT_PREFERENCES_DIRNAME + "/" + JavaProject.JAVA_CORE_PREFS_FILE; IPath expectedPath = Path.fromPortableString(prefs); resourcePath.equals(expectedPath) I tested, this work</technical_language>

Target:
private boolean hasJdtCoreSettingsChange(SimpleLookupTable deltas) { Object resourceDelta = deltas.get(this.currentProject); if (resourceDelta instanceof IResourceDelta) { IResourceDelta delta = (IResourceDelta) resourceDelta; class CheckForJdtCoreSettingsFileChange implements IResourceDeltaVisitor { boolean hasJdtCoreSettingsChange = false; @Override public boolean visit(IResourceDelta childDelta) throws CoreException { IResource resource = childDelta.getResource(); boolean isJdtCoreSettingsResource = isJdtCoreSettingsResource(resource); if (isJdtCoreSettingsResource) { this.hasJdtCoreSettingsChange = true; return false; } return true; } } try { CheckForJdtCoreSettingsFileChange visitor = new CheckForJdtCoreSettingsFileChange(); delta.accept(visitor); return visitor.hasJdtCoreSettingsChange; } catch (CoreException e) { Util.log(e, "Failed to check whether deltas contain JDT preference changes"); } } return false; }
Source:
<code>public void incrementAttribute(long t, int attributeQuark) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException { try { ITmfStateValue stateValue = queryOngoingState(attributeQuark); int prevValue = 0; if (!stateValue.isNull()) { prevValue = stateValue.unboxInt(); } modifyAttribute(t, TmfStateValue.newValueInt(prevValue + 1), attributeQuark); <START> } catch (TimeRangeException e) { <END> throw new TimeRangeException(getSSID() + ' ' + e.getMessage(), e); } catch (AttributeNotFoundException e) { throw new AttributeNotFoundException(getSSID() + ' ' + e.getMessage(), e); } }</code><technical_language>man</technical_language>

Target:
public void incrementAttribute(long t, int attributeQuark) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException { ITmfStateValue stateValue = queryOngoingState(attributeQuark); int prevValue = 0; if (!stateValue.isNull()) { prevValue = stateValue.unboxInt(); } modifyAttribute(t, TmfStateValue.newValueInt(prevValue + 1), attributeQuark); }
Source:
<code>private void removeFromHistoryAndAnnotationModel( final Collection<ContributionAnnotationHistory> histories) { final Set<IAnnotationModel> annotationModels = new HashSet<>(); final Set<User> users = new HashSet<>(); for (final ContributionAnnotationHistory history : histories) { <START> List<ContributionAnnotation> allAnnotationsInHistory = history.clear(); <END> for (ContributionAnnotation annotation : allAnnotationsInHistory) { annotationModels.add(annotation.getModel()); users.add(annotation.getSource()); } } for (final IAnnotationModel annotationModel : annotationModels) annotationModelHelper.removeAnnotationsFromModel( annotationModel, (a) -> a instanceof ContributionAnnotation && users.contains(((ContributionAnnotation) (a)).getSource())); }</code><technical_language>2 cents: final key constantly do all. code pretty weird GIT Blame written developers</technical_language>

Target:
private void removeFromHistoryAndAnnotationModel( final Collection<ContributionAnnotationHistory> histories) { final Set<IAnnotationModel> annotationModels = new HashSet<>(); final Set<User> users = new HashSet<>(); for (final ContributionAnnotationHistory history : histories) { final List<ContributionAnnotation> allAnnotationsInHistory = history.clear(); for (final ContributionAnnotation annotation : allAnnotationsInHistory) { annotationModels.add(annotation.getModel()); users.add(annotation.getSource()); } } for (final IAnnotationModel annotationModel : annotationModels) annotationModelHelper.removeAnnotationsFromModel( annotationModel, (a) -> a instanceof ContributionAnnotation && users.contains(((ContributionAnnotation) (a)).getSource())); }
Source:
<code>private void on(EventDispatchedToSubscriber event) { <START> getBuilder().addEvents(event.getPayload()); <END> }</code><technical_language>I get idea wrong. store events in state - fit storage memory. Instead history() develop API further</technical_language>

Target:
private void on(EventDispatchedToSubscriber event) { updateLastEventTime(event.getPayload() .getWhenDispatched()); }
Source:
<code>public WakeupResponse wakeup(@ApiParam("Internal id for workflow instance") @PathVariable("id") int id, @RequestBody @Valid @ApiParam("Expected states") WakeupRequest req) { WakeupResponse response = new WakeupResponse(); <START> List<String> expectedStates = req.expectedStates != null ? req.expectedStates : emptyList(); <END> response.wakeupSuccess = workflowInstances.wakeupWorkflowInstance(id, expectedStates); return response; }</code><technical_language>suggestion List<String> expectedStates = Optional.ofNullable(req.expectedStates).orElseGet(Collections::emptyList);</technical_language>

Target:
public WakeupResponse wakeup(@ApiParam("Internal id for workflow instance") @PathVariable("id") int id, @RequestBody @Valid @ApiParam("Expected states") WakeupRequest req) { WakeupResponse response = new WakeupResponse(); List<String> expectedStates = ofNullable(req.expectedStates).orElseGet(Collections::emptyList); response.wakeupSuccess = workflowInstances.wakeupWorkflowInstance(id, expectedStates); return response; }
Source:
<code>protected OAuthCredentials getOAuthCredentials(final WebContext context) { final String stateParameter = context.getRequestParameter("state"); <START> if (stateParameter != null && !stateParameter.isEmpty()) { <END> final String sessionState = (String) context.getSessionAttribute(getName() + STATE_PARAMETER); context.setSessionAttribute(getName() + STATE_PARAMETER, null); logger.debug("sessionState : / stateParameter : {}", sessionState, stateParameter); if (!stateParameter.equals(sessionState)) { final String message = "State parameter mismatch : session expired or possible threat of cross-site request forgery"; throw new OAuthCredentialsException(message); } } else if (requiresStateParameter()) { final String message = "Missing state parameter : session expired or possible threat of cross-site request forgery"; throw new OAuthCredentialsException(message); } final String verifierParameter = context.getRequestParameter(OAUTH_CODE); if (verifierParameter != null) { final String verifier = OAuthEncoder.decode(verifierParameter); logger.debug("verifier : {}", verifier); return new OAuthCredentials(verifier, getName()); } else { final String message = "No credential found"; throw new OAuthCredentialsException(message); } }</code><technical_language>logic changed here, is a refactoring, it</technical_language>

Target:
protected OAuthCredentials getOAuthCredentials(final WebContext context) { final String verifierParameter = context.getRequestParameter(OAUTH_CODE); if (verifierParameter != null) { final String verifier = OAuthEncoder.decode(verifierParameter); logger.debug("verifier : {}", verifier); return new OAuthCredentials(verifier, getName()); } else { final String message = "No credential found"; throw new OAuthCredentialsException(message); } }