auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpRequest request = (HttpRequest) e.getMessage(); ChannelBuffer content = request.getContent(); if (content.readable()) { <START> sendMessage(MessageBuilder.withPayload(content.toString(Charset.forName("UTF-8"))).build()); <END> } writeResponse(request, e.getChannel()); }</code><technical_language>I realize a cut, I if map some basic headers (method, path (uri), Accept) ?</technical_language>

Target:
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpRequest request = (HttpRequest) e.getMessage(); ChannelBuffer content = request.getContent(); if (content.readable()) { Map<String, String> messageHeaders = new HashMap<String, String>(); for (Entry<String, String> entry : request.getHeaders()) { if (!entry.getKey().toUpperCase().startsWith("ACCEPT") && !entry.getKey().toUpperCase().equals("CONNECTION")) { messageHeaders.put(entry.getKey(), entry.getValue()); } } messageHeaders.put("requestPath", request.getUri()); messageHeaders.put("requestMethod", request.getMethod().toString()); sendMessage(MessageBuilder.withPayload(content.toString(Charset.forName("UTF-8"))) .copyHeaders(messageHeaders).build()); } writeResponse(request, e.getChannel()); }
Source:
<code>public BaseResourceReferenceDt setResource(IBaseResource theResource) { myResource = theResource; <START> return null; <END> }</code><technical_language>nan</technical_language>

Target:
public BaseResourceReferenceDt setResource(IBaseResource theResource) { myResource = theResource; return this; }
Source:
<code>@Override public Frame fetch(StatementHandle h, long offset, int fetchMaxRowCount) throws NoSuchStatementException { final CalciteConnectionImpl calciteConnection = getConnection(); CalciteServerStatement stmt = calciteConnection.server.getStatement(h); final Signature signature = stmt.getSignature(); final Iterator<Object> iterator; if (stmt.getResultSet() == null) { final Iterable<Object> iterable = _createIterable(h, signature, null, null); iterator = iterable.iterator(); stmt.setResultSet(iterator); } else { iterator = stmt.getResultSet(); } final List rows = MetaImpl.collect(signature.cursorFactory, LimitIterator.of(iterator, fetchMaxRowCount), new ArrayList<List<Object>>()); boolean done = fetchMaxRowCount == 0 || rows.size() < fetchMaxRowCount; @SuppressWarnings("unchecked") List<Object> rows1 = (List<Object>) rows; <START> stmt.setResultSet(null); <END> return new Meta.Frame(offset, done, rows1); }</code><technical_language>This is aggressive :( iterator is released a call ended fully read. If wrong, setting null infinite loop result row count is large enough</technical_language>

Target:
@Override public Frame fetch(StatementHandle h, long offset, int fetchMaxRowCount) throws NoSuchStatementException { final CalciteConnectionImpl calciteConnection = getConnection(); CalciteServerStatement stmt = calciteConnection.server.getStatement(h); final Signature signature = stmt.getSignature(); final Iterator<Object> iterator; if (stmt.getResultSet() == null) { final Iterable<Object> iterable = _createIterable(h, signature, null, null); iterator = iterable.iterator(); stmt.setResultSet(iterator); } else { iterator = stmt.getResultSet(); } final List rows = MetaImpl.collect(signature.cursorFactory, LimitIterator.of(iterator, fetchMaxRowCount), new ArrayList<List<Object>>()); boolean done = fetchMaxRowCount == 0 || rows.size() < fetchMaxRowCount; @SuppressWarnings("unchecked") List<Object> rows1 = (List<Object>) rows; if (done) { stmt.setResultSet(null); } return new Meta.Frame(offset, done, rows1); }
Source:
<code>public String getDeviceName() { <START> String manufacturer = Build.MANUFACTURER; <END> String model = Build.MODEL; String deviceName; if (model.startsWith(manufacturer)) { deviceName = StringUtils.capitalize(model); } else { deviceName = StringUtils.capitalize(manufacturer) + " " + model; } return deviceName == null ? "Unknown Device" : deviceName; }</code><technical_language>final</technical_language>

Target:
public String getDeviceName() { final String manufacturer = Build.MANUFACTURER; final String model = Build.MODEL; String deviceName; if (model.startsWith(manufacturer)) { deviceName = StringUtils.capitalize(model); } else { deviceName = StringUtils.capitalize(manufacturer) + " " + model; } return deviceName == null ? "Unknown Device" : deviceName; }
Source:
<code>public BsmAdminPageEditWindow editAttribute(String key, String value) throws InterruptedException { getSelectWebElement("attributeList").selectByVisibleText(key); editAttributeWindow() .value(value) .confirm(); <START> wait.until(ExpectedConditions.elementToBeClickable(By.id("addAttributeButton"))); <END> return this; }</code><technical_language>This is kinda a duplicate, wait in confirm() method is a reason wait for another element</technical_language>

Target:
public BsmAdminPageEditWindow editAttribute(String key, String value) throws InterruptedException { getSelectWebElement("attributeList").selectByVisibleText(key); editAttributeWindow() .value(value) .confirm(); return this; }
Source:
<code>@Test @Config(reportSdk=9) public void useOkHttpByDefault() throws Exception { Downloader downloader = Utils.createDefaultDownloader(Robolectric.application); <START> assertThat(downloader instanceof OkHttpDownloader).isTrue(); <END> }</code><technical_language>change this assertThat(downloader).isInstanceOf(OkHttpDownloader.class)</technical_language>

Target:
@Test @Config(reportSdk=GINGERBREAD) public void useOkHttpByDefault() throws Exception { Downloader downloader = Utils.createDefaultDownloader(Robolectric.application); assertThat(downloader).isInstanceOf(OkHttpDownloader.class); }
Source:
<code>public void load(@NonNull Picasso picasso, @NonNull Request request, @NonNull Callback callback) { initializeIfFirstTime(); boolean signaledCallback = false; try { <START> BufferedSource source = Okio.buffer(Okio.source(assetManager.open(getFilePath(request)))); <END> try { Bitmap bitmap = decodeStream(source, request); signaledCallback = true; callback.onSuccess(new Result(bitmap, DISK)); } finally { try { source.close(); } catch (IOException ignored) { } } } catch (Exception e) { if (!signaledCallback) { callback.onError(e); } } }</code><technical_language>a more of update</technical_language>

Target:
public void load(@NonNull Picasso picasso, @NonNull Request request, @NonNull Callback callback) { initializeIfFirstTime(); boolean signaledCallback = false; try { Source source = Okio.source(assetManager.open(getFilePath(request))); try { Bitmap bitmap = decodeStream(source, request); signaledCallback = true; callback.onSuccess(new Result(bitmap, DISK)); } finally { try { source.close(); } catch (IOException ignored) { } } } catch (Exception e) { if (!signaledCallback) { callback.onError(e); } } }
Source:
<code>public void onLiveInstanceChange(List<LiveInstance> liveInstances, NotificationContext changeContext) { try { <START> logger.trace("Live instance change triggered from with: {}", dcName, liveInstances); <END> updateInstanceLiveness(liveInstances); if (!liveStateInitialized.get()) { logger.info("Received initial notification for live instance change from {}", dcName); liveStateInitialized.set(true); } helixClusterManagerMetrics.liveInstanceChangeTriggerCount.inc(); } catch (Throwable t) { errorCount.incrementAndGet(); throw t; } }</code><technical_language>trace low, this happen</technical_language>

Target:
public void onLiveInstanceChange(List<LiveInstance> liveInstances, NotificationContext changeContext) { try { logger.debug("Live instance change triggered from with: {}", dcName, liveInstances); updateInstanceLiveness(liveInstances); if (!liveStateInitialized.get()) { logger.info("Received initial notification for live instance change from {}", dcName); liveStateInitialized.set(true); } helixClusterManagerMetrics.liveInstanceChangeTriggerCount.inc(); } catch (Throwable t) { errorCount.incrementAndGet(); throw t; } }
Source:
<code>public EncryptionServiceImpl() { String passwordDirectory = System.getProperty("ddf.etc").concat("/certs"); String keysetLocation = Paths.get(passwordDirectory, KEYSET_FILE_NAME).toString(); synchronized (EncryptionServiceImpl.class) { File keysetFile = new File(keysetLocation); InputStream keysetFileInputStream = null; OutputStream keysetFileOutputStream = null; try { AeadConfig.register(); if (!keysetFile.exists()) { keysetHandle = KeysetHandle.generateNew(AeadKeyTemplates.AES128_GCM); keysetFileOutputStream = Files.newOutputStream(Paths.get(keysetLocation)); CleartextKeysetHandle.write( keysetHandle, JsonKeysetWriter.withOutputStream(keysetFileOutputStream)); } else { keysetFileInputStream = Files.newInputStream(Paths.get(keysetLocation)); keysetHandle = CleartextKeysetHandle.read(JsonKeysetReader.withInputStream(keysetFileInputStream)); } aead = AeadFactory.getPrimitive(keysetHandle); } catch (GeneralSecurityException | IOException e) { LOGGER.warn("Problem initializing Tink. Enable debug logging for more information."); LOGGER.debug("", e); } finally { try { keysetFileInputStream.close(); <START> } catch (IOException | NullPointerException ignore) { <END> } try { keysetFileOutputStream.close(); } catch (IOException | NullPointerException ignore) { } } } }</code><technical_language>Do a null check instead of catching NPE. a try resources used</technical_language>

Target:
public EncryptionServiceImpl() { crypter = AccessController.doPrivileged((PrivilegedAction<Crypter>) () -> new Crypter(CRYPTER_NAME)); }
Source:
<code>public static String updateOldDescription(String description) { String newDescription = ""; <START> newDescription = updatePrisonerDescription(description); <END> if (!newDescription.isEmpty()) { return newDescription; } newDescription = updateBondsmanDescription(description); if (!newDescription.isEmpty()) { return newDescription; } return ""; }</code><technical_language>move this declaration remove meaningless initialization</technical_language>

Target:
public static String updateOldDescription(String description) { String newDescription = updatePrisonerDescription(description); if (!newDescription.isEmpty()) { return newDescription; } newDescription = updateBondsmanDescription(description); if (!newDescription.isEmpty()) { return newDescription; } return ""; }
Source:
<code>public void testCacheBehaviour(){ IgniteUtils.setCurrentIgniteName(ignite.configuration().getIgniteInstanceName()); <START> int size = rows; <END> cacheBehaviorLogic(size); }</code><technical_language>dont need size variable here</technical_language>

Target:
public void testCacheBehaviour(){ IgniteUtils.setCurrentIgniteName(ignite.configuration().getIgniteInstanceName()); cacheBehaviorLogic(rows); }
Source:
<code>void preInit( FMLPreInitializationEvent event ) { if ( !Loader.isModLoaded( "appliedenergistics2-core" ) ) { CommonHelper.proxy.missingCoreMod(); } Stopwatch star = Stopwatch.createStarted(); this.configPath = event.getModConfigurationDirectory().getPath() + File.separator + "AppliedEnergistics2" + File.separator; AEConfig.instance = new AEConfig( this.configPath ); FacadeConfig.instance = new FacadeConfig( this.configPath ); AELog.info( "Starting Pre Initialization" ); CreativeTab.init(); if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) ) CreativeTabFacade.init(); if ( Platform.isClient() ) CommonHelper.proxy.init(); Registration.instance.PreInit( event ); if ( AEConfig.instance.isFeatureEnabled( AEFeature.VersionChecker ) ) { AELog.info( "Starting VersionChecker" ); this.startService( "AE2 VersionChecker", new Thread( new VersionChecker() ) ); } AELog.info( "Pre Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" ); <START> } <END></code><technical_language>removed top brackets here</technical_language>

Target:
void preInit( FMLPreInitializationEvent event ) { if ( !Loader.isModLoaded( "appliedenergistics2-core" ) ) { CommonHelper.proxy.missingCoreMod(); } Stopwatch star = Stopwatch.createStarted(); this.configPath = event.getModConfigurationDirectory().getPath() + File.separator + "AppliedEnergistics2" + File.separator; AEConfig.instance = new AEConfig( this.configPath ); FacadeConfig.instance = new FacadeConfig( this.configPath ); AELog.info( "Pre Initialization ( started )" ); CreativeTab.init(); if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) ) CreativeTabFacade.init(); if ( Platform.isClient() ) CommonHelper.proxy.init(); Registration.instance.PreInit( event ); if ( AEConfig.instance.isFeatureEnabled( AEFeature.VersionChecker ) ) { AELog.info( "Starting VersionChecker" ); this.startService( "AE2 VersionChecker", new Thread( new VersionChecker() ) ); } AELog.info( "Pre Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" ); }
Source:
<code>public static void checkValidPath(String path) throws InvalidPathException { ObjectChecker chk = new ObjectChecker() <START> .setSafeForWindows(SystemReader.getInstance().isWindows()); <END> byte[] bytes = Constants.encode(path); int segmentStart = 0; try { for (int i = 0; i < bytes.length; i++) { if (bytes[i] == '/') { chk.checkPathSegment(bytes, segmentStart, i); segmentStart = i + 1; } } chk.checkPathSegment(bytes, segmentStart, bytes.length); } catch (CorruptObjectException e) { throw new InvalidPathException(e.getMessage()); } }</code><technical_language>Likewise</technical_language>

Target:
public static void checkValidPath(String path) throws InvalidPathException { ObjectChecker chk = new ObjectChecker() .setSafeForWindows(SystemReader.getInstance().isWindows()) .setSafeForMacOS(SystemReader.getInstance().isMacOS()); byte[] bytes = Constants.encode(path); int segmentStart = 0; try { for (int i = 0; i < bytes.length; i++) { if (bytes[i] == '/') { chk.checkPathSegment(bytes, segmentStart, i); segmentStart = i + 1; } } chk.checkPathSegment(bytes, segmentStart, bytes.length); } catch (CorruptObjectException e) { throw new InvalidPathException(e.getMessage()); } }
Source:
<code>public static float convertLightCountsToLux(final int rawCount) { final float maxLux = 125.0f; final float maxCount = 65536.0f; final float whiteMultiplier = 2.0f; <START> final float internalIntensity = ((float) rawCount / maxCount) * maxLux; <END> return (whiteMultiplier * internalIntensity); }</code><technical_language>this is possibly a breaking change for timelines. tested</technical_language>

Target:
public static float convertLightCountsToLux(final int rawCount) { final float maxLux = 125.0f; final float maxCount = 65536.0f; final float whiteMultiplier = 2.0f; if ((float) rawCount > maxCount) { return (whiteMultiplier * maxLux); } final float internalIntensity = ((float) rawCount / maxCount) * maxLux; return (whiteMultiplier * internalIntensity); }
Source:
<code>private boolean getNodeMemberships(Element subscriptions) throws NodeStoreException, InterruptedException { ResultSet<NodeMembership> cur = channelManager.getNodeMemberships(node); if (channelManager.isLocalNode(node)) { subscriptions.addAttribute(XMLConstants.NODE_ATTR, node); for (NodeMembership ns : cur) { <START> if (actorJid.toBareJID().equals(ns.getUser().toBareJID())) { <END> Element subscription = subscriptions.addElement(XMLConstants.SUBSCRIPTION_ELEM); subscription.addAttribute(XMLConstants.NODE_ATTR, ns.getNodeId()) .addAttribute(XMLConstants.SUBSCRIPTION_ELEM, ns.getSubscription().toString()) .addAttribute(XMLConstants.JID_ATTR, ns.getUser().toBareJID()); if (null != ns.getInvitedBy() && isOwnerModerator()) { subscription.addAttribute(XMLConstants.INVITED_BY_ELEM, ns.getInvitedBy().toBareJID()); } } } } else { if (!channelManager.isCachedNode(node) || (null != requestIq.getElement().element(XMLConstants.PUBSUB_ELEM).element(XMLConstants.SET_ELEM)) && !cur.isEmpty()) { makeRemoteRequest(new JID(node.split("/")[2]).getDomain()); } return false; } return true; }</code><technical_language>This a comparison, original line: java if (false == actorJid.toBareJID().equals(ns.getUser())) { Basically want show a subscription != 'subscribed' owner/admin user themselves</technical_language>

Target:
private boolean getNodeMemberships(Element subscriptions) throws NodeStoreException, InterruptedException { ResultSet<NodeMembership> cur = channelManager.getNodeMemberships(node); if (Configuration.getInstance().isLocalNode(node)) { subscriptions.addAttribute(XMLConstants.NODE_ATTR, node); for (NodeMembership ns : cur) { if (!isUserPriviledged(ns.getUser()) && !ns.getSubscription().equals(Subscriptions.subscribed)) { continue; } Element subscription = subscriptions.addElement(XMLConstants.SUBSCRIPTION_ELEM); subscription.addAttribute(XMLConstants.NODE_ATTR, ns.getNodeId()) .addAttribute(XMLConstants.SUBSCRIPTION_ELEM, ns.getSubscription().toString()) .addAttribute(XMLConstants.JID_ATTR, ns.getUser().toBareJID()); if (null != ns.getInvitedBy() && isUserPriviledged(ns.getUser())) { subscription.addAttribute(XMLConstants.INVITED_BY_ELEM, ns.getInvitedBy().toBareJID()); } } } else { if (!channelManager.isCachedNode(node) || (null != requestIq.getElement().element(XMLConstants.PUBSUB_ELEM).element(XMLConstants.SET_ELEM)) && !cur.isEmpty()) { makeRemoteRequest(new JID(node.split("/")[2]).getDomain()); } return false; } return true; }
Source:
<code>public void testRestart() throws RunScriptOnNodesException { final String groupName = String.format(NAME_PREFIX, System.getProperty("user.name").substring(0, 3)); Set<? extends NodeMetadata> nodes = view.getComputeService().rebootNodesMatching(inGroup(groupName)); assertTrue(nodes.size() > 0); boolean allRestarted = false; while (!allRestarted) { nodes = view.getComputeService().listNodesDetailsMatching(nameStartsWith(groupName)); for (NodeMetadata node : nodes) { if (node.getStatus() != NodeMetadata.Status.RUNNING) { allRestarted = false; try { Thread.sleep(30 * 1000); } catch (InterruptedException e) { } continue; } else { allRestarted = true; } } } assertTrue(allRestarted); view.getComputeService().destroyNodesMatching(inGroup(groupName)); <START> } <END></code><technical_language>tests covered BaseComputeServiceLiveTest. subclass try tests pass overriding methods (as is compute service implementation contract). [DigitalOcean](<LINK_0> example</technical_language>

Target:
public void testRestart() throws RunScriptOnNodesException { final String groupName = this.azureGroup; Set<? extends NodeMetadata> nodes = view.getComputeService().rebootNodesMatching(inGroup(groupName)); assertTrue(nodes.size() > 0); boolean allRestarted = false; while (!allRestarted) { nodes = view.getComputeService().listNodesDetailsMatching(nameStartsWith(groupName)); for (NodeMetadata node : nodes) { if (node.getStatus() != NodeMetadata.Status.RUNNING) { allRestarted = false; try { Thread.sleep(30 * 1000); } catch (InterruptedException e) { } continue; } else { allRestarted = true; } } } assertTrue(allRestarted); view.getComputeService().destroyNodesMatching(inGroup(groupName)); }
Source:
<code>private void registerExternalProvidersTrustStore(DefaultHttpClient httpClient) { try { KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); FileInputStream inputStream = new FileInputStream( new File(EngineLocalConfig.getInstance().getExternalProvidersTrustStore().getAbsolutePath())); try { trustStore.load(inputStream, EngineLocalConfig.getInstance().getExternalProvidersTrustStorePassword().toCharArray()); } finally { <START> inputStream.close(); <END> } SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore); Scheme sch = new Scheme("https", 443, socketFactory); httpClient.getConnectionManager().getSchemeRegistry().register(sch); } catch (Exception ex) { log.warn("Cannot register external providers trust store: {}", ex.getMessage()); } }</code><technical_language>instead try-with-resource paradigm</technical_language>

Target:
private void registerExternalProvidersTrustStore(DefaultHttpClient httpClient) { try (FileInputStream inputStream = new FileInputStream( new File(EngineLocalConfig.getInstance().getExternalProvidersTrustStore().getAbsolutePath()));) { KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); trustStore.load(inputStream, EngineLocalConfig.getInstance().getExternalProvidersTrustStorePassword().toCharArray()); SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore); Scheme scheme = new Scheme("https", 443, socketFactory); httpClient.getConnectionManager().getSchemeRegistry().register(scheme); } catch (Exception ex) { log.warn("Cannot register external providers trust store: {}", ex.getMessage()); log.debug("Exception", ex); } }
Source:
<code>public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); TextView filesText = (TextView) view.findViewById(R.id.files_text); view.findViewById(R.id.finish_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (activity != null) { activity.finish(); } } }); filesText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (parent != null) { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); Uri uri = Uri.parse(parent); intent.setDataAndType(uri, "resource/folder"); startActivity(Intent.createChooser(intent, "Open folder")); } } }); int numFiles = 0; Bundle args = getArguments(); if (args != null) { ArrayList<File> files = (ArrayList<File>) args.getSerializable(GeoTagImagesService.EXTRA_GEOTAGGED_FILES); numFiles = files.size(); <START> if (files != null && numFiles > 0) { <END> parent = files.get(0).getParent(); } } if (parent != null) { filesText.setText(String.format(getString(R.string.photos_geotagged), String.valueOf(numFiles), parent)); } else { filesText.setText(getString(R.string.no_files_geotagged)); } }</code><technical_language>@chaviw point checking for files null call files.size() above</technical_language>

Target:
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); TextView filesText = (TextView) view.findViewById(R.id.files_text); view.findViewById(R.id.finish_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (activity != null) { activity.finish(); } } }); filesText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (parent != null) { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); Uri uri = Uri.parse(parent); intent.setDataAndType(uri, "resource/folder"); startActivity(Intent.createChooser(intent, "Open folder")); } } }); int numFiles = 0; Bundle args = getArguments(); if (args != null) { numFiles = args.getInt(GeoTagActivity.NUM_IMAGE_FILES); parent = args.getString(GeoTagActivity.PARENT_DIR); } if (parent != null) { filesText.setText(getString(R.string.photos_geotagged, String.valueOf(numFiles), parent)); } else { filesText.setText(R.string.no_files_geotagged); } }
Source:
<code>public Boolean attachStdin() { <START> return (attachStdin != null) ? attachStdin : Boolean.FALSE; <END> }</code><technical_language>if Boolean methods null return type boolean instead of Boolean</technical_language>

Target:
public boolean attachStdin() { return attachStdin; }
Source:
<code><START> public NonTerminal(String name) { <END> this.name = name; this.entryState = new EntryState(name + "-entry", this); this.exitState = new ExitState(name + "-exit", this); }</code><technical_language>I throw exception if name is null</technical_language>

Target:
public NonTerminal(String name) { assert name != null && !name.equals("") : "NonTerminal name cannot be null or empty."; this.name = name; this.entryState = new EntryState(name + "-entry", this); this.exitState = new ExitState(name + "-exit", this); }
Source:
<code>public void determineNextResync(ZonedDateTime now) { <START> this.nextResync = now.plusNanos(this.resyncPeriodInMillis * 1000000); <END> }</code><technical_language>understand here. multiply 1,000,000 a millisecond unit add a nanosecond? (it _probably_ sense if divided instead of multiply, do now.plus(resyncPeriodInMillis, ChronoUnit.MILLIS))</technical_language>

Target:
public void determineNextResync(ZonedDateTime now) { this.nextResync = now.plus(this.resyncPeriodInMillis, ChronoUnit.MILLIS); }
Source:
<code>@Test public void testArrayGetCloneRefCouples() throws Exception { <START> Run("@a = array('Meow'); @b = array(@a, @a, array(@a)); @c = @b[]; msg((ref_equals(@b[0], @b[1]) && ref_equals(@b[0], @b[2][0])));", fakePlayer); <END> verify(fakePlayer).sendMessage("true"); }</code><technical_language>@c is here, I meant for be</technical_language>

Target:
@Test public void testArrayGetCloneRefCouples() throws Exception { Run("@a = array('Meow'); @b = array(@a, @a, array(@a)); @c = @b[]; msg((ref_equals(@c[0], @c[1]) && ref_equals(@c[0], @c[2][0])));", fakePlayer); verify(fakePlayer).sendMessage("true"); }
Source:
<code>void resizeArray(int newArraySize) { long[] newArray = new long[newArraySize]; <START> System.arraycopy(this.array, 0, newArray, 0, this.array.length); <END> this.array = newArray; }</code><technical_language>I this fail if new size is smaller current one. checked assert (private methods)</technical_language>

Target:
void resizeArray(int newArraySize) { long[] newArray = new long[newArraySize]; System.arraycopy(this.arrayOfBits, 0, newArray, 0, Math.min(this.arrayOfBits.length, newArraySize)); this.arrayOfBits = newArray; }
Source:
<code>public void onResume() { super.onResume(); <START> if (mSelectRoleShareVM.isRemoveSeleted()) { <END> showSpinner(); mCollaborationsShareVM.deleteCollaboration(mSelectRoleShareVM.getCollaboration()); mSelectRoleShareVM.setRemoveSelected(false); } else { if (mSelectRoleShareVM.getSelectedRole().getValue() != null && mSelectRoleShareVM.getCollaboration() != null) { if (mSelectRoleShareVM.getSelectedRole().getValue() != mSelectRoleShareVM.getCollaboration().getRole()) { if (mSelectRoleShareVM.getSelectedRole().getValue() == BoxCollaboration.Role.OWNER) { AlertDialog dialog = new AlertDialog.Builder(getActivity()).setTitle(R.string.box_sharesdk_change_owner_alert_title) .setMessage(R.string.box_sharesdk_change_owner_alert_message) .setPositiveButton(android.R.string.yes, (d, which) -> { showSpinner(R.string.box_sharesdk_fetching_collaborators, R.string.boxsdk_Please_wait); mCollaborationsShareVM.updateOwner(mSelectRoleShareVM.getCollaboration()); }).setNegativeButton(android.R.string.no, (d, which) -> {}).setIcon(android.R.drawable.ic_dialog_alert).create(); dialog.show(); } else { showSpinner(); mCollaborationsShareVM.updateCollaboration(mSelectRoleShareVM.getCollaboration(), mSelectRoleShareVM.getSelectedRole().getValue()); } mSelectRoleShareVM.setSelectedRole(null); } } } if (mCollaborationsShareVM.getCollaborations().getValue() == null) { mCollaborationsShareVM.fetchItemInfo(mCollaborationsShareVM.getShareItem()); } }</code><technical_language>removeSelected</technical_language>

Target:
public void onResume() { super.onResume(); if (mSelectRoleShareVM.isRemoveSelected()) { showSpinner(); mCollaborationsShareVM.deleteCollaboration(mSelectRoleShareVM.getCollaboration()); } else { if (mSelectRoleShareVM.getSelectedRole().getValue() != null && mSelectRoleShareVM.getCollaboration() != null) { if (mSelectRoleShareVM.getSelectedRole().getValue() != mSelectRoleShareVM.getCollaboration().getRole()) { if (mSelectRoleShareVM.getSelectedRole().getValue() == BoxCollaboration.Role.OWNER) { AlertDialog dialog = new AlertDialog.Builder(getActivity()).setTitle(R.string.box_sharesdk_change_owner_alert_title) .setMessage(R.string.box_sharesdk_change_owner_alert_message) .setPositiveButton(android.R.string.yes, (d, which) -> { showSpinner(R.string.box_sharesdk_fetching_collaborators, R.string.boxsdk_Please_wait); mCollaborationsShareVM.updateOwner(mSelectRoleShareVM.getCollaboration()); }).setNegativeButton(android.R.string.no, (d, which) -> {}).setIcon(android.R.drawable.ic_dialog_alert).create(); dialog.show(); } else { showSpinner(); mCollaborationsShareVM.updateCollaboration(mSelectRoleShareVM.getCollaboration(), mSelectRoleShareVM.getSelectedRole().getValue()); } } } } if (mCollaborationsShareVM.getCollaborations().getValue() == null) { mCollaborationsShareVM.fetchItemInfo(mCollaborationsShareVM.getShareItem()); } mSelectRoleShareVM.reset(); }
Source:
<code>void stop() { allocatorExecutor.shutdown(); try { <START> if (!allocatorExecutor.awaitTermination(3, TimeUnit.SECONDS)) { <END> log.warn("Timedout while awaiting for allocatorExecutor's termination, so force shuttingdown"); } } catch (InterruptedException e) { log.warn("Got InterruptedException while awaiting termination of allocatorExecutor, so force shuttingdown"); } allocatorExecutor.shutdownNow(); log.info("Stopped entry logger preallocator."); }</code><technical_language>give some more time, 30 seconds</technical_language>

Target:
void stop() { allocatorExecutor.shutdown(); try { if (!allocatorExecutor.awaitTermination(5, TimeUnit.SECONDS)) { log.warn("Timedout while awaiting for allocatorExecutor's termination, so force shuttingdown"); } } catch (InterruptedException e) { log.warn("Got InterruptedException while awaiting termination of allocatorExecutor, so force shuttingdown"); Thread.currentThread().interrupt(); } allocatorExecutor.shutdownNow(); log.info("Stopped entry logger preallocator."); }
Source:
<code>public AbstractLunAvailableSizeColumn() { super(new AbstractToggleButtonCell<LunModel>() { @Override public void onClickEvent(LunModel lunModel) { if (lunModel !=null) { lunModel.setAdditionalAvailableSizeSelected(!lunModel.isAdditionalAvailableSizeSelected()); } } @Override public void render(Context context, LunModel value, SafeHtmlBuilder sb, String id) { boolean isGrayedOut = value.getIsGrayedOut(); String inputId = id + "_input"; <START> <END> SafeHtml input = null; int additionalAvailableSizeSize = value.getAdditionalAvailableSize(); String additionalAvailableSizeSizeString = "+ " + additionalAvailableSizeSize + " GB"; if (additionalAvailableSizeSize == 0 || !value.getIsIncluded()) { input = templates.disabled("", "color:gray", inputId); } else if (!isGrayedOut) { input = templates.disabled("", "color:black", inputId); } else if (value.isAdditionalAvailableSizeSelected()) { input = templates.toggledDown(inputId, additionalAvailableSizeSizeString); } else { input = templates.toggledUp(inputId, additionalAvailableSizeSizeString); } sb.append(templates.span(id, input)); } }); }</code><technical_language>redundant black line</technical_language>

Target:
public AbstractLunAvailableSizeColumn() { super(new AbstractToggleButtonCell<LunModel>() { @Override public void onClickEvent(LunModel lunModel) { if (lunModel !=null) { lunModel.setAdditionalAvailableSizeSelected(!lunModel.isAdditionalAvailableSizeSelected()); } } @Override public void render(Context context, LunModel value, SafeHtmlBuilder sb, String id) { boolean isGrayedOut = value.getIsGrayedOut(); String inputId = id + "_input"; SafeHtml input = null; int additionalAvailableSizeSize = value.getAdditionalAvailableSize(); String additionalAvailableSizeSizeString = messages.additionalAvailableSizeInGB(additionalAvailableSizeSize); if (additionalAvailableSizeSize == 0 || !value.getIsIncluded()) { input = templates.disabled("", "color:gray", inputId); } else if (!isGrayedOut) { input = templates.disabled("", "color:black", inputId); } else if (value.isAdditionalAvailableSizeSelected()) { input = templates.toggledDown(inputId, additionalAvailableSizeSizeString); } else { input = templates.toggledUp(inputId, additionalAvailableSizeSizeString); } sb.append(templates.span(id, input)); } }); }
Source:
<code>public String getPendingViewAsString() { CacheTopology cacheTopology = stateTransferManager.getCacheTopology(); <START> return (!(cacheTopology != null && cacheTopology.getPendingCH() != null)) ? "N/A" <END> : cacheTopology.getPendingCH().getMembers().toString(); }</code><technical_language>Reverse operands avoid negation maybe? nicer</technical_language>

Target:
public String getPendingViewAsString() { CacheTopology cacheTopology = stateTransferManager.getCacheTopology(); return (cacheTopology != null && cacheTopology.getPendingCH() != null) ? cacheTopology.getPendingCH().getMembers().toString() : "N/A"; }
Source:
<code>public void scrutinize(ItemUpdate update) { Map<PropertyIdValue, Value> propertyIdValueValueMap = new HashMap<>(); <START> for (Statement statement : update.getAddedStatements()){ <END> PropertyIdValue pid = statement.getClaim().getMainSnak().getPropertyId(); Value value = statement.getClaim().getMainSnak().getValue(); propertyIdValueValueMap.put(pid, value); } for(PropertyIdValue propertyId : propertyIdValueValueMap.keySet()){ List<PropertyIdValue> conflictingProperties = _fetcher.getConflictsWithProperties(propertyId); if (conflictingProperties != null){ for (PropertyIdValue conflictingPid : conflictingProperties) { if (propertyIdValueValueMap.containsKey(conflictingPid) && raiseWarning(propertyId, propertyIdValueValueMap, conflictingPid)) { QAWarning issue = new QAWarning(type, propertyId.getId(), QAWarning.Severity.WARNING, 1); issue.setProperty("property_entity", propertyId); issue.setProperty("added_property_entity", conflictingPid); issue.setProperty("example_entity", update.getItemId()); addIssue(issue); } } } } }</code><technical_language>need check check some snaks</technical_language>

Target:
public void scrutinize(ItemUpdate update) { Map<PropertyIdValue, Set<Value>> propertyIdValueValueMap = new HashMap<>(); for (Statement statement : update.getAddedStatements()){ PropertyIdValue pid = statement.getClaim().getMainSnak().getPropertyId(); Value value = statement.getClaim().getMainSnak().getValue(); Set<Value> values; if (value != null) { if (propertyIdValueValueMap.containsKey(pid)) { values = propertyIdValueValueMap.get(pid); } else { values = new HashSet<>(); } values.add(value); propertyIdValueValueMap.put(pid, values); } } for(PropertyIdValue propertyId : propertyIdValueValueMap.keySet()){ Map<PropertyIdValue, List<Value>> conflictingPropertyMap = _fetcher.getParamConflictsWith(propertyId); for (PropertyIdValue conflictingPid : conflictingPropertyMap.keySet()) { if (propertyIdValueValueMap.containsKey(conflictingPid) && raiseWarning(propertyIdValueValueMap, conflictingPid, conflictingPropertyMap)) { QAWarning issue = new QAWarning(type, propertyId.getId()+conflictingPid.getId(), QAWarning.Severity.WARNING, 1); issue.setProperty("property_entity", propertyId); issue.setProperty("added_property_entity", conflictingPid); issue.setProperty("example_entity", update.getItemId()); addIssue(issue); } } } }
Source:
<code>public SSLContext get() { Credentials currentCreds = checkNotNull(creds.get(), "credential supplier returned null"); String keyStorePassword = checkNotNull(currentCreds.credential, "credential supplier returned null credential (should be keyStorePassword)"); KeyManagerFactory kmf; try { kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(keyStore.get(), keyStorePassword.toCharArray()); SSLContext sc = SSLContext.getInstance("TLS"); sc.init(kmf.getKeyManagers(), trustManager, new SecureRandom()); <START> System.setProperty("https.protocols", "TLSv1"); <END> return sc; } catch (NoSuchAlgorithmException e) { throw propagate(e); } catch (UnrecoverableKeyException e) { throw propagate(e); } catch (KeyStoreException e) { throw propagate(e); } catch (KeyManagementException e) { throw propagate(e); } }</code><technical_language>find a way, this is super dodgy</technical_language>

Target:
public SSLContext get() { Credentials currentCreds = checkNotNull(creds.get(), "credential supplier returned null"); try { SSLContext sslContext = SSLContext.getInstance("TLS"); X509Certificate certificate = getCertificate(loadFile(currentCreds.identity)); PrivateKey privateKey = getKey(loadFile(currentCreds.credential)); sslContext.init(new KeyManager[]{new InMemoryKeyManager(certificate, privateKey)}, trustManager, new SecureRandom()); return sslContext; } catch (NoSuchAlgorithmException e) { throw propagate(e); } catch (KeyManagementException e) { throw propagate(e); } catch (CertificateException e) { throw propagate(e); } catch (IOException e) { throw propagate(e); } }
Source:
<code>public void fromStream_user_providesToken() throws IOException { MockTokenServerTransportFactory transportFactory = new MockTokenServerTransportFactory(); transportFactory.transport.addClient(CLIENT_ID, CLIENT_SECRET); transportFactory.transport.addRefreshToken(REFRESH_TOKEN, ACCESS_TOKEN); InputStream userStream = <START> UserCredentialsTest.writeUserStream(CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN); <END> UserCredentials credentials = UserCredentials.fromStream(userStream, transportFactory); assertNotNull(credentials); Map<String, List<String>> metadata = credentials.getRequestMetadata(CALL_URI); TestUtils.assertContainsBearerToken(metadata, ACCESS_TOKEN); }</code><technical_language>Fully-qualified class name needed</technical_language>

Target:
public void fromStream_user_providesToken() throws IOException { MockTokenServerTransportFactory transportFactory = new MockTokenServerTransportFactory(); transportFactory.transport.addClient(CLIENT_ID, CLIENT_SECRET); transportFactory.transport.addRefreshToken(REFRESH_TOKEN, ACCESS_TOKEN); InputStream userStream = writeUserStream(CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN); UserCredentials credentials = UserCredentials.fromStream(userStream, transportFactory); assertNotNull(credentials); Map<String, List<String>> metadata = credentials.getRequestMetadata(CALL_URI); TestUtils.assertContainsBearerToken(metadata, ACCESS_TOKEN); }
Source:
<code>public void scan(HttpMessage msg, String param, String value) { if (this.inScope(Tech.Linux) || this.inScope(Tech.MacOS)) { <START> if (matchBodyPattern(getBaseMsg(), patternSSIUnix, new StringBuilder())) { <END> return; } if (testServerSideInclude(param, SSI_UNIX, patternSSIUnix)) { return; } if (testServerSideInclude(param, SSI_UNIX2, patternSSIUnix)) { return; } } if (this.inScope(Tech.Windows)) { if (matchBodyPattern(getBaseMsg(), patternSSIWin, new StringBuilder())) { return; } if (testServerSideInclude(param, SSI_WIN, patternSSIWin)) { return; } if (testServerSideInclude(param, SSI_WIN2, patternSSIWin)) { return; } } }</code><technical_language>This done in previous if statement (after tech checks), return earlier (Windows test done). Also, worth extracting a method reduce code duplication (boolean isEvidencePresent(Pattern)?). - result is required StringBuilder null</technical_language>

Target:
public void scan(HttpMessage msg, String param, String value) { if ((this.inScope(Tech.Linux) || this.inScope(Tech.MacOS)) && !isEvidencePresent(patternSSIUnix)) { if (testServerSideInclude(param, SSI_UNIX, patternSSIUnix)) { return; } if (testServerSideInclude(param, SSI_UNIX2, patternSSIUnix)) { return; } } if (this.inScope(Tech.Windows) && !isEvidencePresent(patternSSIWin)) { if (testServerSideInclude(param, SSI_WIN, patternSSIWin)) { return; } if (testServerSideInclude(param, SSI_WIN2, patternSSIWin)) { return; } } }
Source:
<code>public void onHelpClick() { <START> UriUtil.visitInExternalBrowser(getContext(), <END> Uri.parse(requireContext().getString(R.string.android_app_edit_help_url))); }</code><technical_language>Hint: FeedbackUtil.java contains numerous convenience functions for visiting specific external pages, e.g. FAQ page, privacy policy, etc. simply add another function this page</technical_language>

Target:
public void onHelpClick() { FeedbackUtil.showAndroidAppEditingFAQ(requireContext()); }
Source:
<code>protected boolean validateSourceDomainsSpaceRequirements() { Map<Guid, List<DiskImage>> storageDomainsActiveImagesMap = new HashMap<>(); for (LiveMigrateDiskParameters parameters : getParameters().getParametersList()) { DiskImage diskImage = getDiskImageByImageId(parameters.getImageId()); if (diskImage.getActive()) { diskImage.getSnapshots().add(diskImage); MultiValueMapUtils.addToMap(parameters.getSourceStorageDomainId(), diskImage, storageDomainsActiveImagesMap); } } for (Map.Entry<Guid, List<DiskImage>> entry : storageDomainsActiveImagesMap.entrySet()) { Guid sourceDomainId = entry.getKey(); List<DiskImage> disksList = entry.getValue(); Guid storagePoolId = disksList.get(0).getStoragePoolId(); StorageDomain sourceDomain = getStorageDomainById(sourceDomainId, storagePoolId); if (!doesStorageDomainHasSpaceForRequest(sourceDomain, disksList)) { return false; } } return true; <START> } <END></code><technical_language>daft, CDA message added</technical_language>

Target:
protected boolean validateSourceDomainsSpaceRequirements() { Map<Guid, List<DiskImage>> storageDomainsActiveImagesMap = new HashMap<>(); for (LiveMigrateDiskParameters parameters : getParameters().getParametersList()) { DiskImage diskImage = getDiskImageByImageId(parameters.getImageId()); if (diskImage.getActive()) { diskImage.getSnapshots().add(diskImage); MultiValueMapUtils.addToMap(parameters.getSourceStorageDomainId(), diskImage, storageDomainsActiveImagesMap); } } for (Map.Entry<Guid, List<DiskImage>> entry : storageDomainsActiveImagesMap.entrySet()) { Guid sourceDomainId = entry.getKey(); List<DiskImage> disksList = entry.getValue(); Guid storagePoolId = disksList.get(0).getStoragePoolId(); StorageDomain sourceDomain = getStorageDomainById(sourceDomainId, storagePoolId); if (!doesStorageDomainHaveSpaceForRequest(sourceDomain, disksList)) { return false; } } return true; }
Source:
<code>int binarySearch(K key) { int res = map.getKeyType().binarySearch(key, keys, getKeyCount(), cachedCompare); <START> cachedCompare = (res < 0 ? -res : res) - 1; <END> return res; }</code><technical_language>new logic expect cachedCompare range [1, size] for cached path. previous logic generated cachedCompare Java cachedCompare = res < 0 ? ~res : res + 1; Java cachedCompare = res < 0 ? ~res : res - 1; is used. entry ~res produces values range [0, size], this range is wider expected range, fallback default unexpectedly new code. entry is found, res + 1 produced values range [1, size], correct. This range is expected cachedCompare - 1 is used, res + 1 - 1 = res (previous entry) starting point. entry is found, new res - 1 produces values range [-1, size - 2], off-by-two error. of paths buggy paths buggy (suboptimal). missing something, please re-check. (~something == -something - 1)</technical_language>

Target:
int binarySearch(K key) { int res = map.getKeyType().binarySearch(key, keys, getKeyCount(), cachedCompare); cachedCompare = res < 0 ? ~res : res + 1; return res; }
Source:
<code>public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { <START> if (resource != null) { <END> Fluid f = resource.getFluid(); if (f != null) { Fluid fluid = tank.getFluidType(); if (fluid != null && f.getID() == fluid.getID()) return tank.drain(resource.amount, doDrain); } } return null; }</code><technical_language>easier if do this in tank? return null this i</technical_language>

Target:
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { return tank.drain(resource, doDrain); }
Source:
<code>public static <K, V> List<ConsumerRecord<K, V>> waitUntilMinRecordsReceived(final Properties consumerConfig, final String topic, final int expectedNumRecords, final long waitTime) throws InterruptedException { final List<ConsumerRecord<K, V>> accumData = new ArrayList<>(); final String reason = String.format("Did not receive all %d records from topic %s within %d ms", expectedNumRecords, topic, waitTime); try (final Consumer<K, V> consumer = createConsumer(consumerConfig)) { <START> TestUtils.retryOnExceptionWithTimeout(waitTime, () -> { <END> final List<ConsumerRecord<K, V>> readData = readRecords(topic, consumer, waitTime, expectedNumRecords); accumData.addAll(readData); assertThat(reason, accumData.size(), is(greaterThanOrEqualTo(expectedNumRecords))); }); } return accumData; }</code><technical_language>nit: add static import? (similar elsewhere)</technical_language>

Target:
public static <K, V> List<ConsumerRecord<K, V>> waitUntilMinRecordsReceived(final Properties consumerConfig, final String topic, final int expectedNumRecords, final long waitTime) throws InterruptedException { final List<ConsumerRecord<K, V>> accumData = new ArrayList<>(); final String reason = String.format("Did not receive all %d records from topic %s within %d ms", expectedNumRecords, topic, waitTime); try (final Consumer<K, V> consumer = createConsumer(consumerConfig)) { retryOnExceptionWithTimeout(waitTime, () -> { final List<ConsumerRecord<K, V>> readData = readRecords(topic, consumer, waitTime, expectedNumRecords); accumData.addAll(readData); assertThat(reason, accumData.size(), is(greaterThanOrEqualTo(expectedNumRecords))); }); } return accumData; }
Source:
<code>public void setImage (Image image) { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return; if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); this.image = image; <START> updateStyleBits(false); <END> OS.InvalidateRect (handle, null, true); }</code><technical_language>proposed change: updateStyleBits(image == null)</technical_language>

Target:
public void setImage (Image image) { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return; if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); this.image = image; updateStyleBits(image == null); OS.InvalidateRect (handle, null, true); }
Source:
<code>public static void setupEnvironment() throws Exception { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceDescription description = workspace.getDescription(); description.setAutoBuilding(false); workspace.setDescription(description); GitImportRepoWizard importWizard = new GitImportRepoWizard(); importWizard.openWizard(); String repoName = "egit"; String repoUrl = "git://egit.eclipse.org/egit.git"; <START> if (!importWizard.containsRepo(repoName)) { <END> addRepository(importWizard, repoUrl); } importWizard.selectAndCloneRepository(repoName); importWizard.waitForCreate(); waitForWorkspaceRefresh(); }</code><technical_language>style nit: braces single line</technical_language>

Target:
public static void setupEnvironment() throws Exception { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceDescription description = workspace.getDescription(); description.setAutoBuilding(false); workspace.setDescription(description); GitImportRepoWizard importWizard = new GitImportRepoWizard(); importWizard.openWizard(); String repoName = "egit"; String repoUrl = "git://egit.eclipse.org/egit.git"; if (!importWizard.containsRepo(repoName)) addRepository(importWizard, repoUrl); importWizard.selectAndCloneRepository(repoName); importWizard.waitForCreate(); waitForWorkspaceRefresh(); }
Source:
<code>protected void configure() { bind(String.class).annotatedWith(PluginName.class).toInstance(pluginName); <START> bind(WebUiPlugin.class).annotatedWith(UniqueAnnotations.create()) <END> .toInstance(new JavaScriptPlugin(fileName)); }</code><technical_language>DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(...)</technical_language>

Target:
protected void configure() { bind(String.class).annotatedWith(PluginName.class).toInstance(pluginName); DynamicSet.bind(binder(), WebUiPlugin.class).toInstance( new JavaScriptPlugin(fileName)); }
Source:
<code>public List<QuickFilter> getQuickFilters() { <START> return this.quickFilters; <END> }</code><technical_language>return quickFilters</technical_language>

Target:
public List<QuickFilter> getQuickFilters() { return quickFilters; }
Source:
<code>public ListenableFuture<?> isBlocked() { if (!finishing || !joinPagesNotNeeded.isPresent()) { return NOT_BLOCKED; } <START> return joinPagesNotNeeded.get(); <END> }</code><technical_language>finishing tied joinPagesNotNeeded empty? get rid of return joinPagesNotNeeded.orElse(NOT_BLOCKED)</technical_language>

Target:
public ListenableFuture<?> isBlocked() { return probeDoneWithPages.orElse(NOT_BLOCKED); }