auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public TelephonePaymentResponse create(CreateTelephonePaymentRequest createTelephonePaymentRequest){ Supplemental supplemental = createTelephonePaymentRequest.getPaymentOutcome().getSupplemental() .map(s -> new Supplemental( s.getErrorCode(), s.getErrorMessage() )).orElse(null); PaymentOutcome paymentOutcome = new PaymentOutcome( createTelephonePaymentRequest.getPaymentOutcome().getStatus(), createTelephonePaymentRequest.getPaymentOutcome().getCode(), supplemental ); <START> <END> State state = new State( "Success", true, "Hello, world!", "P0010" ); TelephonePaymentResponse telephonePaymentResponse = new TelephonePaymentResponse( createTelephonePaymentRequest.getAmount(), createTelephonePaymentRequest.getReference(), createTelephonePaymentRequest.getDescription(), createTelephonePaymentRequest.getCreatedDate(), createTelephonePaymentRequest.getAuthorisedDate(), createTelephonePaymentRequest.getProcessorId(), createTelephonePaymentRequest.getProviderId(), createTelephonePaymentRequest.getAuthCode(), paymentOutcome, createTelephonePaymentRequest.getCardType(), createTelephonePaymentRequest.getNameOnCard(), createTelephonePaymentRequest.getEmailAddress(), createTelephonePaymentRequest.getCardExpiry(), createTelephonePaymentRequest.getLastFourDigits(), createTelephonePaymentRequest.getFirstSixDigits(), createTelephonePaymentRequest.getTelephoneNumber(), "DUMMY API - RECORD NOT PERSISTED", state ); return telephonePaymentResponse; }</code><technical_language>of purpose of lines - basically cloning incoming payment outcome,</technical_language>

Target:
public TelephonePaymentResponse create(CreateTelephonePaymentRequest createTelephonePaymentRequest){ State state = new State( "success", true, "Created", "P0010" ); return new TelephonePaymentResponse( createTelephonePaymentRequest.getAmount(), createTelephonePaymentRequest.getReference(), createTelephonePaymentRequest.getDescription(), createTelephonePaymentRequest.getCreatedDate(), createTelephonePaymentRequest.getAuthorisedDate(), createTelephonePaymentRequest.getProcessorId(), createTelephonePaymentRequest.getProviderId(), createTelephonePaymentRequest.getAuthCode(), createTelephonePaymentRequest.getPaymentOutcome(), createTelephonePaymentRequest.getCardType(), createTelephonePaymentRequest.getNameOnCard(), createTelephonePaymentRequest.getEmailAddress(), createTelephonePaymentRequest.getCardExpiry(), createTelephonePaymentRequest.getLastFourDigits(), createTelephonePaymentRequest.getFirstSixDigits(), createTelephonePaymentRequest.getTelephoneNumber(), "DUMMY API - RECORD NOT PERSISTED", state ); }
Source:
<code>public void testGetPercentage() { assertEquals(99,Ratio.create(249,250).getPercentage()); <START> } <END></code><technical_language>a couple more unit tests - 99 100 good. I need verify printed string</technical_language>

Target:
public void testGetPercentage() { assertEquals(98, Ratio.create(246, 250).getPercentage()); assertEquals(99, Ratio.create(247, 250).getPercentage()); assertEquals(99, Ratio.create(248, 250).getPercentage()); assertEquals(99, Ratio.create(249, 250).getPercentage()); assertEquals(100, Ratio.create(250, 250).getPercentage()); }
Source:
<code>private void init() { <START> hostedEngineVm = dbFacade.getVmDao().get(dbFacade.getVmStaticDao().getAllByName("HostedEngine").get(0).getId()); <END> VmHandler.updateDisksFromDb(hostedEngineVm); sd = dbFacade.getStorageDomainStaticDao() .getByName(Config.<String>getValue(ConfigValues.HostedEngineStorageDomainName)); sdConnection = dbFacade.getStorageServerConnectionDao() .getAllForDomain(getStorageDomainStatic().getId()) .get(0); }</code><technical_language>chance vm named "HostedEngine" in this flow</technical_language>

Target:
private void init() { VmStatic vmStatic = dbFacade.getVmStaticDao().getAllByName( Config.<String>getValue(ConfigValues.HostedEngineVmName)).get(0); if (vmStatic != null) { hostedEngineVm = dbFacade.getVmDao().get(vmStatic.getId()); VmHandler.updateDisksFromDb(hostedEngineVm); sd = dbFacade.getStorageDomainStaticDao().getByName( Config.<String>getValue(ConfigValues.HostedEngineStorageDomainName)); if (sd != null) { sdConnection = dbFacade.getStorageServerConnectionDao() .getAllForDomain(getStorageDomainStatic().getId()).get(0); } } }
Source:
<code><START> public Set<Descriptor> getIndexDescriptors() <END> { Set<SchemaIndexProvider.Descriptor> fromProviders = new HashSet<>(); for ( IndexProxy indexProxy : indexMapRef.getAllIndexProxies() ) { Descriptor providerDescriptor = indexProxy.getProviderDescriptor(); fromProviders.add( providerDescriptor ); } return fromProviders; }</code><technical_language>index descriptors, schema index provider descriptors. do need schema index provider descriptors? Do want resume provider</technical_language>

Target:
public Set<IndexDescriptor> getIndexDescriptors() { Set<IndexDescriptor> indexDescriptors = new HashSet<>(); for ( IndexProxy indexProxy : indexMapRef.getAllIndexProxies() ) { indexDescriptors.add( indexProxy.getDescriptor() ); } return indexDescriptors; }
Source:
<code>private boolean matchBeanRegex(Filter filter, boolean matchIfNoRegex) { ArrayList<Pattern> beanRegexes = filter.getBeanRegexes(); if (beanRegexes.isEmpty()) { return matchIfNoRegex; } for (Pattern beanRegex : beanRegexes) { Matcher m = beanRegex.matcher(beanStringName); if(m.matches()) { for (int i = 0; i<= m.groupCount(); i++) { <START> this.beanParameters.put(""+i, m.group(i)); <END> } return true; } } return false; }</code><technical_language>This is a stylistic issue, a technical one. I love java ""+i I clear. I more clear: java Integer.toString(i)</technical_language>

Target:
private boolean matchBeanRegex(Filter filter, boolean matchIfNoRegex) { ArrayList<Pattern> beanRegexes = filter.getBeanRegexes(); if (beanRegexes.isEmpty()) { return matchIfNoRegex; } for (Pattern beanRegex : beanRegexes) { Matcher m = beanRegex.matcher(beanStringName); if(m.matches()) { for (int i = 0; i<= m.groupCount(); i++) { this.beanParameters.put(Integer.toString(i), m.group(i)); } return true; } } return false; }
Source:
<code>private Quantum getQuantumClient() { if (quantumClient == null) { quantumClient = new Quantum(getProviderDetails().getUrl()); if (getProviderDetails().isRequiringAuthentication()) { final String tenantName = getProviderDetails().getAdditionalProperties().getTenantName(); <START> final KeystoneTokenProvider keystoneTokenProvider = <END> new KeystoneTokenProvider(Config.<String> GetValue(ConfigValues.KeystoneAuthUrl), getProviderDetails().getUsername(), getProviderDetails().getPassword()); quantumClient.setTokenProvider(keystoneTokenProvider.getProviderByTenant(tenantName)); } } return quantumClient; }</code><technical_language>Check: <LINK_0></technical_language>

Target:
private Quantum getQuantumClient() { if (quantumClient == null) { quantumClient = new Quantum(getProvider().getUrl()); if (getProvider().isRequiringAuthentication()) { final String tenantName = getProvider().getAdditionalProperties().getTenantName(); final KeystoneTokenProvider keystoneTokenProvider = new KeystoneTokenProvider(Config.<String> GetValue(ConfigValues.KeystoneAuthUrl), getProvider().getUsername(), getProvider().getPassword()); quantumClient.setTokenProvider(keystoneTokenProvider.getProviderByTenant(tenantName)); } } return quantumClient; }
Source:
<code>private ActivationWithLossGpuLayer(@Parameter(LayerIndex.class) final int index, @Parameter(LayerInputShape.class) final String inputShape, @Parameter(LossFunction.class) final String lossFunction, @Parameter(ActivationFunction.class) final String activationFunction, @Parameter(NeuralNetworkConfigurationParameters.BatchSize.class) final int batchSize, final MatrixFactory matrixFactory) { <START> <END> super(index, inputShape); this.lossFunction = lossFunction; this.matrixFactory = matrixFactory; final int inputChannel; final int inputHeight; final int inputWidth; if (getInputShape().length == 2) { inputChannel = 1; inputHeight = getInputShape()[0]; inputWidth = getInputShape()[1]; } else { inputChannel = getInputShape()[0]; inputHeight = getInputShape()[1]; inputWidth = getInputShape()[2]; } if (activationFunction.toLowerCase().equals("softmax")) { this.inputDesc = JavaCudnn.createTensorDesc(batchSize, inputChannel, inputHeight, inputWidth); detectErrorPointer(inputDesc); this.activationDesc = JavaCudnn.createTensorDesc(batchSize, inputChannel, inputHeight, inputWidth); detectErrorPointer(activationDesc); } else { throw new IllegalArgumentException("Unsupported activation function"); } }</code><technical_language>Please remove blank lines</technical_language>

Target:
private ActivationWithLossGpuLayer(@Parameter(LayerIndex.class) final int index, @Parameter(LayerInputShape.class) final String inputShape, @Parameter(LossFunction.class) final String lossFunction, @Parameter(ActivationFunction.class) final String activationFunction, @Parameter(NeuralNetworkConfigurationParameters.BatchSize.class) final int batchSize, final MatrixFactory matrixFactory) { super(index, inputShape); this.lossFunction = lossFunction; this.matrixFactory = matrixFactory; final int inputChannel; final int inputHeight; final int inputWidth; if (getInputShape().length == 2) { inputChannel = 1; inputHeight = getInputShape()[0]; inputWidth = getInputShape()[1]; } else { inputChannel = getInputShape()[0]; inputHeight = getInputShape()[1]; inputWidth = getInputShape()[2]; } if (activationFunction.toLowerCase().equals("softmax")) { this.inputDesc = JavaCudnn.createTensorDesc(batchSize, inputChannel, inputHeight, inputWidth); this.activationDesc = JavaCudnn.createTensorDesc(batchSize, inputChannel, inputHeight, inputWidth); } else { throw new IllegalArgumentException("Unsupported activation function"); } }
Source:
<code>public void saveProjectProperties(final DmsProject study, final DmsProject trialDataset, final DmsProject measurementDataset, final List<MeasurementVariable> variables, final boolean isConstant) { if (variables != null) { int rank = this.getNextRank(study); final Set<Integer> geoIds = this.daoFactory.getGeolocationDao().getLocationIds(study.getProjectId()); final Geolocation geolocation = this.daoFactory.getGeolocationDao().getById(geoIds.iterator().next()); Hibernate.initialize(geolocation.getProperties()); for (final MeasurementVariable variable : variables) { <START> switch (variable.getOperation().toString()) { <END> case "DELETE": this.deleteVariable(study, trialDataset, measurementDataset, variable.getRole(), variable.getTermId(), geolocation); break; case "ADD": this.insertVariable(study, trialDataset, measurementDataset, variable, rank, isConstant, geolocation); break; case "UPDATE": this.updateVariable(study, trialDataset, measurementDataset, variable, isConstant, geolocation); break; default: break; } } } }</code><technical_language>Compare enum</technical_language>

Target:
public void saveProjectProperties(final DmsProject study, final DmsProject trialDataset, final DmsProject measurementDataset, final List<MeasurementVariable> variables, final boolean isConstant) { if (variables != null) { int rank = this.getNextRank(study); final Set<Integer> geoIds = this.daoFactory.getGeolocationDao().getLocationIds(study.getProjectId()); final Geolocation geolocation = this.daoFactory.getGeolocationDao().getById(geoIds.iterator().next()); Hibernate.initialize(geolocation.getProperties()); for (final MeasurementVariable variable : variables) { switch (variable.getOperation()) { case DELETE: this.deleteVariable(study, trialDataset, measurementDataset, variable.getRole(), variable.getTermId(), geolocation); break; case ADD: this.insertVariable(study, trialDataset, measurementDataset, variable, rank, isConstant, geolocation); rank++; break; case UPDATE: this.updateVariable(study, trialDataset, measurementDataset, variable, isConstant, geolocation); break; default: break; } } } }
Source:
<code>protected ScriptVariableContainer readAllVariables() throws DbgpException { final IDbgpContextCommands commands = thread.getDbgpSession() .getCoreCommands(); final ScriptVariableContainer result = new ScriptVariableContainer(); if (!thread.isSuspended()) { <START> needRefreshVariables = true; <END> return result; } final Map names = commands.getContextNames(getLevel()); if (thread.retrieveLocalVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.LOCAL_CONTEXT_ID))) { result.locals = readVariables(this, IDbgpContextCommands.LOCAL_CONTEXT_ID, commands); } if (thread.retrieveGlobalVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.GLOBAL_CONTEXT_ID))) { result.globals = readVariables(this, IDbgpContextCommands.GLOBAL_CONTEXT_ID, commands); } if (thread.retrieveClassVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.CLASS_CONTEXT_ID))) { result.classes = readVariables(this, IDbgpContextCommands.CLASS_CONTEXT_ID, commands); } return result; }</code><technical_language>this is called checkVariablesAvailable() variables != null -> this variable is false of finally block there. I suggest early exit checkVariablesAvailable() if suspended (e.g. return false), leaving "variables" initialized, a check in a calls checkVariablesAvailable()</technical_language>

Target:
protected ScriptVariableContainer readAllVariables() throws DbgpException { final IDbgpContextCommands commands = thread.getDbgpSession() .getCoreCommands(); final ScriptVariableContainer result = new ScriptVariableContainer(); final Map names = commands.getContextNames(getLevel()); if (thread.retrieveLocalVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.LOCAL_CONTEXT_ID))) { result.locals = readVariables(this, IDbgpContextCommands.LOCAL_CONTEXT_ID, commands); } if (thread.retrieveGlobalVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.GLOBAL_CONTEXT_ID))) { result.globals = readVariables(this, IDbgpContextCommands.GLOBAL_CONTEXT_ID, commands); } if (thread.retrieveClassVariables() && names.containsKey(Integer.valueOf( IDbgpContextCommands.CLASS_CONTEXT_ID))) { result.classes = readVariables(this, IDbgpContextCommands.CLASS_CONTEXT_ID, commands); } return result; }
Source:
<code>private void waitForInitialConfig(){ log.debug("Waiting for initial config from host"); String line = socket.readLine(); log.debug("got: " + line); <START> if(line == null) { <END> log.error("Host disconnect while waiting for initial config, BAIL OUT"); System.exit(-1); } try { JsonObject obj = parser.parse(line).getAsJsonObject(); log.debug("Got initial config from host, building model: "+obj.toString()); SevenWondersGame game = getLocalGame(); game.setCards(obj.getAsJsonArray(PROP_ROUTE_CARDS)); game.setDeck(obj.getAsJsonArray(PROP_ROUTE_DECK)); game.setWonders(obj.getAsJsonArray(PROP_ROUTE_WONDERS)); game.setPlayers(obj.getAsJsonObject(PROP_ROUTE_PLAYERS)); log.debug("Model built"); } catch(Exception e) { log.error("Exception while parsing initial config"); cleanup(); } }</code><technical_language>Why's this a check for null, isValid()</technical_language>

Target:
private void waitForInitialConfig(){ log.debug("Waiting for initial config from host"); String line = socket.readLine(); log.debug("got: " + line); if(!socket.isValid()) { log.error("Host disconnect while waiting for initial config, BAIL OUT"); System.exit(-1); } try { JsonObject obj = parser.parse(line).getAsJsonObject(); log.debug("Got initial config from host, building model: "+obj.toString()); SevenWondersGame game = getLocalGame(); game.setCards(obj.getAsJsonArray(PROP_ROUTE_CARDS)); game.setDeck(obj.getAsJsonArray(PROP_ROUTE_DECK)); game.setWonders(obj.getAsJsonArray(PROP_ROUTE_WONDERS)); game.setPlayers(obj.getAsJsonObject(PROP_ROUTE_PLAYERS)); log.debug("Model built"); } catch(Exception e) { log.error("Exception while parsing initial config"); cleanup(); } }
Source:
<code>protected void onPostExecute(String response) { <START> Log.i("Response--", response); <END> if (response != null) { try { JSONObject mainObject = new JSONObject(response); JSONObject flavoursObject = mainObject.getJSONObject("flavors"); JSONObject githubObject = flavoursObject.getJSONObject("github"); JSONObject githubStableObject = githubObject.getJSONObject("stable"); String versionName = githubStableObject.getString("version"); String versionCode = githubStableObject.getString("version_code"); String apkLocationUrl = githubStableObject.getString("apk"); compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); } catch (JSONException ex) { ex.printStackTrace(); } } }</code><technical_language>This entry find issues in future. Please add some additional information remove this log entry</technical_language>

Target:
protected void onPostExecute(String response) { if (response != null) { try { JSONObject mainObject = new JSONObject(response); JSONObject flavoursObject = mainObject.getJSONObject("flavors"); JSONObject githubObject = flavoursObject.getJSONObject("github"); JSONObject githubStableObject = githubObject.getJSONObject("stable"); String versionName = githubStableObject.getString("version"); String versionCode = githubStableObject.getString("version_code"); String apkLocationUrl = githubStableObject.getString("apk"); compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); } catch (JSONException ex) { ErrorActivity.reportError(app, ex, null, null, ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", "could not parse app update JSON data", R.string.app_ui_crash)); } } }
Source:
<code>public void addIdP(IdentityProvider identityProvider) throws IdentityProviderManagementException { try { String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); IdentityProviderManager.getInstance().addIdP(identityProvider, tenantDomain); } catch (IdentityProviderManagementException idpException) { <START> log.error("Error while adding Identity provider", idpException); <END> throw idpException; } }</code><technical_language>log tenantDomain idp name if</technical_language>

Target:
public void addIdP(IdentityProvider identityProvider) throws IdentityProviderManagementException { String tenantDomain = ""; try { tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); IdentityProviderManager.getInstance().addIdP(identityProvider, tenantDomain); } catch (IdentityProviderManagementException idpException) { log.error("Error while adding Identity provider in tenantDomain : " + tenantDomain, idpException); throw idpException; } }
Source:
<code>protected boolean canScroll(final View v, final boolean checkV, final int dx, final int x, final int y) { if (SDK_INT < ICE_CREAM_SANDWICH && v instanceof WebView) <START> return v.canScrollHorizontally(-dx); <END> else return super.canScroll(v, checkV, dx, x, y); }</code><technical_language>canScrollHorizontally added in API level 14 View this cast is needed</technical_language>

Target:
protected boolean canScroll(final View v, final boolean checkV, final int dx, final int x, final int y) { if (SDK_INT < ICE_CREAM_SANDWICH && v instanceof WebView) return ((WebView) v).canScrollHorizontally(-dx); else return super.canScroll(v, checkV, dx, x, y); }
Source:
<code>public QosClientLimitsConfig getConfigForClient(String client) { return qosClientLimitsConfigSupplier.get() <START> .getOrDefault(client, ImmutableQosClientLimitsConfig.builder().build()); <END> }</code><technical_language>nit: this is building object method call - a constant</technical_language>

Target:
public QosClientLimitsConfig getConfigForClient(String client) { return qosClientLimitsConfigSupplier.get().getOrDefault(client, DEFAULT_LIMITS); }
Source:
<code>public void close() { final Future<?> task; synchronized (this) { if (expireTask == null) { return; } task = expireTask; expireTask = null; } task.cancel(false); if (!task.isDone()) { try { task.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); <START> } catch (ExecutionException e) { <END> } } }</code><technical_language>concerned expireTask reset this synchronized block completes? cancels Future in case</technical_language>

Target:
public void close() { for (Future<?> future: this.expirationFutures.values()) { future.cancel(false); } for (Future<?> future: this.expirationFutures.values()) { if (!future.isDone()) { try { future.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { } } } this.expirationFutures.clear(); }
Source:
<code>private boolean isAppInFeatureList(Feature feature, String applicationName) { String appKey = feature.getName() + "-" + feature.getVersion(); <START> if (appKey.equalsIgnoreCase(applicationName)) { <END> return true; } return false; }</code><technical_language>"return appKey.equalsIgnoreCase(applicationName);"</technical_language>

Target:
private boolean isAppInFeatureList(Feature feature, String applicationName) { String appKey = feature.getName() + "-" + feature.getVersion(); return appKey.equalsIgnoreCase(applicationName); }
Source:
<code>void setFieldValue( Value value, Field field ) { <START> field.setStringValue( value.asLegacyObject().toString() ); <END> }</code><technical_language>do need legacy object in usages here</technical_language>

Target:
void setFieldValue( Value value, Field field ) { field.setDoubleValue( Values.coerceToDouble(value) ); }
Source:
<code>public String toString() { return "StateResponseCommand{" + "cache=" + cacheName + <START> "stateChunks=" + stateChunks + <END> ", origin=" + getOrigin() + ", topologyId=" + topologyId + '}'; }</code><technical_language>missing ,</technical_language>

Target:
public String toString() { return "StateResponseCommand{" + "cache=" + cacheName + ", stateChunks=" + stateChunks + ", origin=" + getOrigin() + ", topologyId=" + topologyId + '}'; }
Source:
<code>public void serialize(DifferentialEntropyState state, BlockBuilder output) { int requiredBytes = SizeOf.SIZE_OF_INT + (state.getStrategy() == null ? 0 : state.getStrategy().getRequiredBytesForSerialization()); DifferentialEntropyStateStrategy strategy = state.getStrategy(); SliceOutput sliceOut = Slices.allocate(requiredBytes).getOutput(); if (strategy == null) { sliceOut.appendInt(0); } else if (strategy instanceof UnweightedReservoirSampleStateStrategy) { sliceOut.appendInt(1); } else if (strategy instanceof WeightedReservoirSampleStateStrategy) { sliceOut.appendInt(2); } else if (strategy instanceof FixedHistogramMleStateStrategy) { sliceOut.appendInt(3); } else if (strategy instanceof FixedHistogramJacknifeStateStrategy) { sliceOut.appendInt(4); } else { <START> verify(false, <END> "Strategy " + strategy.getClass().getSimpleName() + " cannot be serialized"); } if (strategy != null) { strategy.serialize(sliceOut); } VARBINARY.writeSlice(output, sliceOut.getUnderlyingSlice()); }</code><technical_language>nit: put arguments line</technical_language>

Target:
public void serialize(DifferentialEntropyState state, BlockBuilder output) { DifferentialEntropyStateStrategy strategy = state.getStrategy(); if (strategy == null) { SliceOutput sliceOut = Slices.allocate(SizeOf.SIZE_OF_INT).getOutput(); sliceOut.appendInt(0); VARBINARY.writeSlice(output, sliceOut.getUnderlyingSlice()); return; } int requiredBytes = SizeOf.SIZE_OF_INT + strategy.getRequiredBytesForSerialization(); SliceOutput sliceOut = Slices.allocate(requiredBytes).getOutput(); if (strategy instanceof UnweightedReservoirSampleStateStrategy) { sliceOut.appendInt(1); } else if (strategy instanceof WeightedReservoirSampleStateStrategy) { sliceOut.appendInt(2); } else if (strategy instanceof FixedHistogramMleStateStrategy) { sliceOut.appendInt(3); } else if (strategy instanceof FixedHistogramJacknifeStateStrategy) { sliceOut.appendInt(4); } else { verify(false, format("Strategy cannot be serialized: %s", strategy.getClass().getSimpleName())); } strategy.serialize(sliceOut); VARBINARY.writeSlice(output, sliceOut.getUnderlyingSlice()); }
Source:
<code>public void impl$checkSerializationBehaviorForSaveChunks(CallbackInfoReturnable<Boolean> cir) { <START> SerializationBehavior serializationBehavior = ((WorldProperties) this.world.getWorldInfo()).getSerializationBehavior(); <END> if (serializationBehavior == SerializationBehaviors.NONE || serializationBehavior == SerializationBehaviors.METADATA_ONLY) { cir.setReturnValue(true); } }</code><technical_language>suggestion final SerializationBehavior serializationBehavior = ((WorldProperties) this.world.getWorldInfo()).getSerializationBehavior();</technical_language>

Target:
public void impl$checkSerializationBehaviorForSaveChunks(CallbackInfoReturnable<Boolean> cir) { final SerializationBehavior behavior = ((WorldProperties) this.world.getWorldInfo()).getSerializationBehavior(); if (behavior == SerializationBehaviors.NONE || behavior == SerializationBehaviors.METADATA_ONLY) { cir.setReturnValue(true); } }
Source:
<code><START> public void error(SAXParseException e) throws SAXException { <END> if (firstException == null) { firstException = e; messageBuffer = new StringBuilder(64); messageBuffer.append('\'').append(resourceId).append('\'').append("' validation error:"); } messageBuffer.append('\n').append(e.toString()); }</code><technical_language>I missing something, this method throws a SAXException. "throw e" end</technical_language>

Target:
public void error(SAXParseException e) { if (firstException == null) { firstException = e; messageBuffer = new StringBuilder(64); messageBuffer.append('\'').append(resourceId).append('\'').append("' validation error:"); } messageBuffer.append('\n').append(e.toString()); }
Source:
<code><START> public static FileSystem write(final FileSystem fs, final Path path, <END> final CharSequence charseq, final Charset cs) throws IOException { Objects.requireNonNull(path); Objects.requireNonNull(charseq); Objects.requireNonNull(cs); CharsetEncoder encoder = cs.newEncoder(); try (FSDataOutputStream out = fs.create(path); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder))) { writer.append(charseq); } return fs; }</code><technical_language>add in overwrite options. dealing 404 caching in S3A, relies createFile(overwrite = false). default, callers use</technical_language>

Target:
public static FileSystem write(final FileSystem fs, final Path path, final CharSequence charseq, final Charset cs) throws IOException { Objects.requireNonNull(path); Objects.requireNonNull(charseq); Objects.requireNonNull(cs); CharsetEncoder encoder = cs.newEncoder(); try (FSDataOutputStream out = fs.createFile(path).overwrite(true).build(); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder))) { writer.append(charseq); } return fs; }
Source:
<code>private void updateTabletLocation() { Path locationPath; if (volumeChooserUpdateInterval > 0 && (lastVolumeChooserUpdate + volumeChooserUpdateInterval < System.currentTimeMillis())) { VolumeManager fs = this.tabletServer.getFileSystem(); UniqueNameAllocator namer = context.getUniqueNameAllocator(); VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(extent.getTableId(), context); Text endRow = extent.getEndRow(); String directory = fs.choose(chooserEnv, <START> ServerConstants.getBaseUris(context.getConfiguration())) + Constants.HDFS_TABLES_DIR <END> + Path.SEPARATOR + extent.getTableId().toString() + Path.SEPARATOR; if (endRow == null) { directory += Constants.DEFAULT_TABLET_LOCATION; } else { directory += Constants.GENERATED_TABLET_DIRECTORY_PREFIX + namer.getNextName(); } locationPath = new Path(directory); this.location = locationPath; this.tabletDirectory = locationPath.toString(); } }</code><technical_language>some time review this closer, thought this handle namespaces</technical_language>

Target:
private void updateTabletLocation() { Path locationPath; VolumeManager fs = this.tabletServer.getFileSystem(); UniqueNameAllocator namer = context.getUniqueNameAllocator(); VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(extent.getTableId(), context); Text endRow = extent.getEndRow(); String directory = fs.choose(chooserEnv, ServerConstants.getBaseUris(context.getConfiguration())) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + extent.getTableId().toString() + Path.SEPARATOR; if (endRow == null) { directory += Constants.DEFAULT_TABLET_LOCATION; } else { directory += Constants.GENERATED_TABLET_DIRECTORY_PREFIX + namer.getNextName(); } locationPath = new Path(directory); this.location = locationPath; this.tabletDirectory = locationPath.toString(); }
Source:
<code>private void renderRemovedPost(final int position, final ReaderRemovedPostViewHolder holder) { <START> final ReaderPost post = getItem(position); <END> final Context context = holder.mRemovedPostContainer.getContext(); holder.mTxtRemovedPostTitle.setText(createTextForRemovedPostContainer(post, context)); Drawable[] compoundDrawables = holder.mUndoRemoveAction.getCompoundDrawables(); for (Drawable item : compoundDrawables) { if (item != null) { DrawableCompat.setTint(item, context.getResources().getColor(R.color.blue_medium)); } } holder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { undoPostUnbookmarked(post, position); } }); }</code><technical_language>Other "render" methods check if post is null rendering things, I assume is (was?) a possibility null. check too, null</technical_language>

Target:
private void renderRemovedPost(final int position, final ReaderRemovedPostViewHolder holder) { final ReaderPost post = getItem(position); final Context context = holder.mRemovedPostContainer.getContext(); holder.mTxtRemovedPostTitle.setText(createTextForRemovedPostContainer(post, context)); Drawable drawable = context.getResources().getDrawable(R.drawable.ic_undo_24dp); DrawableCompat.setTint(drawable, context.getResources().getColor(R.color.blue_medium)); DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_IN); holder.mUndoRemoveAction.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null); holder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { undoPostUnbookmarked(post, position); } }); }
Source:
<code>public void run() { String carbonConfigDirPath = CarbonUtils.getCarbonConfigDirPath(); File log4j2File = new File(carbonConfigDirPath + File.separator + "log4j2.properties"); try (WatchService watchService = FileSystems.getDefault().newWatchService()) { Path carbonConfigDirectory = Paths.get(carbonConfigDirPath); carbonConfigDirectory.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY); WatchKey key; while ((key = watchService.take()) != null) { for (WatchEvent<?> event : key.pollEvents()) { WatchEvent<Path> watchEvent = (WatchEvent<Path>) event; Path fileName = watchEvent.context(); Path changedFile = carbonConfigDirectory.resolve(fileName); <START> if (changedFile.toFile().equals(log4j2File)) { <END> updateLoggingConfiguration(); } } key.reset(); } } catch (IOException e) { LOG.error("Error while retrieving watch events", e); } catch (InterruptedException e) { LOG.error("Error while waiting to watch events", e); } }</code><technical_language>try adding CanonicalPath here</technical_language>

Target:
public void run() { String carbonConfigDirPath = CarbonUtils.getCarbonConfigDirPath(); File log4j2File = new File(carbonConfigDirPath + File.separator + "log4j2.properties"); try (WatchService watchService = FileSystems.getDefault().newWatchService()) { Path carbonConfigDirectory = Paths.get(carbonConfigDirPath); carbonConfigDirectory.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY); WatchKey key; while ((key = watchService.take()) != null) { for (WatchEvent<?> event : key.pollEvents()) { WatchEvent<Path> watchEvent = (WatchEvent<Path>) event; Path fileName = watchEvent.context(); Path changedFile = carbonConfigDirectory.resolve(fileName); if (changedFile.toFile().getCanonicalFile().equals(log4j2File.getCanonicalFile())) { updateLoggingConfiguration(); } } key.reset(); } } catch (IOException e) { LOG.error("Error while retrieving watch events", e); } catch (InterruptedException e) { LOG.error("Error while waiting to watch events", e); } }
Source:
<code>private Iterable<Object> processData(Class<?> entityClass, Map<String, Object> data, Optional<FilterExpression> filterExpression, Optional<Sorting> sorting, Optional<Pagination> pagination, RequestScope scope) { List<Object> results = filterExpression .map(fe -> { Predicate predicate = fe.accept(new InMemoryFilterVisitor(scope)); return data.values().stream().filter(predicate::test).collect(Collectors.toList()); }) .orElseGet(() -> new ArrayList<>(data.values())); Comparator<Object> noSort = (left, right) -> 0; List<Object> sorted = sorting .map(sort -> { Map<Path, Sorting.SortOrder> sortRules = sort.getValidSortingRules(entityClass, dictionary); if (sortRules.isEmpty()) { return results; } Comparator<Object> comp = sortRules.entrySet().stream() .map(entry -> getComparator(entry.getKey(), entry.getValue(), scope)) <START> .reduce(noSort, (first, second) -> (left, right) -> { <END> int comparison = first.compare(left, right); if (comparison == 0) { return second.compare(left, right); } return comparison; }); results.sort(comp); return results; }) .orElse(results); return pagination .map(p -> { int offset = p.getOffset(); int limit = p.getLimit(); if (offset < 0 || offset >= sorted.size()) { return Collections.emptyList(); } int endIdx = offset + limit; if (endIdx > sorted.size()) { endIdx = sorted.size(); } return sorted.subList(offset, endIdx); }) .orElse(sorted); }</code><technical_language>rename type in this case</technical_language>

Target:
private Iterable<Object> processData(Class<?> entityClass, Map<String, Object> data, Optional<FilterExpression> filterExpression, Optional<Sorting> sorting, Optional<Pagination> pagination, RequestScope scope) { List<Object> results = filterExpression .map(fe -> { Predicate predicate = fe.accept(new InMemoryFilterVisitor(scope)); return data.values().stream().filter(predicate::test).collect(Collectors.toList()); }) .orElseGet(() -> new ArrayList<>(data.values())); Comparator<Object> noSort = (left, right) -> 0; List<Object> sorted = sorting .map(sort -> { Map<Path, Sorting.SortOrder> sortRules = sort.getValidSortingRules(entityClass, dictionary); if (sortRules.isEmpty()) { return results; } Comparator<Object> comp = sortRules.entrySet().stream() .map(entry -> getComparator(entry.getKey(), entry.getValue(), scope)) .reduce(noSort, (comparator1, comparator2) -> (left, right) -> { int comparison = comparator1.compare(left, right); if (comparison == 0) { return comparator2.compare(left, right); } return comparison; }); results.sort(comp); return results; }) .orElse(results); return pagination .map(p -> { int offset = p.getOffset(); int limit = p.getLimit(); if (offset < 0 || offset >= sorted.size()) { return Collections.emptyList(); } int endIdx = offset + limit; if (endIdx > sorted.size()) { endIdx = sorted.size(); } return sorted.subList(offset, endIdx); }) .orElse(sorted); }
Source:
<code>protected ScheduledExecutorService executor() { final ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(serviceName()) <START> .setDaemon(false) <END> .build(); return Executors.newSingleThreadScheduledExecutor(threadFactory); }</code><technical_language>this set true daemon threads do prevent JVM exiting program finishes</technical_language>

Target:
protected ScheduledExecutorService executor() { final ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(serviceName()) .setDaemon(true) .build(); return Executors.newSingleThreadScheduledExecutor(threadFactory); }
Source:
<code>protected boolean canDoAction() { if (getParameters().getParametersList().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_DISKS_SPECIFIED); } for ( MoveDiskParameters param : getParameters().getParametersList() ) { if (getDiskImageDao().get(param.getImageId()).isShareable()) { if ( getStorageDomainDAO().get(param.getStorageDomainId()).getStorageType().equals(StorageType.GLUSTERFS) ) { <START> return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS); <END> } } } return true; }</code><technical_language>This is a fail-fast paradigm, is appropriate. collect disks moved domain X, fail a message for of them. (side effect: database queries)</technical_language>

Target:
protected boolean canDoAction() { if (getParameters().getParametersList().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_DISKS_SPECIFIED); } else { return verifyShareableDisksMoving(); } }
Source:
<code>public void execute(final OperationParams params) { try { final DynamoDBLocal server = options.getServer(); server.start(); if (interactive) { System.out.println("hit any key to shutdown .."); System.in.read(); System.out.println("Shutting down!"); server.stop(); } else { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { try { server.stop(); } catch (final Exception e) { <START> LOGGER.warn("Unable to shutdown redis", e); <END> System.out.println("Error shutting down redis."); } System.out.println("Shutting down!"); } }); while (true) { Thread.sleep(TimeUnit.MILLISECONDS.convert(Long.MAX_VALUE, TimeUnit.DAYS)); } } } catch (final Exception e) { LOGGER.error("Unable to run embedded Redis server", e); } }</code><technical_language>Replace redis DynamoDB in this lines</technical_language>

Target:
public void execute(final OperationParams params) { try { final DynamoDBLocal server = options.getServer(); server.start(); if (interactive) { System.out.println("hit any key to shutdown .."); System.in.read(); System.out.println("Shutting down!"); server.stop(); } else { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { try { server.stop(); } catch (final Exception e) { LOGGER.warn("Unable to shutdown DynamoDB", e); System.out.println("Error shutting down DynamoDB."); } System.out.println("Shutting down!"); } }); while (true) { Thread.sleep(TimeUnit.MILLISECONDS.convert(Long.MAX_VALUE, TimeUnit.DAYS)); } } } catch (final Exception e) { LOGGER.error("Unable to run embedded DynamoDB server", e); } }
Source:
<code>protected boolean internalTestConnection(ConnectionRequestInfo cri, Subject subject) { log.debugf("%s: testConnection(%s, %s)", poolName, cri, subject); <START> log.debugf("testConnection subjectIdentityHashCode=%s", System.identityHashCode(subject)); <END> log.debugf("%s: Statistics=%s", poolName, statistics); boolean result = false; boolean kill = false; ConnectionListener cl = null; if (shutdown.get()) return false; if (isFull()) return false; try { boolean separateNoTx = false; if (noTxSeparatePools) { separateNoTx = cm.isTransactional(); } Object key = getKey(subject, cri, separateNoTx); ManagedConnectionPool mcp = getManagedConnectionPool(key, subject, cri); cl = mcp.getConnection(subject, cri); result = true; } catch (Throwable t) { kill = true; } finally { if (cl != null) { try { returnConnection(cl, kill); } catch (ResourceException ire) { } } } return result; }</code><technical_language>I add previous line (%s, %s) (%d) something. Needs Integer.toHexString</technical_language>

Target:
protected boolean internalTestConnection(ConnectionRequestInfo cri, Subject subject) { log.debugf("%s: testConnection(%s, %s)(%s)", poolName, cri, subject, Integer.toHexString(System.identityHashCode(subject))); log.debugf("%s: Statistics=%s", poolName, statistics); boolean result = false; boolean kill = false; ConnectionListener cl = null; if (shutdown.get()) return false; if (isFull()) return false; try { boolean separateNoTx = false; if (noTxSeparatePools) { separateNoTx = cm.isTransactional(); } Object key = getKey(subject, cri, separateNoTx); ManagedConnectionPool mcp = getManagedConnectionPool(key, subject, cri); cl = mcp.getConnection(subject, cri); result = true; } catch (Throwable t) { kill = true; } finally { if (cl != null) { try { returnConnection(cl, kill); } catch (ResourceException ire) { } } } return result; }
Source:
<code>private ConfigDescriptionParameter buildConfigParam(Set<ModuleInformation> moduleInformations, ActionModuleKind kind) { List<ParameterOption> options = new ArrayList<>(); if (kind == ActionModuleKind.SINGLE) { if (moduleInformations.size() == 1) { if (((ModuleInformation) moduleInformations.toArray()[0]).getConfigName() == null && ((ModuleInformation) moduleInformations.toArray()[0]).getThingUID() == null) { return null; } } } else if (kind == ActionModuleKind.SERVICE) { for (ModuleInformation mi : moduleInformations) { String configName = mi.getConfigName(); options.add(new ParameterOption(configName, null)); } return ConfigDescriptionParameterBuilder.create(CONFIG_PARAM, Type.TEXT).withLabel(SELECT_SERVICE_LABEL) .withOptions(options).withLimitToOptions(true).withRequired(true).build(); } else if (kind == ActionModuleKind.THING) { for (ModuleInformation mi : moduleInformations) { String thingUID = mi.getThingUID(); options.add(new ParameterOption(thingUID, null)); } <START> return ConfigDescriptionParameterBuilder.create(CONFIG_PARAM, Type.TEXT).withLabel("Select Thing") <END> .withContext("thing").withOptions(options).withLimitToOptions(true).withRequired(true).build(); } return null; }</code><technical_language>Select a constant</technical_language>

Target:
private ConfigDescriptionParameter buildConfigParam(Set<ModuleInformation> moduleInformations, ActionModuleKind kind) { List<ParameterOption> options = new ArrayList<>(); if (kind == ActionModuleKind.SINGLE) { if (moduleInformations.size() == 1) { if (((ModuleInformation) moduleInformations.toArray()[0]).getConfigName() == null && ((ModuleInformation) moduleInformations.toArray()[0]).getThingUID() == null) { return null; } } } else if (kind == ActionModuleKind.SERVICE) { for (ModuleInformation mi : moduleInformations) { String configName = mi.getConfigName(); options.add(new ParameterOption(configName, configName)); } return ConfigDescriptionParameterBuilder.create(CONFIG_PARAM, Type.TEXT).withLabel(SELECT_SERVICE_LABEL) .withOptions(options).withLimitToOptions(true).withRequired(true).build(); } else if (kind == ActionModuleKind.THING) { for (ModuleInformation mi : moduleInformations) { String thingUID = mi.getThingUID(); options.add(new ParameterOption(thingUID, null)); } return ConfigDescriptionParameterBuilder.create(CONFIG_PARAM, Type.TEXT).withLabel(SELECT_THING_LABEL) .withContext("thing").withOptions(options).withLimitToOptions(true).withRequired(true).build(); } return null; }
Source:
<code>public boolean updateEntityInTableTransactional(String tableName, ODataEntry oldProperties, ODataEntry newProperties) { List<String> pKeys = this.primaryKeys.get(tableName); String newPropertyObjectKeyValue = null; String oldPropertyObjectKeyValue = null; for (String newPropertyObjectKeyName : newProperties.getData().keySet()) { if (newPropertyObjectKeyName.equals(DOCUMENT_ID)) { newPropertyObjectKeyValue = newProperties.getValue(newPropertyObjectKeyName); } } for (String oldPropertyObjectKeyName : oldProperties.getData().keySet()) { if (oldPropertyObjectKeyName.equals(DOCUMENT_ID)) { oldPropertyObjectKeyValue = oldProperties.getValue(oldPropertyObjectKeyName); } } for (String column : newProperties.getData().keySet()) { <START> if (!pKeys.contains(column)) { <END> String propertyValue = newProperties.getValue(column); assert newPropertyObjectKeyValue != null; jongo.getCollection(tableName).update(new ObjectId(newPropertyObjectKeyValue)).upsert().with(SET + column + ": '" + propertyValue + "'}}"); } } for (String column : oldProperties.getNames()) { if (!pKeys.contains(column)) { String propertyValue = oldProperties.getValue(column); assert oldPropertyObjectKeyValue != null; jongo.getCollection(tableName).update(new ObjectId(oldPropertyObjectKeyValue)).upsert().with(SET + column + ": '" + propertyValue + "'}}"); } } return true; }</code><technical_language>pKey null? If handle NPE</technical_language>

Target:
public boolean updateEntityInTableTransactional(String tableName, ODataEntry oldProperties, ODataEntry newProperties) throws ODataServiceFault { String oldPropertyObjectKeyValue = oldProperties.getValue(DOCUMENT_ID); StringBuilder updateNewProperties = new StringBuilder(); updateNewProperties.append("{$set: {"); boolean propertyMatch = false; for (String column : newProperties.getData().keySet()) { if (propertyMatch) { updateNewProperties.append("', "); } String propertyValue = newProperties.getValue(column); updateNewProperties.append(column).append(": '").append(propertyValue); propertyMatch = true; } updateNewProperties.append("'}}"); String query = updateNewProperties.toString(); WriteResult update = jongo.getCollection(tableName).update(new ObjectId(oldPropertyObjectKeyValue)).with(query); int wasUpdated = update.getN(); if (wasUpdated == 1) { return update.wasAcknowledged(); } else { throw new ODataServiceFault("Error occured while updating the entity to collection :" + tableName + "."); } }
Source:
<code>private List<BinaryExpressionTree> flattenLogicalExpression(ExpressionTree expression) { if (expression.is(CONDITIONAL_AND, CONDITIONAL_OR)) { ignored.add(expression); BinaryExpressionTree binaryExpr = (BinaryExpressionTree) expression; ExpressionTree left = ExpressionUtils.skipParentheses(binaryExpr.leftOperand()); ExpressionTree right = ExpressionUtils.skipParentheses(binaryExpr.rightOperand()); return Stream.of(flattenLogicalExpression(left), Collections.singletonList(binaryExpr), flattenLogicalExpression(right)) .flatMap(List::stream) <START> .collect(Collectors.toList()); <END> } return Collections.emptyList(); }</code><technical_language>avoid collecting (and flatmapping) relying Stream.concat Stream.empty collect resulting call</technical_language>

Target:
private Stream<BinaryExpressionTree> flattenLogicalExpression(ExpressionTree expression) { if (expression.is(CONDITIONAL_AND, CONDITIONAL_OR)) { ignored.add(expression); BinaryExpressionTree binaryExpr = (BinaryExpressionTree) expression; ExpressionTree left = ExpressionUtils.skipParentheses(binaryExpr.leftOperand()); ExpressionTree right = ExpressionUtils.skipParentheses(binaryExpr.rightOperand()); return Stream.concat(Stream.concat(flattenLogicalExpression(left), Stream.of(binaryExpr)), flattenLogicalExpression(right)); } return Stream.empty(); }
Source:
<code>private void updateActionAvailability() { getEditCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); boolean removeAllowed = true; if (getSelectedItems() == null || getSelectedItems().isEmpty()) { removeAllowed = false; } else { for (MacPool macPool : (Iterable<MacPool>) getSelectedItems()) { if (macPool.isDefaultPool()) { <START> removeAllowed = false; <END> } } } getRemoveCommand().setIsExecutionAllowed(removeAllowed); }</code><technical_language>related this patch, add a "break;" line while it? :)</technical_language>

Target:
private void updateActionAvailability() { getEditCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1); boolean removeAllowed = true; if (getSelectedItems() == null || getSelectedItems().isEmpty()) { removeAllowed = false; } else { for (MacPool macPool : (Iterable<MacPool>) getSelectedItems()) { if (macPool.isDefaultPool()) { removeAllowed = false; break; } } } getRemoveCommand().setIsExecutionAllowed(removeAllowed); }
Source:
<code>protected boolean overrideHotcodeReplace(IServer server, ILaunch launch) throws CoreException { IJavaHotCodeReplaceListener l = getHotCodeReplaceListener(server, launch); if( l != null) { IDebugTarget[] targets = launch.getDebugTargets(); <START> if( targets != null && l != null) { <END> for( int i = 0; i < targets.length; i++ ) { if( targets[i] instanceof IJavaDebugTarget) { ((IJavaDebugTarget)targets[i]).addHotCodeReplaceListener(l); } } } return true; } return false; }</code><technical_language>redundant l != null check</technical_language>

Target:
protected boolean overrideHotcodeReplace(IServer server, ILaunch launch) throws CoreException { IJavaHotCodeReplaceListener l = getHotCodeReplaceListener(server, launch); IDebugTarget[] targets = launch.getDebugTargets(); if( targets != null && l != null) { for( int i = 0; i < targets.length; i++ ) { if( targets[i] instanceof IJavaDebugTarget) { ((IJavaDebugTarget)targets[i]).addHotCodeReplaceListener(l); } } } return true; }
Source:
<code>public void setLongitude(double longitude) { <START> this.mLongitude <END> = longitude; }</code><technical_language>shit</technical_language>

Target:
public void setLongitude(double longitude) { mLongitude = longitude; }