auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean hasNext() { if (baseRecord == null) { return false; } final long nextTimestamp = timestampSampler.nextTimestamp(lastTimestamp); if (this.nextTimestamp > nextTimestamp) { this.lastTimestamp = nextTimestamp; return true; } this.lastTimestamp = timestampSampler.round(baseRecord.getTimestamp(timestampIndex)); final int n = groupByFunctions.size(); for (int i = 0; i < n; i++) { interruptor.checkInterrupted(); groupByFunctions.getQuick(i).computeFirst(simpleMapValue, baseRecord); } while (base.hasNext()) { long timestamp = timestampSampler.round(baseRecord.getTimestamp(timestampIndex)); if (lastTimestamp == timestamp) { for (int i = 0; i < n; i++) { <START> interruptor.checkInterrupted(); <END> groupByFunctions.getQuick(i).computeNext(simpleMapValue, baseRecord); } } else { this.nextTimestamp = timestamp; return true; } } baseRecord = null; return true; }</code><technical_language>this is intense. Function exec long time, lets this cursor</technical_language>

Target:
public boolean hasNext() { if (baseRecord == null) { return false; } final long nextTimestamp = timestampSampler.nextTimestamp(lastTimestamp); if (this.nextTimestamp > nextTimestamp) { this.lastTimestamp = nextTimestamp; return true; } this.lastTimestamp = timestampSampler.round(baseRecord.getTimestamp(timestampIndex)); final int n = groupByFunctions.size(); for (int i = 0; i < n; i++) { groupByFunctions.getQuick(i).computeFirst(simpleMapValue, baseRecord); } while (base.hasNext()) { interruptor.checkInterrupted(); long timestamp = timestampSampler.round(baseRecord.getTimestamp(timestampIndex)); if (lastTimestamp == timestamp) { for (int i = 0; i < n; i++) { groupByFunctions.getQuick(i).computeNext(simpleMapValue, baseRecord); } } else { this.nextTimestamp = timestamp; return true; } } baseRecord = null; return true; }
Source:
<code>public void cleanupState() { for (int i = 1; i <= cluster.size(); i++) <START> cluster.get(i).runOnInstance(InstanceKiller::clear); <END> }</code><technical_language>remove timeouts</technical_language>

Target:
public void cleanupState() { for (int i = 1; i <= CLUSTER.size(); i++) CLUSTER.get(i).runOnInstance(InstanceKiller::clear); }
Source:
<code>protected void setStyles() { errorMessagePanel.setVisible(false); informationMessagePanel.setVisible(false); passwordEditor.setAutoComplete("off"); userNameEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); <START> userNameEditor.addLabelStyleName(PatternflyConstants.COL_MD_2); <END> userNameEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); userNameEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); userNameEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_MD_10); passwordEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); passwordEditor.addLabelStyleName(PatternflyConstants.COL_MD_2); passwordEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); passwordEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); passwordEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_MD_10); profileEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); profileEditor.addLabelStyleName(PatternflyConstants.COL_MD_2); profileEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); profileEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); profileEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_MD_10); }</code><technical_language>Out of curiosity, is screen size resolved? Is project running small medium screens</technical_language>

Target:
protected void setStyles() { errorMessagePanel.setVisible(false); informationMessagePanel.setVisible(false); passwordEditor.setAutoComplete("off"); userNameEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); userNameEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); userNameEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); passwordEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); passwordEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); passwordEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); profileEditor.addLabelStyleName(PatternflyConstants.COL_SM_2); profileEditor.addLabelStyleName(PatternflyConstants.CONTROL_LABEL); userNameEditor.addLabelStyleName("white"); profileEditor.addContentWidgetContainerStyleName(PatternflyConstants.COL_SM_10); }
Source:
<code>public void executeMojo() throws MojoExecutionException { try { final ExecFileLoader loader = new ExecFileLoader(); final Socket socket = tryConnect(); final RemoteControlWriter remoteWriter = new RemoteControlWriter( socket.getOutputStream()); final RemoteControlReader remoteReader = new RemoteControlReader( socket.getInputStream()); remoteReader.setSessionInfoVisitor(loader.getSessionInfoStore()); remoteReader .setExecutionDataVisitor(loader.getExecutionDataStore()); remoteWriter.visitDumpCommand(dump, reset); remoteReader.read(); if (dump) { getLog().info( format("Dumping execution data to %s", destFile.getAbsolutePath())); loader.save(destFile, append); } <START> socket.close(); <END> } catch (final IOException e) { throw new MojoExecutionException("Unable to dump coverage data", e); } }</code><technical_language>socket.close() IMO a finally section</technical_language>

Target:
public void executeMojo() throws MojoExecutionException { try { final ExecFileLoader loader = new ExecFileLoader(); Socket socket = null; try { socket = tryConnect(); final RemoteControlWriter remoteWriter = new RemoteControlWriter( socket.getOutputStream()); final RemoteControlReader remoteReader = new RemoteControlReader( socket.getInputStream()); remoteReader .setSessionInfoVisitor(loader.getSessionInfoStore()); remoteReader.setExecutionDataVisitor(loader .getExecutionDataStore()); remoteWriter.visitDumpCommand(dump, reset); remoteReader.read(); } finally { if (socket != null) { socket.close(); } } if (dump) { getLog().info( format("Dumping execution data to %s", destFile.getAbsolutePath())); loader.save(destFile, append); } } catch (final IOException e) { throw new MojoExecutionException("Unable to dump coverage data", e); } }
Source:
<code>public void setup() { super.setup(); when(client.createMediaPipeline(any(Transaction.class))).thenReturn(mock(MediaPipeline.class)); User u = new User(); u.setId(USER_ID); u.setFirstname("firstname"); u.setLastname("lastname"); when(userDao.get(USER_ID)).thenReturn(u); doReturn(true).when(handler).isConnected(); when(recDao.update(any(Recording.class))).thenAnswer(new Answer<Recording>() { @Override public Recording answer(InvocationOnMock invocation) throws Throwable { Object[] args = invocation.getArguments(); Recording r = (Recording) args[0]; r.setId(1L); return r; } }); <START> PowerMockito.mockStatic(LabelDao.class); <END> BDDMockito.given(LabelDao.getLanguage(any(Long.class))).willReturn(new OmLanguage(Locale.ENGLISH)); c = getClientFull(); when(roomDao.get(ROOM_ID)).thenReturn(c.getRoom()); doReturn(null).when(streamProcessor).startBroadcast(any(), any(), any()); }</code><technical_language>this moved @BeforeAll</technical_language>

Target:
public void setup() { super.setup(); when(client.createMediaPipeline(any(Transaction.class))).thenReturn(mock(MediaPipeline.class)); User u = new User(); u.setId(USER_ID); u.setFirstname("firstname"); u.setLastname("lastname"); when(userDao.get(USER_ID)).thenReturn(u); doReturn(true).when(handler).isConnected(); when(recDao.update(any(Recording.class))).thenAnswer((invocation) -> { Object[] args = invocation.getArguments(); Recording r = (Recording) args[0]; r.setId(1L); return r; }); PowerMockito.mockStatic(LabelDao.class); BDDMockito.given(LabelDao.getLanguage(any(Long.class))).willReturn(new OmLanguage(Locale.ENGLISH)); c = getClientFull(); when(roomDao.get(ROOM_ID)).thenReturn(c.getRoom()); doReturn(null).when(streamProcessor).startBroadcast(any(), any(), any()); }
Source:
<code>int read(byte b[], int off, int length, int timeout) throws IOException { int n; if (eof) { return -1; } if (impl.isConnectionReset()) { throw new SocketException("Connection reset"); } if (length <= 0 || off < 0 || off + length > b.length) { if (length == 0) { return 0; } throw new ArrayIndexOutOfBoundsException(); } boolean gotReset = false; FileDescriptor fd = impl.acquireFD(); try { BlockGuard.getThreadPolicy().onNetwork(); n = <START> socketRead0(fd, <END> b, off, length, timeout); if (n > 0) { return n; } } catch (ConnectionResetException rstExc) { gotReset = true; } if (gotReset) { impl.setConnectionResetPending(); try { n = socketRead(fd, b, off, length, timeout); if (n > 0) { return n; } } catch (ConnectionResetException rstExc) { } } if (impl.isClosedOrPending()) { throw new SocketException("Socket closed"); } if (impl.isConnectionResetPending()) { impl.setConnectionReset(); } if (impl.isConnectionReset()) { throw new SocketException("Connection reset"); } eof = true; return -1; }</code><technical_language>missed this one? in <LINK_0></technical_language>

Target:
int read(byte b[], int off, int length, int timeout) throws IOException { int n; if (eof) { return -1; } if (impl.isConnectionReset()) { throw new SocketException("Connection reset"); } if (length <= 0 || off < 0 || off + length > b.length) { if (length == 0) { return 0; } throw new ArrayIndexOutOfBoundsException(); } boolean gotReset = false; FileDescriptor fd = impl.acquireFD(); try { BlockGuard.getThreadPolicy().onNetwork(); n = socketRead(fd, b, off, length, timeout); if (n > 0) { return n; } } catch (ConnectionResetException rstExc) { gotReset = true; } if (gotReset) { impl.setConnectionResetPending(); try { n = socketRead(fd, b, off, length, timeout); if (n > 0) { return n; } } catch (ConnectionResetException rstExc) { } } if (impl.isClosedOrPending()) { throw new SocketException("Socket closed"); } if (impl.isConnectionResetPending()) { impl.setConnectionReset(); } if (impl.isConnectionReset()) { throw new SocketException("Connection reset"); } eof = true; return -1; }
Source:
<code>protected HashMap<Guid, DiskImage> getDiskToDestinationMap(VM vm, Guid storageDomainId, boolean isDomainSet) { HashMap<Guid, DiskImage> diskToDestinationMap = null; if (vm.isSetDisks() && vm.getDisks().isSetDisks()) { diskToDestinationMap = new HashMap<Guid, DiskImage>(); for (Disk disk : vm.getDisks().getDisks()) { if (disk.isSetId()) { <START> org.ovirt.engine.core.common.businessentities.Disk sourceDisk = queryDisk(disk); <END> if (sourceDisk.isDiskImage()) { DiskImage destinationDisk = (DiskImage) DiskMapper.map(disk, sourceDisk); if (disk.isSetStorageDomains() && disk.getStorageDomains().isSetStorageDomains() && disk.getStorageDomains().getStorageDomains().get(0).isSetId()) { destinationDisk.setStorageIds(new ArrayList<Guid>()); Guid newStorageDomainId = isDomainSet ? storageDomainId : asGuid(disk.getStorageDomains(). getStorageDomains().get(0).getId()); destinationDisk.getStorageIds().add(newStorageDomainId); } diskToDestinationMap.put(destinationDisk.getId(), destinationDisk); } } } } return diskToDestinationMap; }</code><technical_language>This means if template N disks running N+1 backend queries, N+1 database queries. if disks retrieved query. a big concern, templates 1 disk</technical_language>

Target:
protected HashMap<Guid, DiskImage> getDiskToDestinationMap(VM vm, Guid storageDomainId, boolean isDomainSet) { HashMap<Guid, DiskImage> diskToDestinationMap = null; if (vm.isSetDisks() && vm.getDisks().isSetDisks()) { diskToDestinationMap = new HashMap<Guid, DiskImage>(); Map<Guid, org.ovirt.engine.core.common.businessentities.Disk> vmSourceDisks = queryVMDiskList(vm); for (Disk disk : vm.getDisks().getDisks()) { Guid currDiskID = asGuid(disk.getId()); if (disk.isSetId() && vmSourceDisks.containsKey(currDiskID)) { org.ovirt.engine.core.common.businessentities.Disk sourceDisk = vmSourceDisks.get(currDiskID); if (sourceDisk.isDiskImage()) { DiskImage destinationDisk = (DiskImage) DiskMapper.map(disk, sourceDisk); if (disk.isSetStorageDomains() && disk.getStorageDomains().isSetStorageDomains() ) { List<org.ovirt.engine.api.model.StorageDomain> diskStorageDomains = disk.getStorageDomains().getStorageDomains(); if (!diskStorageDomains.isEmpty() && diskStorageDomains.get(0).isSetId()) { destinationDisk.setStorageIds(new ArrayList<Guid>(1)); Guid newStorageDomainId = isDomainSet ? storageDomainId : asGuid(diskStorageDomains.get(0).getId()); destinationDisk.getStorageIds().add(newStorageDomainId); } diskToDestinationMap.put(destinationDisk.getId(), destinationDisk); } } } } } return diskToDestinationMap; }
Source:
<code>public String toString() { StringBuilder str = new StringBuilder(55); str.append("(id=") .append(getId()); str.append(", displayName=") .append(getDisplayName()); str.append(", dbTableName=") .append(getDbTableName()); str.append(", supported=") .append(isSupported().toString()); str.append(", enabled=") <START> .append(isEnabled().toString()); <END> str.append(")"); return str.toString(); }</code><technical_language>I codacy is complaining is reuse of "str" variable. able chain of in statement (so "str" beginning)</technical_language>

Target:
public String toString() { StringBuilder str = new StringBuilder(55); str.append("(id=") .append(getId()) .append(", displayName=") .append(getDisplayName()) .append(", dbTableName=") .append(getDbTableName()) .append(", supported=") .append(isSupported().toString()) .append(", enabled=") .append(isEnabled().toString()) .append(')'); return str.toString(); }
Source:
<code>protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__BEGIN_LABEL_STYLE, DiagramFactory.eINSTANCE.createBeginLabelStyle())); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__CENTER_LABEL_STYLE, DiagramFactory.eINSTANCE.createCenterLabelStyle())); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__END_LABEL_STYLE, DiagramFactory.eINSTANCE.createEndLabelStyle())); newChildDescriptors .add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__STROKE_COLOR, ViewpointFactory.eINSTANCE.createFromString(ViewpointPackage.Literals.RGB_VALUES, <START> "209,209,209"))); <END> }</code><technical_language>209, 209, 209 instead of 0, 0, 0 previoulsy</technical_language>

Target:
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__BEGIN_LABEL_STYLE, DiagramFactory.eINSTANCE.createBeginLabelStyle())); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__CENTER_LABEL_STYLE, DiagramFactory.eINSTANCE.createCenterLabelStyle())); newChildDescriptors.add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__END_LABEL_STYLE, DiagramFactory.eINSTANCE.createEndLabelStyle())); newChildDescriptors .add(createChildParameter(DiagramPackage.Literals.EDGE_STYLE__STROKE_COLOR, ViewpointFactory.eINSTANCE.createFromString(ViewpointPackage.Literals.RGB_VALUES, "136,136,136"))); }
Source:
<code>public void testSaveChanges() { <START> onView(withId(R.id.brick_set_variable_edit_text)).perform(click()); <END> onView(withId(R.id.formula_editor_keyboard_0)).perform(click()); pressBack(); onView(withText(R.string.formula_editor_discard_changes_dialog_title)).check(matches(isDisplayed())); onView(withId(android.R.id.button1)).perform(click()); onBrickAtPosition(1).checkShowsText(R.string.brick_set_variable); onBrickAtPosition(1).onChildView(withId(R.id.brick_set_variable_edit_text)).perform(click()); onView(withId(R.id.formula_editor_edit_field)).check(matches(withText("0 "))); }</code><technical_language>please FormulaEditorWrapper, ids of formula editor elements in tests</technical_language>

Target:
public void testSaveChanges() { onBrickAtPosition(1).onChildView(withId(R.id.brick_set_variable_edit_text)) .perform(click()); onFormulaEditor() .performEnterNumber(0); pressBack(); onView(withText(R.string.formula_editor_discard_changes_dialog_title)) .check(matches(isDisplayed())); onView(withId(android.R.id.button1)) .perform(click()); onBrickAtPosition(1).onChildView(withId(R.id.brick_set_variable_edit_text)) .perform(click()); onFormulaEditor() .checkValue("0"); }
Source:
<code>public Integer convert(String s) { <START> try{ <END> return Integer.parseInt(s); }catch(NumberFormatException e){ GWT.log("Impossible to convert the string'"+s+"' to an integer."); return null; } }</code><technical_language>missing spaces in format</technical_language>

Target:
public Integer convert(String s) { try{ return Integer.parseInt(s); }catch(NumberFormatException e){ return null; } }
Source:
<code>public void testWriteBehindWithoutCacheLoaderWriter() { WriteBehindConfiguration writeBehindConfiguration = WriteBehindConfigurationBuilder.newWriteBehindConfiguration().build(); WriteBehindDecoratorLoaderWriterProviderFactory factory = new WriteBehindDecoratorLoaderWriterProviderFactory(); <START> factory.create(mock(ServiceConfiguration.class), null).createWriteBehindDecoratorLoaderWriter(null, writeBehindConfiguration); <END> }</code><technical_language>of setup in this test is superfluous calling line nulls result in exception. However, require catch exception exact expect</technical_language>

Target:
public void testWriteBehindWithoutCacheLoaderWriter() { expectedEx.expect(NullPointerException.class); expectedEx.expectMessage("WriteBehind requires non null CacheLoaderWriter"); WriteBehindDecoratorLoaderWriterProviderFactory factory = new WriteBehindDecoratorLoaderWriterProviderFactory(); factory.create(null, null).createWriteBehindDecoratorLoaderWriter(null, null); }
Source:
<code>public static KubernetesToleration fromMap(Map<String, String> stringMap) { final TolerationBuilder tolerationBuilder = new TolerationBuilder(); <START> stringMap.forEach((k, v) -> { <END> switch (k) { case "effect": tolerationBuilder.withEffect(v); break; case "key": tolerationBuilder.withKey(v); break; case "operator": tolerationBuilder.withOperator(v); break; case "tolerationSeconds": tolerationBuilder.withTolerationSeconds(Long.valueOf(v)); break; case "value": tolerationBuilder.withValue(v); break; default: LOG.warn("Unrecognized key({}) of toleration, will ignore.", k); break; } }); return new KubernetesToleration(tolerationBuilder.build()); }</code><technical_language>keys case insensitive</technical_language>

Target:
public static KubernetesToleration fromMap(Map<String, String> stringMap) { final TolerationBuilder tolerationBuilder = new TolerationBuilder(); stringMap.forEach((k, v) -> { switch (k.toLowerCase()) { case "effect": tolerationBuilder.withEffect(v); break; case "key": tolerationBuilder.withKey(v); break; case "operator": tolerationBuilder.withOperator(v); break; case "tolerationseconds": tolerationBuilder.withTolerationSeconds(Long.valueOf(v)); break; case "value": tolerationBuilder.withValue(v); break; default: LOG.warn("Unrecognized key({}) of toleration, will ignore.", k); break; } }); return new KubernetesToleration(tolerationBuilder.build()); }
Source:
<code>public void run() { try { Injector injector = makeInjector(); try { final Lifecycle lifecycle = initLifecycle(injector); Runtime.getRuntime().addShutdownHook( new Thread( new Runnable() { @Override public void run() { log.info("Running shutdown hook"); lifecycle.stop(); } } ) ); injector.getInstance(ExecutorLifecycle.class).join(); } <START> catch (Throwable t) { <END> log.error(t, "Error when starting up. Failing."); System.exit(1); } log.info("Finished peon task"); } catch (Exception e) { throw Throwables.propagate(e); } }</code><technical_language>is advantage of removing this putting requirement thread started lifecycle handler a daemon thread , this assumption is hard verify in unit tests peons hanging. If concern is calling stop() issues started flag in stop() method ensure is effectively a noop if called twice</technical_language>

Target:
public void run() { try { Injector injector = makeInjector(); try { final Lifecycle lifecycle = initLifecycle(injector); Runtime.getRuntime().addShutdownHook( new Thread( new Runnable() { @Override public void run() { log.info("Running shutdown hook"); lifecycle.stop(); } } ) ); injector.getInstance(ExecutorLifecycle.class).join(); lifecycle.stop(); } catch (Throwable t) { log.error(t, "Error when starting up. Failing."); System.exit(1); } log.info("Finished peon task"); } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
<code>public String toString() { <START> return "PlanImpl{" + <END> "evaluatorsToAdd=" + evaluatorsToAdd + ", evaluatorsToDelete=" + evaluatorsToDelete + ", transferSteps=" + transferSteps + '}'; }</code><technical_language>StringBuilder</technical_language>

Target:
public String toString() { final StringBuilder sb = new StringBuilder("PlanImpl{"); sb.append("evaluatorsToAdd=").append(evaluatorsToAdd); sb.append(", evaluatorsToDelete=").append(evaluatorsToDelete); sb.append(", transferSteps=").append(transferSteps); sb.append('}'); return sb.toString(); }
Source:
<code><START> public void update(StyleRange[] ranges) { <END> updateStyles = true; int oldMaxRise = maxRise; int oldMaxFontHeight = maxFontHeight; int oldMaxMetricsWidth = maxMetricsWidth; maxRise = 0; maxMetricsWidth = 0; maxFontHeight = defaultFontHeight; if (ranges != null) { for (int i = 0; i < ranges.length; i++) { StyleRange style = ranges[i]; if (style.isVariableHeight()) { if (style.font != null) { Integer height = getMaxFontHeight(style.font); if (height != null && height > maxFontHeight) { maxFontHeight = height; } } if (style.metrics != null) { int width = style.metrics.width; if (width > maxMetricsWidth) { maxMetricsWidth = width; } } if (style.rise > maxRise) { maxRise = style.rise; } } } } if (oldMaxRise != maxRise || (oldMaxFontHeight != maxFontHeight)) { height = -1; } if (oldMaxMetricsWidth != maxMetricsWidth) { width = -1; } }</code><technical_language>This method able invalidate width if new ranges font previous one. For example, assume do a new StyleRange a line, a font height. safely height, need invalidate width if font is current one. Overall, I is skip comparison of current ranges older sort out line needs recompute size. height enough</technical_language>

Target:
public void update(StyleRange[] ranges) { updateStyles = true; int oldMaxRise = maxRise; int oldMaxFontHeight = maxFontHeight; int oldMaxMetricsWidth = maxMetricsWidth; int oldMaxMetricsHeight = maxMetricsHeight; List<Font> oldFonts = fonts; maxRise = 0; maxMetricsWidth = 0; maxMetricsHeight = 0; maxFontHeight = defaultFontHeight; if (fonts != null) { fonts.clear(); } if (ranges != null) { for (int i = 0; i < ranges.length; i++) { StyleRange style = ranges[i]; if (style.isVariableHeight()) { if (style.font != null) { Integer height = getMaxFontHeight(style.font); if (height != null && height > maxFontHeight) { maxFontHeight = height; } if (fonts == null) { fonts = new ArrayList<>(); } fonts.add(style.font); } if (style.metrics != null) { int width = style.metrics.width; if (width > maxMetricsWidth) { maxMetricsWidth = width; } int height = style.metrics.ascent + style.metrics.descent; if (height > maxMetricsHeight) { maxMetricsHeight = height; } } if (style.rise > maxRise) { maxRise = style.rise; } } } } if (oldMaxRise != maxRise || oldMaxFontHeight != maxFontHeight || oldMaxMetricsHeight != maxMetricsHeight) { height = -1; } if (oldMaxMetricsWidth != maxMetricsWidth || !isSameFonts(fonts, oldFonts)) { width = -1; } }
Source:
<code>public JGroupsAddress doReadObject(ObjectInput unmarshaller) throws IOException, ClassNotFoundException { try { org.jgroups.Address address = org.jgroups.util.Util.readAddress(unmarshaller); return (JGroupsAddress) JGroupsAddressCache.fromJGroupsAddressUnchecked(address); <START> } catch (Exception e) { <END> throw new IOException(e); } }</code><technical_language>this change needed</technical_language>

Target:
public JGroupsAddress doReadObject(ObjectInput unmarshaller) throws IOException, ClassNotFoundException { try { org.jgroups.Address address = org.jgroups.util.Util.readAddress(unmarshaller); return (JGroupsAddress) JGroupsAddressCache.fromJGroupsAddress(address); } catch (Exception e) { throw new IOException(e); } }
Source:
<code>public ParseFile(File file) { <START> this(null, file, null); <END> }</code><technical_language>File#getName() for name</technical_language>

Target:
public ParseFile(File file) { this(file, null); }
Source:
<code>@Test void testSortProject() { final String sql = "select mgr from sales.emp order by mgr desc nulls last"; Query.create(sql) <START> .removeRules(SORT_PROJECT_TRANSPOSE_RULES) <END> .removeRule(EnumerableRules.ENUMERABLE_SORT_RULE) .check(); }</code><technical_language>Query remove this rule default. need in case</technical_language>

Target:
@Test void testSortProject() { final String sql = "select mgr from sales.emp order by mgr desc nulls last"; Query.create(sql) .removeRule(EnumerableRules.ENUMERABLE_SORT_RULE) .check(); }
Source:
<code>protected void executeQueryCommand() { Provider<?> provider = getProvider(); try { ProviderProxy proxy = ProviderProxyFactory.getInstance().create(provider); List<? extends Certificate> chain = proxy.getCertificateChain(); if (!chain.isEmpty()) { List<CertificateInfo> results = new ArrayList<CertificateInfo>(); for (Certificate cert : chain) { <START> results.add(createCertificateInfo((X509Certificate) cert)); <END> } getQueryReturnValue().setReturnValue(results); } } catch (Exception e) { log.error("Error in encoding certificate. Error is " + e.getMessage()); log.debug("Exeption:", e); } }</code><technical_language>check certificate is X509? I findbugs/coverity complain blind cast</technical_language>

Target:
protected void executeQueryCommand() { Provider<?> provider = getProvider(); try { ProviderProxy proxy = ProviderProxyFactory.getInstance().create(provider); List<? extends Certificate> chain = proxy.getCertificateChain(); if (!chain.isEmpty()) { List<CertificateInfo> results = new ArrayList<CertificateInfo>(); for (Certificate cert : chain) { if (cert instanceof X509Certificate) { results.add(createCertificateInfo((X509Certificate) cert)); } } getQueryReturnValue().setReturnValue(results); } } catch (Exception e) { log.error("Error in encoding certificate. Error is " + e.getMessage()); log.debug("Exeption:", e); } }
Source:
<code>public void slicesOfTwo() { Series series = new Series("35"); List<List<String>> expected = Arrays.asList(Arrays.asList("3", "5")); List<List<String>> actual = series.slices(2); assertNotNull(actual); <START> assertFalse(actual.isEmpty()); <END> assertEquals(expected, actual); }</code><technical_language>for previous tests, assetions removed I think. happy open a new issue for if prefer applies for other tests</technical_language>

Target:
public void slicesOfTwo() { Series series = new Series("35"); List<List<String>> expected = Arrays.asList(Arrays.asList("3", "5")); List<List<String>> actual = series.slices(2); assertEquals(expected, actual); }
Source:
<code>public ArtifactToken createArtifact(BranchId branch, IArtifactType artifactType, ArtifactId parent, String name) { <START> TransactionBuilder tx = <END> orcsApi.getTransactionFactory().createTransaction(branch, account, "rest - create artifacts"); ArtifactToken token = tx.createArtifact(parent, artifactType, name); tx.commit(); return token; }</code><technical_language>artifacts artifact - remove s</technical_language>

Target:
public ArtifactToken createArtifact(BranchId branch, IArtifactType artifactType, ArtifactId parent, String name) { TransactionBuilder tx = orcsApi.getTransactionFactory().createTransaction(branch, account, "rest - create artifact"); ArtifactToken token = tx.createArtifact(parent, artifactType, name); tx.commit(); return token; }
Source:
<code>public void process(ClusterEvent event) throws Exception { _eventId = event.getEventId(); BaseControllerDataProvider cache = event.getAttribute(AttributeName.ControllerDataProvider.name()); if (cache == null) { throw new StageException("Missing attributes in event:" + event + ". Requires DataCache"); } Map<String, Resource> resourceMap = new LinkedHashMap<>(); Map<String, Resource> resourceToRebalance = new LinkedHashMap<>(); Map<String, IdealState> idealStates = cache.getIdealStates(); boolean isTaskCache = cache instanceof WorkflowControllerDataProvider; processIdealStates(cache, resourceMap, resourceToRebalance, idealStates, isTaskCache); if (isTaskCache) { WorkflowControllerDataProvider taskDataCache = event.getAttribute(AttributeName.ControllerDataProvider.name()); processWorkflowConfigs(taskDataCache, resourceMap, resourceToRebalance); processJobConfigs(taskDataCache, resourceMap, resourceToRebalance, idealStates); } Map<String, LiveInstance> availableInstances = cache.getLiveInstances(); for (LiveInstance instance : availableInstances.values()) { String instanceName = instance.getInstanceName(); String clientSessionId = instance.getEphemeralOwner(); Map<String, CurrentState> currentStateMap = cache.getCurrentState(instanceName, clientSessionId); <START> processCurrentStates(currentStateMap, resourceMap, resourceToRebalance, idealStates, <END> isTaskCache); if (isTaskCache) { Map<String, CurrentState> taskCurrentStateMap = ((WorkflowControllerDataProvider) cache) .getTaskCurrentState(instanceName, clientSessionId); processCurrentStates(taskCurrentStateMap, resourceMap, resourceToRebalance, idealStates, true); } } event.addAttribute(AttributeName.RESOURCES.name(), resourceMap); event.addAttribute(AttributeName.RESOURCES_TO_REBALANCE.name(), resourceToRebalance); }</code><technical_language>processCurrentStates takes isTaskCache, put complex processCurrentStates() method</technical_language>

Target:
public void process(ClusterEvent event) throws Exception { _eventId = event.getEventId(); BaseControllerDataProvider cache = event.getAttribute(AttributeName.ControllerDataProvider.name()); if (cache == null) { throw new StageException("Missing attributes in event:" + event + ". Requires DataCache"); } Map<String, Resource> resourceMap = new LinkedHashMap<>(); Map<String, Resource> resourceToRebalance = new LinkedHashMap<>(); Map<String, IdealState> idealStates = cache.getIdealStates(); boolean isTaskCache = cache instanceof WorkflowControllerDataProvider; processIdealStates(cache, resourceMap, resourceToRebalance, idealStates, isTaskCache); if (isTaskCache) { WorkflowControllerDataProvider taskDataCache = event.getAttribute(AttributeName.ControllerDataProvider.name()); processWorkflowConfigs(taskDataCache, resourceMap, resourceToRebalance); processJobConfigs(taskDataCache, resourceMap, resourceToRebalance, idealStates); } processCurrentStates(cache, resourceMap, resourceToRebalance, idealStates, isTaskCache); event.addAttribute(AttributeName.RESOURCES.name(), resourceMap); event.addAttribute(AttributeName.RESOURCES_TO_REBALANCE.name(), resourceToRebalance); }
Source:
<code>public void accept(Event<? extends Payload> event) { String key = (String) event.getKey(); Payload payload = event.getData(); String flowId = getFlowId(event); String flowChainId = getFlowChainId(event); String flowTriggerUserCrn = getFlowTriggerUserCrn(event); Span activeSpan = tracer.activeSpan(); SpanContext spanContext = event.getHeaders().get(FlowConstants.SPAN_CONTEXT); String operationName = event.getKey().toString(); if (TracingUtil.isActiveSpanReusable(activeSpan, spanContext, operationName)) { doAccept(event, key, payload, flowId, flowChainId, flowTriggerUserCrn, spanContext); } else { Span span = TracingUtil.getSpan(tracer, operationName, spanContext, flowId, flowChainId, flowTriggerUserCrn); <START> if (spanContext == null) { spanContext = span.context(); } try (Scope scope = tracer.activateSpan(span)) { doAccept(event, key, payload, flowId, flowChainId, flowTriggerUserCrn, spanContext); <END> } finally { span.finish(); } } }</code><technical_language>here, do need this</technical_language>

Target:
public void accept(Event<? extends Payload> event) { String key = (String) event.getKey(); Payload payload = event.getData(); String flowId = getFlowId(event); String flowChainId = getFlowChainId(event); String flowTriggerUserCrn = getFlowTriggerUserCrn(event); Span activeSpan = tracer.activeSpan(); SpanContext spanContext = event.getHeaders().get(FlowConstants.SPAN_CONTEXT); String operationName = event.getKey().toString(); if (TracingUtil.isActiveSpanReusable(activeSpan, spanContext, operationName)) { LOGGER.debug("Reusing existing span. {}", activeSpan.context()); doAccept(event, key, payload, flowId, flowChainId, flowTriggerUserCrn, spanContext); } else { Span span = TracingUtil.getSpan(tracer, operationName, spanContext, flowId, flowChainId, flowTriggerUserCrn); spanContext = TracingUtil.useOrCreateSpanContext(spanContext, span); try (Scope ignored = tracer.activateSpan(span)) { doAccept(event, key, payload, flowId, flowChainId, flowTriggerUserCrn, spanContext); } finally { span.finish(); } } }
Source:
<code>private boolean glusterHostRemove(Guid sourceClusterId) { String hostName = (getVds().getHostName().isEmpty()) ? getVds().getManagementIp() : getVds().getHostName(); VDS runningHostInSourceCluster = getClusterUtils().getUpServer(sourceClusterId); if (runningHostInSourceCluster == null) { log.error("Cannot remove host from source cluster, no host in Up status found in source cluster"); handleError(-1, "No host in Up status found in source cluster"); errorType = AuditLogType.GLUSTER_SERVER_REMOVE_FAILED; return false; } <START> Guid serverId = runningHostInSourceCluster.getId(); <END> GlusterServer glusterServer = getDbFacade().getGlusterServerDao().getByServerId(serverId); Guid glusterHostId = (glusterServer != null) ? glusterServer.getGlusterServerUuid() : null; if (glusterHostId == null) { handleError(-1, "Failed to get gluser UUID for the host:" + hostName); errorType = AuditLogType.GLUSTER_SERVER_REMOVE_FAILED; return false; } VDSReturnValue returnValue = runVdsCommand( VDSCommandType.RemoveGlusterServer, new RemoveGlusterServerVDSParameters(serverId, hostName, false, glusterHostId)); if (!returnValue.getSucceeded()) { handleVdsError(returnValue); errorType = AuditLogType.GLUSTER_SERVER_REMOVE_FAILED; return false; } return true; }</code><technical_language>runningHostinSourceCluster is server gluster peer detach command is executed. getVds() get host removed</technical_language>

Target:
private boolean glusterHostRemove(Guid sourceClusterId) { String hostName = (getVds().getHostName().isEmpty()) ? getVds().getManagementIp() : getVds().getHostName(); VDS runningHostInSourceCluster = getClusterUtils().getUpServer(sourceClusterId); if (runningHostInSourceCluster == null) { log.error("Cannot remove host from source cluster, no host in Up status found in source cluster"); handleError(-1, "No host in Up status found in source cluster"); errorType = AuditLogType.GLUSTER_SERVER_REMOVE_FAILED; return false; } GlusterServer glusterServer = getDbFacade().getGlusterServerDao().getByServerId(getVds().getId()); Guid glusterHostId = (glusterServer != null) ? glusterServer.getGlusterServerUuid() : null; if (glusterHostId == null) { log.warnFormat("Could not find gluster host uuid for the node {0}", hostName); } VDSReturnValue returnValue = runVdsCommand( VDSCommandType.RemoveGlusterServer, new RemoveGlusterServerVDSParameters(runningHostInSourceCluster.getId(), hostName, false, glusterHostId)); if (!returnValue.getSucceeded()) { handleVdsError(returnValue); errorType = AuditLogType.GLUSTER_SERVER_REMOVE_FAILED; return false; } return true; }
Source:
<code>private void startSyncOperation(OCFile availableOfflineFile, String accountName) { Log_OC.i( TAG, String.format( "Requested synchronization for file %1s", availableOfflineFile.getFileName() ) ); Account mAccount = AccountUtils.getOwnCloudAccountByName(mAvailableOfflineJobService, accountName); FileDataStorageManager storageManager = new FileDataStorageManager( mAvailableOfflineJobService, mAccount, mAvailableOfflineJobService.getContentResolver() ); SynchronizeFileOperation synchronizeFileOperation = new SynchronizeFileOperation(availableOfflineFile, null, mAccount, false, mAvailableOfflineJobService); RemoteOperationResult result = synchronizeFileOperation. execute(storageManager, mAvailableOfflineJobService); if (result.getCode() == RemoteOperationResult.ResultCode.SYNC_CONFLICT) { Intent i = new Intent(mAvailableOfflineJobService, ConflictsResolveActivity.class); i.setFlags(i.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); i.putExtra(ConflictsResolveActivity.EXTRA_FILE, availableOfflineFile); i.putExtra(ConflictsResolveActivity.EXTRA_ACCOUNT, mAccount); <START> mAvailableOfflineJobService.startActivity(i); <END> } }</code><technical_language>Launching activity job service.... This is a good approach. Android restricts starting UI items services. move another logic. For example, this job emits event start activity</technical_language>

Target:
private void startSyncOperation(OCFile availableOfflineFile, String accountName) { if (BuildConfig.DEBUG || MainApp.isBeta()) { Log_OC.i( TAG, String.format( "Requested synchronization for file %1s in account %2s", availableOfflineFile.getRemotePath(), accountName ) ); } Account account = AccountUtils.getOwnCloudAccountByName(mAvailableOfflineJobService, accountName); FileDataStorageManager storageManager = new FileDataStorageManager( mAvailableOfflineJobService, account, mAvailableOfflineJobService.getContentResolver() ); SynchronizeFileOperation synchronizeFileOperation = new SynchronizeFileOperation(availableOfflineFile, null, account, false, mAvailableOfflineJobService, true); RemoteOperationResult result = synchronizeFileOperation. execute(storageManager, mAvailableOfflineJobService); if (result.getCode() == RemoteOperationResult.ResultCode.SYNC_CONFLICT) { notifyConflict(availableOfflineFile, account); } }
Source:
<code>public void stop() { for (Map.Entry<Task.Priority, ListeningExecutorService> entry : exec.entrySet()) { <START> entry.getValue().shutdownNow(); <END> } }</code><technical_language>this throw exceptions</technical_language>

Target:
public void stop() { for (Map.Entry<Integer, ListeningExecutorService> entry : exec.entrySet()) { try { entry.getValue().shutdown(); } catch (SecurityException ex) { log.wtf(ex, "I can't control my own threads!"); } } for (ThreadPoolTaskRunnerWorkItem item : runningItems) { final Task task = item.getTask(); final long start = System.currentTimeMillis(); final boolean graceful; final long elapsed; boolean error = false; if (taskConfig.isRestoreTasksOnRestart() && task.canRestore()) { graceful = true; log.info("Starting graceful shutdown of task[%s].", task.getId()); try { task.stopGracefully(); final TaskStatus taskStatus = item.getResult().get( new Interval(new DateTime(start), taskConfig.getGracefulShutdownTimeout()).toDurationMillis(), TimeUnit.MILLISECONDS ); log.info( "Graceful shutdown of task[%s] finished in %,dms with status[%s].", task.getId(), System.currentTimeMillis() - start, taskStatus.getStatusCode() ); } catch (Exception e) { log.makeAlert(e, "Graceful task shutdown failed: %s", task.getDataSource()) .addData("taskId", task.getId()) .addData("dataSource", task.getDataSource()) .emit(); log.warn(e, "Graceful shutdown of task[%s] aborted with exception."); error = true; } } else { graceful = false; } elapsed = System.currentTimeMillis() - start; final ServiceMetricEvent.Builder metricBuilder = ServiceMetricEvent .builder() .setDimension("task", task.getId()) .setDimension("dataSource", task.getDataSource()) .setDimension("graceful", String.valueOf(graceful)) .setDimension("error", String.valueOf(error)); emitter.emit(metricBuilder.build("task/interrupt/count", 1L)); emitter.emit(metricBuilder.build("task/interrupt/elapsed", elapsed)); } for (Map.Entry<Integer, ListeningExecutorService> entry : exec.entrySet()) { try { entry.getValue().shutdownNow(); } catch (SecurityException ex) { log.wtf(ex, "I can't control my own threads!"); } } }
Source:
<code>public String getAsText() throws OseeCoreException { IOseeBranch branch = TokenFactory.createBranch(branchUuid, ""); QueryFactory factory = OrcsApplication.getOrcsApi().getQueryFactory(null); ArtifactReadable exactlyOne = factory.fromBranch(branch).andGuidsOrHrids(artifactUuid).getResults().getExactlyOne(); AttributeReadable<Object> item = Iterables.find(exactlyOne.getAttributes(), new Predicate<AttributeReadable<Object>>() { @Override public boolean apply(AttributeReadable<Object> attribute) { <START> return attribute.getId() == attrId; <END> } }); return item.getValue().toString(); }</code><technical_language>i this throw a NoSuchElementException if found. is tryFind if want handle this differently</technical_language>

Target:
public String getAsText() throws OseeCoreException { IOseeBranch branch = TokenFactory.createBranch(branchUuid, ""); QueryFactory factory = OrcsApplication.getOrcsApi().getQueryFactory(null); ArtifactReadable exactlyOne = factory.fromBranch(branch).andGuidsOrHrids(artifactUuid).getResults().getExactlyOne(); Optional<AttributeReadable<Object>> item = Iterables.tryFind(exactlyOne.getAttributes(), new Predicate<AttributeReadable<Object>>() { @Override public boolean apply(AttributeReadable<Object> attribute) { return attribute.getId() == attrId; } }); String toReturn = ""; if (item.isPresent()) { Object value = item.get().getValue(); if (value != null) { toReturn = value.toString(); } } return toReturn; }
Source:
<code>public void testUniqueHitPolicyRedundantAndSubsumptantRows() throws Exception, UpdateException { analyze("uniqueHitPolicyRedundantAndSubsumptantRows.gdst"); assertContains("SubsumptantRows", <START> new HashSet<Integer>() {{ <END> add(1); add(2); }}, Severity.ERROR, analyzerProvider.getAnalysisReport()); assertContains("SubsumptantRows", new HashSet<Integer>() {{ add(2); add(3); }}, Severity.ERROR, analyzerProvider.getAnalysisReport()); assertContains("RedundantRows", new HashSet<Integer>() {{ add(1); add(3); }}, Severity.ERROR, analyzerProvider.getAnalysisReport()); }</code><technical_language>nitpicking here... I for a nicer code if Set turned varargs. If need set, handle conversion assertContains method</technical_language>

Target:
public void testUniqueHitPolicyRedundantAndSubsumptantRows() throws Exception, UpdateException { analyze("uniqueHitPolicyRedundantAndSubsumptantRows.gdst"); assertContains(analyzerProvider.getAnalysisReport(), SUBSUMPTANT_ROWS, Severity.ERROR, 1, 2); assertContains(analyzerProvider.getAnalysisReport(), SUBSUMPTANT_ROWS, Severity.ERROR, 2, 3); assertContains(analyzerProvider.getAnalysisReport(), REDUNDANT_ROWS, Severity.ERROR, 1, 3); }
Source:
<code>public boolean isEnabled(Session session) { <START> FeaturesConfig.JoinReorderingStrategy joinReorderingStrategy = getJoinReorderingStrategy(session); <END> return joinReorderingStrategy == ELIMINATE_CROSS_JOINS || joinReorderingStrategy == COST_BASED; }</code><technical_language>Import JoinReorderingStrategy</technical_language>

Target:
public boolean isEnabled(Session session) { JoinReorderingStrategy joinReorderingStrategy = getJoinReorderingStrategy(session); return joinReorderingStrategy == ELIMINATE_CROSS_JOINS || joinReorderingStrategy == COST_BASED; }
Source:
<code>public void setTaskLimitExceeded(boolean exceeded) { <START> this.taskLimitExceeded.set(exceeded); <END> }</code><technical_language>nit: drop "this."</technical_language>

Target:
public void setTaskLimitExceeded(boolean exceeded) { taskLimitExceeded.set(exceeded); }
Source:
<code><START> protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { <END> JobInstance jobInstance = stepExecution.getJobExecution().getJobInstance(); String stepName = stepExecution.getStepName(); StepExecution lastStepExecution = jobRepository.getLastStepExecution(jobInstance, stepName); boolean isRestart = (lastStepExecution != null && lastStepExecution.getStatus() != BatchStatus.COMPLETED); if (isRestart) { stepExecution.setExecutionContext(lastStepExecution.getExecutionContext()); } else { stepExecution.setExecutionContext(context); } return shouldStart(allowStartIfComplete, stepExecution, lastStepExecution) || isRestart; }</code><technical_language>avoid code duplication making isStartable call getStartable: protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { return getStartable(stepExecution, context); }</technical_language>

Target:
protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { return getStartable(stepExecution, context); }
Source:
<code>public void includeResource_shouldNotIncludeDuplicateResources() { Resource first = new Resource(Resource.CATEGORY_JS, "source", "z_first", 1); Resource second = new Resource(Resource.CATEGORY_JS, "mergepatientdata", "path", 2); Resource duplicateResource = new Resource(Resource.CATEGORY_JS, "mergepatientdata", "path", 3); PageContext pageContext = new PageContext(null); pageContext.includeResource(first); pageContext.includeResource(second); pageContext.includeResource(duplicateResource); List<Resource> jsResourcesToIncluude = pageContext.getResourcesToInclude(Resource.CATEGORY_JS); assertEquals(2, jsResourcesToIncluude.size()); <START> assertEquals(3, (int) jsResourcesToIncluude.get(0).getPriority()); <END> }</code><technical_language>add another assertion for priority of resource</technical_language>

Target:
public void includeResource_shouldNotIncludeDuplicateResources() { Resource first = new Resource(Resource.CATEGORY_JS, "source", "z_first", 1); Resource second = new Resource(Resource.CATEGORY_JS, "mergepatientdata", "path", 2); Resource duplicateResource = new Resource(Resource.CATEGORY_JS, "mergepatientdata", "path", 3); PageContext pageContext = new PageContext(null); pageContext.includeResource(first); pageContext.includeResource(second); pageContext.includeResource(duplicateResource); List<Resource> jsResourcesToIncluude = pageContext.getResourcesToInclude(Resource.CATEGORY_JS); assertEquals(2, jsResourcesToIncluude.size()); assertEquals(3, (int) jsResourcesToIncluude.get(0).getPriority()); assertEquals(1, (int) jsResourcesToIncluude.get(1).getPriority()); }
Source:
<code>protected void validateAuthenticationState(HttpClient httpClient) throws GerritLoginException { Optional<Cookie> cookie = findCookieWithName(LOGIN_COOKIE_NAME, httpClient); <START> setXsrfCookie(nonNullOrThrow(cookie, () -> new GerritLoginException(), httpClient).get()); <END> }</code><technical_language>me, I find a simple if-else clause more readable</technical_language>

Target:
protected void validateAuthenticationState(HttpClient httpClient) throws GerritLoginException { Optional<Cookie> cookie = findCookieWithName(LOGIN_COOKIE_NAME, httpClient); if (cookie.isPresent()) { setXsrfCookie(cookie.get()); return; } if (CoreUtil.TEST_MODE) { System.err.println(" Authentication failed: " + httpClient.getState()); } throw new GerritLoginException(); }