auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public @ResponseBody Map<String, Object> getJsonSchema(@PathVariable String className) { try { JsonSchema json = modelDescriptionService.getJsonSchema(className); <START> return ResultSet.success(json); <END> } catch (Exception e) { return ResultSet.error("Could not get description for " + className + " " + e.getMessage()); } }</code><technical_language>want return a ResultSet.error() if json is null. decide</technical_language>

Target:
public @ResponseBody Map<String, Object> getJsonSchema(@PathVariable String className) { try { JsonSchema json = modelDescriptionService.getJsonSchema(className); if (json == null) { return ResultSet.error("Modeldescription (json) for model " + className + "is null."); } return ResultSet.success(json); } catch (Exception e) { return ResultSet.error("Could not get description for " + className + " " + e.getMessage()); } }
Source:
<code>public List<Resource> getFileLocations() throws IOException { List<Resource> configurationFiles = new ArrayList<>(); <START> GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class); <END> if (loader != null) { Resource f = getConfigurationFile(loader); configurationFiles.add(f); } else if (fw != null && fw.getResource() != null) { configurationFiles.add(fw.getResource()); } return configurationFiles; }</code><technical_language>loader is construtor injection, dynamically runtime</technical_language>

Target:
public List<Resource> getFileLocations() throws IOException { List<Resource> configurationFiles = new ArrayList<>(); if (loader != null) { Resource f = getConfigurationFile(loader); configurationFiles.add(f); } else if (fw != null && fw.getResource() != null) { configurationFiles.add(fw.getResource()); } return configurationFiles; }
Source:
<code>private boolean tooManyLooseObjects() { int auto = repo.getConfig().getInt(ConfigConstants.CONFIG_GC_SECTION, ConfigConstants.CONFIG_KEY_AUTO, <START> 6700); <END> if (auto <= 0) { return false; } int n = 0; int threshold = (auto + 255) / 256; Path dir = repo.getObjectsDirectory().toPath().resolve("17"); if (!Files.exists(dir)) { return false; } try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, new DirectoryStream.Filter<Path>() { public boolean accept(Path file) throws IOException { return Files.isRegularFile(file) && PATTERN_LOOSE_OBJECT .matcher(file.getFileName().toString()) .matches(); } })) { Iterator<Path> iter = stream.iterator(); while (iter.hasNext()) { if (n++ > threshold) { return true; } } } catch (IOException e) { LOG.error(e.getMessage(), e); } return false; }</code><technical_language>a constant</technical_language>

Target:
private boolean tooManyLooseObjects() { int auto = repo.getConfig().getInt(ConfigConstants.CONFIG_GC_SECTION, ConfigConstants.CONFIG_KEY_AUTO, DEFAULT_AUTOLIMIT); if (auto <= 0) { return false; } int n = 0; int threshold = (auto + 255) / 256; Path dir = repo.getObjectsDirectory().toPath().resolve("17"); if (!Files.exists(dir)) { return false; } try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, new DirectoryStream.Filter<Path>() { public boolean accept(Path file) throws IOException { return Files.isRegularFile(file) && PATTERN_LOOSE_OBJECT .matcher(file.getFileName().toString()) .matches(); } })) { Iterator<Path> iter = stream.iterator(); while (iter.hasNext()) { if (n++ > threshold) { return true; } } } catch (IOException e) { LOG.error(e.getMessage(), e); } return false; }
Source:
<code>public List<Address> getAddresses() { if (isValidPatientId()) { return loadTestDataService.getAllAddressesBy(getPatientId()); <START> } else { <END> return new ArrayList<>(); } }</code><technical_language>A method return statement instead of two. a local variable get result return local variable</technical_language>

Target:
public List<Address> getAddresses() { return loadTestDataService.getAllAddressesBy(getPatientId()); }
Source:
<code>protected EntityMemento getMementoWithProperties(Map<String,?> props) { EntityMemento memento = MementosGenerators.newEntityMementoBuilder(entity).customFields(props).build(); <START> if (LOG.isTraceEnabled()) LOG.trace("Creating memento for entity {}({}): parent={}; children={}; locations={}; "+ <END> "policies={}; members={}; config={}; attributes={}; customProperties={}", new Object[] {memento.getType(), memento.getId(), memento.getParent(), memento.getChildren(), memento.getLocations(), memento.getPolicies(), memento.getMembers(), sanitize(memento.getConfig()), sanitize(memento.getAttributes()), sanitize(memento.getCustomFields())}); return memento; }</code><technical_language>this logging format string Object[] { ... } params list replaced adding a toString() method BasicEntityMemento</technical_language>

Target:
protected EntityMemento getMementoWithProperties(Map<String,?> props) { EntityMemento memento = MementosGenerators.newEntityMementoBuilder(entity).customFields(props).build(); if (LOG.isTraceEnabled()) LOG.trace("Creating memento for entity: {}", memento.toVerboseString()); return memento; }
Source:
<code>private ValidTxnList getValidTxnList(Connection dbConn, String fullTableName, Long writeId) throws MetaException, SQLException { PreparedStatement pst = null; ResultSet rs = null; try { String[] names = TxnUtils.getDbTableName(fullTableName); String s = "select t2w_txnid from TXN_TO_WRITE_ID where t2w_database = ? and t2w_table = ? and t2w_writeid = ?"; pst = dbConn.prepareStatement(sqlGenerator.addEscapeCharacters(s)); pst.setString(1, names[0]); pst.setString(2, names[1]); pst.setLong(3, writeId); LOG.debug("Going to execute query <" + s.replaceAll("\\?", "{}") + ">", quoteString(names[0]), quoteString(names[1]), writeId); rs = pst.executeQuery(); if (rs.next()) { return TxnCommonUtils.createValidReadTxnList(getOpenTxns(), rs.getLong(1)); } throw new MetaException("invalid write id " + writeId + " for table " + fullTableName); } finally { close(rs); if (pst != null) { pst.close(); <START> } <END> } }</code><technical_language>call closeStmt(pst) avoid null check here</technical_language>

Target:
private ValidTxnList getValidTxnList(Connection dbConn, String fullTableName, Long writeId) throws MetaException, SQLException { PreparedStatement pst = null; ResultSet rs = null; try { String[] names = TxnUtils.getDbTableName(fullTableName); assert names.length == 2; String s = "select t2w_txnid from TXN_TO_WRITE_ID where t2w_database = ? and t2w_table = ? and t2w_writeid = ?"; pst = dbConn.prepareStatement(sqlGenerator.addEscapeCharacters(s)); pst.setString(1, names[0]); pst.setString(2, names[1]); pst.setLong(3, writeId); LOG.debug("Going to execute query <" + s.replaceAll("\\?", "{}") + ">", quoteString(names[0]), quoteString(names[1]), writeId); rs = pst.executeQuery(); if (rs.next()) { return TxnCommonUtils.createValidReadTxnList(getOpenTxns(), rs.getLong(1)); } throw new MetaException("invalid write id " + writeId + " for table " + fullTableName); } finally { close(rs, pst, null); } }
Source:
<code>public void handleCommand(ChannelUID channelUID, Command command) { if (command instanceof RefreshType) { logger.debug("Refreshing channel {}", channelUID); coapClient.asyncGet(this); return; } switch (channelUID.getId()) { case CHANNEL_BRIGHTNESS: if (command instanceof PercentType) { setBrightness((PercentType) command); } else if (command instanceof OnOffType) { setState(((OnOffType) command)); } else if (command instanceof IncreaseDecreaseType) { if (state != null) { int current = state.getBrightness().intValue(); if (IncreaseDecreaseType.INCREASE.equals(command)) { setBrightness(new PercentType(Math.min(current + STEP, PercentType.HUNDRED.intValue()))); } else { setBrightness(new PercentType(Math.max(current - STEP, PercentType.ZERO.intValue()))); } } else { logger.debug("Cannot handle inc/dec as current state is not known."); } } else { logger.debug("Cannot handle command for channel {}", command, channelUID); } break; case CHANNEL_COLOR_TEMPERATURE: if (command instanceof PercentType) { setColorTemperature((PercentType) command); } else if (command instanceof IncreaseDecreaseType) { if (state != null) { int current = state.getColorTemperature().intValue(); if (IncreaseDecreaseType.INCREASE.equals(command)) { setColorTemperature( new PercentType(Math.min(current + STEP, PercentType.HUNDRED.intValue()))); } else { setColorTemperature(new PercentType(Math.max(current - STEP, PercentType.ZERO.intValue()))); } } else { logger.debug("Cannot handle inc/dec as current state is not known."); } } else { logger.debug("Can't handle command on channel {}", command, channelUID); } break; default: <START> logger.error("Unknown channel UID {}", channelUID); <END> } }</code><technical_language>error logging, please check</technical_language>

Target:
public void handleCommand(ChannelUID channelUID, Command command) { if (command instanceof RefreshType) { logger.debug("Refreshing channel {}", channelUID); coapClient.asyncGet(this); return; } switch (channelUID.getId()) { case CHANNEL_BRIGHTNESS: handleBrightnessCommand(command); break; case CHANNEL_COLOR_TEMPERATURE: handleColorTemperatureCommand(command); break; default: logger.error("Unknown channel UID {}", channelUID); } }
Source:
<code><START> public ScmArtifact getArtifact(IResource resource, String revision) { <END> ISVNRemoteResource svnResource = null; SubclipseRepository repo = null; ISVNRemoteResource remoteResource = null; try { svnResource = SVNWorkspaceRoot.getBaseResourceFor(resource); if (svnResource == null) { return null; } SVNRevision svnRevision = new SVNRevision.Number(Long.parseLong(revision)); GetLogsCommand logCmd = new GetLogsCommand(svnResource, null, svnRevision, svnRevision, false, 1L, null, true); try { logCmd.run(new NullProgressMonitor()); } catch (SVNException e) { return null; } final ILogEntry[] entries = logCmd.getLogEntries(); if (entries.length < 1) { return null; } remoteResource = entries[entries.length - 1].getRemoteResource(); if (null == remoteResource) { return null; } repo = (SubclipseRepository) getRepository(resource, null); } catch (SVNException e) { return null; } catch (CoreException e) { return null; } String id = Long.toString(remoteResource.getLastChangedRevision().getNumber()); SubclipseArtifact artifact = new SubclipseArtifact(id, remoteResource.getRepositoryRelativePath(), repo); artifact.setProjectName(resource.getProject().getName()); artifact.setProjectRelativePath(resource.getProjectRelativePath().toPortableString()); artifact.setRemoteResource(remoteResource); return artifact; }</code><technical_language>This method supportted case revision provided is null, this update implement support for reception of a valid revision argument. 1) revision == nuil, resolution of actual revision artifact local variable svnResource getLastChangedRevision method. 2) revision is null, implement new logic resolve remote resource log command revision work space version</technical_language>

Target:
public ScmArtifact getArtifact(IResource resource, String revision) { ISVNRemoteResource localResource = null; SubclipseRepository repo = null; ISVNRemoteResource resolvedResource = null; try { localResource = SVNWorkspaceRoot.getBaseResourceFor(resource); if (null == revision) { resolvedResource = localResource; } else { SVNRevision svnRevision = new SVNRevision.Number(Long.parseLong(revision)); GetLogsCommand logCmd = new GetLogsCommand(localResource, null, svnRevision, svnRevision, false, 1L, null, true); try { logCmd.run(new NullProgressMonitor()); } catch (SVNException e) { return null; } final ILogEntry[] entries = logCmd.getLogEntries(); if (entries.length < 1) { return null; } resolvedResource = entries[entries.length - 1].getRemoteResource(); } if (null == resolvedResource) { return null; } repo = (SubclipseRepository) getRepository(resource, null); } catch (SVNException e) { return null; } catch (CoreException e) { return null; } String id = Long.toString(resolvedResource.getLastChangedRevision().getNumber()); SubclipseArtifact artifact = new SubclipseArtifact(id, resolvedResource.getRepositoryRelativePath(), repo); artifact.setProjectName(resource.getProject().getName()); artifact.setProjectRelativePath(resource.getProjectRelativePath().toPortableString()); artifact.setRemoteResource(resolvedResource); return artifact; }
Source:
<code>private boolean checkSupportedAudio() { <START> try { <END> AudioHeader header = audioFile.getAudioHeader(); bitrate = header.getBitRateAsNumber(); sampleRate = header.getSampleRateAsNumber(); channels = header.getChannels(); if (header.getChannels().toLowerCase().contains("stereo")) { channels = "2"; } length = header.getTrackLength(); Tag tag = audioFile.getTag(); artist = tag.getFirst(FieldKey.ARTIST); album = tag.getFirst(FieldKey.ALBUM); title = tag.getFirst(FieldKey.TITLE); comment = tag.getFirst(FieldKey.COMMENT); year = tag.getFirst(FieldKey.YEAR); track = tag.getFirst(FieldKey.TRACK); genre = tag.getFirst(FieldKey.GENRE); artwork = new ArrayList<AudioMetadataArtwork>(); for (Artwork a : tag.getArtworkList()) { AudioMetadataArtwork ama = new AudioMetadataArtwork(); ama.setMimeType(a.getMimeType()); if (a.getPictureType() >= 0) { ama.setType(a.getPictureType()); } ama.setData(a.getBinaryData()); artwork.add(ama); } return true; } catch (Exception e) { e.printStackTrace(); } return false; }</code><technical_language>this reformatted, left indent is big</technical_language>

Target:
private boolean checkSupportedAudio() { AudioHeader header = audioFile.getAudioHeader(); bitrate = header.getBitRateAsNumber(); sampleRate = header.getSampleRateAsNumber(); channels = header.getChannels(); if (header.getChannels().toLowerCase().contains("stereo")) { channels = "2"; } if (header instanceof MP3AudioHeader) { duration = ((MP3AudioHeader) header).getPreciseTrackLength(); } else if (header instanceof Mp4AudioHeader) { duration = new Double(((Mp4AudioHeader) header).getPreciseLength()); } else { duration = new Double((double) header.getTrackLength()); } Tag tag = audioFile.getTag(); artist = tag.getFirst(FieldKey.ARTIST); album = tag.getFirst(FieldKey.ALBUM); title = tag.getFirst(FieldKey.TITLE); comment = tag.getFirst(FieldKey.COMMENT); year = tag.getFirst(FieldKey.YEAR); track = tag.getFirst(FieldKey.TRACK); genre = tag.getFirst(FieldKey.GENRE); artwork = new ArrayList<AudioMetadataArtwork>(); for (Artwork a : tag.getArtworkList()) { AudioMetadataArtwork ama = new AudioMetadataArtwork(); ama.setMimeType(a.getMimeType()); if (a.getPictureType() >= 0) { ama.setType(a.getPictureType()); } ama.setData(a.getBinaryData()); artwork.add(ama); } return true; }
Source:
<code>public static Double stSphericalLength(@SqlType(SPHERICAL_GEOGRAPHY_TYPE_NAME) Slice input) { OGCGeometry geometry = deserialize(input); if (geometry.isEmpty()) { return null; } validateSphericalType("ST_Length", geometry, EnumSet.of(LINE_STRING)); OGCLineString lineString = (OGCLineString) geometry; <START> return IntStream.range(0, lineString.numPoints() - 1) <END> .mapToDouble(n -> { OGCPoint p1 = lineString.pointN(n); OGCPoint p2 = lineString.pointN(n + 1); return greatCircleDistance(p1.Y(), p1.X(), p2.Y(), p2.X()) * 1000; }) .sum(); }</code><technical_language>Stream APIs a bit slow this function called for row in a dataset. Hence, a simple loop is better. Also, pointN API creates extra object (OGCPoint) unnecessary. getPoint(n) is better. double sum = 0; MultiPath lineString = (MultiPath) geometry.getEsriGeometry(); Point previous = lineString.getPoint(0); for (int i = 1; i < linestring.getPointCount(); i++) { Point next = lineString.getPoint(i); sum += greatCircleDistance(previous.getY(), previous.getX(), next.getY(), next.getX()) previous = next; } return sum * 1_000;</technical_language>

Target:
public static Double stSphericalLength(@SqlType(SPHERICAL_GEOGRAPHY_TYPE_NAME) Slice input) { OGCGeometry geometry = deserialize(input); if (geometry.isEmpty()) { return null; } validateSphericalType("ST_Length", geometry, EnumSet.of(LINE_STRING, MULTI_LINE_STRING)); MultiPath lineString = (MultiPath) geometry.getEsriGeometry(); double sum = 0; for (int path = 0; path < lineString.getPathCount(); path++) { if (lineString.getPathSize(path) < 2) { continue; } int pathStart = lineString.getPathStart(path); Point prev = lineString.getPoint(pathStart); for (int i = pathStart + 1; i < lineString.getPathEnd(path); i++) { Point next = lineString.getPoint(i); sum += greatCircleDistance(prev.getY(), prev.getX(), next.getY(), next.getX()); prev = next; } } return sum * 1000; }
Source:
<code>protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { drawBackground(BACKGROUND); super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY); fuelInfo = furnace.getFuelDisplay(); this.mc.getTextureManager().bindTexture(BACKGROUND); float fuel = furnace.getFuelPercentage(); if(fuel > 0) { GuiElement flame = this.flame; int height = 1 + Math.round(fuel * (flame.h - 1)); int x = 26 + cornerX; int y = 41 + cornerY + flame.h - height; GuiScreen.drawModalRectWithCustomSizedTexture(x, y, flame.x, flame.y + flame.h - height, flame.w, height, flame.texW, flame.texH); } <START> if(fuelInfo.fluid != null && fuelInfo.fluid.amount > 0) { <END> int x = 71 + cornerX; int y = 16 + cornerY + 52; int w = 12; int h = (int) (52f * fuelInfo.fluid.amount / fuelInfo.maxCap); RenderUtil.renderTiledFluid(x, y - h, w, h, this.zLevel, fuelInfo.fluid); } }</code><technical_language>here, duplicate code</technical_language>

Target:
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { drawBackground(BACKGROUND); super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY); this.mc.getTextureManager().bindTexture(BACKGROUND); float fuel = furnace.getFuelPercentage(); if(fuel > 0) { GuiElement flame = this.flame; int height = 1 + Math.round(fuel * (flame.h - 1)); int x = 26 + cornerX; int y = 41 + cornerY + flame.h - height; GuiScreen.drawModalRectWithCustomSizedTexture(x, y, flame.x, flame.y + flame.h - height, flame.w, height, flame.texW, flame.texH); } fuelInfo = furnace.getFuelDisplay(); drawFuel(71, 16, 12, 52); }
Source:
<code>public static boolean isPublicKeyValid(String publicKey) { String[] words = publicKey.split("\\s+", 3); <START> if (words.length != 2 && words.length != 3) { <END> return false; } if (!words[0].matches("^[\\p{Alpha}\\p{Digit}-]*$")) { return false; } if (!isBase64(words[1].getBytes())) { return false; } return true; }</code><technical_language>do need this complex? if (words.length < 2) { } please</technical_language>

Target:
public static boolean isPublicKeyValid(String publicKey) { String[] words = publicKey.split("\\s+", 3); if (words.length < 2) { return false; } if (!words[0].matches("^[\\p{Alpha}\\p{Digit}-]*$")) { return false; } if (!isBase64(words[1].getBytes())) { return false; } return true; }
Source:
<code>public Object evaluate(Object feature) { String format; Double number; String localeString = ""; try { format = getExpression(0).evaluate(feature, String.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #0 - expected type String"); } try { number = getExpression(1).evaluate(feature, Double.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #1 - expected type java.util.Double"); } if (format == null || number == null) { return null; } try { if (params.size() > 2) { Expression second = getExpression(2); localeString = second.evaluate(feature, String.class); } } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #2 - expected type String"); } <START> if (localeString != null && !localeString.isEmpty() && languages.contains(localeString)) { <END> locale = Locale.forLanguageTag(localeString); } DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols.getInstance(locale); DecimalFormat numberFormat = new DecimalFormat(format, decimalFormatSymbols); return numberFormat.format(number); }</code><technical_language>if locale is unknown code ignore right? other functions same, graceful degradation instead of early fail</technical_language>

Target:
public Object evaluate(Object feature) { String format; Double number; String localeString = ""; try { format = getExpression(0).evaluate(feature, String.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #0 - expected type String"); } try { number = getExpression(1).evaluate(feature, Double.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #1 - expected type java.util.Double"); } if (format == null || number == null) { return null; } try { if (params.size() > 2) { Expression second = getExpression(2); localeString = second.evaluate(feature, String.class); } } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function NumberFormat argument #2 - expected type String"); } if (languages.contains(localeString)) { if (localeString != null && !localeString.isEmpty()) { locale = Locale.forLanguageTag(localeString); } } else { throw new IllegalArgumentException( "Unknown language code '" + localeString + "' in numberFormat function"); } DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols.getInstance(locale); DecimalFormat numberFormat = new DecimalFormat(format, decimalFormatSymbols); return numberFormat.format(number); }
Source:
<code>private PinotExpression handleLogicalBinary(String operator, CallExpression call, Function<VariableReferenceExpression, Selection> context) { if (!LOGICAL_BINARY_OPS_FILTER.contains(operator)) { throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), format("'%s' is not supported in filter", operator)); } List<RowExpression> arguments = call.getArguments(); if (arguments.size() == 2) { return derived(format("(%s %s %s)", arguments.get(0).accept(this, context).getDefinition(), operator, arguments.get(1).accept(this, context).getDefinition())); } <START> else { <END> throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), format("Unknown logical binary: '%s'", call)); } }</code><technical_language>else { is redundant</technical_language>

Target:
private PinotExpression handleLogicalBinary( String operator, CallExpression call, Function<VariableReferenceExpression, Selection> context) { if (!LOGICAL_BINARY_OPS_FILTER.contains(operator)) { throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), format("'%s' is not supported in filter", operator)); } List<RowExpression> arguments = call.getArguments(); if (arguments.size() == 2) { return derived(format( "(%s %s %s)", arguments.get(0).accept(this, context).getDefinition(), operator, arguments.get(1).accept(this, context).getDefinition())); } throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), format("Unknown logical binary: '%s'", call)); }
Source:
<code>@Override public void onPartitionCreated(int grpId, int partId) throws IgniteCheckedException { PageStore store = getStore(grpId, partId); if (store instanceof FilePageStore) <START> ((FilePageStore)store).dereferenceFile(); <END> }</code><technical_language>redundant if remove cfgFile field</technical_language>

Target:
@Override public void onPartitionCreated(int grpId, int partId) { }
Source:
<code>protected Control createDialogArea(final Composite parent) { final Composite container = new Composite(parent, SWT.NULL); final GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.marginHeight = 9; layout.marginWidth = 9; container.setLayout(layout); GridData gd = new GridData(GridData.FILL_BOTH); container.setLayoutData(gd); final Label label = new Label(container, SWT.NULL); <START> String labelText = "New representation name ("; <END> if (isCaseSensitive) { labelText += "case sensitive"; } else { labelText += "case insensitive"; } labelText += "):"; label.setText(labelText); text = new Text(container, SWT.SINGLE | SWT.BORDER); text.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { textChanged(text.getText()); } }); gd = new GridData(GridData.FILL_HORIZONTAL); text.setLayoutData(gd); Dialog.applyDialogFont(container); return container; }</code><technical_language>Ok for this correction. another issue: this class id defined in common.ui plugn rename somethinshg else. I title a parameter setter</technical_language>

Target:
protected Control createDialogArea(final Composite parent) { final Composite container = new Composite(parent, SWT.NULL); final GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.marginHeight = 9; layout.marginWidth = 9; container.setLayout(layout); GridData gd = new GridData(GridData.FILL_BOTH); container.setLayoutData(gd); final Label label = new Label(container, SWT.NULL); String labelText; if (getMessage() != null && getMessage().length() > 0) { labelText = getMessage(); } else { labelText = "Enter new name ("; if (isCaseSensitive) { labelText += "case sensitive"; } else { labelText += "case insensitive"; } labelText += "):"; } label.setText(labelText); text = new Text(container, SWT.SINGLE | SWT.BORDER); if (newName != null) { text.setText(newName); } else { text.setText(oldName); } text.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { textChanged(text.getText()); } }); gd = new GridData(GridData.FILL_HORIZONTAL); text.setLayoutData(gd); Dialog.applyDialogFont(container); return container; }
Source:
<code>public StreamingOutput setSolr(@PathParam("command") final String command, @Context UriInfo uriInfo) throws JsonGenerationException, JsonMappingException, IOException { if (!"select".equals(command)) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("command not supported").build()); } String query = uriInfo.getRequestUri().getRawQuery(); if (null == query) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("invalid query").build()); } ResultsWrapper results; try { results = searchService.select(query); return new StringStreamingOutput(results); } catch (Exception e) { <START> log.error(e.getMessage()); <END> throw new WebApplicationException(Response.serverError().entity("Search not currently available.").build()); } }</code><technical_language>If exception is logged, logged (stacktrace)</technical_language>

Target:
public StreamingOutput setSolr(@PathParam("command") final String command, @Context UriInfo uriInfo) throws JsonGenerationException, JsonMappingException, IOException { if (!"select".equals(command)) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("command not supported").build()); } String query = uriInfo.getRequestUri().getRawQuery(); if (null == query) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("invalid query").build()); } ResultsWrapper results; try { results = searchService.select(query); return new StringStreamingOutput(results); } catch (IOException e) { log.error(e.getMessage(), e); throw new WebApplicationException(Response.serverError().entity("Search not currently available.").build()); } }
Source:
<code>private Page createFragmentsPage() { Collection<Slice> fragments = getFutureValue(finishFuture); committed = true; updateWrittenBytes(); PageBuilder page = new PageBuilder(fragments.size() + 2, ImmutableList.of(types.get(ROW_COUNT_CHANNEL), types.get(FRAGMENT_CHANNEL), types.get(CONTEXT_CHANNEL))); BlockBuilder rowsBuilder = page.getBlockBuilder(0); BlockBuilder fragmentBuilder = page.getBlockBuilder(1); BlockBuilder operatorExecutionContextBuilder = page.getBlockBuilder(2); TaskId taskId = operatorContext.getDriverContext().getPipelineContext().getTaskId(); Slice operatorExecutionContext = wrappedBuffer(operatorExecutionContextCodec.toJsonBytes(new OperatorExecutionContext(operatorContext.getDriverContext().getLifespan(), taskId.getStageId().getId(), taskId.getId(), CommitGranularity.TABLE, true))); page.declarePosition(); BIGINT.writeLong(rowsBuilder, rowCount); fragmentBuilder.appendNull(); VARBINARY.writeSlice(operatorExecutionContextBuilder, operatorExecutionContext); for (Slice fragment : fragments) { page.declarePosition(); rowsBuilder.appendNull(); VARBINARY.writeSlice(fragmentBuilder, fragment); <START> VARBINARY.writeSlice(operatorExecutionContextBuilder, operatorExecutionContext); <END> } return page.build(); }</code><technical_language>This run length</technical_language>

Target:
private Page createFragmentsPage() { Collection<Slice> fragments = getFutureValue(finishFuture); int positionCount = fragments.size() + 1; committed = true; updateWrittenBytes(); BlockBuilder rowsBuilder = BIGINT.createBlockBuilder(null, positionCount); BlockBuilder fragmentBuilder = VARBINARY.createBlockBuilder(null, positionCount); BIGINT.writeLong(rowsBuilder, rowCount); fragmentBuilder.appendNull(); for (Slice fragment : fragments) { rowsBuilder.appendNull(); VARBINARY.writeSlice(fragmentBuilder, fragment); } return new Page(positionCount, rowsBuilder.build(), fragmentBuilder.build(), RunLengthEncodedBlock.create(VARBINARY, getTableCommitContext(true), positionCount)); }
Source:
<code>@Override public boolean <START> shouldShow() <END> { return super.shouldShow() && DeviceUtil.isOnline() && !OfflineManager.hasCompilation(); }</code><technical_language>I this is planned for next beta release, worth feature-flagging in for safety's sake</technical_language>

Target:
@Override public boolean shouldShow() { return super.shouldShow() && ReleaseUtil.isPreBetaRelease() && DeviceUtil.isOnline() && !OfflineManager.hasCompilation(); }
Source:
<code>public Proxy getProxy() { <START> if (mProxyHost == null) return null; <END> Proxy.Type type = null; switch (mProxyType) { case TYPE_HTTP: type = Proxy.Type.HTTP; break; case TYPE_SOCKS: type = Proxy.Type.SOCKS; break; } return new Proxy(type, new InetSocketAddress(mProxyHost, mProxyPort)); }</code><technical_language>mind code style</technical_language>

Target:
public Proxy getProxy() { if (mProxyHost == null) { return null; } return new Proxy(mProxyType, new InetSocketAddress(mProxyHost, mProxyPort)); }
Source:
<code>protected void executeVmCommand() { final Snapshot activeSnapshot = getSnapshotDao().get(getVmId(), SnapshotType.ACTIVE); final Guid createdSnapshotId = activeSnapshot.getId(); getParameters().setSnapshotType(determineSnapshotType()); TransactionSupport.executeInScope(TransactionScopeOption.Required, new TransactionMethod<Void>() { @Override public Void runInTransaction() { getSnapshotDao().updateId(createdSnapshotId, newActiveSnapshotId); <START> getCompensationContext().snapshotEntity(activeSnapshot); <END> activeSnapshot.setId(newActiveSnapshotId); getCompensationContext().snapshotNewEntity(activeSnapshot); getCompensationContext().stateChanged(); return null; } }); setActionReturnValue(createdSnapshotId); MemoryImageBuilder memoryImageBuilder = getMemoryImageBuilder(); freezeVm(); createSnapshotsForDisks(); addSnapshotToDB(createdSnapshotId, memoryImageBuilder); fastForwardDisksToActiveSnapshot(); memoryImageBuilder.build(); boolean pendingAsyncTasks = !getTaskIdList().isEmpty() || !CommandCoordinatorUtil.getChildCommandIds(getCommandId()).isEmpty(); if (!pendingAsyncTasks) { getParameters().setTaskGroupSuccess(true); incrementVmGeneration(); } setSucceeded(true); }</code><technical_language>please replace lines of order 237/238. also, please export this entire block a function ease read here. thanks</technical_language>

Target:
protected void executeVmCommand() { getParameters().setSnapshotType(determineSnapshotType()); Snapshot activeSnapshot = getSnapshotDao().get(getVmId(), SnapshotType.ACTIVE); Guid createdSnapshotId = activeSnapshot.getId(); updateActiveSnapshotId(activeSnapshot); setActionReturnValue(createdSnapshotId); MemoryImageBuilder memoryImageBuilder = getMemoryImageBuilder(); freezeVm(); createSnapshotsForDisks(); addSnapshotToDB(createdSnapshotId, memoryImageBuilder); fastForwardDisksToActiveSnapshot(); memoryImageBuilder.build(); boolean pendingAsyncTasks = !getTaskIdList().isEmpty() || !CommandCoordinatorUtil.getChildCommandIds(getCommandId()).isEmpty(); if (!pendingAsyncTasks) { getParameters().setTaskGroupSuccess(true); incrementVmGeneration(); } setSucceeded(true); }
Source:
<code>public Vm update(Vm incoming) { validateParameters(incoming); if (incoming.isSetCluster() && (incoming.getCluster().isSetId() || incoming.getCluster().isSetName())) { Guid clusterId = lookupClusterId(incoming); if(!clusterId.toString().equals(get().getCluster().getId())){ performAction(VdcActionType.ChangeVMCluster, new ChangeVMClusterParameters(clusterId, guid, null)); } } if (!isFiltered()) { if (incoming.isSetPlacementPolicy()) { parent.validateAndUpdateHostsInPlacementPolicy(incoming.getPlacementPolicy()); } } else { incoming.setPlacementPolicy(null); } Vm vm = performUpdate( incoming, new <START> QueryIdResolver<>(VdcQueryType.GetVmNextRunConfiguration, IdQueryParameters.class), <END> VdcActionType.UpdateVm, new UpdateParametersProvider() ); if (vm != null) { DisplayHelper.adjustDisplayData(this, vm, false); removeRestrictedInfo(vm); } return vm; }</code><technical_language>This needs conditional, next run configuration, of user requested: VdcQueryType queryType = isNextRunRequested() ? VdcQueryType.GetVmNextRunConfiguration, : VdcQueryType.GetVmByVmId; Vm vm = performUpdate( incoming, new QueryIdResolver<>(queryType, IdQueryParameters.class), ... );</technical_language>

Target:
public Vm update(Vm incoming) { validateParameters(incoming); if (incoming.isSetCluster() && (incoming.getCluster().isSetId() || incoming.getCluster().isSetName())) { Guid clusterId = lookupClusterId(incoming); if(!clusterId.toString().equals(get().getCluster().getId())){ performAction(VdcActionType.ChangeVMCluster, new ChangeVMClusterParameters(clusterId, guid, null)); } } if (!isFiltered()) { if (incoming.isSetPlacementPolicy()) { parent.validateAndUpdateHostsInPlacementPolicy(incoming.getPlacementPolicy()); } } else { incoming.setPlacementPolicy(null); } VdcQueryType queryType = isNextRunRequested() ? VdcQueryType.GetVmNextRunConfiguration : VdcQueryType.GetVmByVmId; Vm vm = performUpdate( incoming, new QueryIdResolver<>(queryType, IdQueryParameters.class), VdcActionType.UpdateVm, new UpdateParametersProvider() ); if (vm != null) { DisplayHelper.adjustDisplayData(this, vm, false); removeRestrictedInfo(vm); } return vm; }
Source:
<code>public static String decapitalize(String string) { if ( string == null || string.isEmpty() || startsWithSeveralUpperCaseLetters( string ) ) { return string; } else { <START> return string.substring( 0, 1 ).toLowerCase( Locale.ENGLISH ) + string.substring( 1 ); <END> } }</code><technical_language>giving some thoughts, change Locale.ROOT? I emphasizes want do. that, good go! Thanks</technical_language>

Target:
public static String decapitalize(String string) { if ( string == null || string.isEmpty() || startsWithSeveralUpperCaseLetters( string ) ) { return string; } else { return string.substring( 0, 1 ).toLowerCase( Locale.ROOT ) + string.substring( 1 ); } }
Source:
<code>public void scanFile(JavaFileScannerContext context) { expectedLevel = 0; isBlockAlreadyReported = false; lastCheckedLine = 0; <START> isInAnonymousClass.clear(); <END> this.context = context; scan(context.getTree()); isInAnonymousClass.clear(); }</code><technical_language>If clear list end of scan, need clear before</technical_language>

Target:
public void scanFile(JavaFileScannerContext context) { expectedLevel = 0; isBlockAlreadyReported = false; lastCheckedLine = 0; this.context = context; scan(context.getTree()); isInAnonymousClass.clear(); }
Source:
<code>public void testZeroExecutorScheduling() { ConstraintSolverStrategy cs = new ConstraintSolverStrategy(); cs.prepare(new HashMap<>()); <START> Map<String, Object> topoConf = Utils.readDefaultConfig(); <END> topoConf.put(Config.TOPOLOGY_RAS_CONSTRAINT_MAX_STATE_SEARCH, 1_000); topoConf.put(Config.TOPOLOGY_RAS_ONE_EXECUTOR_PER_WORKER, false); topoConf.put(Config.TOPOLOGY_RAS_ONE_COMPONENT_PER_WORKER, false); TopologyDetails topo = makeTopology(topoConf, 1); Cluster cluster = makeCluster(new Topologies(topo)); cs.schedule(cluster, topo); LOG.info("********************* Scheduling Zero Unassigned Executors *********************"); cs.schedule(cluster, topo); LOG.info("********************* End of Scheduling Zero Unassigned Executors *********************"); }</code><technical_language>changing this in this PR</technical_language>

Target:
public void testZeroExecutorScheduling() { ConstraintSolverStrategy cs = new ConstraintSolverStrategy(); cs.prepare(new HashMap<>()); Map<String, Object> topoConf = new HashMap<>(); topoConf.put(Config.TOPOLOGY_RAS_CONSTRAINT_MAX_STATE_SEARCH, 1_000); topoConf.put(Config.TOPOLOGY_RAS_ONE_EXECUTOR_PER_WORKER, false); topoConf.put(Config.TOPOLOGY_RAS_ONE_COMPONENT_PER_WORKER, false); TopologyDetails topo = makeTopology(topoConf, 1); Cluster cluster = makeCluster(new Topologies(topo)); cs.schedule(cluster, topo); LOG.info("********************* Scheduling Zero Unassigned Executors *********************"); cs.schedule(cluster, topo); LOG.info("********************* End of Scheduling Zero Unassigned Executors *********************"); }
Source:
<code>public void start() { queryManagementExecutor.scheduleWithFixedDelay(new Runnable() { @Override public void run() { try { failAbandonedQueries(); } catch (Throwable e) { log.warn(e, "Error cancelling abandoned queries"); } try { enforceMemoryLimits(); } catch (Throwable e) { log.warn(e, "Error enforcing memory limits"); } try { enforceTimeLimits(); } catch (Throwable e) { log.warn(e, "Error enforcing query timeout limits"); } try { enforceCpuLimits(); } catch (Throwable e) { <START> log.warn(e, "Error enforcing query CPU time limits"); <END> } try { removeExpiredQueries(); } catch (Throwable e) { log.warn(e, "Error removing expired queries"); } try { pruneExpiredQueries(); } catch (Throwable e) { log.warn(e, "Error pruning expired queries"); } } }, 1, 1, TimeUnit.SECONDS); }</code><technical_language>This log.error. other statements log.warn</technical_language>

Target:
public void start() { queryManagementExecutor.scheduleWithFixedDelay(new Runnable() { @Override public void run() { try { failAbandonedQueries(); } catch (Throwable e) { log.error(e, "Error cancelling abandoned queries"); } try { enforceMemoryLimits(); } catch (Throwable e) { log.error(e, "Error enforcing memory limits"); } try { enforceTimeLimits(); } catch (Throwable e) { log.error(e, "Error enforcing query timeout limits"); } try { enforceCpuLimits(); } catch (Throwable e) { log.error(e, "Error enforcing query CPU time limits"); } try { removeExpiredQueries(); } catch (Throwable e) { log.error(e, "Error removing expired queries"); } try { pruneExpiredQueries(); } catch (Throwable e) { log.error(e, "Error pruning expired queries"); } } }, 1, 1, TimeUnit.SECONDS); }
Source:
<code>protected void setSecondsLabel(View view, BrickField brickField) { TextView textView = view.findViewById(R.id.brick_seconds_label); Context context = textView.getContext(); if (getFormulaWithBrickField(brickField).isSingleNumberFormula()) { try { Double formulaValue = formulaMap.get(brickField) .interpretDouble(ProjectManager.getInstance().getCurrentSprite()); textView.setText(context.getResources().getQuantityString(R.plurals.second_plural, Utils.convertDoubleToPluralInteger(formulaValue))); } catch (InterpretationException e) { Log.e(getClass().getSimpleName(), "Interpretation of formula failed, fallback to quantity \"other\"", e); } return; <START> } <END> textView.setText(context.getResources() .getQuantityString(R.plurals.second_plural, Utils.TRANSLATION_PLURAL_OTHER_INTEGER)); }</code><technical_language>if-else instead</technical_language>

Target:
protected void setSecondsLabel(View view, BrickField brickField) { TextView textView = view.findViewById(R.id.brick_seconds_label); Context context = textView.getContext(); if (getFormulaWithBrickField(brickField).isSingleNumberFormula()) { try { Sprite sprite = ProjectManager.getInstance().getCurrentSprite(); Double formulaValue = formulaMap.get(brickField).interpretDouble(sprite); textView.setText(context.getResources().getQuantityString(R.plurals.second_plural, Utils.convertDoubleToPluralInteger(formulaValue))); return; } catch (InterpretationException e) { Log.e(getClass().getSimpleName(), "Interpretation of formula failed, " + "fallback to quantity \"other\" for \"second(s)\" label.", e); } } textView.setText(context.getResources() .getQuantityString(R.plurals.second_plural, Utils.TRANSLATION_PLURAL_OTHER_INTEGER)); }
Source:
<code>public void makesXslTransformationsInThreads() throws Exception { <START> final int zero = 0; <END> final int fifty = 50; final int ten = 10; final XSL xsl = new XSLDocument( StringUtils.join( "<xsl:stylesheet ", " xmlns:xsl='<LINK_0>' ", " version='2.0' >", "<xsl:template match='/'><works/>", "</xsl:template> </xsl:stylesheet>" ) ); final Runnable runnable = new Runnable() { @Override public void run() { MatcherAssert.assertThat( xsl.transform(new XMLDocument("<test/>")), XhtmlMatchers.hasXPath("/works") ); } }; final ExecutorService executorService = Executors.newFixedThreadPool(5); for (int count = zero; count < fifty; count = count + 1) { executorService.submit(runnable); } executorService.awaitTermination(ten, TimeUnit.SECONDS); executorService.shutdown(); }</code><technical_language>@tmjee</technical_language>

Target:
public void makesXslTransformationsInThreads() throws Exception { final int loop = 50; final int timeout = 30; final XSL xsl = new XSLDocument( StringUtils.join( "<xsl:stylesheet ", " xmlns:xsl='<LINK_0>' ", " version='2.0' >", "<xsl:template match='/'><works/>", "</xsl:template> </xsl:stylesheet>" ) ); final Runnable runnable = new Runnable() { @Override public void run() { MatcherAssert.assertThat( xsl.transform(new XMLDocument("<test/>")), XhtmlMatchers.hasXPath("/works") ); } }; final ExecutorService executorService = Executors.newFixedThreadPool(5); for (int count = 0; count < loop; count = count + 1) { executorService.submit(runnable); } executorService.shutdown(); MatcherAssert.assertThat( executorService.awaitTermination(timeout, TimeUnit.SECONDS), Matchers.is(true) ); executorService.shutdownNow(); }
Source:
<code><START> public static long getDishCategoryId(final SQLiteDatabase db, final long dishId) { <END> final Cursor c = db.rawQuery("SELECT " + CATEGORY_ID + " FROM " + TABLE_NAME + " WHERE " + DISH_ID + " =?", new String[] { String.valueOf(dishId) }); if (c != null) { try { if(c.moveToFirst()) { return c.getLong(c.getColumnIndex(CATEGORY_ID)); } } finally { c.close(); } } return -1; }</code><technical_language>return id list</technical_language>

Target:
public static long getDishCategoryId(final SQLiteDatabase db, final long dishId) { List<Long> list = getDishCategoryIds(db, dishId); for (Long l : list) { return l; } return NO_DATA; }
Source:
<code>public void marshal(ITypeMarshalBuffer buffer) throws CoreException { short firstBytes= ITypeMarshalBuffer.FUNCTION_TYPE; if (isConst()) firstBytes |= ITypeMarshalBuffer.FLAG1; if (isVolatile()) firstBytes |= ITypeMarshalBuffer.FLAG2; <START> if (takesVarArgs()) firstBytes |= ITypeMarshalBuffer.FLAG3; <END> buffer.putShort(firstBytes); buffer.putInt(parameters.length); buffer.marshalType(returnType); for (int i = 0; i < parameters.length; i++) { buffer.marshalType(parameters[i]); } }</code><technical_language>sense swap FLAG2 FLAG3 volatile functions common varargs ones</technical_language>

Target:
public void marshal(ITypeMarshalBuffer buffer) throws CoreException { short firstBytes= ITypeMarshalBuffer.FUNCTION_TYPE; if (isConst()) firstBytes |= ITypeMarshalBuffer.FLAG1; if (takesVarArgs()) firstBytes |= ITypeMarshalBuffer.FLAG2; if (isVolatile()) firstBytes |= ITypeMarshalBuffer.FLAG3; buffer.putShort(firstBytes); buffer.putInt(parameters.length); buffer.marshalType(returnType); for (int i = 0; i < parameters.length; i++) { buffer.marshalType(parameters[i]); } }
Source:
<code>public JavaScriptChecks addCustomChecks(@Nullable CustomJavaScriptRulesDefinition[] customRulesDefinitions, @Nullable CustomRuleRepository[] customRuleRepositories) { if (customRulesDefinitions != null) { for (CustomJavaScriptRulesDefinition rulesDefinition : customRulesDefinitions) { <START> addChecks(rulesDefinition.repositoryKey(), ImmutableList.copyOf(rulesDefinition.checkClasses())); <END> } } if (customRuleRepositories != null) { for (CustomRuleRepository repo : customRuleRepositories) { addChecks(repo.repositoryKey(), repo.checkClasses()); } } return this; }</code><technical_language>add warning log deprecated CustomJavaScriptRulesDefinition</technical_language>

Target:
public JavaScriptChecks addCustomChecks(@Nullable CustomJavaScriptRulesDefinition[] customRulesDefinitions, @Nullable CustomRuleRepository[] customRuleRepositories) { if (customRulesDefinitions != null) { LOG.warn("CustomJavaScriptRulesDefinition usage is deprecated. Use CustomRuleRepository API to define custom rules"); for (CustomJavaScriptRulesDefinition rulesDefinition : customRulesDefinitions) { addChecks(rulesDefinition.repositoryKey(), ImmutableList.copyOf(rulesDefinition.checkClasses())); } } if (customRuleRepositories != null) { for (CustomRuleRepository repo : customRuleRepositories) { addChecks(repo.repositoryKey(), repo.checkClasses()); } } return this; }
Source:
<code>public TurboIssue(String repoId, Issue issue) { this.id = issue.getNumber(); this.title = issue.getTitle() == null ? "" : issue.getTitle(); this.creator = issue.getUser().getLogin(); this.createdAt = Utility.dateToLocalDateTime(issue.getCreatedAt()); this.isPullRequest = isPullRequest(issue); this.description = issue.getBody() == null ? "" : issue.getBody(); <START> this.updatedAt = replaceNull(Utility.dateToLocalDateTime(issue.getUpdatedAt()), this.createdAt); <END> this.commentCount = issue.getComments(); this.isOpen = issue.getState().equals(STATE_OPEN); this.assignee = issue.getAssignee() == null ? Optional.empty() : Optional.of(issue.getAssignee().getLogin()); this.labels = issue.getLabels().stream() .map(Label::getName) .collect(Collectors.toList()); this.milestone = issue.getMilestone() == null ? Optional.empty() : Optional.of(issue.getMilestone().getNumber()); this.metadata = new IssueMetadata(); this.repoId = repoId; this.markedReadAt = Optional.empty(); }</code><technical_language>dateToLocalDateTime fail if a null value. need a manual check here</technical_language>

Target:
public TurboIssue(String repoId, Issue issue) { this.id = issue.getNumber(); this.title = issue.getTitle() == null ? "" : issue.getTitle(); this.creator = issue.getUser().getLogin(); this.createdAt = Utility.dateToLocalDateTime(issue.getCreatedAt()); this.isPullRequest = isPullRequest(issue); this.description = issue.getBody() == null ? "" : issue.getBody(); this.updatedAt = issue.getUpdatedAt() != null ? Utility.dateToLocalDateTime(issue.getUpdatedAt()) : this.createdAt; this.commentCount = issue.getComments(); this.isOpen = issue.getState().equals(STATE_OPEN); this.assignee = issue.getAssignee() == null ? Optional.empty() : Optional.of(issue.getAssignee().getLogin()); this.labels = issue.getLabels().stream() .map(Label::getName) .collect(Collectors.toList()); this.milestone = issue.getMilestone() == null ? Optional.empty() : Optional.of(issue.getMilestone().getNumber()); this.metadata = new IssueMetadata(); this.repoId = repoId; this.markedReadAt = Optional.empty(); }