auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static WebArchive createDeployment() { return ShrinkWrap .create(WebArchive.class, "test.war") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsManifestResource(new StringAsset("Dependencies: org.picketlink.core meta-inf,org.picketlink.core.api meta-inf, org.picketlink.idm meta-inf\n"), "MANIFEST.MF") .addClass(PartitionManagerProducerTestCase.class) .addAsManifestResource(createPermissionsXmlAsset( <START> new FilePermission("/tmp/pl-idm", "read,write,delete"), END> new FilePermission("/tmp/pl-idm/-", "read,write,delete"), new FilePermission("/var/tmp/pl-idm", "read,write,delete"), new FilePermission("/var/tmp/pl-idm/-", "read,write,delete")), "permissions.xml"); }</code><technical_language>I get java.io.tempdir used? this kind of change is polluting temp dir CI if noting else. redirect tmp dirs in CI some "job workspace directories" properly cleaned up</technical_language>

Target:
public static WebArchive createDeployment() { final String tmpDir = System.getProperty("java.io.tmpdir"); return ShrinkWrap .create(WebArchive.class, "test.war") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsManifestResource(new StringAsset("Dependencies: org.picketlink.core meta-inf,org.picketlink.core.api meta-inf, org.picketlink.idm meta-inf\n"), "MANIFEST.MF") .addClass(PartitionManagerProducerTestCase.class) .addAsManifestResource(createPermissionsXmlAsset( new FilePermission(tmpDir + "/pl-idm", "read,write,delete"), new FilePermission(tmpDir + "/pl-idm/-", "read,write,delete")), "permissions.xml"); }
Source:
<code>public Configuration build() { final Path jbossHome = this.jbossHome; final LoggerHint loggerHint = this.loggerHint == null ? LoggerHint.DEFAULT : this.loggerHint; final boolean embeddedLoggingHint = this.embeddedLoggingHint; configureLogging(loggerHint); final String[] cmdArgs = this.cmdArgs.toArray(new String[0]); final String[] systemPackages = this.systemPackages.toArray(new String[0]); final ModuleLoader moduleLoader; if (this.moduleLoader == null) { final String modulePath = WildFlySecurityManager.getPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, jbossHome.resolve(JBOSS_MODULES_DIR_NAME).toAbsolutePath().toString()); moduleLoader = setupModuleLoader(modulePath, systemPackages); MODULE_LOADER_CONFIGURED.set(true); } else { <START> moduleLoader = this.moduleLoader; <END> } return new Configuration() { @Override public Path getJBossHome() { return jbossHome; } @Override public ModuleLoader getModuleLoader() { return moduleLoader; } @Override public String[] getCommandArguments() { return Arrays.copyOf(cmdArgs, cmdArgs.length); } }; }</code><technical_language>is this embeddedLoggingHint build Configuration</technical_language>

Target:
public Configuration build() { final Path jbossHome = this.jbossHome; final LoggerHint loggerHint = this.loggerHint == null ? LoggerHint.DEFAULT : this.loggerHint; configureLogging(loggerHint); final String[] cmdArgs = this.cmdArgs.toArray(new String[0]); final String[] systemPackages = this.systemPackages.toArray(new String[0]); final ModuleLoader moduleLoader; if (this.moduleLoader == null) { final String modulePath = SecurityActions.getPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, jbossHome.resolve(JBOSS_MODULES_DIR_NAME).toAbsolutePath().toString()); moduleLoader = setupModuleLoader(modulePath, systemPackages); MODULE_LOADER_CONFIGURED.set(true); } else { moduleLoader = this.moduleLoader; } return new Configuration() { @Override public Path getJBossHome() { return jbossHome; } @Override public ModuleLoader getModuleLoader() { return moduleLoader; } @Override public String[] getCommandArguments() { return Arrays.copyOf(cmdArgs, cmdArgs.length); } }; }
Source:
<code>private void scanJarFile(File entryFile, ImmutableList.Builder<ScanResult> results) throws IOException { try (JarFile jar = new JarFile(entryFile)) { ZipEntry beansXmlEntry = jar.getEntry(AbstractWeldDeployment.BEANS_XML); if (beansXmlEntry != null) { <START> logger.debugv(BEANS_XML_FOUND_MESSAGE, entryFile); <END> BeansXml beansXml = parseBeansXml( new URL(PROCOTOL_JAR + ":" + entryFile.toURI().toURL().toExternalForm() + JAR_URL_SEPARATOR + beansXmlEntry.getName())); if (accept(beansXml)) { results.add(new ScanResult(beansXml, entryFile.getPath())); } } else { if (jar.getEntry(EXTENSION_FILE) == null) { logger.debugv(BEANS_XML_NOT_FOUND_MESSAGE, entryFile); results.add(new ScanResult(null, entryFile.getPath())); } } Manifest manifest = jar.getManifest(); if (manifest != null) { final Attributes manifestMainAttributes = manifest.getMainAttributes(); if (manifestMainAttributes.containsKey(CLASS_PATH)) { scanManifestClassPath(entryFile.toURI().toURL(), manifestMainAttributes.getValue(CLASS_PATH), results); } } } }</code><technical_language>JarFile, ZipEntry changed JarEntry I suppose</technical_language>

Target:
private void scanJarFile(File entryFile, ImmutableList.Builder<ScanResult> results) throws IOException { try (JarFile jar = new JarFile(entryFile)) { JarEntry beansXmlEntry = jar.getJarEntry(AbstractWeldDeployment.BEANS_XML); if (beansXmlEntry != null) { logger.debugv(BEANS_XML_FOUND_MESSAGE, entryFile); BeansXml beansXml = parseBeansXml( new URL(PROCOTOL_JAR + ":" + entryFile.toURI().toURL().toExternalForm() + JAR_URL_SEPARATOR + beansXmlEntry.getName())); if (accept(beansXml)) { results.add(new ScanResult(beansXml, entryFile.getPath())); } } else { if (jar.getEntry(EXTENSION_FILE) == null) { logger.debugv(BEANS_XML_NOT_FOUND_MESSAGE, entryFile); results.add(new ScanResult(null, entryFile.getPath())); } } Manifest manifest = jar.getManifest(); if (manifest != null) { final Attributes manifestMainAttributes = manifest.getMainAttributes(); if (manifestMainAttributes.containsKey(CLASS_PATH)) { scanManifestClassPath(entryFile.toURI().toURL(), manifestMainAttributes.getValue(CLASS_PATH), results); } } } }
Source:
<code>protected TreeViewer doCreateTreeViewer(Composite parentComposite, int style) { fCheckboxTreeViewer = new CheckboxTreeViewer(parentComposite, style) { @Override protected void fireCheckStateChanged(CheckStateChangedEvent event) { int nb = getCheckedElements().length; IPreferenceStore corePreferenceStore = Activator.getDefault().getCorePreferenceStore(); String hide = corePreferenceStore.getString(ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE); if (nb > 20 && !MessageDialogWithToggle.ALWAYS.equals(hide)) { <START> int retCode = MessageDialogWithToggle.openOkCancelConfirm(getControl().getShell(), <END> Messages.AbstractSelectTreeViewer_ManyEntriesSelectedTitle, String.format(Messages.AbstractSelectTreeViewer_ManyEntriesSelectedMessage, nb), Messages.AbstractSelectTreeViewer_ManyEntriesSelectedDontShowAgain, false, corePreferenceStore, ITmfUIPreferences.HIDE_MANY_ENTRIES_SELECTED_TOGGLE).getReturnCode(); if (retCode == Window.CANCEL) { setSubtreeChecked(event.getElement(), !event.getChecked()); checkSubtree(event.getElement(), !event.getChecked()); return; } } super.fireCheckStateChanged(event); } }; fCheckboxTreeViewer.setUseHashlookup(true); fCheckboxTreeViewer.addCheckStateListener(event -> { if (event.getChecked()) { fCheckedObjects.add(event.getElement()); } else { fCheckedObjects.remove(event.getElement()); } }); return fCheckboxTreeViewer; }</code><technical_language>If user accepted selection of 30 elements (without "Don't show this again", sense show dialog unselecting some (e.g. 20)</technical_language>

Target:
protected TreeViewer doCreateTreeViewer(Composite parentComposite, int style) { fCheckboxTreeViewer = new CheckboxTreeViewer(parentComposite, style); fCheckboxTreeViewer.setUseHashlookup(true); fCheckboxTreeViewer.addCheckStateListener(event -> { if (event.getChecked()) { fCheckedObjects.add(event.getElement()); } else { fCheckedObjects.remove(event.getElement()); } }); return fCheckboxTreeViewer; }
Source:
<code>public Iterator<Object[]> indelFlipDataWithOriginalAllele() { final List<Object[]> tests = new ArrayList<>(); indelFlipData().forEachRemaining(x -> { if (x[2] == null){ tests.add(x); } <START> else { <END> VariantContext source = (VariantContext)x[0]; VariantContextBuilder result_builder = new VariantContextBuilder((VariantContext)x[2]); result_builder.attribute(LiftoverVcf.ORIGINAL_ALLELES, allelesToStringList(source.getAlleles())); tests.add(new Object[]{x[0], x[1], result_builder.make()}); } }); return tests.iterator(); }</code><technical_language>} else {</technical_language>

Target:
public Iterator<Object[]> indelFlipDataWithOriginalAllele() { final List<Object[]> tests = new ArrayList<>(); indelFlipData().forEachRemaining(x -> { if (x[2] == null) { tests.add(x); } else { VariantContext source = (VariantContext)x[0]; VariantContextBuilder result_builder = new VariantContextBuilder((VariantContext)x[2]); result_builder.attribute(LiftoverVcf.ORIGINAL_ALLELES, LiftoverUtils.allelesToStringList(source.getAlleles())); tests.add(new Object[]{x[0], x[1], result_builder.make()}); } }); return tests.iterator(); }
Source:
<code>public void shouldRaiseAlertOnMissingFeaturePolicyHTML() throws Exception { msg.getResponseHeader().addHeader(HttpHeader.CONTENT_TYPE, "text/html"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); assertEquals(alertsRaised.size(), 1); assertEquals(alertsRaised.get(0).getDescription(), getAlertAtrribute("desc")); <START> assertEquals(alertsRaised.get(0).getName(), getAlertAtrribute("name")); <END> assertEquals(alertsRaised.get(0).getReference(), getAlertAtrribute("refs")); assertEquals(alertsRaised.get(0).getSolution(), getAlertAtrribute("soln")); }</code><technical_language>For record, if asserts matchers TestUtils (e.g. hasNameLoadedWithKey) assert keys exist</technical_language>

Target:
public void shouldRaiseAlertOnMissingFeaturePolicyHTML() throws Exception { msg.getResponseHeader().addHeader(HttpHeader.CONTENT_TYPE, "text/html"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); assertEquals(alertsRaised.size(), 1); assertThat(alertsRaised.get(0), hasNameLoadedWithKey(MESSAGE_PREFIX+"name")); }
Source:
<code>public Response demonstrateClaims(@HeaderParam("Authorization") String auth) { if (auth != null && auth.startsWith("Bearer ")) { try { JWT j = JWTParser.parse(auth.substring(7)); return Response.ok(j.getJWTClaimsSet().getClaims()).build(); } catch (ParseException e) { <START> e.printStackTrace(); <END> } } return Response.status(204).build(); }</code><technical_language>if exception occurs, return 200 OK? feels wrong</technical_language>

Target:
public Response demonstrateClaims(@HeaderParam("Authorization") String auth) { if (auth != null && auth.startsWith("Bearer ")) { try { JWT j = JWTParser.parse(auth.substring(7)); return Response.ok(j.getJWTClaimsSet().getClaims()).build(); } catch (ParseException e) { e.printStackTrace(); return Response.status(400).build(); } } return Response.status(204).build(); }
Source:
<code>private LastDataPointMessage buildLastDataPointResponse( final String sourceMetricName, final String rollupMetricName, final RollupPeriod period, final ImmutableSet<String> tags, final MetricsQueryResponse response, @Nullable final Throwable failure) { final LastDataPointMessage.Builder builder = new LastDataPointMessage.Builder() .setSourceMetricName(sourceMetricName) .setRollupMetricName(rollupMetricName) .setPeriod(period) .setTags(tags); if (failure != null) { return builder.setFailure(failure).build(); } final Map<String, MetricsQueryResponse.QueryResult> queryResults = response.getQueries() .stream() .flatMap(query -> query.getResults().stream()) .collect(ImmutableMap.toImmutableMap( MetricsQueryResponse.QueryResult::getName, Function.identity() )); if (queryResults.size() != 2 || !queryResults.containsKey(sourceMetricName) || !queryResults.containsKey(rollupMetricName)) { <START> return builder.setFailure(new Exception("Unexpected query results.")).build(); <END> } Optional.ofNullable(queryResults.get(sourceMetricName)) .flatMap(qr -> qr.getValues().stream().findFirst()) .map(DataPoint::getTime) .ifPresent(builder::setSourceLastDataPointTime); Optional.ofNullable(queryResults.get(rollupMetricName)) .flatMap(qr -> qr.getValues().stream().findFirst()) .map(DataPoint::getTime) .ifPresent(builder::setRollupLastDataPointTime); return builder.build(); }</code><technical_language>attach query results this exception. Possibly a new exception type</technical_language>

Target:
private LastDataPointsMessage buildLastDataPointResponse( final String sourceMetricName, final String rollupMetricName, final RollupPeriod period, final ImmutableSet<String> tags, final MetricsQueryResponse response, @Nullable final Throwable failure) { final LastDataPointsMessage.Builder builder = new LastDataPointsMessage.Builder() .setSourceMetricName(sourceMetricName) .setRollupMetricName(rollupMetricName) .setPeriod(period) .setTags(tags); if (failure != null) { return builder.setFailure(failure).build(); } final Map<String, Optional<DataPoint>> queryResults = response.getQueries() .stream() .flatMap(query -> query.getResults().stream()) .collect(ImmutableMap.toImmutableMap( MetricsQueryResponse.QueryResult::getName, queryResult -> queryResult.getValues().stream().findFirst() )); if (queryResults.size() != 2 || !queryResults.containsKey(sourceMetricName) || !queryResults.containsKey(rollupMetricName)) { return builder.setFailure(new UnexpectedQueryResponseException("Unexpected or missing metric names", response)).build(); } queryResults.get(sourceMetricName) .map(DataPoint::getTime) .ifPresent(builder::setSourceLastDataPointTime); queryResults.get(rollupMetricName) .map(DataPoint::getTime) .ifPresent(builder::setRollupLastDataPointTime); return builder.build(); }
Source:
<code>public boolean ok() { MapillaryProperties.DOWNLOAD_MODE.put(DOWNLOAD_MODE.fromLabel(downloadModeComboBox.getSelectedItem().toString()).getPrefId()); MapillaryProperties.DISPLAY_HOUR.put(displayHour.isSelected()); MapillaryProperties.TIME_FORMAT_24.put(format24.isSelected()); MapillaryProperties.MOVE_TO_IMG.put(moveTo.isSelected()); MapillaryProperties.HOVER_ENABLED.put(hoverEnabled.isSelected()); MapillaryProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(cutOffSeq.isSelected()); MapillaryProperties.DEVELOPER.put(developer.isSelected()); try { Integer prefetch_count = Integer.parseInt(preFetchSize.getText()); MapillaryProperties.PRE_FETCH_IMAGE_COUNT.put(prefetch_count); } catch (NumberFormatException e) { <START> Logging.warn("Prefetch Image count is not a valid number. Resetting to default value."); <END> } return false; }</code><technical_language>In opinion this a Notification a JOptionPane (messageDialog). user notice, wrong</technical_language>

Target:
public boolean ok() { MapillaryProperties.DOWNLOAD_MODE.put(DOWNLOAD_MODE.fromLabel(downloadModeComboBox.getSelectedItem().toString()).getPrefId()); MapillaryProperties.DISPLAY_HOUR.put(displayHour.isSelected()); MapillaryProperties.TIME_FORMAT_24.put(format24.isSelected()); MapillaryProperties.MOVE_TO_IMG.put(moveTo.isSelected()); MapillaryProperties.HOVER_ENABLED.put(hoverEnabled.isSelected()); MapillaryProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(cutOffSeq.isSelected()); MapillaryProperties.DEVELOPER.put(developer.isSelected()); if (preFetchSize.getModel() instanceof SpinnerNumberModel) { Integer prefetch_count = ((SpinnerNumberModel) preFetchSize.getModel()).getNumber().intValue(); MapillaryProperties.PRE_FETCH_IMAGE_COUNT.put(prefetch_count); } else { JOptionPane.showMessageDialog( Main.parent, I18n.tr("The Mapillary image prefetch count is not a valid number"), I18n.tr("Warning"), JOptionPane.INFORMATION_MESSAGE); } return false; }
Source:
<code>public boolean apply(IMap.Entry<String, EmployeeImpl> entry) { <START> return entry.getValue().getSalary() == salary; <END> }</code><technical_language>brain capacity is limited I simplify to: Employee e = entry.getValue(); return e.getSalary() == salary; This is easier eyes</technical_language>

Target:
public boolean apply(IMap.Entry<String, EmployeeImpl> entry) { EmployeeImpl value = entry.getValue(); return value.getSalary() == salary; }
Source:
<code>public static Optional<InsightCard> getInsights(final SleepStatsDAODynamoDB sleepStatsDAODynamoDB, final Long accountId, final WakeStdDevData wakeStdDevData, final DateTime queryEndDate, final int numDays) { final DateTime queryStartDate = queryEndDate.minusDays(numDays); final String queryEndDateString = DateTimeUtil.dateToYmdString(queryEndDate); final String queryStartDateString = DateTimeUtil.dateToYmdString(queryStartDate); final List<AggregateSleepStats> sleepStats = sleepStatsDAODynamoDB.getBatchStats(accountId, queryStartDateString, queryEndDateString); LOGGER.debug("length of sleep stats is and sleepStats is ", sleepStats.size(), sleepStats); <START> final List<Long> wakeTimeList = new ArrayList<>(); <END> for (final AggregateSleepStats stat : sleepStats) { LOGGER.debug("printing sleepstats.waketime {}", stat.sleepStats.wakeTime); Long wakeTimeStamp = stat.sleepStats.wakeTime; DateTime wakeTimeDateTime = new DateTime(wakeTimeStamp, DateTimeZone.forOffsetMillis(stat.offsetMillis)); Long wakeTimeMillis = wakeTimeDateTime.getMillis() - wakeTimeDateTime.withTimeAtStartOfDay().getMillis(); Long wakeTime = wakeTimeMillis/(60L * 1000L); wakeTimeList.add(wakeTime); } final Optional<InsightCard> card = processWakeVarianceData(accountId, wakeTimeList, wakeStdDevData); return card; }</code><technical_language>style nitpick Lists.newArrayList() is preferred of creating lists</technical_language>

Target:
public static Optional<InsightCard> getInsights(final SleepStatsDAODynamoDB sleepStatsDAODynamoDB, final Long accountId, final WakeStdDevData wakeStdDevData, final DateTime queryEndDate, final int numDays) { final DateTime queryStartDate = queryEndDate.minusDays(numDays); final String queryEndDateString = DateTimeUtil.dateToYmdString(queryEndDate); final String queryStartDateString = DateTimeUtil.dateToYmdString(queryStartDate); final List<AggregateSleepStats> sleepStats = sleepStatsDAODynamoDB.getBatchStats(accountId, queryStartDateString, queryEndDateString); LOGGER.debug("Account id length of sleep stats is and sleepStats is ", accountId, sleepStats.size(), sleepStats); final List<Integer> wakeTimeList = Lists.newArrayList(); for (final AggregateSleepStats stat : sleepStats) { final Long wakeTimeStamp = stat.sleepStats.wakeTime; final DateTime wakeTimeDateTime = new DateTime(wakeTimeStamp, DateTimeZone.forOffsetMillis(stat.offsetMillis)); final int wakeTime = wakeTimeDateTime.getMinuteOfDay(); wakeTimeList.add(wakeTime); } final Optional<InsightCard> card = processWakeVarianceData(accountId, wakeTimeList, wakeStdDevData); return card; }
Source:
<code>private List<Identifier> prepareIdentifier() { <START> List<Identifier> testList = new ArrayList<>(); <END> Identifier testIdentifier1 = new Identifier("603", new IdentifierType("Old Identification Number")); testIdentifier1.setUuid("2222"); Location location = locationAdapter.createLocation(DEFAULT_CONFIG_NAME, new Location("FooName", "FooCountry", "FooRegion", "FooCountryDistrict", "FooStateProvince")); testIdentifier1.setLocation(location); testList.add(testIdentifier1); return testList; }</code><technical_language>please add motechId here, in OpenMRS module MOTECH ID identifier is required for adding patient</technical_language>

Target:
private List<Identifier> prepareIdentifier() { List<Identifier> testList = new ArrayList<>(); Identifier testIdentifier1 = new Identifier("603", new IdentifierType("Old Identification Number")); testIdentifier1.setUuid("2222"); testIdentifier1.setLocation(location); testList.add(testIdentifier1); return testList; }
Source:
<code>public void initialise() { <START> sceneOpaqueFbo = displayResolutionDependentFBOs.get(SCENE_OPAQUE); <END> playerCamera = worldRenderer.getActiveCamera(); wireframeStateChange = new SetWireframe(true); renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new SetViewportToSizeOf(SCENE_OPAQUE, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial(CHUNK_SHADER.toString())); chunkShader = getMaterial(CHUNK_SHADER); }</code><technical_language>above, please move this line SetViewport line add empty line it</technical_language>

Target:
public void initialise() { wireframeStateChange = new SetWireframe(true); renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new SetViewportToSizeOf(READONLY_GBUFFER, displayResolutionDependentFBOs)); sceneOpaqueFbo = displayResolutionDependentFBOs.get(READONLY_GBUFFER); addDesiredStateChange(new EnableMaterial(CHUNK_SHADER.toString())); chunkShader = getMaterial(CHUNK_SHADER); }
Source:
<code>public VdcReturnValueBase endAction(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext context) { CommandBase<?> command = <START> context != null ? CommandsFactory.createCommand(actionType, parameters, context.duplicate()) : <END> CommandsFactory.createCommand(actionType, parameters); return command.endAction(); }</code><technical_language>context null</technical_language>

Target:
public VdcReturnValueBase endAction(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext context) { return CommandsFactory.createCommand(actionType, parameters, context).endAction(); }
Source:
<code>public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.PUT == request.getMethod()) { bookieServer.getBookie().getLedgerStorage().forceGC(); String output = "Triggered GC on BookieServer: " + bookieServer.toString(); String jsonResponse = JsonUtil.toJson(output); LOG.debug("output body:" + jsonResponse); response.setBody(jsonResponse); response.setCode(HttpServer.StatusCode.OK); return response; } else if (HttpServer.Method.GET == request.getMethod()) { boolean isInForceGC = bookieServer.getBookie().getLedgerStorage().isInForceGC(); String output = "Is Force Triggered GC on BookieServer: " + bookieServer.toString() + " running? " + (isInForceGC ? "true" : "false"); <START> String jsonResponse = JsonUtil.toJson(output); <END> LOG.debug("output body:" + jsonResponse); response.setBody(jsonResponse); response.setCode(HttpServer.StatusCode.OK); return response; } else { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Not found method. Should be PUT method to trigger GC."); return response; } }</code><technical_language>I suggest creating object called GarbageCollectionStatus, includes - gc is running, phase (gc, minor compaction, major compaction) - gc counters gc time. Bascially idea is provide a comprehensive view is a bookie</technical_language>

Target:
public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.PUT == request.getMethod()) { bookieServer.getBookie().getLedgerStorage().forceGC(); String output = "Triggered GC on BookieServer: " + bookieServer.toString(); String jsonResponse = JsonUtil.toJson(output); if (LOG.isDebugEnabled()) { LOG.debug("output body:" + jsonResponse); } response.setBody(jsonResponse); response.setCode(HttpServer.StatusCode.OK); return response; } else if (HttpServer.Method.GET == request.getMethod()) { Boolean isInForceGC = bookieServer.getBookie().getLedgerStorage().isInForceGC(); Pair<String, String> output = Pair.of("is_in_force_gc", isInForceGC.toString()); String jsonResponse = JsonUtil.toJson(output); if (LOG.isDebugEnabled()) { LOG.debug("output body:" + jsonResponse); } response.setBody(jsonResponse); response.setCode(HttpServer.StatusCode.OK); return response; } else { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Not found method. Should be PUT to trigger GC, Or GET to get Force GC state."); return response; } }
Source:
<code>public void testDclassWrapper() { String userAgentSample = "Mozilla/5.0 (Linux; U; Android 2.2; en; HTC Aria A6380 Build/ERE27) AppleWebKit/540.13+ (KHTML, like Gecko) Version/3.1 Mobile Safari/524.15.0"; dClass dw = new dClass(dtree_path); dw.init(); Map<String, String> c = dw.classify(userAgentSample); assertEquals("Vendor as expected", "HTC" , c.get("vendor")); <START> assertEquals("Model as expected" , "A6366", c.get("model")); <END> assertEquals("device_os as expected","Android",c.get("device_os")); assertEquals("is_tablet as expected","false",c.get("is_tablet")); }</code><technical_language>If settle for 1.13 dtree file, A6366 A6380</technical_language>

Target:
public void testDclassWrapper() { String userAgentSample = "Mozilla/5.0 (Linux; U; Android 2.2; en; HTC Aria A6380 Build/ERE27) AppleWebKit/540.13+ (KHTML, like Gecko) Version/3.1 Mobile Safari/524.15.0"; dClass dw = new dClass(dtree_path); Map<String, String> c = dw.classify(userAgentSample); assertEquals("Vendor as expected", "HTC" , c.get("vendor")); assertEquals("Model as expected" , "A6380", c.get("model")); assertEquals("device_os as expected","Android",c.get("device_os")); assertEquals("is_tablet as expected","false",c.get("is_tablet")); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; <START> return obj.hashCode() == hashCode(); <END> }</code><technical_language>bomb: this is a solution. hashCode() equal for objects. Do fields</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SimpleMessage other = (SimpleMessage) obj; return Objects.equals(category, other.category) && Objects.equals(message, other.message) && ((messageParameters == null && other.messageParameters == null) || Arrays.equals(messageParameters, other.messageParameters)) && Objects.equals(severity, other.severity); }
Source:
<code>private static void getThreadSuspendReason(DSFSessionState sessionState, final ICPUDMContext cpuContext, final ICoreDMContext coreContext, final IMIExecutionDMContext execContext, final IThreadDMData threadData, final IFrameDMData frameData, final DSFDebugModelListener listener, final Object arg) { <START> IRunControl runControl = sessionState.getService(IRunControl.class); <END> runControl.getExecutionData(execContext, new ImmediateDataRequestMonitor<IExecutionDMData>() { @Override protected void handleCompleted() { IExecutionDMData executionData = getData(); VisualizerExecutionState state = VisualizerExecutionState.SUSPENDED; if (isSuccess() && executionData != null) { if (executionData.getStateChangeReason() == StateChangeReason.SIGNAL) { if (executionData instanceof IExecutionDMData2) { String details = ((IExecutionDMData2)executionData).getDetails(); if (details != null) { if (isCrashSignal(details)) { state = VisualizerExecutionState.CRASHED; } } } } } listener.getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData, frameData, state, arg); } }); }</code><technical_language>check runControl != null</technical_language>

Target:
private static void getThreadSuspendReason(DSFSessionState sessionState, final ICPUDMContext cpuContext, final ICoreDMContext coreContext, final IMIExecutionDMContext execContext, final IThreadDMData threadData, final IFrameDMData frameData, final DSFDebugModelListener listener, final Object arg) { IRunControl runControl = sessionState.getService(IRunControl.class); if (runControl != null) { runControl.getExecutionData(execContext, new ImmediateDataRequestMonitor<IExecutionDMData>() { @Override protected void handleCompleted() { IExecutionDMData executionData = getData(); VisualizerExecutionState state = VisualizerExecutionState.SUSPENDED; if (isSuccess() && executionData != null) { if (executionData.getStateChangeReason() == StateChangeReason.SIGNAL) { if (executionData instanceof IExecutionDMData2) { String details = ((IExecutionDMData2)executionData).getDetails(); if (details != null) { if (isCrashSignal(details)) { state = VisualizerExecutionState.CRASHED; } } } } } listener.getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData, frameData, state, arg); } }); } else { listener.getThreadExecutionStateDone(cpuContext, coreContext, execContext, threadData, frameData, null, arg); } }
Source:
<code>public Iterable<String> head() { <START> return Collections.singletonList("HTTP/1.1 204 No Content"); <END> }</code><technical_language>@Serranya Lets ListOf</technical_language>

Target:
public Iterable<String> head() { return new ListOf<>("HTTP/1.1 204 No Content"); }
Source:
<code>public void testGPUDriverWithInexecutableScript() throws Exception { final Configuration config = new Configuration(); <START> final TemporaryFolder temporaryFolder = new TemporaryFolder(new File(".")); <END> temporaryFolder.create(); final File inexecutatbleFile = temporaryFolder.newFile(); assertTrue(inexecutatbleFile.setExecutable(false)); config.setString(GPUDriver.DISCOVERY_SCRIPT_PATH, inexecutatbleFile.getPath()); new GPUDriver(config); }</code><technical_language>I try avoid forcing crate temporary folder current path if possible. omit constructor argument, set executableFile.getAbsolutePath() configuration</technical_language>

Target:
public void testGPUDriverWithInexecutableScript() throws Exception { final Configuration config = new Configuration(); final File inexecutableFile = TEMP_FOLDER.newFile(); assertTrue(inexecutableFile.setExecutable(false)); config.setString(GPUDriver.DISCOVERY_SCRIPT_PATH, inexecutableFile.getAbsolutePath()); new GPUDriver(config); }
Source:
<code>protected void configureShell(Shell shell) { super.configureShell(shell); <START> shell.setText("Select a Route Resource"); <END> }</code><technical_language>i18n</technical_language>

Target:
protected void configureShell(Shell shell) { super.configureShell(shell); shell.setText(Messages.getString("DependenciesResourceSelectionDialog.selectResource")); }
Source:
<code>public void testParent() throws Exception { final String xpath = "( final DetailAST rootAst = getRootAst("InputXpathMapperAst.java"); final RootNode rootNode = new RootNode(rootAst); <START> final DetailAST[] actual = convertToDetailAstArray(getXpathItems(xpath, rootNode)); <END> final DetailAST realVariableDefNode = getSiblingByType(rootAst, TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST); final DetailAST[] expected = {realVariableDefNode}; assertArrayEquals(expected, actual); }</code><technical_language>I more clear name is convertToArray arguments return type is clear DetailAST</technical_language>

Target:
public void testParent() throws Exception { final String xpath = "( final RootNode rootNode = getRootNode("InputXpathMapperAst.java"); final DetailAST[] actual = convertToArray(getXpathItems(xpath, rootNode)); final DetailAST expectedVariableDefNode = getSiblingByType(rootNode.getUnderlyingNode(), TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST); final DetailAST[] expected = {expectedVariableDefNode}; assertArrayEquals("Result nodes differ from expected", expected, actual); }
Source:
<code>private void removeImageMapping() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getImageStorageDomainMapDao().remove( new ImageStorageDomainMapId(getParameters().getImageId(), getParameters().getStorageDomainId())); ImagesHandler.updateAllDiskImageSnapshotsStatusWithCompensation(getRelevantDiskImage().getId(), getRelevantDiskImage().getImageStatus(), null, <START> null); <END> return null; }}); }</code><technical_language>other method - compensation</technical_language>

Target:
private void removeImageMapping() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getImageStorageDomainMapDao().remove( new ImageStorageDomainMapId(getParameters().getImageId(), getParameters().getStorageDomainId())); ImagesHandler.updateAllDiskImageSnapshotsStatus(getRelevantDiskImage().getId(), getRelevantDiskImage().getImageStatus()); return null; }}); }
Source:
<code>public void not_analyse_minified_files_default_config() throws Exception { <START> settings.setProperty(JavaScriptPlugin.EXCLUDE_MINIFIED_FILES, true); <END> InputFile inputFile = inputFile("test_minified/file.js"); fileSystem.add(inputFile); fileSystem.add(inputFile("test_minified/file.min.js")); fileSystem.add(inputFile("test_minified/file-min.js")); SensorContext context = mock(SensorContext.class); mockInputFile(inputFile, context); createSensor().analyse(project, context); verify(context, times(1)).saveMeasure(any(InputFile.class), eq(CoreMetrics.NCLOC), anyDouble()); }</code><technical_language>@vilchik-elena setup shared analyse_minified_files_user_config, a difference in "settings"</technical_language>

Target:
public void not_analyse_minified_files_default_config() throws Exception { testExcludeMinifiedFileProperty(true); }
Source:
<code><START> protected boolean domainIsValidDestination(storage_domains domain) { <END> return !(domain.getstorage_domain_type() == StorageDomainType.ISO || domain.getstorage_domain_type() == StorageDomainType.ImportExport); }</code><technical_language>I suspect this relevant for templates. move some helper class a static method</technical_language>

Target:
protected boolean domainIsValidDestination(storage_domains domain) { StorageDomainValidator validator = new StorageDomainValidator(domain); return validator.domainIsValidDestination(); }
Source:
<code>public void save(PageRequestContext requestContext) throws SetupWizardException { String username = requestContext.getString("username"); String password = requestContext.getString("password1"); String firstName = requestContext.getString("firstName"); String lastName = requestContext.getString("lastName"); String passwordMD5 = DigestUtils.md5Hex(password); StaffMemberDAO userDAO = DAOFactory.getInstance().getStaffMemberDAO(); InternalAuthDAO internalAuthDAO = DAOFactory.getInstance().getInternalAuthDAO(); PersonDAO personDAO = DAOFactory.getInstance().getPersonDAO(); UserIdentificationDAO userIdentificationDAO = DAOFactory.getInstance().getUserIdentificationDAO(); InternalAuth internalAuth = internalAuthDAO.create(username, passwordMD5); Person person = personDAO.create(null, null, null, null, Boolean.FALSE); userIdentificationDAO.create(person, "internal", String.valueOf(internalAuth.getId())); <START> Organization organization = null; <END> User user = userDAO.create(organization, firstName, lastName, Role.ADMINISTRATOR, person, false); personDAO.updateDefaultUser(person, user); }</code><technical_language>solution a setup wizard step set default organization :/</technical_language>

Target:
public void save(PageRequestContext requestContext) throws SetupWizardException { String username = requestContext.getString("username"); String password = requestContext.getString("password1"); String firstName = requestContext.getString("firstName"); String lastName = requestContext.getString("lastName"); String passwordMD5 = DigestUtils.md5Hex(password); StaffMemberDAO userDAO = DAOFactory.getInstance().getStaffMemberDAO(); InternalAuthDAO internalAuthDAO = DAOFactory.getInstance().getInternalAuthDAO(); PersonDAO personDAO = DAOFactory.getInstance().getPersonDAO(); UserIdentificationDAO userIdentificationDAO = DAOFactory.getInstance().getUserIdentificationDAO(); DefaultsDAO defaultsDAO = DAOFactory.getInstance().getDefaultsDAO(); Defaults defaults = defaultsDAO.getDefaults(); InternalAuth internalAuth = internalAuthDAO.create(username, passwordMD5); Person person = personDAO.create(null, null, null, null, Boolean.FALSE); userIdentificationDAO.create(person, "internal", String.valueOf(internalAuth.getId())); User user = userDAO.create(defaults.getOrganization(), firstName, lastName, Role.ADMINISTRATOR, person, false); personDAO.updateDefaultUser(person, user); }
Source:
<code>public InputStream getContent() throws IOException, IllegalStateException { <START> return null; <END> }</code><technical_language>throw UnsupportedOperationException? Alternatively, return new ByteArrayInputStream(buffer)</technical_language>

Target:
public InputStream getContent() throws IOException, IllegalStateException { throw new UnsupportedOperationException("Reading from the entity is not supported"); }
Source:
<code>protected boolean canAlleleFrequenciesBeCalculated(VariantSourceEntry variantSourceEntry) { boolean frequenciesCanBeCalculated = false; if (variantSourceEntry.hasAttribute("GTS") && variantSourceEntry.hasAttribute("GTC")) { frequenciesCanBeCalculated = true; } <START> return frequenciesCanBeCalculated; <END> }</code><technical_language>This method's body rewritten java return variantSourceEntry.hasAttribute("GTS") && variantSourceEntry.hasAttribute("GTC"); if keeping this for sake of style consistency classes, I fine that</technical_language>

Target:
protected boolean canAlleleFrequenciesBeCalculated(VariantSourceEntry variantSourceEntry) { return variantSourceEntry.hasAttribute(GENOTYPE_STRING) && variantSourceEntry.hasAttribute(GENOTYPE_COUNT); }
Source:
<code>public void evaluate_shouldReturnAllPatientsTakingDrugsAfterSpecifiedDate() throws Exception { cohortDefinition.setActivatedOnOrAfter(DateUtil.getDateTime(2008, 8, 10)); Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); <START> System.out.println("Taking Drugs before " + cohort.getMemberIds() + " " + cohortDefinition); <END> Assert.assertTrue(cohort.contains(2)); Assert.assertEquals(1, cohort.size()); }</code><technical_language>a this? <LINK_0></technical_language>

Target:
public void evaluate_shouldReturnAllPatientsTakingDrugsAfterSpecifiedDate() throws Exception { cohortDefinition.setActivatedOnOrAfter(DateUtil.getDateTime(2008, 8, 10)); Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); Assert.assertTrue(cohort.contains(2)); Assert.assertTrue(cohort.contains(7)); Assert.assertEquals(2, cohort.size()); }
Source:
<code>public int compareTo(@NonNull Category category) { <START> return customOrderId - category.getCustomOrderId(); <END> }</code><technical_language>add a fallback if a customOrderId = 0 name field instead? This assumes I correct in understanding set this time user starts sort</technical_language>

Target:
public int compareTo(@NonNull Category category) { if (customOrderId == 0 && category.getCustomOrderId() == 0) { return name.compareTo(category.getName()); } else { return customOrderId - category.getCustomOrderId(); } }
Source:
<code>public static TenantId getTenantId(Event event) { <START> final Optional<CommandContext> commandContext = getCommandContext(event); <END> if (!commandContext.isPresent()) { return TenantId.getDefaultInstance(); } final TenantId result = getTenantId(commandContext.get()); return result; }</code><technical_language>append java checkNotNull(event); line. EventsShould a "nullability check" test case (see other Spine tests for a sample)</technical_language>

Target:
public static TenantId getTenantId(Event event) { checkNotNull(event); final Optional<CommandContext> commandContext = getOriginCommandContext(event); if (!commandContext.isPresent()) { return TenantId.getDefaultInstance(); } final TenantId result = Commands.getTenantId(commandContext.get()); return result; }
Source:
<code>public RepositorySelectionPage(final boolean sourceSelection, final List<RemoteConfig> configuredRemotes, String presetUri) { super(RepositorySelectionPage.class.getName()); this.uri = new URIish(); this.sourceSelection = sourceSelection; String preset = null; if (presetUri == null) { Clipboard clippy = new Clipboard(Display.getCurrent()); String text = (String) clippy.getContents(TextTransfer.getInstance()); try { if(text != null) { text = text.trim(); <START> if(Transport.canHandleProtocol(new URIish(text))) { <END> preset = text; } } } catch (URISyntaxException e) { preset = null; } clippy.dispose(); } this.presetUri = preset; this.configuredRemotes = getUsableConfigs(configuredRemotes); this.remoteConfig = selectDefaultRemoteConfig(); selection = RepositorySelection.INVALID_SELECTION; if (sourceSelection) { setTitle(UIText.RepositorySelectionPage_sourceSelectionTitle); setDescription(UIText.RepositorySelectionPage_sourceSelectionDescription); } else { setTitle(UIText.RepositorySelectionPage_destinationSelectionTitle); setDescription(UIText.RepositorySelectionPage_destinationSelectionDescription); } }</code><technical_language>style nit: curly braces line blocks</technical_language>

Target:
public RepositorySelectionPage(final boolean sourceSelection, final List<RemoteConfig> configuredRemotes, String presetUri) { super(RepositorySelectionPage.class.getName()); this.uri = new URIish(); this.sourceSelection = sourceSelection; String preset = null; if (presetUri == null) { Clipboard clippy = new Clipboard(Display.getCurrent()); String text = (String) clippy.getContents(TextTransfer.getInstance()); try { if(text != null) { text = text.trim(); if(Transport.canHandleProtocol(new URIish(text))) preset = text; } } catch (URISyntaxException e) { preset = null; } clippy.dispose(); } this.presetUri = preset; this.configuredRemotes = getUsableConfigs(configuredRemotes); this.remoteConfig = selectDefaultRemoteConfig(); selection = RepositorySelection.INVALID_SELECTION; if (sourceSelection) { setTitle(UIText.RepositorySelectionPage_sourceSelectionTitle); setDescription(UIText.RepositorySelectionPage_sourceSelectionDescription); } else { setTitle(UIText.RepositorySelectionPage_destinationSelectionTitle); setDescription(UIText.RepositorySelectionPage_destinationSelectionDescription); } }
Source:
<code>public static Set<GeneNumber> getGeneNumberList(Set<Gene> genes) { Map<Gene, Set<Evidence>> evidences = EvidenceUtils.getEvidenceByGenes(genes); Set<GeneNumber> geneNumbers = new HashSet<>(); Iterator it = evidences.entrySet().iterator(); while (it.hasNext()) { Map.Entry<Gene, Set<Evidence>> pair = (Map.Entry) it.next(); GeneNumber geneNumber = new GeneNumber(); geneNumber.setGene(pair.getKey()); LevelOfEvidence highestSensitiveLevel = LevelUtils.getHighestLevelFromEvidenceByLevels(pair.getValue(), LevelUtils.getPublicSensitiveLevels()); LevelOfEvidence highestResistanceLevel = LevelUtils.getHighestLevelFromEvidenceByLevels(pair.getValue(), LevelUtils.getPublicResistanceLevels()); geneNumber.setHighestSensitiveLevel(highestSensitiveLevel != null ? highestSensitiveLevel.name() : null); <START> geneNumber.setHighestResistenceLevel(highestResistanceLevel != null ? highestSensitiveLevel.name() : null); <END> Set<Alteration> alterations = AlterationUtils.getAllAlterations(pair.getKey()); List<Alteration> excludeVUS = AlterationUtils.excludeVUS(pair.getKey(), new ArrayList<>(alterations)); geneNumber.setAlteration(excludeVUS.size()); geneNumbers.add(geneNumber); } return geneNumbers; }</code><technical_language>highestResistanceLevel instead of highestSensitiveLevel</technical_language>

Target:
public static Set<GeneNumber> getGeneNumberList(Set<Gene> genes) { Map<Gene, Set<Evidence>> evidences = EvidenceUtils.getEvidenceByGenes(genes); Set<GeneNumber> geneNumbers = new HashSet<>(); Iterator it = evidences.entrySet().iterator(); while (it.hasNext()) { Map.Entry<Gene, Set<Evidence>> pair = (Map.Entry) it.next(); GeneNumber geneNumber = new GeneNumber(); geneNumber.setGene(pair.getKey()); LevelOfEvidence highestSensitiveLevel = LevelUtils.getHighestLevelFromEvidenceByLevels(pair.getValue(), LevelUtils.getPublicSensitiveLevels()); LevelOfEvidence highestResistanceLevel = LevelUtils.getHighestLevelFromEvidenceByLevels(pair.getValue(), LevelUtils.getPublicResistanceLevels()); geneNumber.setHighestSensitiveLevel(highestSensitiveLevel != null ? highestSensitiveLevel.name() : null); geneNumber.setHighestResistenceLevel(highestResistanceLevel != null ? highestResistanceLevel.name() : null); Set<Alteration> alterations = AlterationUtils.getAllAlterations(pair.getKey()); List<Alteration> excludeVUS = AlterationUtils.excludeVUS(pair.getKey(), new ArrayList<>(alterations)); geneNumber.setAlteration(excludeVUS.size()); geneNumbers.add(geneNumber); } return geneNumbers; }
Source:
<code>private void populateChangeRow(final int row, final ChangeInfo c, final ChangeRowFormatter changeRowFormatter) { ChangeCache cache = ChangeCache.get(c.getId()); cache.getChangeInfoCache().set(c); table.setWidget(row, C_ARROW, null); if (Gerrit.isSignedIn()) { table.setWidget(row, C_STAR, StarredChanges.createIcon(c.getId(), c.isStarred())); } String s = Util.cropSubject(c.getSubject()); if (c.getStatus() != null && c.getStatus() != Change.Status.NEW) { s += " (" + c.getStatus().name() + ")"; } if (changeRowFormatter != null) { removeChangeStyle(row, changeRowFormatter); final String rowStyle = changeRowFormatter.getRowStyle(c); if (rowStyle != null) { table.getRowFormatter().addStyleName(row, rowStyle); } s = changeRowFormatter.getDisplayText(c, s); } table.setWidget(row, C_SUBJECT, new TableChangeLink(s, c)); table.setWidget(row, C_OWNER, link(c.getOwner())); table.setWidget(row, C_PROJECT, new ProjectLink(c.getProject().getKey(), c .getStatus())); table.setWidget(row, C_BRANCH, new BranchLink(c.getProject().getKey(), c .getStatus(), c.getBranch(), c.getTopic())); <START> table.setText(row, C_PATCHSET_NUM, String.format("%d", c.getPatchSetId().get())); <END> table.setText(row, C_LAST_UPDATE, shortFormat(c.getLastUpdatedOn())); setRowItem(row, c); }</code><technical_language>I String.format(...) client side</technical_language>

Target:
private void populateChangeRow(final int row, final ChangeInfo c, final ChangeRowFormatter changeRowFormatter) { ChangeCache cache = ChangeCache.get(c.getId()); cache.getChangeInfoCache().set(c); table.setWidget(row, C_ARROW, null); if (Gerrit.isSignedIn()) { table.setWidget(row, C_STAR, StarredChanges.createIcon(c.getId(), c.isStarred())); } String s = Util.cropSubject(c.getSubject()); if (c.getStatus() != null && c.getStatus() != Change.Status.NEW) { s += " (" + c.getStatus().name() + ")"; } if (changeRowFormatter != null) { removeChangeStyle(row, changeRowFormatter); final String rowStyle = changeRowFormatter.getRowStyle(c); if (rowStyle != null) { table.getRowFormatter().addStyleName(row, rowStyle); } s = changeRowFormatter.getDisplayText(c, s); } table.setWidget(row, C_SUBJECT, new TableChangeLink(s, c)); table.setWidget(row, C_OWNER, link(c.getOwner())); table.setWidget(row, C_PROJECT, new ProjectLink(c.getProject().getKey(), c .getStatus())); table.setWidget(row, C_BRANCH, new BranchLink(c.getProject().getKey(), c .getStatus(), c.getBranch(), c.getTopic())); table.setText(row, C_PATCHSET_NUM, "" + c.getPatchSetId().get()); table.setText(row, C_LAST_UPDATE, shortFormat(c.getLastUpdatedOn())); setRowItem(row, c); }