auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void buildEnvVars(Run<?, ?> build, Map<String, String> env) { try { setup(null, null, TaskListener.NULL); } catch (IOException | InterruptedException ex) { logger.log(Level.SEVERE, "buildEnvVars", ex); } if (scm.getDepot() != null) { env.put(ACCUREV_DEPOT, scm.getDepot()); } else { env.put(ACCUREV_DEPOT, ""); } if (scm.getStream() != null) { env.put(ACCUREV_STREAM, scm.getStream()); } else { env.put(ACCUREV_STREAM, ""); } if (server != null && server.getHost() != null) { <START> env.put(ACCUREV_SERVER, server.getHost()+":"+server.getPort()); <END> } else { env.put(ACCUREV_SERVER, ""); } if (server != null && server.getHost() != null) { env.put(ACCUREV_SERVER_HOSTNAME, server.getHost()); } else { env.put(ACCUREV_SERVER_HOSTNAME, ""); } if (server != null && server.getPort() > 0) { env.put(ACCUREV_SERVER_PORT, Integer.toString(server.getPort())); } else { env.put(ACCUREV_SERVER_PORT, ""); } env.put(ACCUREV_WORKSPACE, ""); env.put(ACCUREV_REFTREE, ""); if (scm.getSubPath() != null) { env.put(ACCUREV_SUBPATH, scm.getSubPath()); } else { env.put(ACCUREV_SUBPATH, ""); } if (System.getenv(ACCUREV_HOME) != null) { env.put(ACCUREV_HOME, System.getenv(ACCUREV_HOME)); } buildEnvVarsCustom(build, env); }</code><technical_language>Unrelated changes printing server hostname server port</technical_language>

Target:
public void buildEnvVars(Run<?, ?> build, Map<String, String> env) { try { setup(null, null, TaskListener.NULL); } catch (IOException | InterruptedException ex) { logger.log(Level.SEVERE, "buildEnvVars", ex); } if (scm.getDepot() != null) { env.put(ACCUREV_DEPOT, scm.getDepot()); } else { env.put(ACCUREV_DEPOT, ""); } if (scm.getStream() != null) { env.put(ACCUREV_STREAM, scm.getStream()); } else { env.put(ACCUREV_STREAM, ""); } if (server != null && server.getName() != null) { env.put(ACCUREV_SERVER, server.getName()); } else { env.put(ACCUREV_SERVER, ""); } if (server != null && server.getHost() != null) { env.put(ACCUREV_SERVER_HOSTNAME, server.getHost()); } else { env.put(ACCUREV_SERVER_HOSTNAME, ""); } if (server != null && server.getPort() > 0) { env.put(ACCUREV_SERVER_PORT, Integer.toString(server.getPort())); } else { env.put(ACCUREV_SERVER_PORT, ""); } env.put(ACCUREV_WORKSPACE, ""); env.put(ACCUREV_REFTREE, ""); if (scm.getSubPath() != null) { env.put(ACCUREV_SUBPATH, scm.getSubPath()); } else { env.put(ACCUREV_SUBPATH, ""); } if (System.getenv(ACCUREV_HOME) != null) { env.put(ACCUREV_HOME, System.getenv(ACCUREV_HOME)); } buildEnvVarsCustom(build, env); }
Source:
<code>public Response<BlockBlobItem> uploadWithResponse(InputStream data, ParallelTransferOptions parallelTransferOptions, BlobHTTPHeaders headers, Map<String, String> metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout) { <START> Flux<ByteBuffer> fbb = Utility.convertStreamToByteBuffer(data, BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); <END> Mono<Response<BlockBlobItem>> upload = client.uploadWithResponse(fbb, parallelTransferOptions, headers, metadata, tier, accessConditions); try { return Utility.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } }</code><technical_language>Instead of calling Utility conversion method chunk InputStream ByteBuffers size of ParallelTransferOptions.getBlockSize. need a conversion runs InputStream is depleted end of file/stream</technical_language>

Target:
public Response<BlockBlobItem> uploadWithResponse(InputStream data, ParallelTransferOptions parallelTransferOptions, BlobHTTPHeaders headers, Map<String, String> metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout) { Flux<ByteBuffer> fbb = Utility.convertStreamToByteBuffer(data, parallelTransferOptions.getBlockSize()); Mono<Response<BlockBlobItem>> upload = client.uploadWithResponse(fbb, parallelTransferOptions, headers, metadata, tier, accessConditions); try { return Utility.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { throw logger.logExceptionAsError(e); } }
Source:
<code>private Optional<CatalogQueryOperation> scanInternal(UnresolvedIdentifier identifier) { ObjectIdentifier tableIdentifier = catalogManager.qualifyIdentifier(identifier); return catalogManager.getTable(tableIdentifier).map(t -> { <START> CatalogTableSchemaResolver resolver = new CatalogTableSchemaResolver(parser); <END> TableSchema newTableSchema = resolver.resolve(t.getTable().getSchema(), isStreamingMode); return new CatalogQueryOperation(tableIdentifier, newTableSchema); }); }</code><technical_language>this resolution part of TableSchema itself? IMO a watermarkSpec is applied a TableSchema adjust type of rowtime attribute field. I late in TableEnvironment apply transformation</technical_language>

Target:
private Optional<CatalogQueryOperation> scanInternal(UnresolvedIdentifier identifier) { ObjectIdentifier tableIdentifier = catalogManager.qualifyIdentifier(identifier); return catalogManager.getTable(tableIdentifier).map(t -> { return new CatalogQueryOperation(tableIdentifier, t.getTable().getSchema()); }); }
Source:
<code>protected List<NuxeoOAuth2ServiceProvider> getProviders() { OAuth2ServiceProviderRegistry registry = Framework.getService(OAuth2ServiceProviderRegistry.class); return registry.getProviders().stream() .filter(provider -> provider instanceof NuxeoOAuth2ServiceProvider) <START> .map(provider -> (NuxeoOAuth2ServiceProvider)provider) <END> .collect(Collectors.toList()); }</code><technical_language>Space cast</technical_language>

Target:
protected List<NuxeoOAuth2ServiceProvider> getProviders() { OAuth2ServiceProviderRegistry registry = Framework.getService(OAuth2ServiceProviderRegistry.class); return registry.getProviders().stream() .filter(NuxeoOAuth2ServiceProvider.class::isInstance) .map(provider -> (NuxeoOAuth2ServiceProvider) provider) .collect(Collectors.toList()); }
Source:
<code>private void addClientProperties(Client client, HashMap<String,Object> hashMapInstance, String entryId){ if (client == null){ return; } WMSProperties clientProps = client.getProperties(); String rtmpUrl, encoder,IP; rtmpUrl = clientProps.getPropertyStr(Constants.CLIENT_PROPERTY_CONNECT_URL); encoder = clientProps.getPropertyStr(Constants.CLIENT_PROPERTY_ENCODER); IP = client.getIp(); int port = client.getServerHostPort().getPort(); <START> HashMap<String,Object> ClientPropertiesHash = new HashMap<>(); <END> ClientPropertiesHash.put("rtmpUrl" , rtmpUrl); ClientPropertiesHash.put("encoder" , encoder); ClientPropertiesHash.put("IP" , IP); ClientPropertiesHash.put("port" , port); hashMapInstance.put("clientProperties", ClientPropertiesHash); logger.debug(httpSessionId + "[" + entryId + "] Add the following params: rtmpUrl "+ rtmpUrl + ", encoder " + encoder + ", IP " + IP + ", port " + port); }</code><technical_language>add getPingTimeout instrad of getPort find clinet port getTimeRunningSeconds</technical_language>

Target:
private void addClientProperties(Client client, HashMap<String,Object> hashMapInstance, String entryId){ if (client == null){ return; } WMSProperties clientProps = client.getProperties(); if (clientProps == null){ logger.warn(httpSessionId + "[" + entryId + "] Can't get properties"); return; } String rtmpUrl, encoder,IP; rtmpUrl = clientProps.getPropertyStr(Constants.CLIENT_PROPERTY_CONNECT_URL); encoder = clientProps.getPropertyStr(Constants.CLIENT_PROPERTY_ENCODER); IP = client.getIp(); long pingRoundTripTime = client.getPingRoundTripTime(); double timeRunningSeconds = client.getTimeRunningSeconds(); HashMap<String,Object> ClientPropertiesHash = new HashMap<String,Object>(); ClientPropertiesHash.put("pingRoundTripTime" , pingRoundTripTime); ClientPropertiesHash.put("timeRunningSeconds" , timeRunningSeconds); ClientPropertiesHash.put("rtmpUrl" , rtmpUrl); ClientPropertiesHash.put("encoder" , encoder); ClientPropertiesHash.put("IP" , IP); hashMapInstance.put("clientProperties", ClientPropertiesHash); logger.debug(httpSessionId + "[" + entryId + "] Add the following params: rtmpUrl "+ rtmpUrl + ", encoder " + encoder + ", IP " + IP + ", port " + port); }
Source:
<code>URI generateOutputFilename(final String id) { final FileInfo cfi = job.getFileInfo(currentFile); URI result = cfi.result.resolve(id + FILE_EXTENSION_DITA); <START> URI temp = toURI(new File (result).getName()); <END> if (id == null || new File(currentParsingFile.resolve(temp)).exists()) { final URI t = temp; result = cfi.result.resolve(generateFilename()); temp = toURI(new File (result).getName()); final FileInfo.Builder b = new FileInfo.Builder(cfi); final FileInfo fi = b .uri(temp) .result(result) .format(ATTR_FORMAT_VALUE_DITA) .build(); job.add(fi); conflictTable.put(currentParsingFile.resolve(temp), currentParsingFile.resolve(t)); } return currentParsingFile.resolve(temp); }</code><technical_language>I this break things. generateTempFileName method turn a source file name a temporary file name, e.g. a hash of absolute URI. source file name is incorrect</technical_language>

Target:
URI generateOutputFilename(final String id) { final FileInfo cfi = job.getFileInfo(stripFragment(currentParsingFile)); URI result = cfi.result.resolve(id + FILE_EXTENSION_DITA); URI temp = tempFileNameScheme.generateTempFileName(result); if (id == null || new File(job.tempDirURI.resolve(temp)).exists()) { final URI t = temp; result = cfi.result.resolve(generateFilename()); temp = tempFileNameScheme.generateTempFileName(result); final FileInfo.Builder b = new FileInfo.Builder(cfi); final FileInfo fi = b .uri(temp) .result(result) .format(ATTR_FORMAT_VALUE_DITA) .build(); job.add(fi); conflictTable.put(job.tempDirURI.resolve(temp), job.tempDirURI.resolve(t)); } return job.tempDirURI.resolve(temp); }
Source:
<code>public void testRegisterTrialIsDeprecated() throws Exception { String[] cmd = { "unused" }; <START> NuxeoLauncher launcher = NuxeoLauncher.createLauncher(cmd); <END> try { launcher.registerTrial(); fail("Command \"register-trial\" did not raise exception."); } catch (UnsupportedOperationException e) { String msg = "This command is deprecated. To register for a free 30 day trial on Nuxeo Online Services," + " please visit <LINK_0>"; assertEquals(msg, e.getMessage()); } }</code><technical_language>want test "register-trial" command? NuxeoLauncher launcher = NuxeoLauncher.createLauncher(new String[] { "register-trial" }); if (currently) call launcher.registerTrial() instead of NuxeoLauncher.launch() main method</technical_language>

Target:
public void testRegisterTrialIsDeprecated() throws Exception { thrown.expect(UnsupportedOperationException.class); thrown.expectMessage("deprecated"); thrown.expectMessage("<LINK_0>"); NuxeoLauncher.createLauncher(new String[] { "register-trial" }).registerTrial(); }
Source:
<code>public void tearDown() throws Exception { <START> testContext = null; <END> }</code><technical_language>need a super.tearDown() call end</technical_language>

Target:
public void tearDown() throws Exception { testContext = null; super.tearDown(); }
Source:
<code>public void setUpRefs() throws IOException { Map<String, Ref> refs = getRemoteRefs(); for (Map.Entry<String, Ref> entry : refs.entrySet()) { String pubsubRef = getPubSubRefFromLocal(remote, entry.getKey()); if (repository.getRef(pubsubRef) != null) continue; <START> RefUpdate ru = repository.updateRef(pubsubRef); <END> ru.setExpectedOldObjectId(ObjectId.zeroId()); ru.setNewObjectId(entry.getValue().getObjectId()); ru.update(); } }</code><technical_language>IMHO this include a descriptive reflog update, this is a local repository a user poking in. cf. output of "git reflog refs/remotes/origin/master" in a repo of choice</technical_language>

Target:
public void setUpRefs() throws IOException { Set<String> existingRefs = new LinkedHashSet<String>( repository.getRefDatabase().getRefs( getPubSubRefFromLocal(remote, Constants.R_REFS)) .keySet()); Map<String, Ref> refs = getRemoteRefs(); for (Map.Entry<String, Ref> entry : refs.entrySet()) { String ref = entry.getKey(); String existingRef = ref.substring(Constants.R_REFS.length()); existingRefs.remove(existingRef); String pubsubRef = getPubSubRefFromLocal(remote, ref); if (repository.getRef(pubsubRef) != null) continue; RefUpdate ru = repository.updateRef(pubsubRef); ru.setExpectedOldObjectId(ObjectId.zeroId()); ru.setNewObjectId(entry.getValue().getObjectId()); ru.setRefLogMessage("pubsub setup", true); ru.update(); } for (String r : existingRefs) { String pubsubRef = getPubSubRefFromLocal( remote, Constants.R_REFS + r); if (repository.getRef(pubsubRef) == null) continue; RefUpdate ru = repository.updateRef(pubsubRef); ru.setForceUpdate(true); ru.delete(); } }
Source:
<code>public PunchCommand() { <START> this.setVerb("punch"); <END> }</code><technical_language>Needs changes punche</technical_language>

Target:
public PunchCommand() { this.setVerb("punche"); }
Source:
<code>private Map<String, Object> buildStringKeyMap(ByteBuffer input) { <START> int payloadSize = input.limit(); <END> if (chars == null || chars.remaining() < payloadSize) { chars = CharBuffer.allocate(payloadSize); } final CoderResult coderResult = Charsets.UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE) .decode(input, chars, true); Map<String, Object> theMap; if (coderResult.isUnderflow()) { chars.flip(); try { theMap = parseString(chars.toString()); } finally { chars.clear(); } } else { throw new FormattedException.Builder() .withErrorCode(FormattedException.ErrorCode.UNPARSABLE_ROW) .withMessage(String.format("Failed with CoderResult[%s]", coderResult)) .build(); } return theMap; }</code><technical_language>Instead of limit(), I remaining() is want. limit() == remaining() if position() == 0, I this assume position == 0</technical_language>

Target:
private Map<String, Object> buildStringKeyMap(ByteBuffer input) { int payloadSize = input.remaining(); if (chars == null || chars.remaining() < payloadSize) { chars = CharBuffer.allocate(payloadSize); } final CoderResult coderResult = Charsets.UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE) .decode(input, chars, true); Map<String, Object> theMap; if (coderResult.isUnderflow()) { chars.flip(); try { theMap = parseString(chars.toString()); } finally { chars.clear(); } } else { throw new FormattedException.Builder() .withErrorCode(FormattedException.ErrorCode.UNPARSABLE_ROW) .withMessage(String.format("Failed with CoderResult[%s]", coderResult)) .build(); } return theMap; }
Source:
<code>public ChangeDetail abandon(String reviewId, int patchSetId, final String message, IProgressMonitor monitor) throws GerritException { final PatchSet.Id id = new PatchSet.Id(new Change.Id(id(reviewId)), patchSetId); if (hasJsonRpcApi(monitor)) { return execute(monitor, new Operation<ChangeDetail>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeManageService(monitor).abandonChange(id, message, this); } }); } else { final String uri = "/a/changes/" + id.getParentKey().get() + "/abandon"; ChangeDetailX preAbandoned = getChangeDetail(id.getParentKey().get(), monitor); executePostRestRequest(uri, new AbandonInput(message), ChangeInfo.class, null , monitor); ChangeDetailX postAbandoned = getChangeDetail(id.getParentKey().get(), monitor); <START> if (postAbandoned.getApprovals().isEmpty()) { <END> postAbandoned.setApprovals(preAbandoned.getApprovals()); } if (postAbandoned.getApprovalTypes().isEmpty()) { postAbandoned.setApprovalTypes(preAbandoned.getApprovalTypes()); } return postAbandoned; } }</code><technical_language>Is necessary? If information reasonable show (subsequent invocations of getChangeDetail() information anyways)</technical_language>

Target:
public ChangeDetail abandon(String reviewId, int patchSetId, final String message, IProgressMonitor monitor) throws GerritException { final PatchSet.Id id = new PatchSet.Id(new Change.Id(id(reviewId)), patchSetId); if (hasJsonRpcApi(monitor)) { return execute(monitor, new Operation<ChangeDetail>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeManageService(monitor).abandonChange(id, message, this); } }); } else { final String uri = "/a/changes/" + id.getParentKey().get() + "/abandon"; executePostRestRequest(uri, new AbandonInput(message), ChangeInfo.class, null , monitor); return getChangeDetail(id.getParentKey().get(), monitor); } }
Source:
<code>public boolean canProcess(Map<String, Serializable> params) { try { File file = (File) FILE_PARAM.lookUp(params); String indexPath = (String) INDEX_PARAM.lookUp(params); String dsPath = (String) DS_PARAM.lookUp(params); AncillaryFileManager ancilaryFileManager = new AncillaryFileManager(file, indexPath, dsPath); DataStoreConfiguration datastoreConfig = ancilaryFileManager.getDatastoreConfiguration(); return datastoreConfig.getDatastoreSpi().canProcess(datastoreConfig.getParams()); } catch (NoSuchAlgorithmException | JAXBException | IOException e) { <START> <END> } return false; }</code><technical_language>able move return false catch block for clarity path a valid return</technical_language>

Target:
public boolean canProcess(Map<String, Serializable> params) { try { File file = (File) FILE_PARAM.lookUp(params); String indexPath = (String) INDEX_PARAM.lookUp(params); String dsPath = (String) DS_PARAM.lookUp(params); AncillaryFileManager ancilaryFileManager = new AncillaryFileManager(file, indexPath, dsPath); DataStoreConfiguration datastoreConfig = ancilaryFileManager.getDatastoreConfiguration(); return datastoreConfig.getDatastoreSpi().canProcess(datastoreConfig.getParams()); } catch (NoSuchAlgorithmException | JAXBException | IOException e) { return false; } }
Source:
<code>public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } if ((max - min) > Integer.MAX_VALUE || ((max - min) / values.length) > 192) { return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } <START> else { <END> return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); } }</code><technical_language>redundant</technical_language>

Target:
public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } if ((max - min + 1) > Integer.MAX_VALUE || ((max - min + 1) / values.length) > 192) { return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); }
Source:
<code>public void shouldRetrieveOverridingCredentialFromProject() throws Exception { Folder f = r.jenkins.createProject(Folder.class, "folder1"); UsernamePasswordCredentialsImpl credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, ID, DESCRIPTION, USERNAME, PASSWORD); getFolderStore(f).addCredentials(Domain.global(), credentials); Credential overridingCredentialProvided = new Credential(null, "", null, credentials.getId(), null, true); DeployitNotifier.DeployitDescriptor descriptor = new DeployitNotifier.DeployitDescriptor(); DeployitNotifier notifierSpy = Mockito.spy(new DeployitNotifier("AdminGlobal1", "app1", null, null, null, null, false, null, overridingCredentialProvided)); doReturn(descriptor).when(notifierSpy).getDescriptor(); doReturn(overridingCredentialProvided).when(notifierSpy).getOverridingCredential(); FreeStyleProject freeStyleProjectSpy = Mockito.spy(new FreeStyleProject(f, "folder1/proj1")); freeStyleProjectSpy.addPublisher(notifierSpy); <START> DescribableList<Publisher, Descriptor<Publisher>> publisherListMock = Mockito.mock(DescribableList.class); <END> doReturn(notifierSpy).when(publisherListMock).get(any(DeployitNotifier.DeployitDescriptor.class)); doReturn(publisherListMock).when(freeStyleProjectSpy).getPublishersList(); Credential overridingCredential = RepositoryUtils.retrieveOverridingCredentialFromProject(freeStyleProjectSpy); assertEquals(USERNAME, overridingCredential.getUsername()); assertEquals(PASSWORD, overridingCredential.getPassword().getPlainText()); }</code><technical_language>please add a static import for Mockito.spy</technical_language>

Target:
public void shouldRetrieveOverridingCredentialFromProject() throws Exception { Folder f = r.jenkins.createProject(Folder.class, "folder1"); UsernamePasswordCredentialsImpl credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, ID, DESCRIPTION, USERNAME, PASSWORD); getFolderStore(f).addCredentials(Domain.global(), credentials); Credential overridingCredentialProvided = new Credential(null, "", null, credentials.getId(), null, true); DeployitNotifier.DeployitDescriptor descriptor = new DeployitNotifier.DeployitDescriptor(); DeployitNotifier notifierSpy = spy(new DeployitNotifier("AdminGlobal1", "app1", null, null, null, null, false, null, overridingCredentialProvided)); doReturn(descriptor).when(notifierSpy).getDescriptor(); doReturn(overridingCredentialProvided).when(notifierSpy).getOverridingCredential(); FreeStyleProject freeStyleProjectSpy = spy(new FreeStyleProject(f, "folder1/proj1")); freeStyleProjectSpy.addPublisher(notifierSpy); DescribableList<Publisher, Descriptor<Publisher>> publisherListMock = Mockito.mock(DescribableList.class); doReturn(notifierSpy).when(publisherListMock).get(any(DeployitNotifier.DeployitDescriptor.class)); doReturn(publisherListMock).when(freeStyleProjectSpy).getPublishersList(); Credential overridingCredential = RepositoryUtils.retrieveOverridingCredentialFromProject(freeStyleProjectSpy); assertEquals(USERNAME, overridingCredential.getUsername()); assertEquals(PASSWORD, overridingCredential.getPassword().getPlainText()); }
Source:
<code><START> public synchronized Uri insert(Uri uri, ContentValues initialValues) { <END> SqlArguments args = new SqlArguments(uri); synchronized (mLock) { SQLiteDatabase db = mOpenHelper.getWritableDatabase(); final long rowId = db.insert(args.table, null, initialValues); if (rowId <= 0) return null; uri = ContentUris.withAppendedId(uri, rowId); sendNotify(uri); return uri; } }</code><technical_language>synchronizing "this" if synchronizing lock below</technical_language>

Target:
public Uri insert(Uri uri, ContentValues initialValues) { SqlArguments args = new SqlArguments(uri); synchronized (mLock) { SQLiteDatabase db = mOpenHelper.getWritableDatabase(); final long rowId = db.insert(args.table, null, initialValues); if (rowId <= 0) return null; uri = ContentUris.withAppendedId(uri, rowId); sendNotify(uri); return uri; } }
Source:
<code>public void initialize(Context context, InitializationCompleteCallback initializationCompleteCallback, List<MediationConfiguration> mediationConfigurations) { if (VungleInitializer.getInstance().isInitialized()) { initializationCompleteCallback.onInitializationSucceeded(); return; } if (!(context instanceof Activity)) { initializationCompleteCallback.onInitializationFailed("Vungle SDK requires an " + "Activity context to initialize"); return; } HashSet<String> appIDs = new HashSet<>(); for (MediationConfiguration configuration: mediationConfigurations) { Bundle serverParameters = configuration.getServerParameters(); String appIDFromServer = serverParameters.getString(KEY_APP_ID); if (!TextUtils.isEmpty(appIDFromServer)) { appIDs.add(appIDFromServer); } } int count = appIDs.size(); if (count > 0) { String appID = appIDs.iterator().next(); if (count > 1) { String logMessage = String.format("Multiple '%s' entries found: %s. " + "Using '%s' to initialize the Vungle SDK.", KEY_APP_ID, appIDs.toString(), appID); Log.w(TAG, logMessage); } mInitializationCallback = initializationCompleteCallback; <START> mAdapterId = REWARDED + String.valueOf(sCounter); <END> sCounter++; VungleInitializer.getInstance().initialize(appID, context.getApplicationContext(), mAdapterId, VungleMediationAdapter.this); } else { initializationCompleteCallback.onInitializationFailed("Initialization failed: " + "Missing or Invalid App ID."); } }</code><technical_language>Unnecessary complexity added for adapter ID used</technical_language>

Target:
public void initialize(Context context, InitializationCompleteCallback initializationCompleteCallback, List<MediationConfiguration> mediationConfigurations) { if (VungleInitializer.getInstance().isInitialized()) { initializationCompleteCallback.onInitializationSucceeded(); return; } if (!(context instanceof Activity)) { initializationCompleteCallback.onInitializationFailed("Vungle SDK requires an " + "Activity context to initialize"); return; } HashSet<String> appIDs = new HashSet<>(); for (MediationConfiguration configuration: mediationConfigurations) { Bundle serverParameters = configuration.getServerParameters(); String appIDFromServer = serverParameters.getString(KEY_APP_ID); if (!TextUtils.isEmpty(appIDFromServer)) { appIDs.add(appIDFromServer); } } int count = appIDs.size(); if (count > 0) { String appID = appIDs.iterator().next(); if (count > 1) { String logMessage = String.format("Multiple '%s' entries found: %s. " + "Using '%s' to initialize the Vungle SDK.", KEY_APP_ID, appIDs.toString(), appID); Log.w(TAG, logMessage); } mInitializationCallback = initializationCompleteCallback; VungleInitializer.getInstance().initialize(appID, context.getApplicationContext(), VungleMediationAdapter.this); } else { initializationCompleteCallback.onInitializationFailed("Initialization failed: " + "Missing or Invalid App ID."); } }
Source:
<code>public void backpressure() { MulticastProcessor<Integer> mp = MulticastProcessor.create(16, false); mp.start(); for (int i = 0; i < 10; i++) { mp.onNext(i); } mp.onComplete(); mp.test(0) .assertEmpty() .requestMore(1) .assertValues(0) <START> .assertNotComplete() <END> .requestMore(2) .assertValues(0, 1, 2) .assertNotComplete() .requestMore(3) .assertValues(0, 1, 2, 3, 4, 5) .assertNotComplete() .requestMore(4) .assertResult(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); }</code><technical_language>assertValuesOnly save assertNotComplete call</technical_language>

Target:
public void backpressure() { MulticastProcessor<Integer> mp = MulticastProcessor.create(16, false); mp.start(); for (int i = 0; i < 10; i++) { mp.onNext(i); } mp.onComplete(); mp.test(0) .assertEmpty() .requestMore(1) .assertValuesOnly(0) .requestMore(2) .assertValuesOnly(0, 1, 2) .requestMore(3) .assertValuesOnly(0, 1, 2, 3, 4, 5) .requestMore(4) .assertResult(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); }
Source:
<code>public IFormPage getPreviousPage(IFormPage current) { int i = pages.indexOf(current); if (i > -1) { <START> ListIterator<? extends Object> it = pages.listIterator(i); <END> while (it.hasPrevious()) { Object prev = it.previous(); if (prev instanceof CommonActivityExplorerPage) { String pageID = ((CommonActivityExplorerPage)prev).getId(); IConfigurationElement pageConfigurationElement = ActivityExplorerExtensionManager.getConfigurationElement(pageID); if (pageConfigurationElement != null) { Image imageOn = ActivityExplorerExtensionManager.getImageOn(pageConfigurationElement); Image imageOff = ActivityExplorerExtensionManager.getImageOff(pageConfigurationElement); if (imageOn != null || imageOff != null) { return (IFormPage) prev; } } } } } return null; }</code><technical_language>formatting previous one</technical_language>

Target:
public IFormPage getPreviousPage(IFormPage current) { int i = pages.indexOf(current); if (i > -1) { ListIterator<? extends Object> it = pages.listIterator(i); while (it.hasPrevious()) { Object prev = it.previous(); if (prev instanceof ActivityExplorerPage) { ActivityExplorerPage previousPage = (ActivityExplorerPage)prev; if (previousPage.getHeaderImageOff() != null || previousPage.getHeaderImageOn() != null) { return previousPage; } } } } return null; }
Source:
<code>public DiffEntry getAndReset() { if (captured == null) { <START> throw new NullPointerException(); <END> } final DiffEntry retVal = captured; captured = null; return retVal; }</code><technical_language>add some message explaining null</technical_language>

Target:
public DiffEntry getAndReset() { if (captured == null) { throw new NullPointerException("Cannot get DiffEntry when none was captured."); } final DiffEntry retVal = captured; captured = null; return retVal; }
Source:
<code>public void deleteAllCategories(final String siteId, User user) { <START> ArrayList<CategoryPill.Data> categories = getCategoriesFromSite(siteId, user); <END> for (CategoryPill.Data category : categories) { PageObjectLogging.logInfo("Deleting category: " + category.getName()); deleteCategory(siteId, category); } }</code><technical_language>Interface here</technical_language>

Target:
public void deleteAllCategories(final String siteId, User user) { List<CategoryPill.Data> categories = getCategoriesFromSite(siteId, user); for (CategoryPill.Data category : categories) { PageObjectLogging.logInfo("Deleting category: " + category.getName()); deleteCategory(siteId, category); } }
Source:
<code>public void should_return_failed_future_if_reloading_not_supported() { DefaultDriverConfigLoader loader = new DefaultDriverConfigLoader(() -> ConfigFactory.parseString(configSource.get())) { @Override public boolean supportsReloading() { return false; <START> } <END> }; CompletionStage<Boolean> stage = loader.reload(); assertThatStage(stage) .isFailed( t -> assertThat(t) .isInstanceOf(UnsupportedOperationException.class) .hasMessage( "This instance of DefaultDriverConfigLoader does not support reloading")); }</code><technical_language>this breaking compatibility? If reload() method is called in driver code a client override supportsReloading return false before, get UnsupportedOperationException in code (whereas a case this change)</technical_language>

Target:
public void should_return_failed_future_if_reloading_not_supported() { DefaultDriverConfigLoader loader = new DefaultDriverConfigLoader(() -> ConfigFactory.parseString(configSource.get()), false); assertThat(loader.supportsReloading()).isFalse(); CompletionStage<Boolean> stage = loader.reload(); assertThatStage(stage) .isFailed( t -> assertThat(t) .isInstanceOf(UnsupportedOperationException.class) .hasMessage( "This instance of DefaultDriverConfigLoader does not support reloading")); }
Source:
<code>public boolean retainAll(Collection<?> c) { for (XWikiAttachment x : this.list) { if (!((Collection<? extends XWikiAttachment>) (c)).contains(x)) remove(x); } <START> return true; <END> }</code><technical_language>supposed true if changed</technical_language>

Target:
public boolean retainAll(Collection<?> c) { boolean changed = false; Collection<XWikiAttachment> values = map.values(); for (XWikiAttachment x : values) { if (!c.contains(x)) { map.remove(x.getFilename()); changed = true; } } if (changed) { updatedMap(); } return changed; }
Source:
<code>void shutdown() { try { <START> retryExecutor.shutdownNow(); <END> } catch (Exception ignore) { } }</code><technical_language>if(retryExecutor!=null)</technical_language>

Target:
void shutdown() { try { if (retryExecutor != null) { retryExecutor.shutdownNow(); } } catch (Exception ignore) { } }
Source:
<code>private static void serializePrimitive(Type type, BlockBuilder builder, Object object) { requireNonNull(builder, "builder is null"); if (object == null) { builder.appendNull(); return; } if (type.equals(BOOLEAN)) { type.writeBoolean(builder, (Boolean) object); } else if (type.equals(BIGINT)) { type.writeLong(builder, Long.valueOf(String.valueOf(object))); } else if (type.equals(DOUBLE)) { type.writeDouble(builder, (Double) object); } else if (type.equals(INTEGER)) { type.writeLong(builder, Long.valueOf(String.valueOf(object))); } else if (type.equals(VARCHAR)) { type.writeSlice(builder, utf8Slice(String.valueOf(object))); } else if (type.equals(VARBINARY)) { type.writeSlice(builder, utf8Slice(String.valueOf(object))); } else { <START> throw new RuntimeException("Unknown primitive type: " + type.getDisplayName()); <END> } }</code><technical_language>throw new IllegalArgumentException</technical_language>

Target:
private static void serializePrimitive(Type type, BlockBuilder builder, Object object) { requireNonNull(builder, "builder is null"); if (object == null) { builder.appendNull(); return; } if (type.equals(BOOLEAN)) { type.writeBoolean(builder, (Boolean) object); } else if (type.equals(BIGINT)) { type.writeLong(builder, Long.valueOf(String.valueOf(object))); } else if (type.equals(DOUBLE)) { type.writeDouble(builder, Double.valueOf(String.valueOf(object))); } else if (type.equals(INTEGER)) { type.writeLong(builder, Integer.valueOf(String.valueOf(object))); } else if (type.equals(VARCHAR)) { type.writeSlice(builder, utf8Slice(String.valueOf(object))); } else if (type.equals(VARBINARY)) { type.writeSlice(builder, utf8Slice(String.valueOf(object))); } else { throw new IllegalArgumentException("Unknown primitive type: " + type.getDisplayName()); } }
Source:
<code>public final void init(final FilterConfig filterConfig) throws ServletException { if (!isIgnoreInitConfiguration()) { setServerName(getPropertyFromInitParams(filterConfig, "serverName", null)); logger.trace("Loading serverName property: {}", this.serverName); setService(getPropertyFromInitParams(filterConfig, "service", null)); logger.trace("Loading service property: {}", this.service); setArtifactParameterName(getPropertyFromInitParams(filterConfig, "artifactParameterName", "ticket")); logger.trace("Loading artifact parameter name property: {}", this.artifactParameterName); setServiceParameterName(getPropertyFromInitParams(filterConfig, "serviceParameterName", "service")); logger.trace("Loading serviceParameterName property: ", this.serviceParameterName); setEncodeServiceUrl(parseBoolean(getPropertyFromInitParams(filterConfig, "encodeServiceUrl", "true"))); logger.trace("Loading encodeServiceUrl property: {}", this.encodeServiceUrl); <START> final String ignorePattern = getPropertyFromInitParams(filterConfig, "ignorePattern", null); <END> if (ignorePattern != null) { setIgnorePattern(Pattern.compile(ignorePattern)); logger.trace("Loading ignorePattern property: {}", this.ignorePattern.pattern()); } initInternal(filterConfig); } init(); }</code><technical_language>this denote a RegEx</technical_language>

Target:
public final void init(final FilterConfig filterConfig) throws ServletException { if (!isIgnoreInitConfiguration()) { setServerName(getPropertyFromInitParams(filterConfig, "serverName", null)); logger.trace("Loading serverName property: {}", this.serverName); setService(getPropertyFromInitParams(filterConfig, "service", null)); logger.trace("Loading service property: {}", this.service); setArtifactParameterName(getPropertyFromInitParams(filterConfig, "artifactParameterName", "ticket")); logger.trace("Loading artifact parameter name property: {}", this.artifactParameterName); setServiceParameterName(getPropertyFromInitParams(filterConfig, "serviceParameterName", "service")); logger.trace("Loading serviceParameterName property: ", this.serviceParameterName); setEncodeServiceUrl(parseBoolean(getPropertyFromInitParams(filterConfig, "encodeServiceUrl", "true"))); logger.trace("Loading encodeServiceUrl property: {}", this.encodeServiceUrl); initInternal(filterConfig); } init(); }
Source:
<code>public void testIterator() throws Exception { final int blockCount = 3; RocksBlockStore blockStore = new RocksBlockStore(mFolder.newFolder().getAbsolutePath()); for (int i = 0; i < blockCount; i++) { blockStore.putBlock(i, Block.BlockMeta.newBuilder().setLength(i).build()); } Iterator<BlockStore.Block> iter = blockStore.iterator(); for (int i = 0; i < blockCount; i++) { <START> assertTrue(iter.hasNext()); <END> BlockStore.Block block = iter.next(); assertEquals(i, block.getId()); assertEquals(i, block.getMeta().getLength()); } }</code><technical_language>loop, check iterator is done</technical_language>

Target:
public void testIterator() throws Exception { final int blockCount = 3; RocksBlockStore blockStore = new RocksBlockStore(mFolder.newFolder().getAbsolutePath()); for (int i = 0; i < blockCount; i++) { blockStore.putBlock(i, Block.BlockMeta.newBuilder().setLength(i).build()); } Iterator<BlockStore.Block> iter = blockStore.iterator(); for (int i = 0; i < blockCount; i++) { assertTrue(iter.hasNext()); BlockStore.Block block = iter.next(); assertEquals(i, block.getId()); assertEquals(i, block.getMeta().getLength()); } assertFalse(iter.hasNext()); }
Source:
<code>public DataFormatChooserValues() { super( DataFormat.AVRO, DataFormat.BINARY, DataFormat.DATAGRAM, DataFormat.DELIMITED, DataFormat.JSON, DataFormat.LOG, DataFormat.PROTOBUF, DataFormat.SDC_JSON, DataFormat.TEXT, DataFormat.XML, <START> DataFormat.SAS <END> ); }</code><technical_language>here, making HDFS Directory origin</technical_language>

Target:
public DataFormatChooserValues() { super( DataFormat.AVRO, DataFormat.BINARY, DataFormat.DATAGRAM, DataFormat.DELIMITED, DataFormat.JSON, DataFormat.LOG, DataFormat.PROTOBUF, DataFormat.SDC_JSON, DataFormat.TEXT, DataFormat.XML ); }
Source:
<code>private void apply(TaskAdded event) { <START> getBuilder().setDescription(TASK_DESCRIPTION).build(); <END> }</code><technical_language>This line effect execution flow all. Please remove (preferably) event handler method perform a sort of change of Aggregate state</technical_language>

Target:
private void apply(TaskAdded event) { getBuilder().setDescription(TASK_DESCRIPTION); }
Source:
<code>private void setupAllMetrics() { dbConnectionMeter = MetricsUtility.addMeter("DB-Connection-meter", registry); flowFailMeter = MetricsUtility.addMeter("flow-fail-meter", registry); <START> MetricsUtility.addGauge("OOM-waiting-job-meter", registry, OOMWaitingJobCount::get); <END> MetricsUtility.addGauge("dbConnectionTime", registry, dbConnectionTime::get); }</code><technical_language>This is a gauge a meter. OOM-waiting-job-count a name</technical_language>

Target:
private void setupAllMetrics() { dbConnectionMeter = MetricsUtility.addMeter("DB-Connection-meter", registry); flowFailMeter = MetricsUtility.addMeter("flow-fail-meter", registry); MetricsUtility.addGauge("OOM-waiting-job-count", registry, OOMWaitingJobCount::get); MetricsUtility.addGauge("dbConnectionTime", registry, dbConnectionTime::get); }
Source:
<code>public void start(Listener<RespT> responseListener, Metadata headers) { super.start( new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>( responseListener) { @Override public void onClose(Status status, Metadata trailers) { try { networkTime.stop(); <START> throw new IllegalStateException(); <END> } catch (RuntimeException e) { logger.atWarning().withCause(e).log("Failed to stop networkTime"); } super.onClose(status, trailers); } }, headers); }</code><technical_language>Is this line debugging code left in? (otherwise this code end throwing exception?)</technical_language>

Target:
public void start(Listener<RespT> responseListener, Metadata headers) { super.start( new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>( responseListener) { @Override public void onClose(Status status, Metadata trailers) { try { networkTime.stop(); } catch (RuntimeException e) { logger.atWarning().withCause(e).log("Failed to stop networkTime"); } super.onClose(status, trailers); } }, headers); }
Source:
<code>public static String user(DataContext root) { <START> return java.util.Optional.ofNullable((String) DataContext.Variable.USER.get(root)) <END> .orElse("sa"); }</code><technical_language>Pls remove java.util package. java.util.Optional is imported</technical_language>

Target:
public static String user(DataContext root) { return Objects.requireNonNull(DataContext.Variable.USER.get(root)); }
Source:
<code>public ResultSetMapper mapperFor(Class type, StatementContext ctx) { Map<String, Object> attributes = ctx.getAttributes(); <START> Boolean bypassCache = attributes.containsKey("bypassMappingRegistryCache") ? (Boolean) ctx.getAttribute("bypassMappingRegistryCache") : Boolean.FALSE; <END> if (cache.containsKey(type)) { ResultSetMapper mapper = cache.get(type); if (mapper != null) { return mapper; } } for (ResultSetMapperFactory factory : factories) { if (factory.accepts(type, ctx)) { ResultSetMapper mapper = factory.mapperFor(type, ctx); if (!bypassCache.booleanValue()) { cache.put(type, mapper); } return mapper; } } if (BUILT_IN_MAPPERS.accepts(type, ctx)) { ResultSetMapper mapper = BUILT_IN_MAPPERS.mapperFor(type, ctx); cache.put(type, mapper); return mapper; } throw new DBIException("No mapper registered for " + type.getName()) {}; }</code><technical_language>Boolean.valueOf avoid ClassCastException</technical_language>

Target:
public ResultSetMapper mapperFor(Class type, StatementContext ctx) { Boolean bypassCache = Boolean.valueOf(String.valueOf(ctx.getAttribute("bypassMappingRegistryCache"))); if (cache.containsKey(type)) { ResultSetMapper mapper = cache.get(type); if (mapper != null) { return mapper; } } for (ResultSetMapperFactory factory : factories) { if (factory.accepts(type, ctx)) { ResultSetMapper mapper = factory.mapperFor(type, ctx); if (!bypassCache.booleanValue()) { cache.put(type, mapper); } return mapper; } } if (BUILT_IN_MAPPERS.accepts(type, ctx)) { ResultSetMapper mapper = BUILT_IN_MAPPERS.mapperFor(type, ctx); cache.put(type, mapper); return mapper; } throw new DBIException("No mapper registered for " + type.getName()) {}; }
Source:
<code>public byte[] toByteArray() { if (isOpCode()) { checkState(data == null); return new byte[]{ (byte) opcode }; } else if (data != null) { ArrayList<Byte> res = new ArrayList<>(); if (opcode < OP_PUSHDATA1) { checkState(data.length == opcode); res.add((byte) opcode); } else if (opcode == OP_PUSHDATA1) { checkState(data.length <= 0xFF); res.add((byte) OP_PUSHDATA1); res.add((byte) data.length); } else if (opcode == OP_PUSHDATA2) { checkState(data.length <= 0xFFFF); res.add((byte) OP_PUSHDATA2); res.add((byte) (0xFF & data.length)); res.add((byte) (0xFF & (data.length >> 8))); } else if (opcode == OP_PUSHDATA4) { checkState(data.length <= Script.MAX_SCRIPT_ELEMENT_SIZE); <START> res.add((byte) OP_PUSHDATA4); <END> res.add((byte) (0xFF & data.length)); res.add((byte) (0xFF & (data.length >> 8))); res.add((byte) (0xFF & (data.length >> 16))); res.add((byte) (0xFF & (data.length >> 24))); } else { throw new RuntimeException("Unimplemented"); } return Bytes.concat(Bytes.toArray(res), data); } else { return new byte[] { (byte) opcode }; } }</code><technical_language>I uint32ToByteArrayLE() here. Kind of inlining logic method is a step imho</technical_language>

Target:
public byte[] toByteArray() { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { write(stream); } catch (IOException e) { throw new RuntimeException(e); } return stream.toByteArray(); }
Source:
<code>public void testApplicationIdContainsSpace() { IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, () -> new HttpLogOptions().setApplicationId("AppId 78912345")); <START> assertEquals(thrown.getMessage(), "'applicationId' must not contain a space."); <END> }</code><technical_language>Asserting exception type is sufficient</technical_language>

Target:
public void testApplicationIdContainsSpace() { IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, () -> new HttpLogOptions().setApplicationId("AppId 78912345")); }
Source:
<code>public static Properties defaultProperties() { Properties properties = BaseHttpApiMetadata.defaultProperties(); properties.setProperty(Constants.PROPERTY_MAX_RETRIES, "5"); <START> properties.setProperty(ShipyardProperties.SHIPYARD_CREDENTIAL, "<remote-service-key-given-by-shipyard-cli>"); <END> return properties; }</code><technical_language>Is this a _good_ for this property? Api work if users override it? this passed credential</technical_language>

Target:
public static Properties defaultProperties() { return BaseHttpApiMetadata.defaultProperties(); }
Source:
<code>public void setUp() throws Exception { Logger.getLogger(ConcurStandardAccountingExtractValidationServiceImpl.class).setLevel(Level.DEBUG); concurStandardAccountingExtractService = new ConcurStandardAccountingExtractValidationServiceImpl(); <START> double[] debits = {100.75, -50.45}; <END> double[] credits = {50.45}; file = ConcurStandardAccountingExtractFileFixture.buildConcurStandardAccountingExtractFile(debits, credits); }</code><technical_language>KualiDecimals instead of doubles</technical_language>

Target:
public void setUp() throws Exception { Logger.getLogger(ConcurStandardAccountingExtractValidationServiceImpl.class).setLevel(Level.DEBUG); concurStandardAccountingValidationService = new ConcurStandardAccountingExtractValidationServiceImpl(); KualiDecimal[] debits = {new KualiDecimal(100.75), new KualiDecimal(-50.45)}; KualiDecimal[] credits = {}; file = ConcurStandardAccountingExtractFileFixture.buildConcurStandardAccountingExtractFile(debits, credits); }
Source:
<code>private String convertMapToString(ModelNode modelNode) { <START> StringBuffer sb = new StringBuffer(); <END> String[] ss = strip(modelNode.asString().trim(), '{', '}').split(","); boolean first = true; for (String s : ss) { if (first) { first = false; } else { sb.append(","); } String[] entry = s.split("=>"); sb.append(strip(entry[0].trim(), '"', '"') + ":" + strip(entry[1].trim(), '"', '"')); } return sb.toString(); }</code><technical_language>s/StringBuffer/StringBuilder</technical_language>

Target:
private String convertMapToString(ModelNode modelNode) { StringBuilder sb = new StringBuilder(); boolean first = true; for (String key : modelNode.keys()) { ModelNode value = modelNode.get(key); if (first) { first = false; } else { sb.append(","); } sb.append(key + ":" + value.asString()); } return sb.toString(); }
Source:
<code><START> LauncherDiscoveryRequest buildRequest(Bundle bundle) { <END> List<DiscoverySelector> selectors = new ArrayList<>(baseSelectors.size() + 1); selectors.add(BundleSelector.selectBundle(bundle)); return LauncherDiscoveryRequestBuilder.request() .configurationParameter(BundleEngine.CHECK_UNRESOLVED, unresolved) .selectors(selectors) .build(); }</code><technical_language>this copy in baseSelectors? I currently empty, code implies want add another selector base selectors</technical_language>

Target:
LauncherDiscoveryRequest buildRequest(Bundle bundle) { List<DiscoverySelector> selectors = new ArrayList<>(baseSelectors.size() + 1); selectors.addAll(baseSelectors); selectors.add(BundleSelector.selectBundle(bundle)); return LauncherDiscoveryRequestBuilder.request() .configurationParameter(BundleEngine.CHECK_UNRESOLVED, unresolved) .selectors(selectors) .build(); }
Source:
<code>public boolean handleClick(int x, int y, int k) { <START> return this.inputField.mouseClicked(x,y,k); <END> }</code><technical_language>Formatting</technical_language>

Target:
public boolean handleClick(int x, int y, int k) { if (k == 1 && x >= this.x && x < this.x + width && y >= this.y && y < y + height) setText(""); return mouseClicked(x, y, k); }
Source:
<code>public static URLNotification parseXML(final InputStream message) throws Exception{ <START> parser.parse(message); <END> return parser.getNotification(); }</code><technical_language>Create a new url parser time, this return a previously parsed notification object if a message is empty. New instances allow multiple threads parse time..</technical_language>

Target:
public static URLNotification parseXML(final InputStream message) throws Exception{ URLNotificationParser parser = new URLNotificationParser(); parser.parse(message); return parser.getNotification(); }
Source:
<code>void addCellToPutMutation(Put put, byte[] family, byte[] column, long ts, byte[] value) throws Exception { byte[] rowKey = put.getRow(); <START> Cell cell = new KeyValue(rowKey, family, column, ts, KeyValue.Type.Put, value); <END> put.add(cell); }</code><technical_language>CellUtil.createCell making KeyValues directly. (KeyValues InterfaceAudience.Private, means projects of HBase refer them.)</technical_language>

Target:
void addCellToPutMutation(Put put, byte[] family, byte[] column, long ts, byte[] value) throws Exception { byte[] rowKey = put.getRow(); Cell cell = CellUtil.createCell(rowKey, family, column, ts, KeyValue.Type.Put.getCode(), value); put.add(cell); }