auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void log(Event event) { if (this.managementCenterConfig.isEnabled()) { <START> events.add(event); <END> } }</code><technical_language>This throws exception in case queue is full. want change of control flow for operation logs event. is replace oldest entry instead? do this in MC seams fitting solution well</technical_language>

Target:
public void log(Event event) { if (this.managementCenterConfig.isEnabled() && isRunning()) { events.add(event); } }
Source:
<code>public void addListener( Runnable listener, Executor executor ) { f.andThen( new ExecutionCallback<T>() { @Override public void onResponse( T response ) { listener.run(); } @Override public void onFailure( Throwable t ) { <START> logger.error( "Unable to retrieve Ace.", t ); <END> } } ); }</code><technical_language>change "Ace" else, AceFuture is this</technical_language>

Target:
public void addListener( Runnable listener, Executor executor ) { f.andThen( new ExecutionCallback<T>() { @Override public void onResponse( T response ) { listener.run(); } @Override public void onFailure( Throwable t ) { logger.error( "Unable to retrieve result.", t ); } } ); }
Source:
<code>private void onStateEvent(NodeStateEvent event) { assert adminExecutor.inEventLoop(); this.lastStateEvents.put(event.node, event); if ((event.newState == null || event.newState == NodeState.FORCED_DOWN) && channel != null && !channel.closeFuture().isDone() && event.node.getConnectAddress().equals(channel.remoteAddress())) { LOG.debug( <START> "[{}] Control node was removed or forced down, reconnecting", logPrefix, event.node); <END> reconnectNow(); } }</code><technical_language>(indicate node)</technical_language>

Target:
private void onStateEvent(NodeStateEvent event) { assert adminExecutor.inEventLoop(); this.lastStateEvents.put(event.node, event); if ((event.newState == null || event.newState == NodeState.FORCED_DOWN) && channel != null && !channel.closeFuture().isDone() && event.node.getConnectAddress().equals(channel.remoteAddress())) { LOG.debug( "[{}] Control node was removed or forced down, reconnecting to a different node", logPrefix, event.node); reconnectNow(); } }
Source:
<code>public static void output(@AggregationState PrecisionRecallState state, BlockBuilder out) { Iterator<BucketResult> resultsIterator = getResultsIterator(state); BlockBuilder entryBuilder = out.beginBlockEntry(); while (resultsIterator.hasNext()) { <START> final BucketResult result = resultsIterator.next(); <END> DoubleType.DOUBLE.writeDouble( entryBuilder, result.truePositive / result.positive); } out.closeEntry(); }</code><technical_language>Remove final. dont' final in a body</technical_language>

Target:
public static void output(@AggregationState PrecisionRecallState state, BlockBuilder out) { Iterator<BucketResult> resultsIterator = getResultsIterator(state); BlockBuilder entryBuilder = out.beginBlockEntry(); while (resultsIterator.hasNext()) { BucketResult result = resultsIterator.next(); DoubleType.DOUBLE.writeDouble( entryBuilder, result.getTruePositive() / result.getPositive()); } out.closeEntry(); }
Source:
<code>public void initStore(Store<?, ?> resource) { Map.Entry<CachingTier.Provider, AuthoritativeTier.Provider> entry = providersMap.get(resource); if (entry == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } CacheStore cacheStore = (CacheStore) resource; <START> entry.getKey().initCachingTier(cacheStore.cachingTier()); <END> entry.getValue().initAuthoritativeTier(cacheStore.authoritativeTier); }</code><technical_language>explicit real ref</technical_language>

Target:
public void initStore(Store<?, ?> resource) { Map.Entry<CachingTier.Provider, AuthoritativeTier.Provider> entry = providersMap.get(resource); if (entry == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } CacheStore cacheStore = (CacheStore) resource; entry.getKey().initCachingTier(cacheStore.realCachingTier); entry.getValue().initAuthoritativeTier(cacheStore.authoritativeTier); }
Source:
<code>@Override public void request(int rowsCnt) { assert !F.isEmpty(sources()) && sources().size() == 1; assert rowsCnt > 0; try { checkState(); requested += rowsCnt; if (waiting == -1) <START> context().execute(this::doPush); <END> else if (waiting == 0) source().request(waiting = IN_BUFFER_SIZE); } catch (Exception e) { onError(e); } }</code><technical_language>Is reason wait source prefetched start emitting rows</technical_language>

Target:
@Override public void request(int rowsCnt) { assert !F.isEmpty(sources()) && sources().size() == 1; assert rowsCnt > 0; try { checkState(); requested += rowsCnt; if (waiting == -1 && !inLoop) context().execute(this::doPush); else if (waiting == 0) source().request(waiting = IN_BUFFER_SIZE); } catch (Exception e) { onError(e); } }
Source:
<code>public SaProposal getVerifiedNegotiatedProposal(IkeSaPayload reqSaPayload) throws NoValidProposalChosenException { if (!isSaResponse) { throw new UnsupportedOperationException( "Cannot get negotiated SA proposal from a request message."); } Proposal respProposal = proposalList.get(0); if (respProposal.hasUnrecognizedTransform) { throw new NoValidProposalChosenException( "Negotiated proposal has unrecognized Transform."); } int negotiatedProposalNum = proposalList.get(0).number; List<Proposal> reqProposalList = reqSaPayload.proposalList; if (negotiatedProposalNum < 1 || negotiatedProposalNum > reqProposalList.size()) { throw new NoValidProposalChosenException( "Negotiated proposal has invalid proposal number."); } Proposal reqProposal = reqProposalList.get(negotiatedProposalNum - 1); if (!respProposal.isNegotiatedFrom(reqProposal)) { throw new NoValidProposalChosenException("Invalid <START> negotaited proposal."); <END> } return respProposal.saProposal; }</code><technical_language>spelling</technical_language>

Target:
public SaProposal getVerifiedNegotiatedProposal(IkeSaPayload reqSaPayload) throws NoValidProposalChosenException { if (!isSaResponse) { throw new UnsupportedOperationException( "Cannot get negotiated SA proposal from a request message."); } Proposal respProposal = proposalList.get(0); if (respProposal.hasUnrecognizedTransform) { throw new NoValidProposalChosenException( "Negotiated proposal has unrecognized Transform."); } int negotiatedProposalNum = proposalList.get(0).number; List<Proposal> reqProposalList = reqSaPayload.proposalList; if (negotiatedProposalNum < 1 || negotiatedProposalNum > reqProposalList.size()) { throw new NoValidProposalChosenException( "Negotiated proposal has invalid proposal number."); } Proposal reqProposal = reqProposalList.get(negotiatedProposalNum - 1); if (!respProposal.isNegotiatedFrom(reqProposal)) { throw new NoValidProposalChosenException("Invalid negotiated proposal."); } return respProposal.saProposal; }
Source:
<code>public static Command createCommand(Message message, CommandContext context) { checkNotNull(message); checkNotNull(context); final Any packed = AnyPacker.pack(message); <START> final Command.Builder request = Command.newBuilder() <END> .setMessage(packed) .setContext(context); return request.build(); }</code><technical_language>do call this variable request? create commands a reaction other commands (e.g. in CommandRouter), we? In this case, this a request, a unit of internal communication of system</technical_language>

Target:
public static Command createCommand(Message message, CommandContext context) { checkNotNull(message); checkNotNull(context); final Any packed = AnyPacker.pack(message); final Command.Builder result = Command.newBuilder() .setMessage(packed) .setContext(context); return result.build(); }
Source:
<code>private void assertRegionVersionVectorsConsistency(int bucketId, BucketDump bucketDump1, BucketDump bucketDump2) { <START> RegionVersionVector rvv1 = bucketDump1.getRvv(); RegionVersionVector rvv2 = bucketDump2.getRvv(); <END> if (rvv1 == null) { assertThat(rvv2) .as("Bucket " + bucketId + " has an RVV on member " + bucketDump2.getMember() + ", but does not on member " + bucketDump1.getMember()) .isNull(); } if (rvv2 == null) { assertThat(rvv1) .as("Bucket " + bucketId + " has an RVV on member " + bucketDump1.getMember() + ", but does not on member " + bucketDump2.getMember()) .isNull(); } assertThat(rvv1).isNotNull(); assertThat(rvv2).isNotNull(); Map<VersionSource, RegionVersionHolder> rvv2Members = new HashMap<VersionSource, RegionVersionHolder>(rvv1.getMemberToVersion()); Map<VersionSource, RegionVersionHolder> rvv1Members = new HashMap<VersionSource, RegionVersionHolder>(rvv1.getMemberToVersion()); for (Map.Entry<VersionSource, RegionVersionHolder> entry : rvv1Members.entrySet()) { VersionSource memberId = entry.getKey(); RegionVersionHolder versionHolder1 = entry.getValue(); RegionVersionHolder versionHolder2 = rvv2Members.remove(memberId); assertThat(versionHolder1) .as("RegionVersionVector for bucket " + bucketId + " on member " + bucketDump1.getMember() + " is not consistent with member " + bucketDump2.getMember()) .isEqualTo(versionHolder2); } }</code><technical_language>changed RegionVersionVector<?> prevent "rawtypes" warnings</technical_language>

Target:
private void assertRegionVersionVectorsConsistency(int bucketId, BucketDump bucketDump1, BucketDump bucketDump2) { RegionVersionVector<?> rvv1 = bucketDump1.getRvv(); RegionVersionVector<?> rvv2 = bucketDump2.getRvv(); if (rvv1 == null) { assertThat(rvv2) .as("Bucket " + bucketId + " has an RVV on member " + bucketDump2.getMember() + ", but does not on member " + bucketDump1.getMember()) .isNull(); } if (rvv2 == null) { assertThat(rvv1) .as("Bucket " + bucketId + " has an RVV on member " + bucketDump1.getMember() + ", but does not on member " + bucketDump2.getMember()) .isNull(); } assertThat(rvv1).isNotNull(); assertThat(rvv2).isNotNull(); Map<VersionSource<?>, RegionVersionHolder<?>> rvv2Members = new HashMap<>(rvv1.getMemberToVersion()); Map<VersionSource<?>, RegionVersionHolder<?>> rvv1Members = new HashMap<>(rvv1.getMemberToVersion()); for (Map.Entry<VersionSource<?>, RegionVersionHolder<?>> entry : rvv1Members.entrySet()) { VersionSource<?> memberId = entry.getKey(); RegionVersionHolder<?> versionHolder1 = entry.getValue(); RegionVersionHolder<?> versionHolder2 = rvv2Members.remove(memberId); assertThat(versionHolder1) .as("RegionVersionVector for bucket " + bucketId + " on member " + bucketDump1.getMember() + " is not consistent with member " + bucketDump2.getMember()) .isEqualTo(versionHolder2); } }
Source:
<code><START> public void writeBloomFilter(BloomFilter bloomFilter) { <END> currentBloomFilters.add(bloomFilter); }</code><technical_language>Currently, TestParquetFileWriter this method. If is required public I suggest package protected</technical_language>

Target:
void writeBloomFilter(BloomFilter bloomFilter) { currentBloomFilters.add(bloomFilter); }
Source:
<code>public boolean isCompileTimeConstant(ASTPrimaryExpression expressions) { List<ASTPrimarySuffix> suffix = expressions.findDescendantsOfType(ASTPrimarySuffix.class); if (!suffix.isEmpty()) { return false; } List<ASTName> nameNodes = expressions.findDescendantsOfType(ASTName.class); List<ASTLiteral> literalNodes = expressions.findDescendantsOfType(ASTLiteral.class); if (nameNodes.size() + literalNodes.size() < 2) { for (ASTName node: nameNodes) { if (cache.containsKey(node.getImage())) { return cache.get(node.getImage()); } } <START> return true; <END> } List<ASTPrimaryExpression> subExpressions = expressions.findDescendantsOfType(ASTPrimaryExpression.class); for (ASTPrimaryExpression exp: subExpressions) { if (!isCompileTimeConstant(exp)) { return false; } } return true; }</code><technical_language>this is dangerous example: java public class Outer { private static final int FOO = Inner.BAR; public static class { private static final int BAR = new Random().nextInt(); } } Inner.BAR resolved yet, default a constant, not. A step be: if a literal constant, not. some false positives, now. false positives false negative. improve symbol table a PR</technical_language>

Target:
public boolean isCompileTimeConstant(ASTPrimaryExpression expressions) { List<ASTPrimarySuffix> suffix = expressions.findDescendantsOfType(ASTPrimarySuffix.class); if (!suffix.isEmpty()) { return false; } List<ASTName> nameNodes = expressions.findDescendantsOfType(ASTName.class); List<ASTLiteral> literalNodes = expressions.findDescendantsOfType(ASTLiteral.class); if (nameNodes.size() + literalNodes.size() < 2) { for (ASTName node: nameNodes) { if (!cache.contains(node.getImage())) { return false; } } return true; } List<ASTPrimaryExpression> subExpressions = expressions.findDescendantsOfType(ASTPrimaryExpression.class); for (ASTPrimaryExpression exp: subExpressions) { if (!isCompileTimeConstant(exp)) { return false; } } return true; }
Source:
<code>public boolean equals(Object o) { if (o == null) { return false; } if (!(o instanceof ImmutablePair)) { return false; } ImmutablePair<?, ?> other = (ImmutablePair<?, ?>) o; <START> boolean fst; <END> if (first == null) { if (other.first == null) { fst = true; } else { return false; } } else if (other.first == null) { return false; } else { fst = first.equals(other.first); } boolean snd; if (second == null) { if (other.second == null) { snd = true; } else { return false; } } else if (other.second == null) { return false; } else { snd = second.equals(other.second); } return fst && snd; }</code><technical_language>consider a helper method replaces Objects.equals()</technical_language>

Target:
public boolean equals(Object o) { if (o == null) { return false; } if (!(o instanceof ImmutablePair)) { return false; } ImmutablePair<?, ?> other = (ImmutablePair<?, ?>) o; return equals(first, other.first) && equals(second, other.second); }
Source:
<code><START> public boolean equals(Object o) { <END> if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SupportedApiVersionCommand that = (SupportedApiVersionCommand) o; if (_apiVersion != null ? !_apiVersion.equals(that._apiVersion) : that._apiVersion != null) return false; return true; }</code><technical_language>This equals implementation include attributes Command super class</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SupportedApiVersionCommand)) return false; if (!super.equals(o)) return false; SupportedApiVersionCommand that = (SupportedApiVersionCommand) o; if (_apiVersion != null ? !_apiVersion.equals(that._apiVersion) : that._apiVersion != null) return false; return true; }
Source:
<code>public final void run() { logger.fine("GridTimer[" + name + "].run() called"); if (repetitions > 0) { repetitions--; } else if (repetitions == 0) { cycleRate(); } logger.fine("GridTimer[" + name + "] Executing! Current Rate: " + rateCycle[currentRate] + ":" + getRefreshRate() + " Reps: " + repetitions); execute(); <START> Configurator conf = (Configurator) TypeResolver.getInstance() <END> .resolve(Configurator.class); conf.getRefreshRate(); int interval = conf.getPollingTimerInterval(); if (interval != normalInterval) { setRefreshRate(interval); } }</code><technical_language>extract this code a separate method: private void syncRefreshRate() { Configurator conf = (Configurator) TypeResolver.getInstance().resolve(Configurator.class); conf.updateRefreshRate(); int interval = conf.getPollingTimerInterval(); if (interval != normalInterval) { setRefreshRate(interval); } }</technical_language>

Target:
public final void run() { logger.fine("GridTimer[" + name + "].run() called"); if (repetitions > 0) { repetitions--; } else if (repetitions == 0) { cycleRate(); } logger.fine("GridTimer[" + name + "] Executing! Current Rate: " + rateCycle[currentRate] + ":" + getRefreshRate() + " Reps: " + repetitions); execute(); syncRefreshRate(); }
Source:
<code>public String runTask(StressBenchConfig config, ArrayList<String> args, RunTaskContext runTaskContext) throws Exception { List<String> command = new ArrayList<>(3 + config.getArgs().size()); command.add(ServerConfiguration.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(config.getClassName()); command.addAll(config.getArgs()); command.add(BaseParameters.DISTRIBUTED_FLAG); command.add(BaseParameters.IN_PROCESS_FLAG); if (config.getArgs().stream().noneMatch((s) -> s.equals("--start-ms"))) { command.add("--start-ms"); <START> command.add(Long.toString((System.currentTimeMillis() + 5000))); <END> } command.addAll(args); LOG.info("running command: " + String.join(" ", command)); String output = ShellUtils.execCommand(command.toArray(new String[0])); return output; }</code><technical_language>Is 5000ms headroom for job scheduling enough? this configurable somehow</technical_language>

Target:
public String runTask(StressBenchConfig config, ArrayList<String> args, RunTaskContext runTaskContext) throws Exception { List<String> command = new ArrayList<>(3 + config.getArgs().size()); command.add(ServerConfiguration.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(config.getClassName()); command.addAll(config.getArgs()); command.add(BaseParameters.DISTRIBUTED_FLAG); command.add(BaseParameters.IN_PROCESS_FLAG); if (config.getArgs().stream().noneMatch((s) -> s.equals(BaseParameters.START_MS_FLAG))) { command.add(BaseParameters.START_MS_FLAG); command.add(Long.toString((System.currentTimeMillis() + 5000))); } command.addAll(args); LOG.info("running command: " + String.join(" ", command)); String output = ShellUtils.execCommand(command.toArray(new String[0])); return output; }
Source:
<code>protected String getUrlForPatchSetOrBase(final Patch.Key key, final PatchSet.Id id) throws GerritException { String leftKey; if (id == null) { <START> leftKey = encode(key.toString() + "^1"); END> } else { leftKey = getUrlForPatchSet(key, id); } return leftKey; }</code><technical_language>for clarity, this a method (getUrlForBase)</technical_language>

Target:
protected String getUrlForPatchSetOrBase(final Patch.Key key, final PatchSet.Id id) throws GerritException { if (id == null) { return getUrlForBase(key); } else { return getUrlForPatchSet(key, id); } }
Source:
<code>private int readAllNulls(int[] positions, int positionCount) throws IOException { presentStream.skip(positions[positionCount - 1]); if (nullsAllowed) { if (nullsFilter != null) { for (int i = 0; i < positionCount; i++) { if (nullsFilter.testNull()) { outputPositionCount++; } else { outputPositionCount -= nullsFilter.getPrecedingPositionsToFail(); i += nullsFilter.getSucceedingPositionsToFail(); } } } else { outputPositionCount = positionCount; outputPositions = positions; <START> } <END> } else { outputPositionCount = 0; } if (listFilter != null) { listFilter.populateElementFilters(0, null, null, 0); } allNulls = true; return positions[positionCount - 1] + 1; }</code><technical_language>@bhhari problem? getReadPositions returned junk? If so, if branch populate outputPositions? Also, outputPositions = positions needs outputPositionsReadOnly = true;</technical_language>

Target:
private int readAllNulls(int[] positions, int positionCount) throws IOException { presentStream.skip(positions[positionCount - 1]); if (nullsAllowed) { if (nullsFilter != null) { outputPositionCount = 0; for (int i = 0; i < positionCount; i++) { if (nullsFilter.testNull()) { outputPositions[outputPositionCount] = positions[i]; outputPositionCount++; } else { outputPositionCount -= nullsFilter.getPrecedingPositionsToFail(); i += nullsFilter.getSucceedingPositionsToFail(); } } } else { outputPositionCount = positionCount; outputPositions = positions; outputPositionsReadOnly = true; } } else { outputPositionCount = 0; } if (listFilter != null) { listFilter.populateElementFilters(0, null, null, 0); } allNulls = true; return positions[positionCount - 1] + 1; }
Source:
<code>public void writeTo(IndentingWriter writer, MavenBuild build) { MavenBuildSettings settings = build.getSettings(); <START> MavenDistributionManagement distributionManagement = build.getDistributionManagement(); <END> writeProject(writer, () -> { writeParent(writer, build); writeProjectCoordinates(writer, settings); writePackaging(writer, settings); writeProjectName(writer, settings); writeProperties(writer, build.properties()); writeDependencies(writer, build); writeDependencyManagement(writer, build); writeBuild(writer, build); writeRepositories(writer, build); writeDistributionManagement(writer, distributionManagement); }); }</code><technical_language>I need initialize this right? do in method it</technical_language>

Target:
public void writeTo(IndentingWriter writer, MavenBuild build) { MavenBuildSettings settings = build.getSettings(); writeProject(writer, () -> { writeParent(writer, build); writeProjectCoordinates(writer, settings); writePackaging(writer, settings); writeProjectName(writer, settings); writeProperties(writer, build.properties()); writeDependencies(writer, build); writeDependencyManagement(writer, build); writeBuild(writer, build); writeRepositories(writer, build); writeDistributionManagement(writer, build); }); }
Source:
<code><START> private void setMessageHeaders(Message msg, Map<Header, Object> headers) throws ProducerException { <END> if (msg != null && headers != null) { for (Map.Entry<Header, Object> header : headers.entrySet()) { Method method; try { method = msg.getClass().getMethod("set" + header.getKey().getJmsMessage() , String.class); method.invoke(msg, header.getValue()); } catch (Exception e) { throw new ProducerException("Failed to set message header", e); } } } }</code><technical_language>This changed ActiveMQHeaders settters</technical_language>

Target:
private void setMessageHeaders(Message msg, Map<Header, Object> headers) throws ProducerException { if (msg != null && headers != null) { headers.entrySet().stream().filter(entry -> entry.getValue() != null) .forEach(entry -> { if(ActiveMQHeaders.getFunctions().get(entry.getKey()).get((ActiveMQMessage)msg) == null) { ActiveMQHeaders.getFunctions().get(entry.getKey()).set((ActiveMQMessage)msg,entry.getValue()); } }); } }
Source:
<code>public BudgetGoal() { <START> super(); <END> }</code><technical_language>This line necessary</technical_language>

Target:
public BudgetGoal() { }
Source:
<code>public void startRemain() { if (outputEmitter != null) { result = scheduler.scheduleAtFixedRate(new Runnable() { public void run() { <START> outputEmitter.emitWatermark(new MistWatermarkEvent(System.currentTimeMillis() - expectedDelay)); <END> } }, period, period, timeUnit); } else { throw new RuntimeException("OutputEmitter should be set in " + SourceImpl.class.getName()); } }</code><technical_language>need synchronise System.currentTimeMillis()</technical_language>

Target:
protected void startRemain() { result = scheduler.scheduleAtFixedRate(new Runnable() { public void run() { outputEmitter.emitWatermark(new MistWatermarkEvent(getCurrentTimestamp() - expectedDelay)); } }, period, period, timeUnit); }
Source:
<code><START> public void testBeanMetaDataClassNormalizerNoNormalizer() { <END> Set<ConstraintViolation<Bean>> violations = getValidator().validate( new BeanProxy() ); assertNoViolations( violations ); Set<Class<?>> beanMetaDataToInitialize = new HashSet<>(); beanMetaDataToInitialize.add( Bean.class ); ValidatorFactory validatorFactory = Validation.byProvider( PredefinedScopeHibernateValidator.class ) .configure() .initializeBeanMetaData( beanMetaDataToInitialize ) .initializeLocales( Collections.singleton( Locale.getDefault() ) ) .buildValidatorFactory(); violations = validatorFactory.getValidator().validate( new BeanProxy() ); assertNoViolations( violations ); }</code><technical_language>want test PredefinedScopeConfigurationImpl#initializeLocales() works correctly</technical_language>

Target:
public void testBeanMetaDataClassNormalizerNoNormalizer() { Set<ConstraintViolation<Bean>> violations = getValidator().validate( new BeanProxy() ); assertNoViolations( violations ); Set<Class<?>> beanMetaDataToInitialize = new HashSet<>(); beanMetaDataToInitialize.add( Bean.class ); ValidatorFactory validatorFactory = Validation.byProvider( PredefinedScopeHibernateValidator.class ) .configure() .initializeBeanMetaData( beanMetaDataToInitialize ) .locales( Collections.singleton( Locale.getDefault() ) ) .buildValidatorFactory(); violations = validatorFactory.getValidator().validate( new BeanProxy() ); assertNoViolations( violations ); }
Source:
<code>protected boolean canTakeDamage(EntityDamageEvent.DamageCause damageCause) { <START> return gameMode == GameMode.SURVIVAL || gameMode == GameMode.ADVENTURE && super.canTakeDamage(damageCause); <END> }</code><technical_language>This evaluate incorrectly</technical_language>

Target:
protected boolean canTakeDamage(EntityDamageEvent.DamageCause damageCause) { return (gameMode == GameMode.SURVIVAL || gameMode == GameMode.ADVENTURE) && super.canTakeDamage(damageCause); }
Source:
<code>protected Object applyEntryValueToMap(Entry value, Map target) { Object k = value.getKey(); if (acceptsSubkeyStronglyTyped(k)) { } else if (k instanceof ConfigKey<?>) { k = subKey( ((ConfigKey<?>)k).getName() ); } else if (k instanceof String) { k = subKey((String)k); } else { if (k instanceof Supplier) { Object mapAtRoot = target.get(this); if (mapAtRoot==null) { mapAtRoot = new LinkedHashMap(); target.put(this, mapAtRoot); } if (mapAtRoot instanceof Map) { <START> synchronized (mapAtRoot) { <END> return ((Map)mapAtRoot).put(k, value.getValue()); } } } log.warn("Unexpected subkey "+k+" being inserted into "+this+"; ignoring"); k = null; } if (k!=null) return target.put(k, value.getValue()); else return null; }</code><technical_language>convinced synchronize this map, knowing it. feels dangerous ad hoc. rely map's put method synchronized if map needs synchronized. do expect this map (returned target.get(this)) be</technical_language>

Target:
protected Object applyEntryValueToMap(Entry value, Map target) { Object k = value.getKey(); if (acceptsSubkeyStronglyTyped(k)) { } else if (k instanceof ConfigKey<?>) { k = subKey( ((ConfigKey<?>)k).getName() ); } else if (k instanceof String) { k = subKey((String)k); } else { if (k instanceof Supplier) { Object mapAtRoot = target.get(this); if (mapAtRoot==null) { mapAtRoot = new LinkedHashMap(); target.put(this, mapAtRoot); } if (mapAtRoot instanceof Map) { if (mapAtRoot instanceof ConcurrentMap) { return ((Map)mapAtRoot).put(k, value.getValue()); } else { synchronized (mapAtRoot) { return ((Map)mapAtRoot).put(k, value.getValue()); } } } } log.warn("Unexpected subkey "+k+" being inserted into "+this+"; ignoring"); k = null; } if (k!=null) return target.put(k, value.getValue()); else return null; }
Source:
<code>protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable tvp1 = args[0]; ObjectPointable op; if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) { <START> pointables = new ArrayList<>(); <END> TaggedValuePointable temptvp = ppool.takeOne(TaggedValuePointable.class); try { tvp1.getValue(sp1); int size1 = sp1.getEntryCount(); int size2; for (int i = 0; i < size1; i++) { sp1.getEntry(i, temptvp); if (temptvp.getTag() == ValueTag.OBJECT_TAG) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); temptvp.getValue(op); op.getKeys(temptvp); temptvp.getValue(sp2); size2 = sp2.getEntryCount(); for (int j = 0; j < size2; j++) { TaggedValuePointable tvp = (TaggedValuePointable) TaggedValuePointable.FACTORY .createPointable(); sp2.getEntry(j, tvp); pointables.add(tvp); } } } removeDuplicates(pointables); abvs.reset(); sb.reset(abvs); for (TaggedValuePointable tvp : pointables) { sb.addItem(tvp); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(temptvp); } } else if (tvp1.getTag() == ValueTag.OBJECT_TAG) { try { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); tvp1.getValue(op); op.getKeys(result); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } } else { XDMConstants.setEmptySequence(result); } }</code><technical_language>Partially correct. move instantiation of array evaluate. pointables.clear() evaluate</technical_language>

Target:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable tvp1 = args[0]; ObjectPointable op; pointables.clear(); if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) { TaggedValuePointable temptvp = ppool.takeOne(TaggedValuePointable.class); try { tvp1.getValue(sp1); int size1 = sp1.getEntryCount(); int size2; for (int i = 0; i < size1; i++) { sp1.getEntry(i, temptvp); if (temptvp.getTag() == ValueTag.OBJECT_TAG) { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); temptvp.getValue(op); op.getKeys(temptvp); temptvp.getValue(sp2); size2 = sp2.getEntryCount(); for (int j = 0; j < size2; j++) { TaggedValuePointable tvp = (TaggedValuePointable) TaggedValuePointable.FACTORY .createPointable(); sp2.getEntry(j, tvp); pointables.add(tvp); } } } removeDuplicates(pointables); abvs.reset(); sb.reset(abvs); for (TaggedValuePointable tvp : pointables) { sb.addItem(tvp); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { ppool.giveBack(temptvp); } } else if (tvp1.getTag() == ValueTag.OBJECT_TAG) { try { op = (ObjectPointable) ObjectPointable.FACTORY.createPointable(); tvp1.getValue(op); op.getKeys(result); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } } else { XDMConstants.setEmptySequence(result); } }
Source:
<code>public void onStop() { if (mRequireRestart) { if (mApi != null && <START> mSyncthingService.getCurrentState() != SyncthingService.State.DISABLED) { <END> mApi.restart(); mRequireRestart = false; } } super.onStop(); }</code><technical_language>checking for mSyncthingService null here</technical_language>

Target:
public void onStop() { if (mRequireRestart) { if (mSyncthingService != null && mApi != null && mSyncthingService.getCurrentState() != SyncthingService.State.DISABLED) { mApi.restart(); mRequireRestart = false; } } super.onStop(); }
Source:
<code>public static Credential authorize() { try { GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( HTTP_TRANSPORT, JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPES) <START> .setDataStoreFactory(DATA_STORE_FACTORY) <END> .setAccessType("offline") .build(); Credential credential = new AuthorizationCodeInstalledApp( flow, new LocalServerReceiver()).authorize("ganttuser"); System.out.println( "Credentials saved to " + DATA_STORE_DIR.getAbsolutePath()); return credential; } catch (IOException e) { e.printStackTrace(); return null; } }</code><technical_language>I need offline access (Calendar export is a quick one-off operation) need store credentials. I remove lines DATA_STORE_FACTORY' well</technical_language>

Target:
public Credential authorize() throws GeneralSecurityException, IOException { HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( httpTransport, JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPES) .build(); return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("ganttuser"); }
Source:
<code>public Response add(Event event) { <START> validateParameters(event, "origin", "severity", "eventFloodInSec", "description"); <END> AuditLog entity = map(event); return performCreation(VdcActionType.AddExternalEvent, new AddExternalEventParameters(entity), new QueryIdResolver<Long>(VdcQueryType.GetAuditLogById, GetAuditLogByIdParameters.class)); }</code><technical_language>need force user pass "origin" (unless missing something), define custom events added. - really? 'description' is mandatory</technical_language>

Target:
public Response add(Event event) { validateParameters(event, "origin", "severity", "customId", "description"); return performCreation(VdcActionType.AddExternalEvent, new AddExternalEventParameters(map(event)), new QueryIdResolver<Long>(VdcQueryType.GetAuditLogById, GetAuditLogByIdParameters.class)); }
Source:
<code>public void deleteQuestion(@Load Question question) { if (!environment.supports("deletable.questions")) { result.notFound(); return; } if (!currentUser.isModerator() && !question.hasAuthor(currentUser.getCurrent())) { result.use(http()).sendError(403); return; <START> } <END> I18nMessage errorMessage = messageFactory.build("error", "question.errors.deletion"); if (!question.isDeletable()) { result.use(http()) .body(errorMessage.getMessage()) .setStatusCode(400); return; } questions.delete(question); result.nothing(); }</code><technical_language>@CustomBrutauthRules({ModeratorOnlyRule.class})</technical_language>

Target:
public void deleteQuestion(@Load Question question) { if (!environment.supports("deletable.questions")) { result.notFound(); return; } if (!currentUser.isModerator() && !question.hasAuthor(currentUser.getCurrent())) { result.use(http()).sendError(403); return; } I18nMessage errorMessage = messageFactory.build("error", "question.errors.deletion"); if (!question.isDeletable()) { result.use(http()) .body(errorMessage.getMessage()) .setStatusCode(400); return; } result.include("mamuteMessages", asList(messageFactory.build("confirmation", "question.delete.confirmation"))); questions.delete(question); result.redirectTo(ListController.class).home(null); }
Source:
<code>public void render(AbstractScreen screen) { if((justDroppedTicks-- > 0 || isHighlight()) && MojamComponent.localTeam==team) { drawRadius(screen); } super.render(screen); AbstractBitmap image = getSprite(); if (capacity - money < 500) { screen.colorBlit(image, pos.x - image.getWidth() / 2, pos.y - image.getHeight() / 2 - yOffs, 0x77ff7200); } <START> if( team == MojamComponent.localTeam ) { <END> addMoneyBar(screen); } }</code><technical_language>is easy fix, fix check if carried raildroid player.</technical_language>

Target:
public void render(AbstractScreen screen) { if((justDroppedTicks-- > 0 || isHighlight()) && MojamComponent.localTeam==team) { drawRadius(screen); } super.render(screen); AbstractBitmap image = getSprite(); if (capacity - money < 500) { screen.colorBlit(image, pos.x - image.getWidth() / 2, pos.y - image.getHeight() / 2 - yOffs, 0x77ff7200); } if( team == MojamComponent.localTeam && !(isCarried() && this.carriedBy instanceof Player)) { addMoneyBar(screen); } }
Source:
<code>private Intent getPlayLastPlayedMediaIntent() { Log.d(TAG, "Trying to restore last played media"); Playable media = PlayableUtils.createInstanceFromPreferences(activity); <START> if (media != null) { <END> Intent serviceIntent = new Intent(activity, PlaybackService.class); serviceIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, media); serviceIntent.putExtra(PlaybackService.EXTRA_START_WHEN_PREPARED, false); serviceIntent.putExtra(PlaybackService.EXTRA_PREPARE_IMMEDIATELY, true); boolean fileExists = media.localFileAvailable(); boolean lastIsStream = PlaybackPreferences.getCurrentEpisodeIsStream(); if (!fileExists && !lastIsStream && media instanceof FeedMedia) { DBTasks.notifyMissingFeedMediaFile(activity, (FeedMedia) media); } serviceIntent.putExtra(PlaybackService.EXTRA_SHOULD_STREAM, lastIsStream || !fileExists); return serviceIntent; } Log.d(TAG, "No last played media found"); return null; }</code><technical_language>invert</technical_language>

Target:
@Nullable private Intent getPlayLastPlayedMediaIntent() { Log.d(TAG, "Trying to restore last played media"); Playable media = PlayableUtils.createInstanceFromPreferences(activity); if (media == null) { Log.d(TAG, "No last played media found"); return null; } boolean fileExists = media.localFileAvailable(); boolean lastIsStream = PlaybackPreferences.getCurrentEpisodeIsStream(); if (!fileExists && !lastIsStream && media instanceof FeedMedia) { DBTasks.notifyMissingFeedMediaFile(activity, (FeedMedia) media); } return new PlaybackServiceStarter(activity, media) .startWhenPrepared(false) .shouldStream(lastIsStream || !fileExists) .getIntent(); }
Source:
<code>public List<INetworkNodeInfo> getNetworkNodes(List<String> statementIds) throws QuadrigaStorageException{ List<INetworkNodeInfo> networkNodeList = null; List<NetworkStatementsDTO> networkStatementsDTOList = dbconnect.getNetworkNodes(statementIds); if (networkStatementsDTOList != null) { networkNodeList = new ArrayList<INetworkNodeInfo>(); INetworkNodeInfo networkNodeInfo = null; for (NetworkStatementsDTO networkStatementsDTO : networkStatementsDTOList) { networkNodeInfo = networkNodeInfoFactory.createNetworkNodeInfoObject(); networkNodeInfo.setId(networkStatementsDTO.getStatementid()); networkNodeInfo.setStatementType(networkStatementsDTO.getStatementtype()); networkNodeInfo.setVersion(networkStatementsDTO.getVersion()); networkNodeInfo.setIsTop(networkStatementsDTO.getIstop()); <START> networkNodeList.add(networkNodeInfo); <END> } } return networkNodeList; }</code><technical_language>this is duplicate code extracted a method</technical_language>

Target:
public List<INetworkNodeInfo> getNetworkNodes(List<String> statementIds) throws QuadrigaStorageException{ return getNetworkNodeInfoList(dbconnect.getNetworkNodes(statementIds)); }
Source:
<code>public void checkAllPreferences() { preferencesDialog.open(); preferencesDialog.select(mavenPreferencePage); <START> assertTrue(mavenPreferencePage.getGroupId().equals("Warning")); <END> assertTrue(mavenPreferencePage.getVersion().equals("Warning")); assertTrue(mavenPreferencePage.getProjectConfig().equals("Error")); assertTrue(mavenPreferencePage.getPluginExecution().equals("Error")); assertTrue(mavenPreferencePage.getManagedVersion().equals("Warning")); mavenPreferencePage.setGroupId("Ignore"); mavenPreferencePage.setVersion("Ignore"); mavenPreferencePage.setProjectConfig("Ignore"); mavenPreferencePage.setPluginExecution("Ignore"); mavenPreferencePage.setManagedVersion("Ignore"); assertTrue(mavenPreferencePage.getGroupId().equals("Ignore")); assertTrue(mavenPreferencePage.getVersion().equals("Ignore")); assertTrue(mavenPreferencePage.getProjectConfig().equals("Ignore")); assertTrue(mavenPreferencePage.getPluginExecution().equals("Ignore")); assertTrue(mavenPreferencePage.getManagedVersion().equals("Ignore")); mavenPreferencePage.restoreDefaults(); assertTrue(mavenPreferencePage.getGroupId().equals("Warning")); assertTrue(mavenPreferencePage.getVersion().equals("Warning")); assertTrue(mavenPreferencePage.getProjectConfig().equals("Error")); assertTrue(mavenPreferencePage.getPluginExecution().equals("Error")); assertTrue(mavenPreferencePage.getManagedVersion().equals("Warning")); preferencesDialog.cancel(); }</code><technical_language>asserting default values sense. If Eclipse decide change later, fail this place is a bug in code, tests robust enough. Instead of it, I obtain default values try change a assert change done</technical_language>

Target:
public void checkAllPreferences() { preferencesDialog.open(); preferencesDialog.select(mavenPreferencePage); mavenPreferencePage.setGroupId(MavenErrorSeverity.IGNORE); mavenPreferencePage.setVersion(MavenErrorSeverity.IGNORE); mavenPreferencePage.setProjectConfig(MavenErrorSeverity.IGNORE); mavenPreferencePage.setPluginExecution(MavenErrorSeverity.IGNORE); mavenPreferencePage.setManagedVersion(MavenErrorSeverity.IGNORE); assertTrue(mavenPreferencePage.getGroupId().equals(MavenErrorSeverity.IGNORE.getValue())); assertTrue(mavenPreferencePage.getVersion().equals(MavenErrorSeverity.IGNORE.getValue())); assertTrue(mavenPreferencePage.getProjectConfig().equals(MavenErrorSeverity.IGNORE.getValue())); assertTrue(mavenPreferencePage.getPluginExecution().equals(MavenErrorSeverity.IGNORE.getValue())); assertTrue(mavenPreferencePage.getManagedVersion().equals(MavenErrorSeverity.IGNORE.getValue())); preferencesDialog.cancel(); }
Source:
<code>public IgniteMergeJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType) { <START> super(cluster, traitSet, left, right, condition, variablesSet, joinType); <END> }</code><technical_language>do deprecated constructor here</technical_language>

Target:
public IgniteMergeJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType) { super(cluster, traitSet, ImmutableList.of(), left, right, condition, variablesSet, joinType); }
Source:
<code>public void test_load() throws Exception { int[] loadRefOpcodes = new int[] {Opcodes.ILOAD, Opcodes.LLOAD, Opcodes.FLOAD, Opcodes.DLOAD, Opcodes.ALOAD}; for (int loadRefOpcode : loadRefOpcodes) { SymbolicValue loadRef = new SymbolicValue(); ProgramState programState = execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE.put(0, loadRef)); assertThat(programState.peekValue()).isEqualTo(loadRef); try { <START> programState = execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE); <END> fail("No sv indexed should not generate a program state for "); } catch (NullPointerException npe) { assertThat(npe).hasMessage("Loading a symbolic value unindexed"); } } }</code><technical_language>bit nicer assertThatThrownBy</technical_language>

Target:
public void test_load() throws Exception { int[] loadRefOpcodes = new int[] {Opcodes.ILOAD, Opcodes.LLOAD, Opcodes.FLOAD, Opcodes.DLOAD, Opcodes.ALOAD}; for (int loadRefOpcode : loadRefOpcodes) { SymbolicValue loadRef = new SymbolicValue(); ProgramState programState = execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE.put(0, loadRef)); assertThat(programState.peekValue()).isEqualTo(loadRef); assertThatThrownBy(() -> execute(new Instruction(loadRefOpcode, 0), ProgramState.EMPTY_STATE)).hasMessage("Loading a symbolic value unindexed"); } }
Source:
<code>public S getSchemaByID(String topic, String id) { CachedSchemaTuple cacheKey = new CachedSchemaTuple(topic, id); S schema = cachedById.get(cacheKey); if (schema == null) { synchronized (this) { if (shouldFetchFromSchemaRegistry(id)) { <START> schema = fetchFromSchemaRegistry(topic, id); <END> } else { throw new SchemaNotFoundException(); } } } return schema; }</code><technical_language>'schema' need put cachedById cache</technical_language>

Target:
public S getSchemaByID(String topic, String id) { CachedSchemaTuple cacheKey = new CachedSchemaTuple(topic, id); S schema = cachedById.get(cacheKey); if (schema == null) { synchronized (this) { if (shouldFetchFromSchemaRegistry(id)) { schema = fetchFromSchemaRegistry(topic, id); cachedById.putIfAbsent(new CachedSchemaTuple(topic, id), schema); } else { throw new SchemaNotFoundException(); } } } return schema; }
Source:
<code>public String getRoomCapacity(String displayName) { <START> UI.doubleClick(driver.findElement(By.xpath(" END> return roomCapacityTxtBox.getAttribute("value"); }</code><technical_language>please apply java conventions (spaces +) total amount of characters line</technical_language>

Target:
public String getRoomCapacity(String displayName) { UI.doubleClick(driver.findElement(By.xpath(" + displayName + "')and@class='ng-binding']"))); return roomCapacityTxtBox.getAttribute("value"); }
Source:
<code>public void testValidate() { Message m = new StatsMessage(); Assert.assertFalse(MessageTest.assertValid(m)); m.setText("text"); Assert.assertFalse(MessageTest.assertValid(m)); m.setText("get"); Assert.assertTrue(MessageTest.assertValid(m)); m.setText("clean"); Assert.assertTrue(MessageTest.assertValid(m)); m.setText("reload"); Assert.assertTrue(MessageTest.assertValid(m)); m.setClassName(null); Assert.assertTrue(MessageTest.assertValid(m)); Assert.assertNull(m.getClassName()); m.setTags(new TreeSet<>()); Assert.assertTrue(MessageTest.assertValid(m)); <START> assertEquals(new TreeSet<>(), m.getTags()); <END> }</code><technical_language>I dont this in of tests Assert.assert ... change Idea settings redo test style way</technical_language>

Target:
public void testValidate() { Message m = new StatsMessage(); assertFalse(MessageTest.assertValid(m)); m.setText("text"); assertFalse(MessageTest.assertValid(m)); m.setText("get"); assertTrue(MessageTest.assertValid(m)); m.setText("clean"); assertTrue(MessageTest.assertValid(m)); m.setText("reload"); assertTrue(MessageTest.assertValid(m)); m.setClassName(null); assertTrue(MessageTest.assertValid(m)); assertNull(m.getClassName()); m.setTags(new TreeSet<>()); assertTrue(MessageTest.assertValid(m)); assertEquals(new TreeSet<>(), m.getTags()); }
Source:
<code>public TypeManagementPreferencePage() { super(GRID); setPreferenceStore(Activator.getDefault().getPreferenceStore()); <START> setDescription("Type Managament Preferences Page"); <END> }</code><technical_language>translateable stings externalized</technical_language>

Target:
public TypeManagementPreferencePage() { super(GRID); setPreferenceStore(Activator.getDefault().getPreferenceStore()); setDescription(Messages.typeManagementPreferencePageTitle); }
Source:
<code><START> public Template createStringTemplate(String content, DocumentReference author) <END> { DefaultTemplate newTemplate = new DefaultTemplate(null); newTemplate.content.setAuthorReference(author); newTemplate.content.content = content; return newTemplate; }</code><technical_language>Missing @ since</technical_language>

Target:
public Template createStringTemplate(String content, DocumentReference author) throws Exception { return new StringTemplate(content, author); }
Source:
<code>public static Object countersToJson(Counters counters) { Map<String, Object> jsonObj = new HashMap<String, Object>(); <START> if(counters==null) <END> return jsonObj; Collection<String> counterGroups = counters.getGroupNames(); for (String groupName : counterGroups) { Map<String, String> counterStats = new HashMap<String, String>(); Group group = counters.getGroup(groupName); Iterator<Counters.Counter> it = group.iterator(); while (it.hasNext()) { Counter counter = it.next(); counterStats.put(counter.getDisplayName(), String.valueOf(counter.getCounter())); } jsonObj.put(groupName, counterStats); } return jsonObj; }</code><technical_language>want add spaces "=="</technical_language>

Target:
public static Object countersToJson(Counters counters) { Map<String, Object> jsonObj = new HashMap<String, Object>(); if (counters == null) { return jsonObj; } Collection<String> counterGroups = counters.getGroupNames(); for (String groupName : counterGroups) { Map<String, String> counterStats = new HashMap<String, String>(); Group group = counters.getGroup(groupName); Iterator<Counters.Counter> it = group.iterator(); while (it.hasNext()) { Counter counter = it.next(); counterStats.put(counter.getDisplayName(), String.valueOf(counter.getCounter())); } jsonObj.put(groupName, counterStats); } return jsonObj; }
Source:
<code>protected ActionResult execute() { GateKeeper.inst().verifyAdminPrivileges(account); data = new AdminEmailComposePageData(account); BlobInfo blobInfo = extractImageKey(Const.ParamsNames.ADMIN_EMAIL_IMAGE_TO_UPLOAD); if (blobInfo == null) { data.isFileUploaded = false; data.fileSrcUrl = null; log.warning("Image Upload Failed"); statusToAdmin = "Image Upload Failed"; return createAjaxResult(data); } BlobKey blobKey = blobInfo.getBlobKey(); AppUrl fileSrcUrl = Config.getAppUrl(Const.ActionURIs.PUBLIC_IMAGE_SERVE) .withParam("blob-key", blobKey.getKeyString()); String absoluteFileSrcUrl = fileSrcUrl.toAbsoluteString(); data.fileSrcUrl = fileSrcUrl.toString(); log.info("New Image Uploaded : " + absoluteFileSrcUrl); statusToAdmin = "New Image Uploaded : " + "<a href=" + data.fileSrcUrl + " target=\"_blank\">" <START> + absoluteFileSrcUrl + "</a>"; <END> data.ajaxStatus = "Image Successfully Uploaded to Google Cloud Storage"; return createAjaxResult(data); }</code><technical_language>Is this operation removed correct do</technical_language>

Target:
protected ActionResult execute() { GateKeeper.inst().verifyAdminPrivileges(account); FileUploadPageData uploadPageData = prepareData(); AdminEmailComposePageData data = new AdminEmailComposePageData(account); data.isFileUploaded = uploadPageData.isFileUploaded; data.fileSrcUrl = uploadPageData.fileSrcUrl; data.ajaxStatus = uploadPageData.ajaxStatus; return createAjaxResult(data); }
Source:
<code><START> public List<Map<String, String>> query(String queryStr) { <END> return null; }</code><technical_language>I is return empty collection Collections.emptyList() more null-safe</technical_language>

Target:
public List<Map<String, String>> query(String queryStr) { return Collections.emptyList(); }