auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String description() { return format( "Produce heuristic memory setting recommendations for the Neo4j JVM heap and pagecache. The " + "heuristic is based on the total memory of the system the command is running on, or on the amount of " + "memory specified with the --memory argument. The heuristic assumes that the system is dedicated to " + "running Neo4j. If this is not the case, then use the --memory argument to specify how much memory " + "can be expected to be dedicated to Neo4j.%n" + "%n" + "By default, the command will print its recommendations to the console in a human readable form. " + "The command can alternatively print what the neo4j.conf file would look like with the new settings " + "by specifying --print-conf, and those updated settings can be written back to the conf file " + "(updated in-place) by specifying --update-conf. Any existing settings already enabled in the file " + "will not be updated unless --overwrite is specified.%n" + "%n" + "If --print-conf or --update-conf is specified, then the command will by default look for, and work " + <START> "on, the standard neo4j.conf file. A different file can be specified with the --conf-file argument." ); <END> }</code><technical_language>objection "standard neo4j.conf file"</technical_language>

Target:
public String description() { return format( "Print heuristic memory setting recommendations for the Neo4j JVM heap and pagecache. The " + "heuristic is based on the total memory of the system the command is running on, or on the amount of " + "memory specified with the --memory argument. The heuristic assumes that the system is dedicated to " + "running Neo4j. If this is not the case, then use the --memory argument to specify how much memory " + "can be expected to be dedicated to Neo4j.%n" + "%n" + "The output is formatted such that it can be copy-posted into the neo4j.conf file." ); }
Source:
<code>public void bulkCancelJobsDependingOnStatusTest() { final String serverTemplateTest = "serverTemplateTest"; presenter.setSelectedServerTemplate(serverTemplateTest); String deploymentId = "deploymentId"; String key = "key"; Long jobId_1 = new Random().nextLong(); Long jobId_2 = jobId_1 +1; Long jobId_3 = jobId_2 +1; ArrayList<RequestSummary> requestSummaries= new ArrayList<>(); requestSummaries.add(createRequestSummary(jobId_1, key, deploymentId, RequestStatus.QUEUED)); requestSummaries.add(createRequestSummary(jobId_2, key, deploymentId, <START> RequestStatus.QUEUED)); <END> requestSummaries.add(createRequestSummary(jobId_3, key, deploymentId, RequestStatus.ERROR)); presenter.bulkCancel(requestSummaries); verify(executorServiceMock).cancelRequest(anyString(),anyString(),eq(jobId_1)); verify(executorServiceMock).cancelRequest(anyString(),anyString(),eq(jobId_2)); verify(executorServiceMock,never()).cancelRequest(anyString(),anyString(),eq(jobId_3)); verify(viewMock).displayNotification(Constants.INSTANCE.RequestCanceled(jobId_1)); verify(viewMock).displayNotification(Constants.INSTANCE.RequestCanceled(jobId_2)); verify(viewMock).displayNotification(Constants.INSTANCE.Job_Can_Not_Be_Cancelled(jobId_3)); }</code><technical_language>changing this RequestStatus.RUNNING, queued</technical_language>

Target:
public void bulkCancelJobsDependingOnStatusTest() { final String serverTemplateTest = "serverTemplateTest"; presenter.setSelectedServerTemplate(serverTemplateTest); String deploymentId = "deploymentId"; String key = "key"; Long jobId_1 = new Random().nextLong(); Long jobId_2 = jobId_1 + 1; Long jobId_3 = jobId_2 + 1; ArrayList<RequestSummary> requestSummaries = new ArrayList<>(); requestSummaries.add(createRequestSummary(jobId_1, key, deploymentId, RequestStatus.QUEUED)); requestSummaries.add(createRequestSummary(jobId_2, key, deploymentId, RequestStatus.RUNNING)); requestSummaries.add(createRequestSummary(jobId_3, key, deploymentId, RequestStatus.ERROR)); presenter.bulkCancel(requestSummaries); verify(executorServiceMock).cancelRequest(anyString(), anyString(), eq(jobId_1)); verify(executorServiceMock).cancelRequest(anyString(), anyString(), eq(jobId_2)); verify(executorServiceMock, never()).cancelRequest(anyString(), anyString(), eq(jobId_3)); verify(viewMock).displayNotification(Constants.INSTANCE.RequestCanceled(jobId_1)); verify(viewMock).displayNotification(Constants.INSTANCE.RequestCanceled(jobId_2)); verify(viewMock).displayNotification(Constants.INSTANCE.Job_Can_Not_Be_Cancelled(jobId_3)); }
Source:
<code>public FeedbackSessionQuestionsBundle getFeedbackSessionQuestionsForStudent( String feedbackSessionName, String courseId, String userEmail) throws EntityDoesNotExistException { FeedbackSessionAttributes fsa = fsDb.getFeedbackSession( courseId, feedbackSessionName); StudentAttributes student = studentsLogic.getStudentForEmail(courseId, userEmail); if (fsa == null) { throw new EntityDoesNotExistException( "Trying to get a feedback session that does not exist."); } if (student == null) { throw new EntityDoesNotExistException( "Trying to get a feedback session for student that does not exist."); } Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> bundle = new HashMap<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>(); Map<String, Map<String, String>> recipientList = new HashMap<String, Map<String, String>>(); List<FeedbackQuestionAttributes> questions = fqLogic.getFeedbackQuestionsForStudents(feedbackSessionName, courseId); <START> Set<String> hiddenInstructorEmails = getHiddenInstrutorEmails(courseId); <END> InstructorAttributes instructorGiver = null; StudentAttributes studentGiver = student; for (FeedbackQuestionAttributes question : questions) { updateBundleAndRecipientListWithResponsesForStudent(userEmail, student, bundle, recipientList, question, instructorGiver, studentGiver, hiddenInstructorEmails); } return new FeedbackSessionQuestionsBundle(fsa, bundle, recipientList); }</code><technical_language>@unyoungwax, do check if questions instructors recipients</technical_language>

Target:
public FeedbackSessionQuestionsBundle getFeedbackSessionQuestionsForStudent( String feedbackSessionName, String courseId, String userEmail) throws EntityDoesNotExistException { FeedbackSessionAttributes fsa = fsDb.getFeedbackSession( courseId, feedbackSessionName); StudentAttributes student = studentsLogic.getStudentForEmail(courseId, userEmail); if (fsa == null) { throw new EntityDoesNotExistException( "Trying to get a feedback session that does not exist."); } if (student == null) { throw new EntityDoesNotExistException( "Trying to get a feedback session for student that does not exist."); } Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> bundle = new HashMap<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>(); Map<String, Map<String, String>> recipientList = new HashMap<String, Map<String, String>>(); List<FeedbackQuestionAttributes> questions = fqLogic.getFeedbackQuestionsForStudents(feedbackSessionName, courseId); Set<String> hiddenInstructorEmails = null; for (FeedbackQuestionAttributes question : questions) { if (question.getRecipientType() == FeedbackParticipantType.INSTRUCTORS) { hiddenInstructorEmails = getHiddenInstructorEmails(courseId); break; } } for (FeedbackQuestionAttributes question : questions) { updateBundleAndRecipientListWithResponsesForStudent(userEmail, student, bundle, recipientList, question, hiddenInstructorEmails); } return new FeedbackSessionQuestionsBundle(fsa, bundle, recipientList); }
Source:
<code>public void testCodec() { try { FileInputStream inputStream = new FileInputStream("src\\main\\jni\\test_sound_mono_48.pcm"); <START> FileOutputStream outputStream = new FileOutputStream("src\\main\\jni\\test_sound_mono_48_decoded.pcm", false); <END> OpusJni opus = new OpusJni(); opus.setOpusObserverNative(this); opus.sayHelloNative(); opus.initNative(); try { byte[] input = new byte[960]; short[] inputData = new short[480]; byte[] output = new byte[960]; while (inputStream.read(input) == 960) { ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(inputData); byte[] encodedData = opus.encodeNative(inputData); short[] decodedData = opus.decodeNative(encodedData); ByteBuffer.wrap(output).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(decodedData); outputStream.write(output); } } finally { inputStream.close(); outputStream.close(); opus.closeNative(); } } catch (IOException exc) { System.out.println("IOException: " + exc.getMessage()); return; } org.restcomm.media.spi.dsp.Codec compressor = new Encoder(); long s = System.nanoTime(); compressor.process(buffer); long f = System.nanoTime(); System.out.println("Duration=" + (f-s)); org.restcomm.media.spi.dsp.Codec decompressor = new Decoder(); s = System.nanoTime(); decompressor.process(buffer); f = System.nanoTime(); System.out.println("Duration=" + (f-s)); }</code><technical_language>Create temporary file instead delete test. Example: Path tempFile = Files.createTempFile("tempfiles", ".tmp");</technical_language>

Target:
public void testCodec() throws Exception { boolean testPassed = false; try { OpusJni opus = new OpusJni(); opus.initNative(); final int packetSize = 480; File outputFile = File.createTempFile("opustest", ".tmp"); byte[] output = new byte[2 * packetSize]; try (FileInputStream inputStream = new FileInputStream("src\\test\\resources\\test_sound_mono_48.pcm"); FileOutputStream outputStream = new FileOutputStream(outputFile, false)) { byte[] input = new byte[packetSize]; short[] inputData = new short[packetSize]; while (inputStream.read(input) == 2 * packetSize) { ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(inputData); byte[] encodedData = opus.encodeNative(inputData); short[] decodedData = opus.decodeNative(encodedData); ByteBuffer.wrap(output).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(decodedData); outputStream.write(output); } testPassed = true; } opus.closeNative(); outputFile.delete(); } catch (IOException exc) { log.error("IOException: " + exc.getMessage()); fail("Opus test file access error"); } assertTrue(testPassed); }
Source:
<code>public static AsanaError mapException(HttpResponseException exception) throws AsanaError { switch (exception.getStatusCode()) { case ForbiddenError.STATUS: String constructedErrorMsg = constructMessage("", exception); String premiumOnlyStr = "not available for free"; <START> if (constructedErrorMsg != null && constructedErrorMsg.contains(premiumOnlyStr)) { <END> return new PremiumOnlyError(exception); } return new ForbiddenError(exception); case InvalidRequestError.STATUS: return new InvalidRequestError(exception); case InvalidTokenError.STATUS: return new InvalidTokenError(exception); case NoAuthorizationError.STATUS: return new NoAuthorizationError(exception); case NotFoundError.STATUS: return new NotFoundError(exception); case PremiumOnlyError.STATUS: return new PremiumOnlyError(exception); case RateLimitEnforcedError.STATUS: return new RateLimitEnforcedError(exception); case ServerError.STATUS: return new ServerError(exception); default: return new AsanaError(exception.getStatusMessage(), exception.getStatusCode(), exception); } }</code><technical_language>constructedErrorMsg null? If exception is thrown constructMessage initial string "" is returned. However, this sort of defensive programming is on-brand for Java</technical_language>

Target:
public static AsanaError mapException(HttpResponseException exception) throws AsanaError { switch (exception.getStatusCode()) { case ForbiddenError.STATUS: String constructedErrorMsg = constructMessage("", exception); String premiumOnlyStr = "not available for free"; if (constructedErrorMsg.contains(premiumOnlyStr)) { return new PremiumOnlyError(exception); } return new ForbiddenError(exception); case InvalidRequestError.STATUS: return new InvalidRequestError(exception); case InvalidTokenError.STATUS: return new InvalidTokenError(exception); case NoAuthorizationError.STATUS: return new NoAuthorizationError(exception); case NotFoundError.STATUS: return new NotFoundError(exception); case PremiumOnlyError.STATUS: return new PremiumOnlyError(exception); case RateLimitEnforcedError.STATUS: return new RateLimitEnforcedError(exception); case ServerError.STATUS: return new ServerError(exception); default: return new AsanaError(exception.getStatusMessage(), exception.getStatusCode(), exception); } }
Source:
<code>public void testErrorWhileInitializing() throws Exception { TestContext testContext = createTestContext(Dispatcher.ExecutionType.SUBMISSION); DispatcherJob dispatcherJob = testContext.dispatcherJob; RuntimeException exception = new RuntimeException("Artificial failure in runner initialization"); testContext.failInitialization(exception); Assert.assertThat(dispatcherJob.isInitialized(), is(true)); assertJobStatus(dispatcherJob, JobStatus.FAILED); ArchivedExecutionGraph aeg = dispatcherJob.getResultFuture().get(); Assert.assertThat(aeg.getFailureInfo().getException().deserializeError(ClassLoader.getSystemClassLoader()), is(exception)); <START> Assert.assertTrue(dispatcherJob.closeAsync().isDone() && dispatcherJob.closeAsync().isCompletedExceptionally()); <END> }</code><technical_language>I this case</technical_language>

Target:
public void testErrorWhileInitializing() throws Exception { TestContext testContext = createTestContext(); DispatcherJob dispatcherJob = testContext.getDispatcherJob(); RuntimeException exception = new RuntimeException("Artificial failure in runner initialization"); testContext.failInitialization(exception); assertThat(dispatcherJob.isInitialized(), is(true)); assertJobStatus(dispatcherJob, JobStatus.FAILED); ArchivedExecutionGraph aeg = dispatcherJob.getResultFuture().get().getArchivedExecutionGraph(); assertThat(aeg.getFailureInfo().getException().deserializeError(ClassLoader.getSystemClassLoader()), is(exception)); }
Source:
<code>public void enforceSnapshotSync(DiscoveryServiceEvent event) { <START> for (CorfuLogReplicationRuntime standbyRuntime : runtimeToRemoteCluster.values()) { <END> standbyRuntime.getSourceManager().stopLogReplication(); standbyRuntime.getSourceManager().startSnapshotSync(); log.info("Enforce Start full snapshot sync for cluster with uuid {}", standbyRuntime.getRemoteClusterId(), event.getEventUUID()); } event.getCf().complete(event.getEventUUID()); }</code><technical_language>If runtimeToRemoteCluster is empty here, I log if received request not... good a debug level log this for loop print eventId runtimeToRemoteCluster size</technical_language>

Target:
public void enforceSnapshotSync(DiscoveryServiceEvent event) { CorfuLogReplicationRuntime standbyRuntime = runtimeToRemoteCluster.get(event.getRemoteClusterInfo().getClusterId()); if (standbyRuntime == null) { log.warn("Failed to start enforceSnapshotSync for cluster as it is not on the standby list.", event.getRemoteClusterInfo()); } else { log.info("EnforceSnapshotSync for cluster {}", standbyRuntime.getRemoteClusterId()); standbyRuntime.getSourceManager().stopLogReplication(); standbyRuntime.getSourceManager().startSnapshotSync(); } }
Source:
<code>public FormInstance build() { List<FormValue> formValues = new ArrayList<>(); List<FormElement> formElements = formDefinition.getFormElements(); for (FormElement formElement : formElements) { Object value = params.get(formElement.getName()); if (value != null && !(formElement.getType().equals(FieldTypeConstants.SELECT) <START> && ((List<String>) value).size() == 0)) { <END> formValues.add(buildFormElementValueByType(formElement, value)); } } FormInstance formInstance = new FormInstance(formDefinition.getTitle(), formDefinition.getConfigurationName(), instanceId); formInstance.setFormValues(formValues); return formInstance; }</code><technical_language>I confused this, move clause of this if a single line</technical_language>

Target:
public FormInstance build() throws FormInstanceBuilderException { List<FormValue> formValues = new ArrayList<>(); List<FormElement> formElements = formDefinition.getFormElements(); for (FormElement formElement : formElements) { Object value = params.get(formElement.getName()); if (value != null && !(formElement.getType().equals(FieldTypeConstants.SELECT) && ((List<String>) value).size() == 0)) { formValues.add(buildFormElementValueByType(formElement, value)); } } FormInstance formInstance = new FormInstance(formDefinition.getTitle(), formDefinition.getConfigurationName(), instanceId); formInstance.setFormValues(formValues); return formInstance; }
Source:
<code>public void cleanUp() { try { ProjectModelTestData.deleteProject(fixture); <START> } catch (CoreException e) { <END> fail(e.getMessage()); } }</code><technical_language>check if some files delete, in case this error happens</technical_language>

Target:
public void cleanUp() { ProjectModelTestData.deleteProject(fixture); }
Source:
<code>public static void main(final String[] args) { String jobName = null; String jobGroup = "systemJobs"; switch (args.length) { case 0: System.out.println("Job names:"); break; case 2: jobGroup = args[1]; case 1: jobName = args[0]; break; default: System.out.println("Expects 0, 1, or 2 arguments"); System.exit(1); } if (!StringUtils.isEmpty(jobName) && !StringUtils.isEmpty(jobGroup)) { try { StdSchedulerFactory sf = new StdSchedulerFactory(); sf.initialize("quartz.properties"); Scheduler scheduler = sf.getScheduler(); TriggerKey triggerId = triggerKey("triggerJobNow_" + new Date().getTime(), "triggerJob"); JobKey jobId = jobKey(jobName, jobGroup); Trigger qzTrigger = newTrigger() .withIdentity(triggerId) .startNow() .forJob(jobId) .build(); scheduler.scheduleJob(qzTrigger); scheduler.shutdown(); } catch (SchedulerException se) { se.printStackTrace(); } } else { try { StdSchedulerFactory sf = new StdSchedulerFactory(); sf.initialize("quartz.properties"); Scheduler scheduler = sf.getScheduler(); for (String group: scheduler.getJobGroupNames()) { for (JobKey jobKey : scheduler.getJobKeys(groupEquals(group))) { <START> System.out.println("Found job: \"" + jobKey.getName() <END> + "\" in group: \"" + jobKey.getGroup() + "\""); } } scheduler.shutdown(); } catch (SchedulerException se) { se.printStackTrace(); } } }</code><technical_language>changed this line, a logged statement instead of system.out</technical_language>

Target:
public static void main(final String[] args) { String jobName = null; String jobGroup = "systemJobs"; switch (args.length) { case 0: break; case 2: jobGroup = args[1]; case 1: jobName = args[0]; break; default: LOGGER.error("Expects 0, 1, or 2 arguments." + "\n 0 arguments: outputs all Jobs in system" + "\n 1st argument: job name" + "\n 2nd argument: group name (defaults to \"systemJobs\" if not provided)"); System.exit(1); } if (!StringUtils.isEmpty(jobName) && !StringUtils.isEmpty(jobGroup)) { try { StdSchedulerFactory sf = new StdSchedulerFactory(); sf.initialize("quartz.properties"); Scheduler scheduler = sf.getScheduler(); TriggerKey triggerId = triggerKey("triggerJobNow_" + new Date().getTime(), "triggerJob"); JobKey jobId = jobKey(jobName, jobGroup); Trigger qzTrigger = newTrigger() .withIdentity(triggerId) .startNow() .forJob(jobId) .build(); scheduler.scheduleJob(qzTrigger); scheduler.shutdown(); } catch (SchedulerException se) { se.printStackTrace(); } } else { try { StdSchedulerFactory sf = new StdSchedulerFactory(); sf.initialize("quartz.properties"); Scheduler scheduler = sf.getScheduler(); StringBuilder output = new StringBuilder(); output.append("Found jobs:\n"); for (String group: scheduler.getJobGroupNames()) { for (JobKey jobKey : scheduler.getJobKeys(groupEquals(group))) { output.append(" Job: [" + jobKey.getName() + "] Group: [" + jobKey.getGroup() + "]\n"); } } scheduler.shutdown(); LOGGER.info(output.toString()); } catch (SchedulerException se) { se.printStackTrace(); } } }
Source:
<code>public void onBlocked() { super.onBlocked(); <START> playPauseButton.setImageResource(R.drawable.ic_pause_white); <END> animatePlayButtons(false, 100); getRootView().setKeepScreenOn(false); service.resetNotification(); service.updateNotification(R.drawable.ic_play_arrow_white); }</code><technical_language>I this is wrong pause icon is set suggestion playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);</technical_language>

Target:
public void onBlocked() { super.onBlocked(); playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp); animatePlayButtons(false, 100); getRootView().setKeepScreenOn(false); service.resetNotification(); service.updateNotification(R.drawable.exo_controls_play); }
Source:
<code>public void createPartControl(Composite parent) { parentControl = parent; if (error != null) { <START> new StatusPart(getSite(), parent, error); <END> } }</code><technical_language>handle StatusPart separately</technical_language>

Target:
public void createPartControl(Composite parent) { parentControl = parent; if (error != null) { new StatusPart(parent, error); } }
Source:
<code>public MetadataExtension parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException { List<MetadataInfo> metadataInfos = null; List<MetadataPointer> pointers = null; while (true) { <START> XmlPullParser.Event eventType = parser.next(); <END> if (eventType == XmlPullParser.Event.START_ELEMENT) { if (parser.getName().equals("info")) { if (metadataInfos == null) { metadataInfos = new ArrayList<>(); } MetadataInfo info = parseInfo(parser); if (info.getId() != null) { metadataInfos.add(info); } } if (parser.getName().equals("pointer")) { if (pointers == null) { pointers = new ArrayList<>(); } pointers.add(parsePointer(parser)); } } else if (eventType == XmlPullParser.Event.END_ELEMENT) { if (parser.getDepth() == initialDepth) { break; } } } return new MetadataExtension(metadataInfos, pointers); }</code><technical_language>nextTag() switch-case instead</technical_language>

Target:
public MetadataExtension parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException { List<MetadataInfo> metadataInfos = null; List<MetadataPointer> pointers = null; outerloop: while (true) { XmlPullParser.TagEvent eventType = parser.nextTag(); switch (eventType) { case START_ELEMENT: if (parser.getName().equals("info")) { if (metadataInfos == null) { metadataInfos = new ArrayList<>(); } MetadataInfo info = parseInfo(parser); if (info.getId() != null) { metadataInfos.add(info); } } if (parser.getName().equals("pointer")) { if (pointers == null) { pointers = new ArrayList<>(); } pointers.add(parsePointer(parser)); } break; case END_ELEMENT: if (parser.getDepth() == initialDepth) { break outerloop; } } } return new MetadataExtension(metadataInfos, pointers); }
Source:
<code>public List<WorkflowAction> findActions(List<WorkflowStep> steps, User user) throws DotDataException, DotSecurityException { <START> List<WorkflowAction> actions = new ArrayList<>(); <END> for(WorkflowStep step : steps) { actions.addAll(workFlowFactory.findActions(step)); } actions = APILocator.getPermissionAPI().filterCollection(actions, PermissionAPI.PERMISSION_USE, true, user); return actions; }</code><technical_language>Immutable</technical_language>

Target:
public List<WorkflowAction> findActions(List<WorkflowStep> steps, User user) throws DotDataException, DotSecurityException { final ImmutableList.Builder<WorkflowAction> actions = new ImmutableList.Builder<>(); for(WorkflowStep step : steps) { actions.addAll(workFlowFactory.findActions(step)); } return APILocator.getPermissionAPI().filterCollection(actions.build(), PermissionAPI.PERMISSION_USE, true, user); }
Source:
<code>private List<String> split(String input) { List<String> <START> result=new <END> ArrayList<>(); String[] split = input.split(SEPARATOR); for (String string : split) { if(string != null && string.trim().length()>0) { result.add(string.trim()); } } return result; }</code><technical_language>Missing blanks "="</technical_language>

Target:
private List<String> split(String input) { List<String> result = new ArrayList<>(); String[] split = input.split(SEPARATOR); for (String string : split) { if (string != null) { String trimmed = string.trim(); if (trimmed.length() > 0) { result.add(trimmed); } } } return result; }
Source:
<code>public void testActiveTransactionCancellation() { DataStoreTransaction dtx = elide.getDataStore().beginTransaction(); transactionRegistry.addRunningTransaction(UUID.fromString("edc4a871-dff2-4054-804e-d80075cf828d"), dtx); AsyncQuery asyncQuery1 = createAsyncQueryTestObject("edc4a871-dff2-4054-804e-d80075cf828d", 1577883600000L, QueryStatus.QUEUED); AsyncQuery asyncQuery2 = createAsyncQueryTestObject("edc4a871-dff2-4054-804e-d80075cf827d", 1577883600000L, QueryStatus.QUEUED); Collection<AsyncQuery> asyncCollection = new ArrayList<AsyncQuery>(); asyncCollection.add(asyncQuery1); asyncCollection.add(asyncQuery2); when(cancelThread.getAsyncQueryDao().loadAsyncQueryCollection(any())).thenReturn(asyncCollection); cancelThread.cancelAsyncQuery(); ArgumentCaptor<FilterExpression> filterCaptor = ArgumentCaptor.forClass(FilterExpression.class); <START> verify(asyncQueryDao, times(1)).updateStatusAsyncQueryCollection(filterCaptor.capture(), any()); <END> assertEquals("asyncQuery.id IN [[edc4a871-dff2-4054-804e-d80075cf828d]]", filterCaptor.getValue().toString()); }</code><technical_language>verify status argument here</technical_language>

Target:
public void testActiveTransactionCancellation() { DataStoreTransaction dtx = elide.getDataStore().beginTransaction(); transactionRegistry.addRunningTransaction(UUID.fromString("edc4a871-dff2-4054-804e-d80075cf828d"), dtx); AsyncQuery asyncQuery1 = createAsyncQueryTestObject("edc4a871-dff2-4054-804e-d80075cf828d", 1577883600000L, QueryStatus.QUEUED); AsyncQuery asyncQuery2 = createAsyncQueryTestObject("edc4a871-dff2-4054-804e-d80075cf827d", 1577883600000L, QueryStatus.QUEUED); Collection<AsyncQuery> asyncCollection = new ArrayList<AsyncQuery>(); asyncCollection.add(asyncQuery1); asyncCollection.add(asyncQuery2); when(cancelThread.getAsyncQueryDao().loadAsyncQueryCollection(any())).thenReturn(asyncCollection); cancelThread.cancelAsyncQuery(); ArgumentCaptor<FilterExpression> filterCaptor = ArgumentCaptor.forClass(FilterExpression.class); ArgumentCaptor<QueryStatus> statusCaptor = ArgumentCaptor.forClass(QueryStatus.class); verify(asyncQueryDao, times(1)).loadAsyncQueryCollection(any()); verify(asyncQueryDao, times(1)).updateStatusAsyncQueryCollection(filterCaptor.capture(), statusCaptor.capture()); assertEquals("asyncQuery.id IN [[edc4a871-dff2-4054-804e-d80075cf828d]]", filterCaptor.getValue().toString()); assertEquals("CANCEL_COMPLETE", statusCaptor.getValue().toString()); }
Source:
<code>public static Settings getDepartmentsSettings() { Settings.Builder settingsBuilder = Settings.builder(). <START> loadFromStream("departments-index-config.yml", Indexer.class.getResourceAsStream("/search/departments/departments-index-config.yml")); <END> return settingsBuilder.build(); }</code><technical_language>need close stream</technical_language>

Target:
public static Settings getDepartmentsSettings() throws IOException { try (InputStream inputStream = ZebedeeContentIndexer.class.getResourceAsStream("/search/departments/departments-index-config.yml")) { Settings.Builder settingsBuilder = Settings.builder(). loadFromStream("departments-index-config.yml", inputStream); return settingsBuilder.build(); } }
Source:
<code>public void testAnnouncementUnexpectedMessage() throws InterruptedException { String TOPIC_NAME = "topic1"; ChannelMonitorAgent channelMonitorAgent = new DefaultChannelMonitorAgent(msbContext); CountDownLatch announcementReceived = new CountDownLatch(1); Callback<AggregatorStats> handler = stats -> { assertTrue(stats.getTopicInfoMap().containsKey(TOPIC_NAME)); assertEquals(1, stats.getTopicInfoMap().get(TOPIC_NAME).getProducers().size()); announcementReceived.countDown(); }; MockAdapter.pushRequestMessage(Utils.TOPIC_ANNOUNCE, Utils.toJson(TestUtils.createMsbRequestMessageWithSimplePayload(Utils.TOPIC_ANNOUNCE), msbContext.getPayloadMapper())); ChannelMonitorAggregator channelMonitorAggregator = msbContext.getObjectFactory().createChannelMonitorAggregator(handler); channelMonitorAggregator.start(false, ChannelMonitorAggregator.DEFAULT_HEARTBEAT_INTERVAL_MS, ChannelMonitorAggregator.DEFAULT_HEARTBEAT_TIMEOUT_MS); channelMonitorAgent.producerTopicCreated(TOPIC_NAME); <START> assertTrue("Announcement was not received", announcementReceived.await(RequesterResponderIT.MESSAGE_TRANSMISSION_TIME * 2, TimeUnit.MILLISECONDS)); <END> }</code><technical_language>a dangerous assert fragile</technical_language>

Target:
public void testAnnouncementUnexpectedMessage() throws InterruptedException { String TOPIC_NAME = "topic2"; CountDownLatch announcementReceived = monitorPrepareAwaitOnAnnouncement(TOPIC_NAME); MockAdapter.pushRequestMessage(Utils.TOPIC_ANNOUNCE, Utils.toJson(TestUtils.createMsbRequestMessageWithSimplePayload(Utils.TOPIC_ANNOUNCE), msbContext.getPayloadMapper())); assertFalse("Broken announcement was handled", announcementReceived.await(RequesterResponderIT.MESSAGE_TRANSMISSION_TIME / 2, TimeUnit.MILLISECONDS)); ChannelMonitorAgent channelMonitorAgent = new DefaultChannelMonitorAgent(msbContext); channelMonitorAgent.producerTopicCreated(TOPIC_NAME); assertTrue("Announcement was not received", announcementReceived.await(RequesterResponderIT.MESSAGE_TRANSMISSION_TIME, TimeUnit.MILLISECONDS)); }
Source:
<code>public void processRecord(MetricsRecord record) { String[] sources = record.getSource().split("/"); String source; if (sources.length > 2) { source = includeServiceNamespace ? String.format("%s/%s/%s", topologyName, sources[1], sources[2]) : String.format("/%s/%s", sources[1], sources[2]); } else { source = includeServiceNamespace ? String.format("%s/%s", topologyName, record.getSource()) : String.format("/%s", record.getSource()); } if (isFlatMetrics) { processMetrics(source + "/", record.getMetrics(), metrics); } else { <START> Map<String, Object> sourceMap = new HashMap<>(); <END> processMetrics("", record.getMetrics(), sourceMap); metrics.put(source, sourceMap); } }</code><technical_language>differences between: 1. Map<String, Object> sourceMap = new HashMap<>(); processMetrics("", record.getMetrics(), sourceMap); metrics.put(source, sourceMap); 2. processMetrics("", record.getMetrics(), metrics);</technical_language>

Target:
public void processRecord(MetricsRecord record) { String[] sources = record.getSource().split("/"); String source; if (sources.length > 2) { source = includeTopologyName ? String.format("%s/%s/%s", topologyName, sources[1], sources[2]) : String.format("/%s/%s", sources[1], sources[2]); } else { source = includeTopologyName ? String.format("%s/%s", topologyName, record.getSource()) : String.format("/%s", record.getSource()); } if (isFlatMetrics) { metricsCache.putAll(processMetrics(source + "/", record.getMetrics())); } else { Map<String, Double> sourceMap = processMetrics("", record.getMetrics()); metricsCache.put(source, sourceMap); } }
Source:
<code><START> public List<TupleValueExpression> findAllTupleValueSubexpressions() { <END> ArrayList<TupleValueExpression> collected = new ArrayList<>(); findAllSubexpressionsOfClass_recurse(TupleValueExpression.class, collected); return collected; }</code><technical_language>I suggest findAllSubexpressionsOfClass() call, change return type. work</technical_language>

Target:
public List<TupleValueExpression> findAllTupleValueSubexpressions() { return findAllSubexpressionsOfClass(TupleValueExpression.class); }
Source:
<code>protected void processPacket(QuorumPacket qp) throws IOException{ switch (qp.getType()) { case Leader.PING: ping(qp); break; case Leader.PROPOSAL: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); if (hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x" + Long.toHexString(hdr.getZxid()) + " expected 0x" + Long.toHexString(lastQueued + 1)); } lastQueued = hdr.getZxid(); fzk.logRequest(hdr, txn); break; case Leader.COMMIT: fzk.commit(qp.getZxid()); break; case Leader.UPTODATE: LOG.error("Received an UPTODATE message after Follower started"); break; case Leader.REVALIDATE: revalidate(qp); break; case Leader.SYNC: fzk.sync(); break; default: <START> LOG.error("Invalid packet type received by Observer: " + qp.getType()); <END> } }</code><technical_language>change log message improve readability. LOG.error("Invalid packet type: received Observer", qp.getType());</technical_language>

Target:
protected void processPacket(QuorumPacket qp) throws IOException{ switch (qp.getType()) { case Leader.PING: ping(qp); break; case Leader.PROPOSAL: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); if (hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x" + Long.toHexString(hdr.getZxid()) + " expected 0x" + Long.toHexString(lastQueued + 1)); } lastQueued = hdr.getZxid(); fzk.logRequest(hdr, txn); break; case Leader.COMMIT: fzk.commit(qp.getZxid()); break; case Leader.UPTODATE: LOG.error("Received an UPTODATE message after Follower started"); break; case Leader.REVALIDATE: revalidate(qp); break; case Leader.SYNC: fzk.sync(); break; default: LOG.error("Invalid packet type: received by Observer", qp.getType()); } }
Source:
<code>public List<Object> serializeFieldList(Schema fieldSchema, Object fieldValue) { <START> List<Object> sFL = new ArrayList(); <END> switch (fieldSchema.getType()) { case ARRAY: List<?> ls = (List<?>) fieldValue; for (Object lsValue : ls) { Object lsValue_ = serializeFieldValue(fieldSchema.getElementType(), lsValue); sFL.add(lsValue_); } break; default: throw new AssertionError(fieldSchema.getType().name()); } return sFL; }</code><technical_language>more descriptive names</technical_language>

Target:
public List<Object> serializeFieldList(Schema fieldSchema, Object fieldValue) { List<Object> serializedList = new ArrayList(); switch (fieldSchema.getType()) { case ARRAY: List<?> rawdataList = (List<?>) fieldValue; rawdataList.stream().map((lsValue) -> serializeFieldValue(fieldSchema.getElementType(), lsValue)).forEachOrdered((lsValue_) -> { serializedList.add(lsValue_); }); break; default: throw new AssertionError(fieldSchema.getType().name()); } return serializedList; }
Source:
<code>private void shareApplication() { try { Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, String.format(getString(R.string.whatsapp_promo_msg_template), String.format(getString(R.string.app_share_url),getPackageName()))); <START> startActivity(Intent.createChooser(shareIntent, "Share via")); <END> } catch (Exception e) { Snackbar.make(mainFrame, getString(R.string.error_msg_retry), Snackbar.LENGTH_SHORT).show(); } }</code><technical_language>strings.xml</technical_language>

Target:
private void shareApplication() { try { Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, String.format(getString(R.string.whatsapp_promo_msg_template), String.format(getString(R.string.app_share_url),getPackageName()))); startActivity(Intent.createChooser(shareIntent, getString(R.string.share_via))); } catch (Exception e) { Snackbar.make(mainFrame, getString(R.string.error_msg_retry), Snackbar.LENGTH_SHORT).show(); } }
Source:
<code>private boolean refreshTt(final HttpHost httpHost) { log.debug("Obtaining TT"); final boolean result; final HttpGet getTT = new HttpGet(TOKEN_URL); try { final HttpResponse response = httpClient.execute(httpHost, getTT, context); final int status = response.getStatusLine().getStatusCode(); switch (status) { case HttpStatus.SC_OK: <START> result = true; <END> break; case HttpStatus.SC_UNAUTHORIZED: result = false; break; default: throw new GoodDataAuthException("Unable to obtain TT, HTTP status: " + status); } } catch (IOException e) { throw new GoodDataAuthException("Error during temporary token refresh: " + e.getMessage(), e); } finally { getTT.releaseConnection(); } return result; }</code><technical_language>return true a bit more straight-forward save variable</technical_language>

Target:
private boolean refreshTt(final HttpHost httpHost) { log.debug("Obtaining TT"); final boolean result; final HttpGet getTT = new HttpGet(TOKEN_URL); try { final HttpResponse response = httpClient.execute(httpHost, getTT, context); final int status = response.getStatusLine().getStatusCode(); switch (status) { case HttpStatus.SC_OK: return true; case HttpStatus.SC_UNAUTHORIZED: return false; default: throw new GoodDataAuthException("Unable to obtain TT, HTTP status: " + status); } } catch (IOException e) { throw new GoodDataAuthException("Error during temporary token refresh: " + e.getMessage(), e); } finally { getTT.releaseConnection(); } }
Source:
<code><START> public void beginBlock(BlockType type, Attributes attributes) { <END> pushBlockStrategy(type, attributes).beginBlock(delegate, type, attributes); }</code><technical_language>beginBlock close paragraph created in assertOpenBlock(), if is currently open. Note close *all* paragraph blocks, implicitly created</technical_language>

Target:
public void beginBlock(BlockType type, Attributes attributes) { assertCloseImplicitBlock(); pushBlockStrategy(type, attributes).beginBlock(delegate, type, attributes); }
Source:
<code>public TaskDTO getCurrentTaskDTO(ProcessDTO processDTO) { for (TaskDTO task : processDTO.getTasks()) { if (task.getProcessingStatus() == TaskStatus.OPEN || task.getProcessingStatus() == TaskStatus.INWORK) { return task; } } <START> return null; <END> }</code><technical_language>other return null</technical_language>

Target:
public TaskDTO getCurrentTaskDTO(ProcessDTO processDTO) { for (TaskDTO task : processDTO.getTasks()) { if (task.getProcessingStatus().equals(TaskStatus.OPEN) || task.getProcessingStatus().equals(TaskStatus.INWORK)) { return task; } } return null; }
Source:
<code>public Object execute(ExecutionEvent event) throws ExecutionException { final List<RepositoryNode> selectedNodes; try { selectedNodes = getSelectedNodes(event); if (selectedNodes.isEmpty()) return null; } catch (ExecutionException e) { Activator.handleError(e.getMessage(), e, true); return null; } Job job = new Job("Collecting Garbage...") { @Override protected IStatus run(IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, selectedNodes.size()); for (RepositoryNode node : selectedNodes) { if (progress.isCanceled()) { break; } Repository repo = node.getRepository(); String name = MessageFormat.format( UIText.GarbageCollectCommand_jobTitle, getRepositoryName(repo)); this.setName(name); final GarbageCollectOperation op = new GarbageCollectOperation( repo); try { op.execute(progress.newChild(1)); } catch (CoreException e) { Activator.logError(MessageFormat.format( UIText.GarbageCollectCommand_failed, repo), e); } } <START> <END> return Status.OK_STATUS; } }; job.setUser(true); IServiceLocator serviceLocator = HandlerUtil.getActiveSite(event); if (serviceLocator != null) { IWorkbenchSiteProgressService service = CommonUtils.getService( serviceLocator, IWorkbenchSiteProgressService.class); service.schedule(job); } else { job.schedule(); } return null; }</code><technical_language>missing already, a monitor.done() here</technical_language>

Target:
public Object execute(ExecutionEvent event) throws ExecutionException { final List<RepositoryNode> selectedNodes; try { selectedNodes = getSelectedNodes(event); if (selectedNodes.isEmpty()) return null; } catch (ExecutionException e) { Activator.handleError(e.getMessage(), e, true); return null; } Job job = new Job("Collecting Garbage...") { @Override protected IStatus run(IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, selectedNodes.size()); for (RepositoryNode node : selectedNodes) { if (progress.isCanceled()) { break; } Repository repo = node.getRepository(); String name = MessageFormat.format( UIText.GarbageCollectCommand_jobTitle, getRepositoryName(repo)); this.setName(name); final GarbageCollectOperation op = new GarbageCollectOperation( repo); try { op.execute(progress.newChild(1)); } catch (CoreException e) { Activator.logError(MessageFormat.format( UIText.GarbageCollectCommand_failed, repo), e); } } monitor.done(); return Status.OK_STATUS; } }; job.setUser(true); IServiceLocator serviceLocator = HandlerUtil.getActiveSite(event); if (serviceLocator != null) { IWorkbenchSiteProgressService service = CommonUtils.getService( serviceLocator, IWorkbenchSiteProgressService.class); service.schedule(job); } else { job.schedule(); } return null; }
Source:
<code>public void setupStateSystem() { <START> try { IStateHistoryBackend backend = null; try { backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile("test", NonNullUtils.checkNotNull(File.createTempFile("2Dtest", "ht")), 0, START_TIME, 0); } catch (IOException e) { fail(e.getMessage()); } fStateSystem = StateSystemFactory.newStateSystem(NonNullUtils.checkNotNull(backend)); int stringQuark = fStateSystem.getQuarkAbsoluteAndAdd(STRING_ATTRIBUTE); int integerQuark = fStateSystem.getQuarkAbsoluteAndAdd(INTEGER_ATTRIBUTE); fStateSystem.modifyAttribute(60L, TmfStateValue.newValueString("String1"), stringQuark); fStateSystem.modifyAttribute(70L, TmfStateValue.newValueInt(0), integerQuark); fStateSystem.modifyAttribute(80L, TmfStateValue.newValueInt(1), integerQuark); fStateSystem.modifyAttribute(90L, TmfStateValue.newValueString("String2"), stringQuark); fStateSystem.modifyAttribute(100L, TmfStateValue.newValueInt(2), integerQuark); fStateSystem.modifyAttribute(110L, TmfStateValue.newValueInt(3), integerQuark); fStateSystem.modifyAttribute(130L, TmfStateValue.newValueString("String3"), stringQuark); fStateSystem.modifyAttribute(140L, TmfStateValue.newValueString("String4"), stringQuark); fStateSystem.modifyAttribute(160L, TmfStateValue.newValueInt(4), integerQuark); fStateSystem.closeHistory(200L); } catch (StateValueTypeException e) { fail(e.getMessage()); } <END> }</code><technical_language>do mind refactoring this test throws exceptions</technical_language>

Target:
public void setupStateSystem() throws IOException { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile("test", NonNullUtils.checkNotNull(File.createTempFile("2Dtest", "ht")), 0, START_TIME, 0); fStateSystem = StateSystemFactory.newStateSystem(NonNullUtils.checkNotNull(backend)); int stringQuark = fStateSystem.getQuarkAbsoluteAndAdd(STRING_ATTRIBUTE); int integerQuark = fStateSystem.getQuarkAbsoluteAndAdd(INTEGER_ATTRIBUTE); fStateSystem.modifyAttribute(60L, "String1", stringQuark); fStateSystem.modifyAttribute(70L, 0, integerQuark); fStateSystem.modifyAttribute(80L, 1, integerQuark); fStateSystem.modifyAttribute(90L, "String2", stringQuark); fStateSystem.modifyAttribute(100L, 2, integerQuark); fStateSystem.modifyAttribute(110L, 3, integerQuark); fStateSystem.modifyAttribute(130L, "String3", stringQuark); fStateSystem.modifyAttribute(140L, "String4", stringQuark); fStateSystem.modifyAttribute(160L, 4, integerQuark); fStateSystem.closeHistory(200L); }
Source:
<code>public ActionForward editDepartment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { AssociatedObjectsBean bean = getRenderedObject(); atomic(() -> { Department d = bean.getDepartment(); d.setCode(bean.getCode()); d.setName(bean.getName()); d.setRealName(bean.getRealName()); d.setRealNameEn(bean.getRealNameEn()); <START> d.setCompetenceCourseMembersGroup(Group.parse(bean.getUsername())); <END> }); return list(mapping, form, request, response); }</code><technical_language>bean getUsername method changed more semantic membersGroupExpression</technical_language>

Target:
public ActionForward editDepartment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { AssociatedObjectsBean bean = getRenderedObject(); atomic(() -> { Department d = bean.getDepartment(); d.setCode(bean.getCode()); d.setName(bean.getName()); d.setRealName(bean.getRealName()); d.setRealNameEn(bean.getRealNameEn()); d.setCompetenceCourseMembersGroup(Group.parse(bean.getMembersGroupExpression())); }); return list(mapping, form, request, response); }
Source:
<code>Set<Long> getFileSizeSet() { rwLock.readLock().lock(); try { return internalMap.keySet(); } finally { rwLock.readLock().unlock(); <START> } <END> }</code><technical_language>need lock if a ConcurrentHashMap LinkedinBlockingQueue</technical_language>

Target:
Set<Long> getFileSizeSet() { return internalMap.keySet(); }
Source:
<code>private String getFileExtFromMimeType(String mimeType) throws MimeTypeException { MimeTypes allTypes = MimeTypes.getDefaultMimeTypes(); <START> return allTypes.forName(mimeType).getExtension(); <END> }</code><technical_language>forName(mimeType) throw MimeTypeException ; i NPE occur in case</technical_language>

Target:
private String getFileExtFromMimeType(String mimeType) throws MimeTypeException { MimeTypes allTypes = MimeTypes.getDefaultMimeTypes(); String fileExt = allTypes.forName(mimeType).getExtension(); if (StringUtils.isEmpty(fileExt)) { LOGGER.debug("Null or empty file extension from mime-type {}", mimeType); } return fileExt; }
Source:
<code><START> public static boolean isFloatingLabel(EObject notationElement) { <END> if (!(notationElement instanceof DecorationNode)) { return false; } DecorationNode node = (DecorationNode) notationElement; if (node instanceof BasicCompartment) { return false; } if (node.eContainer() instanceof Connector) { return true; } if (node.eContainer() instanceof Shape) { if (node.getLayoutConstraint() != null) { return true; } } return false; }</code><technical_language>This method static</technical_language>

Target:
public boolean isFloatingLabel(EObject notationElement) { if (!(notationElement instanceof DecorationNode)) { return false; } DecorationNode node = (DecorationNode) notationElement; if (node instanceof BasicCompartment) { return false; } if (node.eContainer() instanceof Connector) { return true; } if (node.eContainer() instanceof Shape) { if (node.getLayoutConstraint() != null) { return true; } } return false; }
Source:
<code>private static String getTitleText(Map<String, Object> figureMetadata) { String title = TextUtil.sanitizeWhitespace((String) figureMetadata.get("title")); String description = TextUtil.sanitizeWhitespace((String) figureMetadata.get("description")); Matcher titleElement = TITLE_EXTRACTOR.matcher(description); if (!titleElement.find()) { <START> return title + "."; <END> } String descriptionTitleText = titleElement.group(1); descriptionTitleText = TextUtil.removeMarkup(descriptionTitleText); return String.format("%s. %s", title, descriptionTitleText); }</code><technical_language>title a value</technical_language>

Target:
private static String getTitleText(Map<String, Object> figureMetadata) { String title = TextUtil.sanitizeWhitespace((String) figureMetadata.get("title")); String description = TextUtil.sanitizeWhitespace((String) figureMetadata.get("description")); Matcher titleElement = TITLE_EXTRACTOR.matcher(description); if (!titleElement.find()) { return title.isEmpty() ? "" : (title + "."); } String descriptionTitleText = titleElement.group(1); descriptionTitleText = TextUtil.removeMarkup(descriptionTitleText); return String.format("%s. %s", title, descriptionTitleText); }
Source:
<code>public ImageAdapter(Context c) { mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); path = imagelist.split("#"); if (path.length > 0) { noPhotos.setVisibility(View.GONE); <START> Log.e("Hi", "Removing"); <END> } }</code><technical_language>Remove unwanted log logical</technical_language>

Target:
public ImageAdapter(Context c) { mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); path = imagelist.split("#"); if (path.length > 0) { noPhotos.setVisibility(View.GONE); } }
Source:
<code>public String toString() { <START> return MoreObjects.toStringHelper("") <END> .add("ChannelKey", mChannelKey) .add("ChannelHealthy", isHealthy()) .add("ChannelReleased", mChannelReleased) .toString(); }</code><technical_language>is this (and others) ""</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("ChannelKey", mChannelKey) .add("ChannelHealthy", isHealthy()) .add("ChannelReleased", mChannelReleased) .toString(); }