auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean updateConsoleLog(File dest, InputStream in) throws IOException { File parentFile = dest.getParentFile(); parentFile.mkdirs(); LOGGER.trace("Updating console log [" + dest.getAbsolutePath() + "]"); try (OutputStream out = new BufferedOutputStream(new FileOutputStream(dest, dest.exists()))) { IOUtils.copy(in, out); } catch (IOException e) { LOGGER.error("Failed to update console log at : [" + dest.getAbsolutePath() + "]", e); return false; } <START> LOGGER.trace("Console log [" + dest.getAbsolutePath() + "] saved."); <END> return true; }</code><technical_language>change</technical_language>

Target:
public boolean updateConsoleLog(File dest, InputStream in) throws IOException { File parentFile = dest.getParentFile(); parentFile.mkdirs(); LOGGER.trace("Updating console log [{}]", dest.getAbsolutePath()); try (OutputStream out = new BufferedOutputStream(new FileOutputStream(dest, dest.exists()))) { IOUtils.copy(in, out); } catch (IOException e) { LOGGER.error("Failed to update console log at : [{}]", dest.getAbsolutePath(), e); return false; } LOGGER.trace("Console log saved.", dest.getAbsolutePath()); return true; }
Source:
<code>public Collection<String> getHeaders(final String header) { final String prefix = String.format( "%s", new Lowered(header) ); try { return new Filtered<>( hdr -> { <START> final Lowered low = new Lowered(hdr); <END> return low.asString().startsWith(prefix); }, this.response.get().head() ); } catch (final IOException ex) { throw new IllegalStateException(ex); } }</code><technical_language>@fanifieiev inline this</technical_language>

Target:
public Collection<String> getHeaders(final String header) { final String prefix = String.format( "%s", new Lowered(header) ); try { return new Filtered<>( hdr -> new Lowered(hdr).asString().startsWith(prefix), this.response.get().head() ); } catch (final IOException ex) { throw new IllegalStateException(ex); } }
Source:
<code>protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { GlStateManager.disableLighting(); fontRenderer.drawString(LangUtils.localize("container.repair"), 60, 6, 0x404040); if (repairContainer.maximumCost > 0) { int k = 8453920; boolean flag = true; <START> String s = LangUtils.localizeWithFormat("container.repair.cost", repairContainer.maximumCost); <END> if (repairContainer.maximumCost >= 40 && !mc.player.capabilities.isCreativeMode) { s = LangUtils.localize("container.repair.expensive"); k = 16736352; } else if (!repairContainer.getSlot(2).getHasStack()) { flag = false; } else if (!repairContainer.getSlot(2).canTakeStack(playerInventory.player)) { k = 16736352; } if (flag) { int l = -16777216 | (k & 16579836) >> 2 | k & -16777216; int i1 = xSize - 25 - 8 - fontRenderer.getStringWidth(s); byte b0 = 67; if (fontRenderer.getUnicodeFlag()) { drawRect(i1 - 3, b0 - 2, xSize - 25 - 7, b0 + 10, 0xFF000000); drawRect(i1 - 2, b0 - 1, xSize - 25 - 8, b0 + 9, 0xFF3B3B3B); } else { fontRenderer.drawString(s, i1, b0 + 1, l); fontRenderer.drawString(s, i1 + 1, b0, l); fontRenderer.drawString(s, i1 + 1, b0 + 1, l); } fontRenderer.drawString(s, i1, b0, k); } } GlStateManager.enableLighting(); super.drawGuiContainerForegroundLayer(mouseX, mouseY); }</code><technical_language>this I18n client package (there's a bunch of I need do for lang stuff)</technical_language>

Target:
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { GlStateManager.disableLighting(); fontRenderer.drawString(LangUtils.localize("container.repair"), 60, 6, 0x404040); if (repairContainer.maximumCost > 0) { int k = 8453920; boolean flag = true; String s = I18n.format("container.repair.cost", repairContainer.maximumCost); if (repairContainer.maximumCost >= 40 && !mc.player.capabilities.isCreativeMode) { s = LangUtils.localize("container.repair.expensive"); k = 16736352; } else if (!repairContainer.getSlot(2).getHasStack()) { flag = false; } else if (!repairContainer.getSlot(2).canTakeStack(playerInventory.player)) { k = 16736352; } if (flag) { int l = -16777216 | (k & 16579836) >> 2 | k & -16777216; int i1 = xSize - 25 - 8 - fontRenderer.getStringWidth(s); byte b0 = 67; if (fontRenderer.getUnicodeFlag()) { drawRect(i1 - 3, b0 - 2, xSize - 25 - 7, b0 + 10, 0xFF000000); drawRect(i1 - 2, b0 - 1, xSize - 25 - 8, b0 + 9, 0xFF3B3B3B); } else { fontRenderer.drawString(s, i1, b0 + 1, l); fontRenderer.drawString(s, i1 + 1, b0, l); fontRenderer.drawString(s, i1 + 1, b0 + 1, l); } fontRenderer.drawString(s, i1, b0, k); } } GlStateManager.enableLighting(); super.drawGuiContainerForegroundLayer(mouseX, mouseY); }
Source:
<code>private ApplicationReportModel createApplicationReport(GraphContext context, ProjectModel projectModel) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(10000); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName(REPORT_NAME); applicationReportModel.setReportIconClass("glyphicon glyphicon-info-sign"); applicationReportModel.setMainApplicationReport(true); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); Map<String, WindupVertexFrame> related = new HashMap<String, WindupVertexFrame>(); AboutWindupModel aboutWindupModel = context.getFramed().addVertex(null, AboutWindupModel.class); <START> aboutWindupModel.setWindupRuntimeVersion("2.3.0.SNAPSHOT"); <END> related.put("windupAbout", aboutWindupModel); applicationReportModel.setRelatedResource(related); ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "about_"+projectModel.getName(), "html"); return applicationReportModel; }</code><technical_language>this get addon version</technical_language>

Target:
private ApplicationReportModel createApplicationReport(GraphContext context, ProjectModel projectModel) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(10000); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName(REPORT_NAME); applicationReportModel.setReportIconClass("glyphicon glyphicon-info-sign"); applicationReportModel.setMainApplicationReport(true); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); Map<String, WindupVertexFrame> related = new HashMap<String, WindupVertexFrame>(); AboutWindupModel aboutWindupModel = context.getFramed().addVertex(null, AboutWindupModel.class); aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString()); related.put("windupAbout", aboutWindupModel); applicationReportModel.setRelatedResource(related); ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "about_"+projectModel.getName(), "html"); return applicationReportModel; }
Source:
<code>public boolean isEnabled(ThingUID thingUID) { Thing thing = getThing(thingUID); <START> if (thing == null) { <END> throw new IllegalArgumentException( String.format("Thing with the UID '%s' is unknown, cannot get its enabled status.", thingUID)); } return thing.isEnabled(); }</code><technical_language>In case is null imho query database here</technical_language>

Target:
public boolean isEnabled(ThingUID thingUID) { Thing thing = getThing(thingUID); if (thing != null) { return thing.isEnabled(); } logger.debug("Thing with UID is unknown. Will try to get the enabled status from the persistent storage."); return !isDisabledByStorage(thingUID); }
Source:
<code><START> public int run() throws IOException { <END> int length = 0; if (in != null) { byte[] buf = new byte[8192]; while ((length = in.read(buf)) != -1) { out.write(buf, 0, length); } in.close(); } out.close(); return length; }</code><technical_language>is responsible for closing streams? In normal case, exceptions</technical_language>

Target:
public int run() throws IOException { int totalRead = 0; int length = 0; if (in != null) { byte[] buf = new byte[8192]; while ((length = in.read(buf)) != -1) { out.write(buf, 0, length); totalRead += length; if (totalRead >= MAX_COPY_BYTES) { return totalRead; } } } if (totalRead == 0 && length == -1) { in.close(); out.close(); return length; } return totalRead; }
Source:
<code><START> public I id() { <END> return id; }</code><technical_language>final</technical_language>

Target:
public final I id() { return id; }
Source:
<code>public void updateSitesStatus(Study s) { String query = "from "+ getDomainClassName() +" s WHERE s.study.studyId = :parentStudyId"; Query q=getCurrentSession().createQuery(query); q.setParameter("parentStudyId", s.getStudyId()); List<Study> slist = q.getResultList(); for(Study s1:slist) { s1.setStatus(s.getStatus()); s1.setOldStatusId(s.getOldStatusId()); getCurrentSession().update(s1); } <START> } <END></code><technical_language>Instead of running select update, create update query update sites query. jdbc query for example</technical_language>

Target:
public void updateSitesStatus(Study s) { String query = "update "+ getDomainClassName() +" s set status=:parentStatus,oldStatusId=:parentOldStatusId WHERE s.study.studyId = :parentStudyId"; Query q=getCurrentSession().createQuery(query); q.setParameter("parentStatus", s.getStatus()); q.setParameter("parentOldStatusId", s.getOldStatusId()); q.setParameter("parentStudyId", s.getStudyId()); int result = q.executeUpdate(); }
Source:
<code>public void load() throws IOException, ConfigInvalidException { <START> int maxStaleRetries = 5; <END> int retries = 0; while (true) { final FileSnapshot oldSnapshot = snapshot; final FileSnapshot newSnapshot = FileSnapshot.save(getFile()); try { final byte[] in = IO.readFully(getFile()); final ObjectId newHash = hash(in); if (hash.equals(newHash)) { if (oldSnapshot.equals(newSnapshot)) oldSnapshot.setClean(newSnapshot); else snapshot = newSnapshot; } else { final String decoded; if (isUtf8(in)) { decoded = RawParseUtils.decode( RawParseUtils.UTF8_CHARSET, in, 3, in.length); utf8Bom = true; } else { decoded = RawParseUtils.decode(in); } fromText(decoded); snapshot = newSnapshot; hash = newHash; } return; } catch (FileNotFoundException noFile) { if (configFile.exists()) { throw noFile; } clear(); snapshot = newSnapshot; return; } catch (IOException e) { if (FileUtils.isStaleFileHandle(e) && retries < maxStaleRetries) { if (LOG.isDebugEnabled()) { LOG.debug(MessageFormat.format( JGitText.get().configHandleIsStale, Integer.valueOf(retries)), e); } retries++; continue; } throw new IOException(MessageFormat .format(JGitText.get().cannotReadFile, getFile()), e); } catch (ConfigInvalidException e) { throw new ConfigInvalidException(MessageFormat .format(JGitText.get().cannotReadFile, getFile()), e); } } }</code><technical_language>final</technical_language>

Target:
public void load() throws IOException, ConfigInvalidException { final int maxStaleRetries = 5; int retries = 0; while (true) { final FileSnapshot oldSnapshot = snapshot; final FileSnapshot newSnapshot = FileSnapshot.save(getFile()); try { final byte[] in = IO.readFully(getFile()); final ObjectId newHash = hash(in); if (hash.equals(newHash)) { if (oldSnapshot.equals(newSnapshot)) { oldSnapshot.setClean(newSnapshot); } else { snapshot = newSnapshot; } } else { final String decoded; if (isUtf8(in)) { decoded = RawParseUtils.decode( RawParseUtils.UTF8_CHARSET, in, 3, in.length); utf8Bom = true; } else { decoded = RawParseUtils.decode(in); } fromText(decoded); snapshot = newSnapshot; hash = newHash; } return; } catch (FileNotFoundException noFile) { if (configFile.exists()) { throw noFile; } clear(); snapshot = newSnapshot; return; } catch (IOException e) { if (FileUtils.isStaleFileHandle(e) && retries < maxStaleRetries) { if (LOG.isDebugEnabled()) { LOG.debug(MessageFormat.format( JGitText.get().configHandleIsStale, Integer.valueOf(retries)), e); } retries++; continue; } throw new IOException(MessageFormat .format(JGitText.get().cannotReadFile, getFile()), e); } catch (ConfigInvalidException e) { throw new ConfigInvalidException(MessageFormat .format(JGitText.get().cannotReadFile, getFile()), e); } } }
Source:
<code><START> public int hashCode() { <END> final int prime = 31; int result = 1; result = prime * result + ((capacityInfo == null) ? 0 : capacityInfo.hashCode()); result = prime * result + ((serviceInfo == null) ? 0 : serviceInfo.hashCode()); result = prime * result + ((volumeId == null) ? 0 : volumeId.hashCode()); return result; }</code><technical_language>Dont need entry for brick details in hashCode() equals() method</technical_language>

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((capacityInfo == null) ? 0 : capacityInfo.hashCode()); result = prime * result + ((serviceInfo == null) ? 0 : serviceInfo.hashCode()); result = prime * result + ((brickDetails == null) ? 0 : brickDetails.hashCode()); result = prime * result + ((volumeId == null) ? 0 : volumeId.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); return result; }
Source:
<code>public UserDetails myUserDetailsService() { ExtendedInMemoryUserDetailsManager extendedInMemoryUserDetailsManager = new ExtendedInMemoryUserDetailsManager(); List<GrantedAuthority> salaboyAuthorities = new ArrayList<>(); salaboyAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); salaboyAuthorities.add(new SimpleGrantedAuthority("GROUP_activitiTeam")); salaboyAuthorities.add(new SimpleGrantedAuthority("GROUP_developers")); extendedInMemoryUserDetailsManager.createUser(new User("salaboy", "password", salaboyAuthorities)); List<GrantedAuthority> adminAuthorities = new ArrayList<>(); adminAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_ADMIN")); extendedInMemoryUserDetailsManager.createUser(new User("admin", "password", adminAuthorities)); List<GrantedAuthority> garthAuthorities = new ArrayList<>(); garthAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); garthAuthorities.add(new SimpleGrantedAuthority("GROUP_doctor")); extendedInMemoryUserDetailsManager.createUser(new User("garth", "password", garthAuthorities)); <START> return (UserDetails) extendedInMemoryUserDetailsManager; <END> }</code><technical_language>@pancudaniel7 I guess testing this one. I guess this break in runtime.. need UserDetailsService</technical_language>

Target:
public UserDetailsService myUserDetailsService() { ExtendedInMemoryUserDetailsManager extendedInMemoryUserDetailsManager = new ExtendedInMemoryUserDetailsManager(); List<GrantedAuthority> salaboyAuthorities = new ArrayList<>(); salaboyAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); salaboyAuthorities.add(new SimpleGrantedAuthority("GROUP_activitiTeam")); salaboyAuthorities.add(new SimpleGrantedAuthority("GROUP_developers")); extendedInMemoryUserDetailsManager.createUser(new User("salaboy", "password", salaboyAuthorities)); List<GrantedAuthority> adminAuthorities = new ArrayList<>(); adminAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_ADMIN")); extendedInMemoryUserDetailsManager.createUser(new User("admin", "password", adminAuthorities)); List<GrantedAuthority> garthAuthorities = new ArrayList<>(); garthAuthorities.add(new SimpleGrantedAuthority("ROLE_ACTIVITI_USER")); garthAuthorities.add(new SimpleGrantedAuthority("GROUP_doctor")); extendedInMemoryUserDetailsManager.createUser(new User("garth", "password", garthAuthorities)); return extendedInMemoryUserDetailsManager; }
Source:
<code>public <Q, I, U> SubscriptionQueryResult<QueryResponseMessage<I>, SubscriptionQueryUpdateMessage<U>> subscriptionQuery( SubscriptionQueryMessage<Q, I, U> query, SubscriptionQueryBackpressure backpressure, int updateBufferSize) { boolean alreadyExists = updateHandlers.keySet() .stream() .anyMatch(m -> m.getIdentifier().equals(query.getIdentifier())); if(alreadyExists) { <START> throw new IllegalArgumentException("There is already a subscription with the same message identifier"); <END> } MonoWrapper<QueryResponseMessage<I>> initialResult = MonoWrapper.create(monoSink -> query(query) .thenAccept(monoSink::success) .exceptionally(t -> { monoSink.error(t.getCause()); return null; })); EmitterProcessor<SubscriptionQueryUpdateMessage<U>> processor = EmitterProcessor.create(updateBufferSize); FluxSink<SubscriptionQueryUpdateMessage<U>> sink = processor.sink(backpressure.getOverflowStrategy()); sink.onDispose(() -> updateHandlers.remove(query)); FluxSinkWrapper<SubscriptionQueryUpdateMessage<U>> fluxSinkWrapper = new FluxSinkWrapper<>(sink); updateHandlers.put(query, fluxSinkWrapper); Registration registration = () -> { fluxSinkWrapper.complete(); return true; }; return new DefaultSubscriptionQueryResult<>(initialResult.getMono(), processor.replay(updateBufferSize).autoConnect(), registration); }</code><technical_language>adjust message is a subscription message identifier, 'already' 'same' suggest 'the same' (pun intended)</technical_language>

Target:
public <Q, I, U> SubscriptionQueryResult<QueryResponseMessage<I>, SubscriptionQueryUpdateMessage<U>> subscriptionQuery( SubscriptionQueryMessage<Q, I, U> query, SubscriptionQueryBackpressure backpressure, int updateBufferSize) { boolean alreadyExists = updateHandlers.keySet() .stream() .anyMatch(m -> m.getIdentifier().equals(query.getIdentifier())); if (alreadyExists) { throw new IllegalArgumentException("There is already a subscription with the given message identifier"); } MonoWrapper<QueryResponseMessage<I>> initialResult = MonoWrapper.create(monoSink -> query(query) .thenAccept(monoSink::success) .exceptionally(t -> { logger.error(format("An error happened while trying to report an initial result. Query: %s", query), t); monoSink.error(t.getCause()); return null; })); EmitterProcessor<SubscriptionQueryUpdateMessage<U>> processor = EmitterProcessor.create(updateBufferSize); FluxSink<SubscriptionQueryUpdateMessage<U>> sink = processor.sink(backpressure.getOverflowStrategy()); sink.onDispose(() -> updateHandlers.remove(query)); FluxSinkWrapper<SubscriptionQueryUpdateMessage<U>> fluxSinkWrapper = new FluxSinkWrapper<>(sink); updateHandlers.put(query, fluxSinkWrapper); Registration registration = () -> { fluxSinkWrapper.complete(); return true; }; return new DefaultSubscriptionQueryResult<>(initialResult.getMono(), processor.replay(updateBufferSize).autoConnect(), registration); }
Source:
<code>public static FeignException errorStatus(String methodKey, Response response) { byte[] body = {}; try { if (response.body() != null) { body = Util.toByteArray(response.body().asInputStream()); } } catch (IOException ignored) { } String message = new FeignExceptionMessageBuilder() <START> .withResponse(response) <END> .withRequestMethod(response.request().httpMethod()) .withBody(body).build(); return errorStatus(response.status(), message, response.request(), body); }</code><technical_language>read method response, eliminating need call withRequestMethod method</technical_language>

Target:
public static FeignException errorStatus(String methodKey, Response response) { byte[] body = {}; try { if (response.body() != null) { body = Util.toByteArray(response.body().asInputStream()); } } catch (IOException ignored) { } String message = new FeignExceptionMessageBuilder() .withResponse(response) .withMethodKey(methodKey) .withBody(body).build(); return errorStatus(response.status(), message, response.request(), body); }
Source:
<code>public static void main(String[] args) throws Exception { long start = System.nanoTime(); TicTacToeData data = new TicTacToeData(); log.debug("Data Processing Started"); final List<String> strings = data.generatePossibleGames(); log.debug("All possible game state sequence generated, Finished"); <START> String path = ClassLoader.getSystemClassLoader().getResource("AllMoveWithReward.txt").getPath(); <END> try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(path))) { Set<String> uniqueValues = new HashSet<>(); for (String string : strings) { if (uniqueValues.add(string)) { writer.write(string + "\r\n"); } } } log.debug("Total time = " + (System.nanoTime() - start)/1_000_000); }</code><technical_language>I writing in classes directory. I understand this example behaving poorly fix. windows generated path creates InvalidPathException 'Illegal char <:> index 2'. '/E:/Projects/dl4j-examples/dl4j-examples/target/classes/AllMoveWithReward.txt'</technical_language>

Target:
public static void main(String[] args) throws Exception { long start = System.nanoTime(); try { TicTacToeData data = new TicTacToeData(); log.info("Data Processing Started"); final String allMoves = data.generatePossibleGames(); log.info("All possible game state sequence generated, Finished"); final Path dataFile = Paths.get(System.getProperty("user.home") + "/AllMoveWithReward.txt"); Files.deleteIfExists(dataFile); final Path dataFilePath = Files.createFile(dataFile); try (BufferedWriter writer = Files.newBufferedWriter(dataFilePath)) { writer.write(allMoves); } } catch (Exception e) { log.error(e); } log.info("Total time = " + (System.nanoTime() - start)/1_000_000); }
Source:
<code>public void channelInactive(ChannelHandlerContext ctx) throws Exception { final Channel channel = ctx.channel(); ClientHead client = clientsBox.get(channel); if (client != null && client.isTransportChannel(ctx.channel(), Transport.POLLING)) { log.debug("channel inactive {}", client.getSessionId()); client.onChannelDisconnect(); } <START> channel.close(); <END> super.channelInactive(ctx); }</code><technical_language>@dawnbreaks need invoke channel close() method</technical_language>

Target:
public void channelInactive(ChannelHandlerContext ctx) throws Exception { final Channel channel = ctx.channel(); ClientHead client = clientsBox.get(channel); if (client != null && client.isTransportChannel(ctx.channel(), Transport.POLLING)) { log.debug("channel inactive {}", client.getSessionId()); client.releasePollingChannel(channel); } super.channelInactive(ctx); }
Source:
<code>void clear() { chunkIndex = -1; chunkBlobId = null; chunkException = null; state = ChunkState.Free; failedAttempts = 0; partitionId = null; <START> correlationIdToChunkPutRequest.clear(); <END> }</code><technical_language>attemptedPartitionIds.clear()</technical_language>

Target:
void clear() { chunkIndex = -1; chunkBlobId = null; chunkException = null; state = ChunkState.Free; failedAttempts = 0; partitionId = null; correlationIdToChunkPutRequestInfo.clear(); attemptedPartitionIds.clear(); }
Source:
<code>protected ICommand getAfterConfigureCommand(ConfigureRequest request) { final Connector connector = (Connector) request.getElementToConfigure(); final View sourceView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_SOURCE_VIEW); final View targetView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_TARGET_VIEW); <START> return new ConfigureElementCommand(request) { @Override protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { if (null != connector && null != sourceView && null != targetView && null != sourceView.getElement() && null != targetView.getElement()) { final ISpecializationType constraintPropertyElementType = (ISpecializationType) ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_CONSTRAINTBLOCK); if (null != constraintPropertyElementType) { final EObject sourceElementContainer = sourceView.getElement().eContainer(); if (null != sourceElementContainer && constraintPropertyElementType.getMatcher().matches(sourceElementContainer)) { if (utils.isNestedConnectableElement(sourceView, targetView)) { final List<Property> nestedPath = utils.getNestedPropertyPath(sourceView, targetView); setNestedPathToConnectorEnd(connector, nestedPath, 0); } } final EObject targetElementContainer = targetView.getElement().eContainer(); if (null != targetElementContainer && constraintPropertyElementType.getMatcher().matches(targetElementContainer)) { if (utils.isNestedConnectableElement(targetView, sourceView)) { final List<Property> nestedPath = utils.getNestedPropertyPath(targetView, sourceView); setNestedPathToConnectorEnd(connector, nestedPath, 1); } } } } return CommandResult.newOKCommandResult(connector); } }; <END> }</code><technical_language>extract command in a class in command package</technical_language>

Target:
protected ICommand getAfterConfigureCommand(ConfigureRequest request) { final Connector connector = (Connector) request.getElementToConfigure(); final View sourceView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_SOURCE_VIEW); final View targetView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_TARGET_VIEW); return new SetNestedConnectorEndCommand(request, connector, sourceView, targetView); }
Source:
<code>public void geoLocation() { Collection<String> names = new ArrayList<String>(); <START> names.add("Indian Institute of Information Technology Vadodara"); <END> final double lat = 23.259104; final double lon = 72.650406; final String iso3166cc = "IN-GJ"; long population = 400; int kmValue = 2589; GeoLocation geoLocation = new GeoLocation(lat, lon, names, iso3166cc); geoLocation.setPopulation(population); Collection<String> returnedNames = geoLocation.getNames(); String returnedISO3166cc = geoLocation.getISO3166cc(); long returnedPopulation = geoLocation.getPopulation(); int returnedKmValue = geoLocation.degreeToKm(23.259104); String returnedString = geoLocation.toString(); assertNotNull(returnedNames); assertNotNull(returnedISO3166cc); assertNotNull(returnedPopulation); assertNotNull(returnedKmValue); assertNotNull(returnedString); assertEquals(names, returnedNames); assertEquals(iso3166cc, returnedISO3166cc); assertEquals(population, returnedPopulation); assertEquals(kmValue, returnedKmValue); }</code><technical_language>Please is more static/known some popular historical monument. tests supposed running independent of changes in entities a part of project</technical_language>

Target:
public void geoLocation() { Collection<String> names = new ArrayList<String>(); names.add("Taj Mahal"); final double lat = 27.175015; final double lon = 78.042155; final String iso3166cc = "IN-UP"; long population = 400; int kmValue = 3025; GeoLocation geoLocation = new GeoLocation(lat, lon, names, iso3166cc); geoLocation.setPopulation(population); Collection<String> returnedNames = geoLocation.getNames(); String returnedISO3166cc = geoLocation.getISO3166cc(); long returnedPopulation = geoLocation.getPopulation(); int returnedKmValue = geoLocation.degreeToKm(27.175015); String returnedString = geoLocation.toString(); assertNotNull(returnedNames); assertNotNull(returnedISO3166cc); assertNotNull(returnedPopulation); assertNotNull(returnedKmValue); assertNotNull(returnedString); assertEquals(names, returnedNames); assertEquals(iso3166cc, returnedISO3166cc); assertEquals(population, returnedPopulation); assertEquals(kmValue, returnedKmValue); }
Source:
<code>public void testDriverRegistration() throws Exception { Class.forName("io.crate.client.jdbc.CrateDriver"); Connection c1 = DriverManager.getConnection("crate://" + hostAndPort); assertThat(c1, instanceOf(CrateConnection.class)); Connection c2 = DriverManager.getConnection("jdbc:crate://" + hostAndPort); assertThat(c2, instanceOf(CrateConnection.class)); expectedException.expect(SQLException.class); expectedException.expectMessage(String.format("No suitable driver found for %s", "jdbc-crate://" + hostAndPort)); <START> DriverManager.getConnection("jdbc-crate://" + hostAndPort); <END> }</code><technical_language>test this jdbc:mysql</technical_language>

Target:
public void testDriverRegistration() throws Exception { Class.forName("io.crate.client.jdbc.CrateDriver"); Connection c1 = DriverManager.getConnection("crate://" + hostAndPort); assertThat(c1, instanceOf(CrateConnection.class)); Connection c2 = DriverManager.getConnection("jdbc:crate://" + hostAndPort); assertThat(c2, instanceOf(CrateConnection.class)); expectedException.expect(SQLException.class); expectedException.expectMessage(String.format("No suitable driver found for %s", "jdbc:mysql://" + hostAndPort)); DriverManager.getConnection("jdbc:mysql://" + hostAndPort); }
Source:
<code>public Response transformCsar(@ApiParam(required = true) final CsarTransformRequest request) { String sourceCsarName = request.getSourceCsarName(); String targetCsarName = request.getTargetCsarName(); CSARID csarId = this.csarService.generateTransformationPlans(new CSARID(sourceCsarName), new CSARID(targetCsarName)); this.controlService.setDeploymentProcessStateStored(csarId); <START> boolean success = this.controlService.invokeTOSCAProcessing(csarId); <END> if (success) { final List<QName> serviceTemplates = this.engineService.getToscaReferenceMapper().getServiceTemplateIDsContainedInCSAR(csarId); for (final QName serviceTemplate : serviceTemplates) { logger.info("Invoke plan deployment for service template \"{}\" of CSAR \"{}\"", serviceTemplate, csarId.getFileName()); if (!this.controlService.invokePlanDeployment(csarId, serviceTemplate)) { logger.error("Error deploying plan for service template \"{}\" of CSAR \"{}\"", serviceTemplate, csarId.getFileName()); success = false; } } } return Response.ok().build(); }</code><technical_language>inlined, successive writes read</technical_language>

Target:
public Response transformCsar(@ApiParam(required = true) final CsarTransformRequest request) { String sourceCsarName = request.getSourceCsarName(); String targetCsarName = request.getTargetCsarName(); CSARID csarId = this.csarService.generateTransformationPlans(new CSARID(sourceCsarName), new CSARID(targetCsarName)); this.controlService.setDeploymentProcessStateStored(csarId); boolean success = this.controlService.invokeTOSCAProcessing(csarId); if (success) { final List<QName> serviceTemplates = this.engineService.getToscaReferenceMapper().getServiceTemplateIDsContainedInCSAR(csarId); for (final QName serviceTemplate : serviceTemplates) { logger.info("Invoke plan deployment for service template \"{}\" of CSAR \"{}\"", serviceTemplate, csarId.getFileName()); if (!this.controlService.invokePlanDeployment(csarId, serviceTemplate)) { logger.error("Error deploying plan for service template \"{}\" of CSAR \"{}\"", serviceTemplate, csarId.getFileName()); success = false; } } } if(success) { return Response.ok().build(); } else { return Response.serverError().build(); } }
Source:
<code>private static void copyFile(File from, File to) throws IOException { FileInputStream in = new FileInputStream(from); FileOutputStream out = new FileOutputStream(to); try { byte[] buffer = new byte[1024]; int count = -1; while ((count = in.read(buffer)) > 0) { out.write(buffer, 0, count); } } finally { <START> IOUtils.closeQuietly(out); <END> IOUtils.closeQuietly(in); } }</code><technical_language>want closeQuietly() OutputStream exception occurred. mask exceptions happen a close(). treated exceptions write() calls</technical_language>

Target:
private static void copyFile(File from, File to) throws IOException { FileInputStream in = new FileInputStream(from); FileOutputStream out = new FileOutputStream(to); try { byte[] buffer = new byte[1024]; int count; while ((count = in.read(buffer)) > 0) { out.write(buffer, 0, count); } out.close(); } finally { IOUtils.closeQuietly(in); IOUtils.closeQuietly(out); } }
Source:
<code>public UriTemplate(String template) { Assert.hasText(template, "Template must not be null or empty!"); Matcher matcher = VARIABLE_REGEX.matcher(template); int baseUriEndIndex = template.length(); List<TemplateVariable> variables = new ArrayList<TemplateVariable>(); while (matcher.find()) { int start = matcher.start(0); VariableType type = VariableType.from(matcher.group(1)); String[] names = matcher.group(2).split(","); for (String name : names) { <START> name = name.endsWith("*")? name.substring(0, name.length() - 1) : name; <END> TemplateVariable variable = new TemplateVariable(name, type); if (!variable.isRequired() && start < baseUriEndIndex) { baseUriEndIndex = start; } variables.add(variable); } } this.variables = variables.isEmpty() ? TemplateVariables.NONE : new TemplateVariables(variables); this.baseUri = template.substring(0, baseUriEndIndex); }</code><technical_language>eager accept a change in UriTemplate pattern includes a special rule regex enforce it. read UriTemplate spec ensure this fits spec well. understanding, UriTemplate is a complex spec multiple levels, needs a defined reason. I slow respond this one</technical_language>

Target:
public UriTemplate(String template) { Assert.hasText(template, "Template must not be null or empty!"); Matcher matcher = VARIABLE_REGEX.matcher(template); int baseUriEndIndex = template.length(); List<TemplateVariable> variables = new ArrayList<TemplateVariable>(); while (matcher.find()) { int start = matcher.start(0); VariableType type = VariableType.from(matcher.group(1)); String[] names = matcher.group(2).split(","); for (String name : names) { boolean isCompositeValue = name.endsWith("*"); TemplateVariable variable; if (isCompositeValue) { variable = new TemplateVariable(name.substring(0, name.length() - 1), VariableType.COMPOSITE_PARAM); } else { variable = new TemplateVariable(name, type); } if (!variable.isRequired() && start < baseUriEndIndex) { baseUriEndIndex = start; } variables.add(variable); } } this.variables = variables.isEmpty() ? TemplateVariables.NONE : new TemplateVariables(variables); this.baseUri = template.substring(0, baseUriEndIndex); }
Source:
<code>void nonSessionScheduleMessage(MessagingEntityType entityType) { setSenderAndReceiver(entityType); final Instant scheduledEnqueueTime = Instant.now().plusSeconds(10); final String messageId = UUID.randomUUID().toString(); final String contents = "Some-contents"; final ServiceBusMessage message = TestUtils.getServiceBusMessage(contents, messageId); long sequenceNumber = sender.scheduleMessage(message, scheduledEnqueueTime); <START> Assertions.assertTrue(sequenceNumber > 0); <END> messagesPending.incrementAndGet(); }</code><technical_language>sequence number 0 if is in beginning of stream</technical_language>

Target:
void nonSessionScheduleMessage(MessagingEntityType entityType) { setSenderAndReceiver(entityType); final Instant scheduledEnqueueTime = Instant.now().plusSeconds(10); final String messageId = UUID.randomUUID().toString(); final String contents = "Some-contents"; final ServiceBusMessage message = TestUtils.getServiceBusMessage(contents, messageId); long sequenceNumber = sender.scheduleMessage(message, scheduledEnqueueTime); Assertions.assertTrue(sequenceNumber >= 0); messagesPending.incrementAndGet(); }
Source:
<code>public void givenLongResponseWhenTimeoutThenHandle() throws InterruptedException { WSClient ws = play.test.WSTestClient.newClient(port); Futures futures = app.injector() .instanceOf(Futures.class); CompletionStage<Result> f = futures.timeout(ws.url(url) .setRequestTimeout(Duration.of(1, SECONDS)) .get() .thenApply(result -> { try { Thread.sleep(2000L); return Results.ok(); } catch (InterruptedException e) { return Results.status( SERVICE_UNAVAILABLE); } <START> }), 1L, TimeUnit.SECONDS); <END> CompletionStage<Object> res = f.handleAsync((result, e) -> { if (e != null) { log.error("Exception thrown", e); return e.getCause(); } else { return result; } }); res.thenAccept(result -> assertEquals(TimeoutException.class, result) ); Thread.sleep(2500); }</code><technical_language>This code is deeply nested right. I needs extract method code for thenApply need reconsider formatting</technical_language>

Target:
public void givenLongResponseWhenTimeoutThenHandle() throws Exception { CountDownLatch latch = new CountDownLatch(1); WSClient ws = play.test.WSTestClient.newClient(port); Futures futures = app.injector() .instanceOf(Futures.class); CompletionStage<Result> f = futures.timeout( ws.url(url) .setRequestTimeout(Duration.of(1, SECONDS)) .get() .thenApply(result -> { try { Thread.sleep(2000L); return Results.ok(); } catch (InterruptedException e) { return Results.status( SERVICE_UNAVAILABLE); } }), 1L, TimeUnit.SECONDS ); CompletionStage<Object> res = f.handleAsync((result, e) -> { if (e != null) { log.error("Exception thrown", e); latch.countDown(); return e.getCause(); } else { return result; } }); res.thenAccept(result -> assertEquals(TimeoutException.class, result)); log.debug( "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis()); latch.await(5, TimeUnit.SECONDS ); assertEquals(0, latch.getCount()); log.debug("All requests have been completed. Exiting test."); }
Source:
<code>private static int[] fuzzyArray(int size){ int[] fuzz = new int[DEFAULT_SAMPLE]; Random rng = new Random(10); for (int i = 0; i < DEFAULT_SAMPLE; i++) { <START> fuzz[i] = rng.nextInt(); <END> } return fuzz; }</code><technical_language>rng.nextInt(1000);</technical_language>

Target:
private static int[] fuzzyArray(int size) { int[] fuzz = new int[DEFAULT_SAMPLE]; Random rng = new Random(10); for (int i = 0; i < DEFAULT_SAMPLE; i++) { fuzz[i] = rng.nextInt(DEFAULT_SAMPLE); } return fuzz; }
Source:
<code><START> public String getDisplayString(EncounterProvider encounterProvider) { <END> if (encounterProvider == null) return ""; return encounterProvider.getUuid(); }</code><technical_language>I expect "display" field provider ID, else provider.person.preferredName</technical_language>

Target:
public String getDisplayString(EncounterProvider encounterProvider) { if (encounterProvider == null) return ""; return encounterProvider.getProvider().getProviderId() + ": " + encounterProvider.getEncounterRole().getName(); }
Source:
<code>public JsonLoader() { <START> this(TextInputFormat.class.getName(), ""); <END> }</code><technical_language>arguments is iffy. e.g. if want enable -nestedLoading, need 'org.apache.hadoop.mapreduce.input.TextInputForamt'. move input format arguments (-inputFormat). '-inputFormat' rarely used</technical_language>

Target:
public JsonLoader() { this(""); }
Source:
<code>public void validateStudyAlreadyHasStudyEntries(final Integer studyId) { this.errors = new MapBindingResult(new HashMap<String, String>(), Integer.class.getName()); if (this.middlewareStudyEntryService.countStudyEntries(studyId) > 0) { <START> errors.reject("study.has.existing.study.entries"); <END> } if (this.errors.hasErrors()) { throw new ApiRequestValidationException(this.errors.getAllErrors()); } }</code><technical_language>throw exception this if clause 1 validation</technical_language>

Target:
public void validateStudyAlreadyHasStudyEntries(final Integer studyId) { this.errors = new MapBindingResult(new HashMap<String, String>(), Integer.class.getName()); if (this.middlewareStudyEntryService.countStudyEntries(studyId) > 0) { this.errors.reject("study.has.existing.study.entries"); throw new ApiRequestValidationException(this.errors.getAllErrors()); } }
Source:
<code>public static <T> TransformSpec fromInputRowParser(final InputRowParser<T> parser) { if (parser instanceof TransformingInputRowParser) { return ((TransformingInputRowParser) parser).getTransformSpec(); } else if (parser instanceof TransformingStringInputRowParser) { return ((TransformingStringInputRowParser) parser).getTransformSpec(); } else { <START> return TransformSpec.NONE; <END> } }</code><technical_language>throw a RuntimeException in this case this get called in codepaths a decorate(..) would've happened. If reached means is some coding error</technical_language>

Target:
public static <T> TransformSpec fromInputRowParser(final InputRowParser<T> parser) { if (parser instanceof TransformingInputRowParser) { return ((TransformingInputRowParser) parser).getTransformSpec(); } else if (parser instanceof TransformingStringInputRowParser) { return ((TransformingStringInputRowParser) parser).getTransformSpec(); } else { throw new ISE("Parser was not decorated, but should have been"); } }
Source:
<code><START> public void propertyChange(PropertyChangeEvent event) { <END> if (event.getOldValue() != event.getNewValue()) { if (event.getPropertyName().equals(RenderingConfig.NORMAL_MAPPING)) { isNormalMapping = renderingConfig.isNormalMapping(); if (isNormalMapping) { addDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } } else { removeDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { removeDesiredStateChange(setHeightTerrain); } } } else if (event.getPropertyName().equals(RenderingConfig.PARALLAX_MAPPING)) { isParallaxMapping = renderingConfig.isParallaxMapping(); if (isNormalMapping) { if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } else { removeDesiredStateChange(setHeightTerrain); } } } else { isAnimateWater = renderingConfig.isAnimateWater(); } worldRenderer.requestTaskListRefresh(); } }</code><technical_language>I thinking this option. if method arguments ancestor class need sorts of additional local variables. if handle*() methods obtained need input arguments? Feasible</technical_language>

Target:
public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(RenderingConfig.NORMAL_MAPPING)) { normalMappingIsEnabled = renderingConfig.isNormalMapping(); if (normalMappingIsEnabled) { addDesiredStateChange(setTerrainNormalsInputTexture); if (parallaxMappingIsEnabled) { addDesiredStateChange(setTerrainHeightInputTexture); } } else { removeDesiredStateChange(setTerrainNormalsInputTexture); if (parallaxMappingIsEnabled) { removeDesiredStateChange(setTerrainHeightInputTexture); } } } else if (event.getPropertyName().equals(RenderingConfig.PARALLAX_MAPPING)) { parallaxMappingIsEnabled = renderingConfig.isParallaxMapping(); if (normalMappingIsEnabled) { if (parallaxMappingIsEnabled) { addDesiredStateChange(setTerrainHeightInputTexture); } else { removeDesiredStateChange(setTerrainHeightInputTexture); } } } else if (event.getPropertyName().equals(RenderingConfig.ANIMATE_WATER)) { animatedWaterIsEnabled = renderingConfig.isAnimateWater(); } worldRenderer.requestTaskListRefresh(); }
Source:
<code>public void dispose() { delegate.dispose(); <START> sinks.asMap().forEach((t, sink) -> sink.complete()); <END> }</code><technical_language>add a call sinks.invalidateAll()</technical_language>

Target:
public void dispose() { delegate.dispose(); sinks.asMap().forEach((t, sink) -> sink.complete()); sinks.invalidateAll(); }
Source:
<code>private void setCharset(String charsetName) { try { if (charsetName == null) { <START> this.charset = Charset.defaultCharset(); <END> } else { this.charset = Charset.forName(charsetName); } logger.debug("Serial port '{}' charset '{}' set.", this.port, charsetName); } catch (IllegalCharsetNameException e) { logger.error("Serial port '{}' charset '{}' not found.", this.port, charsetName); } }</code><technical_language>eliminate extraneous of this. throughout</technical_language>

Target:
private void setCharset(String charsetName) { try { if (charsetName == null) { charset = Charset.defaultCharset(); } else { charset = Charset.forName(charsetName); } logger.debug("Serial port '{}' charset '{}' set.", port, charsetName); } catch (IllegalCharsetNameException e) { logger.warn("Serial port '{}' charset '{}' not found.", port, charsetName); charset = Charset.defaultCharset(); } }
Source:
<code><START> public QuestionDB getQuestion(){ <END> if(question==null){ if(id_question_fk==null) return null; question = new Select() .from(QuestionDB.class) .where(QuestionDB_Table.id_question .is(id_question_fk)).querySingle(); } return question; }</code><technical_language>move necessary queries MediaRepository MediaDB columns for table</technical_language>

Target:
public QuestionDB getQuestion() { if (question == null) { if (id_question_fk == null) return null; question = QuestionDB.findByID(id_question_fk); } return question; }
Source:
<code>public void damageD(double amount) { <START> Living thisEntity = this; <END> DamageSource source = DamageSource.generic; if (thisEntity instanceof Human) { source = net.minecraft.util.DamageSource.causePlayerDamage((EntityPlayer) thisEntity); } else { source = net.minecraft.util.DamageSource.causeMobDamage((EntityLivingBase) thisEntity); } if (thisEntity instanceof net.minecraft.entity.boss.EntityDragon) { ((EntityDragon) thisEntity).attackEntityFrom(source, (float) amount); } else { attackEntityFrom(source, (float) amount); } }</code><technical_language>Unnecessary change</technical_language>

Target:
public void damageD(double amount) { Living thisEntity = (Living) this; DamageSource source = DamageSource.generic; if (thisEntity instanceof Human) { source = net.minecraft.util.DamageSource.causePlayerDamage((EntityPlayer) thisEntity); } else { source = net.minecraft.util.DamageSource.causeMobDamage((EntityLivingBase) thisEntity); } if (thisEntity instanceof net.minecraft.entity.boss.EntityDragon) { ((EntityDragon) thisEntity).attackEntityFrom(source, (float) amount); } else { attackEntityFrom(source, (float) amount); } }
Source:
<code>public String getIpAddress() { <START> return "127.0.0.1"; <END> }</code><technical_language>returning localhost? Also, this a constant</technical_language>

Target:
public String getIpAddress() { return LOCALHOST; }
Source:
<code>private void validateApprovals(Version version, CloudTrailEvent event) { List<Approval> approvals = kioOperations.getApplicationApprovals(version.getApplicationId(), version.getId()); Set<String> approvalTypes = approvals.stream().collect(Collectors.groupingBy(Approval::getApprovalType)) .keySet(); <START> if (!approvalTypes.contains("CODE_CHANGE") || !approvalTypes.contains("DEPLOY") <END> || !approvalTypes.contains("SPECIFICATION") || !approvalTypes.contains("TEST")) { violationSink.put(new ViolationBuilder(format( "Version %s of application %s is missing one or more approvals.", version.getId(), version.getApplicationId())).withAccoundId(getCloudTrailEventAccountId(event)) .withRegion(getCloudTrailEventRegion(event)).withEventId(getCloudTrailEventId(event)).build()); } boolean doneByOne = approvals .stream() .filter(a -> a.getApprovalType() == "CODE_CHANGE" || a.getApprovalType() == "TEST" || a.getApprovalType() == "DEPLOY").map(a -> a.getUserId()).collect(Collectors.toList()).size() == 1; if (doneByOne) { violationSink .put(new ViolationBuilder( format("Code change, test and deploy approvals of version %s of application %s were done by onle one person.", version.getId(), version.getApplicationId())) .withAccoundId(getCloudTrailEventAccountId(event)) .withRegion(getCloudTrailEventRegion(event)).withEventId(getCloudTrailEventId(event)) .build()); } }</code><technical_language>nice, if list of approvals configurable</technical_language>

Target:
private void validateApprovals(Version version, CloudTrailEvent event) { List<Approval> approvals = kioOperations.getApplicationApprovals(version.getApplicationId(), version.getId()); Set<String> defaultApprovals = registryPluginProperties.getDefaultApprovals(); String codeApproval = registryPluginProperties.getCodeApproval(); String testApproval = registryPluginProperties.getTestApproval(); String deployApproval = registryPluginProperties.getDeployApproval(); Set<String> approvalTypes = approvals.stream().collect(Collectors.groupingBy(Approval::getApprovalType)) .keySet(); if (!approvalTypes.containsAll(defaultApprovals)) { Set<String> diff = Sets.newHashSet(defaultApprovals); diff.removeAll(approvalTypes); violationSink.put(new ViolationBuilder(format("Version %s of application %s is missing approvals: %s.", version.getId(), diff.toString(), version.getApplicationId())) .withAccoundId(getCloudTrailEventAccountId(event)).withRegion(getCloudTrailEventRegion(event)) .withEventId(getCloudTrailEventId(event)).build()); } boolean doneByOne = approvals .stream() .filter(a -> a.getApprovalType() == codeApproval || a.getApprovalType() == testApproval || a.getApprovalType() == deployApproval).map(a -> a.getUserId()).distinct() .collect(Collectors.toList()).size() == 1; if (doneByOne) { violationSink .put(new ViolationBuilder( format("Code change, test and deploy approvals of version %s of application %s were done by onle one person.", version.getId(), version.getApplicationId())) .withAccoundId(getCloudTrailEventAccountId(event)) .withRegion(getCloudTrailEventRegion(event)).withEventId(getCloudTrailEventId(event)) .build()); } }