auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public int onBite(IVampire biter) { float perc = biter instanceof IVampirePlayer ? 0.2F : 0.08F; if (getLevel() == 0) { int amt = player.getFoodStats().getFoodLevel(); int sucked = (int) (amt * perc); player.getFoodStats().setFoodLevel(amt - sucked); player.addExhaustion(1000F); if (!player.isPotionActive(ModPotions.sanguinare) && Helper.canTurnPlayer(biter, player) && Helper.canBecomeVampire(player)) { PotionSanguinare.addRandom(player, true); } return sucked; } int amt = this.getBloodStats().getBloodLevel(); int sucked = (int) (amt * perc); bloodStats.removeBlood(sucked, true); sync(this.bloodStats.writeUpdate(new NBTTagCompound()), true); <START> feedCounter = 30; <END> return sucked; }</code><technical_language>Is this somewhere</technical_language>

Target:
public int onBite(IVampire biter) { float perc = biter instanceof IVampirePlayer ? 0.2F : 0.08F; if (getLevel() == 0) { int amt = player.getFoodStats().getFoodLevel(); int sucked = (int) Math.ceil((amt * perc)); player.getFoodStats().setFoodLevel(amt - sucked); player.addExhaustion(1000F); if (!player.isPotionActive(ModPotions.sanguinare) && Helper.canTurnPlayer(biter, player) && Helper.canBecomeVampire(player)) { PotionSanguinare.addRandom(player, true); } return sucked; } int amt = this.getBloodStats().getBloodLevel(); int sucked = (int) Math.ceil((amt * perc)); bloodStats.removeBlood(sucked, true); sync(this.bloodStats.writeUpdate(new NBTTagCompound()), true); return sucked; }
Source:
<code>private Path getLocalTempFile(String s) throws IOException { Path projectRoot = Paths.get("."); Path tempDirectory = Files.createTempDirectory(projectRoot, this.getClass().getSimpleName() + "-test-"); Path relativeTempDirectory = projectRoot.relativize(tempDirectory); Path tempFile = Files.createTempFile(relativeTempDirectory, "test", s); <START> tempFile.toFile().deleteOnExit(); <END> tempDirectory.toFile().deleteOnExit(); return tempFile; }</code><technical_language>Files (or directories) deleted in reverse order registered. I wrong :laughing:</technical_language>

Target:
private Path getLocalTempFile(String s) throws IOException { Path projectRoot = Paths.get("."); Path tempDirectory = Files.createTempDirectory(projectRoot, this.getClass().getSimpleName() + "-test-"); Path relativeTempDirectory = projectRoot.relativize(tempDirectory); Path tempFile = Files.createTempFile(relativeTempDirectory, "test", s); tempDirectory.toFile().deleteOnExit(); tempFile.toFile().deleteOnExit(); return tempFile; }
Source:
<code>public Collection<ManagedConversation> getConversations() { <START> return new HashSet<ManagedConversation>(getConversationMap().values()); <END> }</code><technical_language>this synchronized well</technical_language>

Target:
public Collection<ManagedConversation> getConversations() { Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { return new HashSet<ManagedConversation>(conversations.values()); } }
Source:
<code>private boolean isUserGiverOfResponse(FeedbackQuestionAttributes question, FeedbackResponseAttributes response, String userEmail, CourseRoster roster) { if (question.giverType == FeedbackParticipantType.TEAMS) { if (roster.isStudentsInSameTeam(response.giver, userEmail)) { return true; } } else { if (response.giver.equals(userEmail)) { return true; } } <START> return false; <END> }</code><technical_language>This be: java return question.giverType == FeedbackParticipantType.TEAMS && roster.isStudentsInSameTeam(response.giver, userEmail) || question.giverType != FeedbackParticipantType.TEAMS && response.giver.equals(userEmail);</technical_language>

Target:
private boolean isUserGiverOfResponse(FeedbackQuestionAttributes question, FeedbackResponseAttributes response, String userEmail, CourseRoster roster) { return question.giverType == FeedbackParticipantType.TEAMS && roster.isStudentsInSameTeam(response.giver, userEmail) || question.giverType != FeedbackParticipantType.TEAMS && response.giver.equals(userEmail); }
Source:
<code>protected Map<Locator, MetricData> getDatapointsForRange( List<Locator> locators, Range range, String columnFamily, Granularity granularity ) { <START> Map<Locator, List<ResultSetFuture>> locatorToFuturesMap = new HashMap<Locator, List<ResultSetFuture>>(); <END> Map<Locator, DAbstractMetricIO> locatorIOMap = new HashMap<Locator, DAbstractMetricIO>(); for (Locator locator : locators) { try { String rType = metadataCache.get( locator, MetricMetadata.ROLLUP_TYPE.name().toLowerCase() ); DAbstractMetricIO io = getIO( rType, granularity ); locatorIOMap.put( locator, io ); List<ResultSetFuture> selectFutures = io.selectForLocatorAndRange( columnFamily, locator, range ); List<ResultSetFuture> existing = locatorToFuturesMap.get(locator); if (existing == null) { existing = new ArrayList<ResultSetFuture>(); locatorToFuturesMap.put(locator, existing); } existing.addAll(selectFutures); } catch (CacheException ex) { Instrumentation.markReadError(); LOG.error(String.format("Error looking up locator %s in cache", locator), ex); } } return resultSetsToMetricData(locatorToFuturesMap, locatorIOMap, granularity); }</code><technical_language>I noticed.... missing Instrumentation.getReadTimerContext(columnFamilyName) here? oversight... :-(</technical_language>

Target:
public Map<Locator, MetricData> getDatapointsForRange( List<Locator> locators, Range range, String columnFamily, Granularity granularity ) throws IOException { Timer.Context ctx = Instrumentation.getReadTimerContext( columnFamily ); try { Map<Locator, List<ResultSetFuture>> locatorToFuturesMap = new HashMap<Locator, List<ResultSetFuture>>(); Map<Locator, DAbstractMetricIO> locatorIOMap = new HashMap<Locator, DAbstractMetricIO>(); for (Locator locator : locators) { try { String rType = metadataCache.get( locator, MetricMetadata.ROLLUP_TYPE.name().toLowerCase() ); DAbstractMetricIO io = getIO( rType, granularity ); locatorIOMap.put( locator, io ); List<ResultSetFuture> selectFutures = io.selectForLocatorAndRange( columnFamily, locator, range ); List<ResultSetFuture> existing = locatorToFuturesMap.get(locator); if (existing == null) { existing = new ArrayList<ResultSetFuture>(); locatorToFuturesMap.put(locator, existing); } existing.addAll(selectFutures); } catch (CacheException ex) { Instrumentation.markReadError(); LOG.error(String.format("Error looking up locator %s in cache", locator), ex); } } return resultSetsToMetricData(locatorToFuturesMap, locatorIOMap, granularity); } finally { ctx.stop(); } }
Source:
<code><START> public ResourceSet<?> setPageSize(final int pageSize) { <END> reader.pageSize(pageSize); return this; }</code><technical_language>ResourceSet<E> is correct stricter ResourceSet<?></technical_language>

Target:
public ResourceSet<E> setPageSize(final int pageSize) { reader.pageSize(pageSize); return this; }
Source:
<code>public synchronized Tuple peek() throws SQLException { try { init(); return next; } catch (IOException e) { <START> throw SQLExceptionInfo.getNewInfoObject(SQLExceptionCodeEnum.IO_EXCEPTION).genWrappedException(e); } <END> }</code><technical_language>Compare this change is done in src/main/java/com/salesforce/phoenix/query/StatsManagerImpl.java:132, wrt sqlE.setNextException(). If exception occurs finally block, lose original exception</technical_language>

Target:
public synchronized Tuple peek() throws SQLException { try { init(); return next; } catch (IOException e) { throw new PhoenixIOException(e); } }
Source:
<code>public void startNextKeyspace() { final String keyspace = super.nextKeyspace(); if (keyspace == null) return; <START> new Thread("Cleanup " + keyspace) { <END> @Override public void run() { try { LOGGER.info("Starting cleanup on keyspace {}", keyspace); keyspaceStarted(); List<String> cfNames = jmxConnect.getColumnFamilyNames(keyspace); for (String cfName : cfNames) { int status = jmxConnect.getStorageServiceProxy().forceKeyspaceCleanup(keyspace, cfName); CompactionManager.AllSSTableOpStatus s = CompactionManager.AllSSTableOpStatus.SUCCESSFUL; for (CompactionManager.AllSSTableOpStatus st : CompactionManager.AllSSTableOpStatus.values()) { if (st.statusCode == status) s = st; } LOGGER.info("Cleanup of {}.{} returned with {}", keyspace, cfName, s); } keyspaceFinished("SUCCESS", keyspace); } catch (Exception e) { LOGGER.error("Failed to cleanup keyspace " + keyspace, e); keyspaceFinished("FAILURE", keyspace); } finally { startNextKeyspace(); } } }.start(); LOGGER.info("Submitted cleanup for keyspace {}", keyspace); }</code><technical_language>please move this a runnable is submitted executor service, track returned future</technical_language>

Target:
public void startNextKeyspace() { final String keyspace = super.nextKeyspace(); if (keyspace == null) { return; } cleanupFuture = executorService.submit(new Runnable() { @Override public void run() { try { LOGGER.info("Starting cleanup on keyspace {}", keyspace); keyspaceStarted(); List<String> cfNames = jmxConnect.getColumnFamilyNames(keyspace); for (String cfName : cfNames) { int status = jmxConnect.getStorageServiceProxy().forceKeyspaceCleanup(keyspace, cfName); CompactionManager.AllSSTableOpStatus s = CompactionManager.AllSSTableOpStatus.SUCCESSFUL; for (CompactionManager.AllSSTableOpStatus st : CompactionManager.AllSSTableOpStatus.values()) { if (st.statusCode == status) { s = st; } } LOGGER.info("Cleanup of {}.{} returned with {}", keyspace, cfName, s); } keyspaceFinished("SUCCESS", keyspace); } catch (Exception e) { LOGGER.error("Failed to cleanup keyspace " + keyspace, e); keyspaceFinished("FAILURE", keyspace); } finally { startNextKeyspace(); } } }); LOGGER.info("Submitted cleanup for keyspace {}", keyspace); }
Source:
<code>@Override public void run(JsonNode jNode) { String cacheName = jNode.get("cacheName").asText(); long size = jNode.get("size").asLong(); int dataSize = jNode.get("dataSize").asInt(); markInitialized(); try (IgniteDataStreamer<UUID, byte[]> dataStreamer = ignite.dataStreamer(cacheName)) { <START> for (long j = 0L; j <= size; j++) <END> dataStreamer.addData(UUID.randomUUID(), new byte[dataSize]); } markFinished(); }</code><technical_language>1) "j" ? :) 2) "<=" ? 3) reason "L"</technical_language>

Target:
@Override public void run(JsonNode jNode) { String cacheName = jNode.get("cacheName").asText(); int amount = jNode.get("amount").asInt(); int dataSize = jNode.get("dataSize").asInt(); markInitialized(); try (IgniteDataStreamer<UUID, byte[]> dataStreamer = ignite.dataStreamer(cacheName)) { for (int i = 0; i < amount; i++) dataStreamer.addData(UUID.randomUUID(), new byte[dataSize]); } markFinished(); }
Source:
<code>public void testConversionToFrameworkFormat() { if (Util.SDK_INT < 16) { return; } byte[] initData1 = new byte[] {1, 2, 3}; byte[] initData2 = new byte[] {4, 5, 6}; List<byte[]> initData = new ArrayList<>(); initData.add(initData1); initData.add(initData2); testConversionToFrameworkFormatV16(MediaFormat.createVideoFormat( <START> null, MediaFormat.NO_VALUE, "video/xyz", 5000, 102400, 1000L, 1280, 720, initData)); <END> testConversionToFrameworkFormatV16(MediaFormat.createVideoFormat( null, MediaFormat.NO_VALUE, "video/xyz", 5000, MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, 1280, 720, null)); testConversionToFrameworkFormatV16(MediaFormat.createAudioFormat( null, MediaFormat.NO_VALUE, "audio/xyz", 500, 128, 1000L, 5, 44100, initData, null)); testConversionToFrameworkFormatV16(MediaFormat.createAudioFormat( null, MediaFormat.NO_VALUE, "audio/xyz", 500, MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, 5, 44100, null, null)); testConversionToFrameworkFormatV16( MediaFormat.createTextFormat(null, MediaFormat.NO_VALUE, "text/xyz", MediaFormat.NO_VALUE, 1000L, "eng")); testConversionToFrameworkFormatV16( MediaFormat.createTextFormat(null, MediaFormat.NO_VALUE, "text/xyz", MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, null)); }</code><technical_language>Please put indentation (4 chars) (ditto x2 below)</technical_language>

Target:
public void testConversionToFrameworkFormat() { if (Util.SDK_INT < 16) { return; } byte[] initData1 = new byte[] {1, 2, 3}; byte[] initData2 = new byte[] {4, 5, 6}; List<byte[]> initData = new ArrayList<>(); initData.add(initData1); initData.add(initData2); testConversionToFrameworkFormatV16(MediaFormat.createVideoFormat( null, "video/xyz", 5000, 102400, 1000L, 1280, 720, initData)); testConversionToFrameworkFormatV16(MediaFormat.createVideoFormat( null, "video/xyz", 5000, MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, 1280, 720, null)); testConversionToFrameworkFormatV16(MediaFormat.createAudioFormat( null, "audio/xyz", 500, 128, 1000L, 5, 44100, initData, null)); testConversionToFrameworkFormatV16(MediaFormat.createAudioFormat( null, "audio/xyz", 500, MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, 5, 44100, null, null)); testConversionToFrameworkFormatV16( MediaFormat.createTextFormat(null, "text/xyz", MediaFormat.NO_VALUE, 1000L, "eng")); testConversionToFrameworkFormatV16( MediaFormat.createTextFormat(null, "text/xyz", MediaFormat.NO_VALUE, C.UNKNOWN_TIME_US, null)); }
Source:
<code>public File getFile() { try { return springResource.getFile(); } catch (final Exception e) { <START> LOGGER.error(e.getMessage(), e); <END> return null; } }</code><technical_language>a a big deal, throw a TechnicalException instead</technical_language>

Target:
public File getFile() { try { return springResource.getFile(); } catch (final Exception e) { throw new TechnicalException(e); } }
Source:
<code>public ClusterLevel makeClusterLevel(String version) { ClusterLevel level = new ClusterLevel(); level.setId(version); if (!isFiltered()) { CpuTypes cpuTypes = new CpuTypes(); for (ServerCpu serverCpu : getServerCpuList(version)) { CpuType cpuType = new CpuType(); cpuType.setName(serverCpu.getCpuName()); cpuType.setLevel(serverCpu.getLevel()); cpuType.setArchitecture(CPUMapper.map(serverCpu.getArchitecture(), null)); cpuTypes.getCpuTypes().add(cpuType); } level.setCpuTypes(cpuTypes); } Permits permits = new Permits(); for (ActionGroup actionGroup : getActionGroups()) { Permit permit = PermitMapper.map(actionGroup, null); permits.getPermits().add(permit); } level.setPermits(permits); ClusterFeatures features = new ClusterFeatures(); getAdditionalFeatureList(version).forEach(clusterFeature -> { org.ovirt.engine.api.model.ClusterFeature feature = ClusterFeaturesMapper.map(clusterFeature, null); features.getClusterFeatures().add(feature); }); <START> level.setClusterFeatures(features); <END> return LinkHelper.addLinks(level); }</code><technical_language>I this belong here. want report features a cluster level is retrived. I a request this: GET /ovirt-engine/clustelevels produce this: <cluster_levels> <cluster_level id="4.1" href="/ovirt-engine/api/clusterlevels/4.1"> <!-- Features *not* reported here. --> ... </cluster_level> ... </cluster_levels> features reported there. reported explicitly requested: GET /ovirt-engine/api/clusterlevels/4.1/clusterfeatures</technical_language>

Target:
public ClusterLevel makeClusterLevel(String version) { ClusterLevel level = new ClusterLevel(); level.setId(version); if (!isFiltered()) { CpuTypes cpuTypes = new CpuTypes(); for (ServerCpu serverCpu : getServerCpuList(version)) { CpuType cpuType = new CpuType(); cpuType.setName(serverCpu.getCpuName()); cpuType.setLevel(serverCpu.getLevel()); cpuType.setArchitecture(CPUMapper.map(serverCpu.getArchitecture(), null)); cpuTypes.getCpuTypes().add(cpuType); } level.setCpuTypes(cpuTypes); } Permits permits = new Permits(); for (ActionGroup actionGroup : getActionGroups()) { Permit permit = PermitMapper.map(actionGroup, null); permits.getPermits().add(permit); } level.setPermits(permits); return LinkHelper.addLinks(level); }
Source:
<code>private Triple<String, Date, String> getRef(GHRef ref, GHRepository repository) { final Date epochStart = new Date(0); Date branchDate = new Date(0); String refName = ref.getRef(); String sha = null; boolean toIgnore = false; if (refName.startsWith("refs/heads/")) { refName = StringUtils.removeStart(refName, "refs/heads/"); } else if (refName.startsWith("refs/tags/")) { refName = StringUtils.removeStart(refName, "refs/tags/"); <START> } else if (refName.startsWith("refs/pull/")) { <END> toIgnore = true; } if (!toIgnore) { try { sha = ref.getObject().getSha(); if (ref.getObject().getType().equals("tag")) { GHTagObject tagObject = repository.getTagObject(sha); sha = tagObject.getObject().getSha(); } else if (ref.getObject().getType().equals("branch")) { GHBranch branch = repository.getBranch(refName); sha = branch.getSHA1(); } GHCommit commit = repository.getCommit(sha); branchDate = commit.getCommitDate(); if (branchDate.before(epochStart)) { branchDate = epochStart; } } catch (IOException e) { LOG.info("unable to retrieve commit date for branch " + refName); } return Triple.of(refName, branchDate, sha); } else { return null; } }</code><technical_language>other values refName start (I know)? If so, OK toIgnore false in case</technical_language>

Target:
private Triple<String, Date, String> getRef(GHRef ref, GHRepository repository) { final Date epochStart = new Date(0); Date branchDate = new Date(0); String refName = ref.getRef(); String sha = null; boolean toIgnore = false; if (refName.startsWith("refs/heads/")) { refName = StringUtils.removeStart(refName, "refs/heads/"); } else if (refName.startsWith("refs/tags/")) { refName = StringUtils.removeStart(refName, "refs/tags/"); } else if (refName.startsWith("refs/pull/")) { toIgnore = true; } if (!toIgnore) { try { sha = ref.getObject().getSha(); if (ref.getObject().getType().equals("tag")) { GHTagObject tagObject = repository.getTagObject(sha); sha = tagObject.getObject().getSha(); } else if (ref.getObject().getType().equals("branch")) { GHBranch branch = repository.getBranch(refName); sha = branch.getSHA1(); } GHCommit commit = repository.getCommit(sha); branchDate = commit.getCommitDate(); if (branchDate.before(epochStart)) { branchDate = epochStart; } } catch (IOException e) { LOG.error("unable to retrieve commit date for branch " + refName); } return Triple.of(refName, branchDate, sha); } else { return null; } }
Source:
<code><START> public boolean shutdown() { <END> }</code><technical_language>I do databases this method is properly constructed? Eclipse returns "This method return a result of type boolean" I add return for firstRun of false</technical_language>

Target:
public boolean shutdown() { return true; }
Source:
<code>public boolean match(Object selection) { if (selection instanceof EditPart) { if (selection instanceof PapyrusLabelEditPart && ((EditPart) selection).getParent() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart) { <START> return true; <END> } } return false; }</code><technical_language>do return condition</technical_language>

Target:
public boolean match(Object selection) { boolean match = false; if (selection instanceof EditPart) { if (selection instanceof PapyrusLabelEditPart && ((EditPart) selection).getParent() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart) { match = true; } } return match; }
Source:
<code>private static String getStringProperty(final String name, final String def) { try { return System.getProperty("samjdk." + name, def); } catch (final java.security.AccessControlException error) { <START> return def; <END> } }</code><technical_language>emit a warning this happens? I catch people guard otherwise</technical_language>

Target:
private static String getStringProperty(final String name, final String def) { try { return System.getProperty("samjdk." + name, def); } catch (final java.security.AccessControlException error) { log.warn(error,"java Security Manager forbids 'System.getProperty(\"" + name + "\")' , returning default value: " + def ); return def; } }
Source:
<code>public void write(Object object) throws IOException { String content; if (object == null) return; result.totalCount++; if (writeSchema == null) { writeSchema = ((IndexedRecord) object).getSchema(); } GenericIndexedRecordConverter factory = new GenericIndexedRecordConverter(); factory.setSchema(writeSchema); IndexedRecord inputRecord = factory.convertToAvro((IndexedRecord) object); Field msgContent = writeSchema.getField(AzureStorageQueueProperties.FIELD_MESSAGE_CONTENT); int ttl = props.timeToLiveInSeconds.getValue(); int visibility = props.initialVisibilityDelayInSeconds.getValue(); if (msgContent == null) { LOGGER.error(i18nMessages.getMessage("error.VacantMessage")); if (props.dieOnError.getValue()) { throw new ComponentException(new Exception(i18nMessages.getMessage("error.VacantMessage"))); } } else { content = (String) inputRecord.get(msgContent.pos()); CloudQueueMessage msg = new CloudQueueMessage(content); <START> msg.setMessageContent(content); <END> messagesBuffer.add(new QueueMessage(msg, ttl, visibility)); } if (messagesBuffer.size() >= MAX_MSG_TO_ENQUEUE) { sendParallelMessages(); } }</code><technical_language>I this before, a bit strange: content is passed in Constructor setter method</technical_language>

Target:
public void write(Object object) throws IOException { String content; if (object == null) return; result.totalCount++; if (writeSchema == null) { writeSchema = ((IndexedRecord) object).getSchema(); } GenericIndexedRecordConverter factory = new GenericIndexedRecordConverter(); factory.setSchema(writeSchema); IndexedRecord inputRecord = factory.convertToAvro((IndexedRecord) object); Field msgContent = writeSchema.getField(AzureStorageQueueProperties.FIELD_MESSAGE_CONTENT); int ttl = props.timeToLiveInSeconds.getValue(); int visibility = props.initialVisibilityDelayInSeconds.getValue(); if (msgContent == null) { LOGGER.error(i18nMessages.getMessage("error.VacantMessage")); if (props.dieOnError.getValue()) { throw new ComponentException(new Exception(i18nMessages.getMessage("error.VacantMessage"))); } } else { content = (String) inputRecord.get(msgContent.pos()); messagesBuffer.add(new QueueMessage(new CloudQueueMessage(content), ttl, visibility)); } if (messagesBuffer.size() >= MAX_MSG_TO_ENQUEUE) { sendParallelMessages(); } }
Source:
<code>private static String normalizeJUnitOutput(String input) { Scanner scn = new Scanner(input); int index = 1; String res = ""; while (scn.hasNextLine()) { String line = scn.nextLine(); <START> if (line.startsWith(index + ") ")) { <END> res += line + "\n" + scn.nextLine() + "\n"; index++; } } scn.close(); return res; }</code><technical_language>minimizer retains stack trace. Previously I thought method name name of failure necessary. I needed a handle line numbers initial approach lines line numbers</technical_language>

Target:
private static Map<String, String> normalizeJUnitOutput(String input) { BufferedReader bufReader = new BufferedReader(new StringReader(input)); String line; String methodName = null; Map<String, String> resultMap = new HashMap<String, String>(); StringBuilder result = new StringBuilder(); try { int index = 1; while ((line = bufReader.readLine()) != null) { String indexStr = index + ") "; if (line.startsWith(indexStr)) { if (methodName != null) { resultMap.put(methodName, result.toString()); result.setLength(0); } methodName = line; index += 1; } else if (line.isEmpty()) { resultMap.put(methodName, result.toString()); break; } else if (methodName != null) { int lParenIndex = line.indexOf('('); if (lParenIndex >= 0) { line = line.substring(0, lParenIndex); } result.append(line + "\n"); } } bufReader.close(); } catch (IOException e) { System.err.println("I/O error reading line from trace."); e.printStackTrace(); System.exit(1); return null; } return resultMap; }
Source:
<code>public void increment( int typeId ) { if ( typeId >= counts.length ) { <START> counts = Arrays.copyOf( counts, max( counts.length * 2, typeId ) ); <END> } counts[typeId]++; if ( typeId > highestTypeId ) { highestTypeId = typeId; } }</code><technical_language>This needs typeId + 1, parameter is _length_, while typeId is _index_</technical_language>

Target:
public void increment( int typeId ) { if ( typeId >= counts.length ) { counts = Arrays.copyOf( counts, max( counts.length * 2, typeId + 1 ) ); } counts[typeId]++; if ( typeId > highestTypeId ) { highestTypeId = typeId; } }
Source:
<code>public ResultSetFuture executeAsync(final Statement statement) { <START> if (cluster.isClosed()) { <END> throw new IllegalStateException("Parent cluster is closed. This session is no longer valid."); } if (isInit) { DefaultResultSetFuture future = new DefaultResultSetFuture( this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null)); new RequestHandler(this, future, statement).sendRequest(); return future; } else { final ChainedResultSetFuture chainedFuture = new ChainedResultSetFuture(); this.initAsync() .addListener( new Runnable() { @Override public void run() { DefaultResultSetFuture actualFuture = new DefaultResultSetFuture( SessionManager.this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null)); execute(actualFuture, statement); chainedFuture.setSource(actualFuture); } }, executor()); return chainedFuture; } }</code><technical_language>I this needed, this ultimately calls execute method logic for below. rely fail future instead of calling thread is nicer for users need handle exceptions in places</technical_language>

Target:
public ResultSetFuture executeAsync(final Statement statement) { if (isInit) { DefaultResultSetFuture future = new DefaultResultSetFuture( this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null)); execute(future, statement); return future; } else { final ChainedResultSetFuture chainedFuture = new ChainedResultSetFuture(); this.initAsync() .addListener( new Runnable() { @Override public void run() { DefaultResultSetFuture actualFuture = new DefaultResultSetFuture( SessionManager.this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null)); execute(actualFuture, statement); chainedFuture.setSource(actualFuture); } }, executor()); return chainedFuture; } }
Source:
<code><START> @Override public Optional<org.spongepowered.api.map.color.MapColor.Base> getById(String id) { <END> checkNotNull(id, "id"); return Optional.ofNullable(this.mapColorMappings.get(id.toLowerCase(Locale.ENGLISH))); }</code><technical_language>Fix annotation placement</technical_language>

Target:
public Optional<org.spongepowered.api.map.color.MapColor.Base> getById(String id) { checkNotNull(id, "id"); return Optional.ofNullable(mapColorMappings.get(id.toLowerCase(Locale.ENGLISH))); }
Source:
<code>public Schema modelFromProperty(Schema object, @SuppressWarnings("unused") String path) { String description = object.getDescription(); String example = null; Object obj = object.getExample(); if (obj != null) { example = obj.toString(); } Schema items; ArraySchema model = new ArraySchema(); model.setDescription(description); model.setExample(example); if (object.getAdditionalProperties() != null && object.getAdditionalProperties() instanceof Schema) { <START> items = (Schema) object.getAdditionalProperties(); <END> model.setItems(items); } return model; }</code><technical_language>variable item created for assignation, if validation another a good idea delete set model.setItems((Schema)object.getAdditionalProperties());</technical_language>

Target:
public Schema modelFromProperty(Schema object, @SuppressWarnings("unused") String path) { String description = object.getDescription(); String example = null; Object obj = object.getExample(); if (obj != null) { example = obj.toString(); } ArraySchema model = new ArraySchema(); model.setDescription(description); model.setExample(example); if (object.getAdditionalProperties() != null && object.getAdditionalProperties() instanceof Schema) { model.setItems((Schema) object.getAdditionalProperties()); } return model; }
Source:
<code>public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { if (isTaskSideMetaData(job)) { return toParquetSplits(super.getSplits(job, numSplits)); } <START> <END> List<Footer> footers = getFooters(job); List<ParquetInputSplit> splits = realInputFormat.getSplits(job, footers); if (splits == null) { return null; } InputSplit[] resultSplits = new InputSplit[splits.size()]; int i = 0; for (ParquetInputSplit split : splits) { resultSplits[i++] = new ParquetInputSplitWrapper(split); } return resultSplits; }</code><technical_language>I get this? need for special case? I this is in wrong place this wrapper care isTaskSideMetaData</technical_language>

Target:
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { if (isTaskSideMetaData(job)) { return super.getSplits(job, numSplits); } List<Footer> footers = getFooters(job); List<ParquetInputSplit> splits = realInputFormat.getSplits(job, footers); if (splits == null) { return null; } InputSplit[] resultSplits = new InputSplit[splits.size()]; int i = 0; for (ParquetInputSplit split : splits) { resultSplits[i++] = new ParquetInputSplitWrapper(split); } return resultSplits; }
Source:
<code>public Map<Long, Set<TObject>> chronologize(String key, long record, long start, long end, Map<Long, Set<TObject>> context) { <START> <END> Set<TObject> set = Iterables.getLast(context.values(), Sets.<TObject> newLinkedHashSet()); for (Iterator<Write> it = iterator(); it.hasNext();) { Write write = it.next(); long writeTimeStamp = write.getVersion(); if(writeTimeStamp >= start && writeTimeStamp <= end) { Text writtenKey = write.getKey(); long writtenRecordId = write.getRecord().longValue(); Action action = write.getType(); if(writtenKey.toString().equals(key) && writtenRecordId == record) { set = Sets.newLinkedHashSet(set); Value newValue = write.getValue(); if(action == Action.ADD) { set.add(newValue.getTObject()); } else if(action == Action.REMOVE) { set.remove(newValue.getTObject()); } context.put(writeTimeStamp, set); } } } return context; }</code><technical_language>remove blank line</technical_language>

Target:
public Map<Long, Set<TObject>> chronologize(String key, long record, long start, long end, Map<Long, Set<TObject>> context) { Set<TObject> set = Iterables.getLast(context.values(), Sets.<TObject> newLinkedHashSet()); for (Iterator<Write> it = iterator(); it.hasNext();) { Write write = it.next(); long timestamp = write.getVersion(); if(timestamp >= end){ break; } else{ Text writeKey = write.getKey(); long writeRecord = write.getRecord().longValue(); Action action = write.getType(); if(writeKey.toString().equals(key) && writeRecord == record) { set = Sets.newLinkedHashSet(set); Value writeValue = write.getValue(); if(action == Action.ADD) { set.add(writeValue.getTObject()); } else if(action == Action.REMOVE) { set.remove(writeValue.getTObject()); } if(timestamp >= start && !set.isEmpty()) context.put(timestamp, set); } } } return context; }
Source:
<code>public void stop(String workspaceId, Map<String, String> options) throws NotFoundException, InfrastructureException, ConflictException { RuntimeState state = runtimes.get(workspaceId); if (state == null) { throw new NotFoundException("Workspace with id '" + workspaceId + "' is not running."); } if (!state.status.equals(RUNNING)) { throw new ConflictException( <START> format("Could not start workspace '%s' because its state is '%s'", workspaceId, state.status)); <END> } runtimes.replace(workspaceId, new RuntimeState(state.runtime, STOPPING)); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.RUNNING) .withStatus(WorkspaceStatus.STOPPING)); try { state.runtime.stop(options); runtimes.remove(workspaceId); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.STOPPING) .withStatus(STOPPED)); } catch (InfrastructureException e) { runtimes.remove(workspaceId); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.STOPPING) .withStatus(STOPPED) .withError("Error occurs on workspace runtime stop. Error: " + e.getMessage())); } }</code><technical_language>typo _start_ -> _stop_</technical_language>

Target:
public void stop(String workspaceId, Map<String, String> options) throws NotFoundException, InfrastructureException, ConflictException { RuntimeState state = runtimes.get(workspaceId); if (state == null) { throw new NotFoundException("Workspace with id '" + workspaceId + "' is not running."); } if (!state.status.equals(RUNNING)) { throw new ConflictException( format("Could not stop workspace '%s' because its state is '%s'", workspaceId, state.status)); } if (!runtimes.replace(workspaceId, state, new RuntimeState(state.runtime, STOPPING))) { RuntimeState newState = runtimes.get(workspaceId); WorkspaceStatus status = newState != null ? newState.status : STOPPED; throw new ConflictException( format("Could not stop workspace '%s' because its state is '%s'", workspaceId, status)); } eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.RUNNING) .withStatus(WorkspaceStatus.STOPPING)); try { state.runtime.stop(options); runtimes.remove(workspaceId); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.STOPPING) .withStatus(STOPPED)); } catch (InfrastructureException e) { runtimes.remove(workspaceId); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class) .withWorkspaceId(workspaceId) .withPrevStatus(WorkspaceStatus.STOPPING) .withStatus(STOPPED) .withError("Error occurs on workspace runtime stop. Error: " + e.getMessage())); } }
Source:
<code>private void calculateState(Route route) { boolean failureLimitReached = isThresholdExceeded(); if (state.get() == STATE_CLOSED) { if (failureLimitReached) { <START> LOG.debug("opening circuit..."); <END> openCircuit(route); } } else if (state.get() == STATE_HALF_OPEN) { if (failureLimitReached) { LOG.debug("opening circuit..."); openCircuit(route); } else { LOG.debug("closing circuit..."); closeCircuit(route); } } else if (state.get() == STATE_OPEN) { long elapsedTimeSinceOpened = System.currentTimeMillis() - openedAt; if (halfOpenAfter <= elapsedTimeSinceOpened) { LOG.debug("checking an open circuit..."); if (halfOpenHandler != null) { if (halfOpenHandler.isReadyToBeClosed()) { LOG.debug("closing circuit..."); closeCircuit(route); } else { LOG.debug("opening circuit..."); openCircuit(route); } } else { LOG.debug("half opening circuit..."); halfOpenCircuit(route); } } } }</code><technical_language>Dont change back, dont case logging</technical_language>

Target:
private void calculateState(Route route) { boolean failureLimitReached = isThresholdExceeded(); if (state.get() == STATE_CLOSED) { if (failureLimitReached) { LOG.debug("Opening circuit..."); openCircuit(route); } } else if (state.get() == STATE_HALF_OPEN) { if (failureLimitReached) { LOG.debug("Opening circuit..."); openCircuit(route); } else { LOG.debug("Closing circuit..."); closeCircuit(route); } } else if (state.get() == STATE_OPEN) { long elapsedTimeSinceOpened = System.currentTimeMillis() - openedAt; if (halfOpenAfter <= elapsedTimeSinceOpened) { LOG.debug("Checking an open circuit..."); if (halfOpenHandler != null) { if (halfOpenHandler.isReadyToBeClosed()) { LOG.debug("Closing circuit..."); closeCircuit(route); } else { LOG.debug("Opening circuit..."); openCircuit(route); } } else { LOG.debug("Half opening circuit..."); halfOpenCircuit(route); } } } }
Source:
<code>public void testEncodeLocalProxyV2() { HAProxyMessageEncoder encoder = new HAProxyMessageEncoder(); EmbeddedChannel ch = new EmbeddedChannel(encoder); HAProxyMessage message = new HAProxyMessage( HAProxyProtocolVersion.V2, HAProxyCommand.LOCAL, HAProxyProxiedProtocol.UNKNOWN, null, null, 0, 0); assertTrue(ch.writeOutbound(message)); ByteBuf byteBuf = ch.readOutbound(); byte[] headerBytes = new byte[12]; byteBuf.readBytes(headerBytes); assertArrayEquals(BINARY_PREFIX, headerBytes); byte commandByte = byteBuf.readByte(); assertEquals(0x02, (commandByte & 0xf0) >> 4); assertEquals(0x00, commandByte & 0x0f); byte transportByte = byteBuf.readByte(); assertEquals(0x00, transportByte); int sourceAddrLength = byteBuf.readUnsignedShort(); assertEquals(0, sourceAddrLength); <START> assertFalse(byteBuf.isReadable()); <END> }</code><technical_language>call byteBuf.release() add assertFalse(ch.finish());</technical_language>

Target:
public void testEncodeLocalProxyV2() { EmbeddedChannel ch = new EmbeddedChannel(INSTANCE); HAProxyMessage message = new HAProxyMessage( HAProxyProtocolVersion.V2, HAProxyCommand.LOCAL, HAProxyProxiedProtocol.UNKNOWN, null, null, 0, 0); assertTrue(ch.writeOutbound(message)); ByteBuf byteBuf = ch.readOutbound(); byte[] headerBytes = new byte[12]; byteBuf.readBytes(headerBytes); assertArrayEquals(BINARY_PREFIX, headerBytes); byte commandByte = byteBuf.readByte(); assertEquals(0x02, (commandByte & 0xf0) >> 4); assertEquals(0x00, commandByte & 0x0f); byte transportByte = byteBuf.readByte(); assertEquals(0x00, transportByte); int sourceAddrLength = byteBuf.readUnsignedShort(); assertEquals(0, sourceAddrLength); assertFalse(byteBuf.isReadable()); byteBuf.release(); assertFalse(ch.finish()); }
Source:
<code>private void connectToClusterInternal() { CandidateClusterContext currentClusterContext = discoveryService.current(); logger.info("Trying to connect to cluster with client name: " + currentClusterContext.getClusterName()); if (connectToCandidate(currentClusterContext)) { return; } discoveryService.resetSearch(); while (discoveryService.hasNext() && client.getLifecycleService().isRunning()) { CandidateClusterContext candidateClusterContext = discoveryService.next(); beforeClusterSwitch(candidateClusterContext); <START> logger.info("Trying to connect to next cluster with client name: " + candidateClusterContext.getClusterName()); <END> if (connectToCandidate(candidateClusterContext)) { client.getQueryCacheContext().recreateAllCaches(); fireLifecycleEvent(LifecycleEvent.LifecycleState.CLIENT_CHANGED_CLUSTER); return; } } if (!client.getLifecycleService().isRunning()) { throw new IllegalStateException("Client is being shutdown."); } else { throw new IllegalStateException("Unable to connect to any cluster."); } }</code><technical_language>Minor: "with _cluster_ name"</technical_language>

Target:
private void connectToClusterInternal() { CandidateClusterContext currentClusterContext = discoveryService.current(); logger.info("Trying to connect to cluster with cluster name: " + currentClusterContext.getClusterName()); if (connectToCandidate(currentClusterContext)) { return; } discoveryService.resetSearch(); while (discoveryService.hasNext() && client.getLifecycleService().isRunning()) { CandidateClusterContext candidateClusterContext = discoveryService.next(); beforeClusterSwitch(candidateClusterContext); logger.info("Trying to connect to next cluster with cluster name: " + candidateClusterContext.getClusterName()); if (connectToCandidate(candidateClusterContext)) { client.getQueryCacheContext().recreateAllCaches(); fireLifecycleEvent(LifecycleEvent.LifecycleState.CLIENT_CHANGED_CLUSTER); return; } } if (!client.getLifecycleService().isRunning()) { throw new IllegalStateException("Client is being shutdown."); } else { throw new IllegalStateException("Unable to connect to any cluster."); } }
Source:
<code>QName normaliseBuiltInTypeTypeRef(final QName typeRef) { String namespace = typeRef.getNamespaceURI(); String localPart = typeRef.getLocalPart(); String prefix = typeRef.getPrefix(); final Definitions definitions = dmnGraphUtils.getDefinitions(); <START> final Optional<String> nsPrefix = definitions.getPrefixForNamespaceURI(namespace); <END> if (nsPrefix.isPresent()) { prefix = nsPrefix.get(); namespace = ""; } return new QName(namespace, localPart, prefix); }</code><technical_language>dmnGraphUtils.getDefinitions() return null, please protect NPE this line</technical_language>

Target:
QName normaliseBuiltInTypeTypeRef(final QName typeRef) { String namespace = typeRef.getNamespaceURI(); String localPart = typeRef.getLocalPart(); String prefix = typeRef.getPrefix(); final Definitions definitions = dmnGraphUtils.getDefinitions(); final Optional<String> nsPrefix = definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); if (nsPrefix.isPresent()) { prefix = nsPrefix.get(); namespace = ""; } return new QName(namespace, localPart, prefix); }
Source:
<code>public TrackedVisit createTrackedVisit(TrackedVisit trackedVisit, Long userId) { final String remoteIp = trackedVisit.getIp(); try { ipTranslationService.getLocationForIp(remoteIp).ifPresent(location -> { trackedVisit.setCountry(location.getCountry()); trackedVisit.setCity(location.getCity()); }); } catch (IpFormatException e) { if (!isLocalhost(remoteIp)) { log.warn("Failed to resolve location for IP {}", remoteIp); } } TrackedVisitor2User trackedVisitor = null; if (StringUtils.isNotBlank(trackedVisit.getUuid_())) { trackedVisitor = trackedVisitor2UserDao.getByUUID(trackedVisit.getUuid_()) .orElse(null); } if (trackedVisitor == null) { trackedVisitor = trackedVisitor2UserService.getOrCreate(userId); trackedVisit.setUuid_(trackedVisitor.getUuid_()); } else { <START> if (trackedVisitor.getUserId() == null && userId != null) { <END> trackedVisitor.setUserId(userId); trackedVisitor2UserDao.update(trackedVisitor); } } return trackedVisitDao.create(trackedVisit); }</code><technical_language>This moved else if</technical_language>

Target:
public TrackedVisit createTrackedVisit(TrackedVisit trackedVisit, Long userId) { final String remoteIp = trackedVisit.getIp(); try { ipTranslationService.getLocationForIp(remoteIp).ifPresent(location -> { trackedVisit.setCountry(location.getCountry()); trackedVisit.setCity(location.getCity()); }); } catch (IpFormatException e) { if (!isLocalhost(remoteIp)) { log.warn("Failed to resolve location for IP {}", remoteIp); } } TrackedVisitor2User trackedVisitor = null; if (StringUtils.isNotBlank(trackedVisit.getUuid_())) { trackedVisitor = trackedVisitor2UserDao.getByUUID(trackedVisit.getUuid_()) .orElse(null); } if (trackedVisitor == null) { trackedVisitor = trackedVisitor2UserService.getOrCreate(userId); trackedVisit.setUuid_(trackedVisitor.getUuid_()); } else if (trackedVisitor.getUserId() == null && userId != null) { trackedVisitor.setUserId(userId); trackedVisitor2UserDao.update(trackedVisitor); } return trackedVisitDao.create(trackedVisit); }
Source:
<code>private void usageForNamespaceName(NamespaceNameTree namespaceName, Symbol.Kind kind) { if (namespaceName.name().is(Kind.NAME_IDENTIFIER)) { NameIdentifierTree usageIdentifier = (NameIdentifierTree) namespaceName.name(); QualifiedName qualifiedName = getFullyQualifiedName(namespaceName); Symbol symbol = symbolTable.getSymbol(qualifiedName); if (symbol == null && namespaceName.namespaces().isEmpty()) { symbol = currentScope.getSymbol(usageIdentifier.text(), kind); } if (symbol == null) { symbol = symbolTable.createUnresolvedSymbol(getFullyQualifiedName(namespaceName), Symbol.Kind.FUNCTION); } if (symbol != null) { associateSymbol(usageIdentifier, symbol); } } <START> } <END></code><technical_language>correct: code alias\foo\bar</technical_language>

Target:
private void usageForNamespaceName(NamespaceNameTree namespaceName, Symbol.Kind kind) { if (namespaceName.name().is(Kind.NAME_IDENTIFIER)) { NameIdentifierTree usageIdentifier = (NameIdentifierTree) namespaceName.name(); QualifiedName qualifiedName = getFullyQualifiedName(namespaceName); Symbol symbol = symbolTable.getSymbol(qualifiedName); if (symbol == null && namespaceName.namespaces().isEmpty()) { symbol = currentScope.getSymbol(usageIdentifier.text(), kind); } if (symbol == null) { symbol = symbolTable.createUndeclaredSymbol(getFullyQualifiedName(namespaceName), Symbol.Kind.FUNCTION); } if (symbol != null) { associateSymbol(usageIdentifier, symbol); } } }
Source:
<code>public void test19CloseImportedProjectsZipFile() throws Exception { WizardProjectsImportPage wpip = createImportWizardWithZipLocation( "ImportExistingProjectsWizardTestRebuildProject"); <START> wpip.setCloseProjectsAfterImport(true); <END> wpip.createProjects(); IProject testProject = ResourcesPlugin.getWorkspace().getRoot() .getProject("ImportExistingProjectsWizardTestRebuildProject"); assertFalse("Expected imported project to be closd due to setting dialog option checkbox", testProject.isAccessible()); }</code><technical_language>I this replaced wpip.saveWidgetValues(); wpip.getWizard().getDialogSettings().put("WizardProjectsImportPage.STORE_CLOSE_CREATED_PROJECTS_ID", true); wpip.restoreWidgetValues(); similar</technical_language>

Target:
public void test19CloseImportedProjectsZipFile() throws Exception { WizardProjectsImportPage wpip = createImportWizardWithZipLocation( "ImportExistingProjectsWizardTestRebuildProject"); try (AutoCloseable restore = setPageSetting(wpip, "WizardProjectsImportPage.STORE_CLOSE_CREATED_PROJECTS_ID", true)) { wpip.createProjects(); IProject testProject = ResourcesPlugin.getWorkspace().getRoot() .getProject("ImportExistingProjectsWizardTestRebuildProject"); assertFalse("Expected imported project to be closd due to setting dialog option checkbox", testProject.isAccessible()); } }
Source:
<code><START> public static AggregatedPayload createPayload(String json) throws JsonSyntaxException { <END> AggregatedPayload payload = new Gson().fromJson(json, AggregatedPayload.class); return payload; }</code><technical_language>JsonParseException if want declare exception</technical_language>

Target:
public static AggregatedPayload createPayload(String json) { AggregatedPayload payload = new Gson().fromJson(json, AggregatedPayload.class); return payload; }
Source:
<code>private synchronized void onNotification(Notification notification) { if ("com.sun.management.gc.notification".equals(notification.getType())) { GarbageCollectionNotificationInfo info = new GarbageCollectionNotificationInfo((CompositeData) notification.getUserData()); if (info.isMajorGc()) { majorGcCount.incrementAndGet(); majorGcTime.addAndGet(info.getDurationMs()); majorGc.add(info.getDurationMs(), MILLISECONDS); long applicationRuntime = max(0, info.getStartTime() - lastGcEndTime); lastGcEndTime = info.getEndTime(); log.info( "Major GC: application %sms, stopped %sms:: %s -> %s", applicationRuntime, info.getDurationMs(), <START> info.getBeforeGcTotalMb(), <END> info.getAfterGcTotalMb()); } else if (info.isMinorGc()) { minorGc.add(info.getDurationMs(), MILLISECONDS); log.debug( "Minor GC: duration %sms:: %s -> %s", info.getDurationMs(), info.getBeforeGcTotalMb(), info.getAfterGcTotalMb()); } } }</code><technical_language>DataSize for add unit in log message</technical_language>

Target:
private synchronized void onNotification(Notification notification) { if ("com.sun.management.gc.notification".equals(notification.getType())) { GarbageCollectionNotificationInfo info = new GarbageCollectionNotificationInfo((CompositeData) notification.getUserData()); if (info.isMajorGc()) { majorGcCount.incrementAndGet(); majorGcTime.addAndGet(info.getDurationMs()); majorGc.add(info.getDurationMs(), MILLISECONDS); long applicationRuntime = max(0, info.getStartTime() - lastGcEndTime); lastGcEndTime = info.getEndTime(); log.info( "Major GC: application %sms, stopped %sms:: %s -> %s", applicationRuntime, info.getDurationMs(), info.getBeforeGcTotal(), info.getAfterGcTotal()); } else if (info.isMinorGc()) { minorGc.add(info.getDurationMs(), MILLISECONDS); log.debug( "Minor GC: duration %sms:: %s -> %s", info.getDurationMs(), info.getBeforeGcTotal(), info.getAfterGcTotal()); } } }
Source:
<code>public AuditLogType getAuditLogTypeValue() { if (getSucceeded()) { return AuditLogType.USER_VDS_STOP; <START> } else { <END> return skippedDueToFencingPolicy ? AuditLogType.VDS_NOT_STOPPED_DUE_TO_POLICY : AuditLogType.USER_FAILED_VDS_STOP; } }</code><technical_language>user point of view action failed restarting Host. true implementing Restart stop-wait-start-wait this transparent user IMO log restart operation failed I log of NonRespondingTreatmentCommand IMO this block remain change : @Override public AuditLogType getAuditLogTypeValue() { return getSucceeded() ? AuditLogType.USER_VDS_STOP : AuditLogType.USER_FAILED_VDS_STOP;</technical_language>

Target:
public AuditLogType getAuditLogTypeValue() { return getSucceeded() ? AuditLogType.USER_VDS_STOP : AuditLogType.USER_FAILED_VDS_STOP; }