auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String saveOrUpdate(@Valid @ModelAttribute StateHistoryDTO stateHistoryDTO, BindingResult result, RedirectAttributes redirectAttributes) { if (!result.hasErrors()) { stateHistoryDTO.setStateDTO(new StateDTO(1L, "newstate")); ApplicationDTO applicationDTO = ApplicationDTO.builder() .creationDate(new Date()) .candidateId(stateHistoryDTO.getCandidateId()) .positionId(stateHistoryDTO.getPosition().getId()) .channelId(stateHistoryDTO.getChannel().getId()) .deleted(false) .build(); applicationsService.saveApplication(applicationDTO, stateHistoryDTO); return "redirect:/secure/candidate/details/" + stateHistoryDTO.getCandidateId(); } redirectAttributes.addFlashAttribute(COMMON_INVALID_INPUT_MESSAGE_NAME, this.messageKeyResolver.resolveMessageOrDefault(COMMON_INVALID_INPUT_MESSAGE_KEY)); result.getFieldErrors().forEach(error -> redirectAttributes.addFlashAttribute(error.getField() + "ErrorMessage", messageKeyResolver.resolveMessageOrDefault(error.getDefaultMessage()))); <START> return "redirect:/secure/application?candidateId=" + stateHistoryDTO.getCandidateId(); <END> }</code><technical_language>redirect attributes well</technical_language>

Target:
public String saveOrUpdate(@Valid @ModelAttribute StateHistoryDTO stateHistoryDTO, BindingResult result, RedirectAttributes redirectAttributes) { if (!result.hasErrors()) { stateHistoryDTO.setStateDTO(new StateDTO(1L, "newstate")); ApplicationDTO applicationDTO = ApplicationDTO.builder() .creationDate(new Date()) .candidateId(stateHistoryDTO.getCandidateId()) .positionId(stateHistoryDTO.getPosition().getId()) .channelId(stateHistoryDTO.getChannel().getId()) .deleted(false) .build(); applicationsService.saveApplication(applicationDTO, stateHistoryDTO); redirectAttributes.addAttribute("candidateId", stateHistoryDTO.getCandidateId()); return "redirect:/secure/candidate/details/{candidateId}"; } result.getFieldErrors().forEach(error -> redirectAttributes.addFlashAttribute(error.getField() + "ErrorMessage", messageKeyResolver.resolveMessageOrDefault(error.getDefaultMessage()))); redirectAttributes.addAttribute("candidateId", stateHistoryDTO.getCandidateId()); return "redirect:/secure/application"; }
Source:
<code>public void testDynamicImport2() { <START> withModules(ImmutableList.<String>builder() <END> .add("export default 1; export function Bar() { return 'bar'; };") .add("const foo = import('./testcode0');") .build()); assertType(getType("foo")) .toStringIsEqualTo("Promise<{\n" + " Bar: function(): string,\n" + " default: number\n" + "}>"); }</code><technical_language>Totally optional nit: ImmutableList.of() verbose</technical_language>

Target:
public void testDynamicImport2() { withModules(ImmutableList.of( "export default 1; export function Bar() { return 'bar'; };", "const foo = import('./testcode0');")); assertType(getType("foo")) .toStringIsEqualTo("Promise<{\n" + " Bar: function(): string,\n" + " default: number\n" + "}>"); }
Source:
<code>@Test public void testArrayGetClone() throws Exception { Run("@a = array(array(array('value'))); @b = @a[]; @b[0][0][0] = 'changedValue'; msg(@a[0][0][0]);", fakePlayer); <START> verify(fakePlayer).sendMessage("value"); <END> }</code><technical_language>This msg @b[0][0][0] insure is 'changedValue. Add msg(@b...) Run, add another verify(...) line 311</technical_language>

Target:
@Test public void testArrayGetClone() throws Exception { Run("@a = array(array(array('value'))); @b = @a[]; @b[0][0][0] = 'changedValue'; msg(@a[0][0][0]); msg(@b[0][0][0]);", fakePlayer); verify(fakePlayer).sendMessage("value"); verify(fakePlayer).sendMessage("changedValue"); }
Source:
<code>private DateTimeService buildMockDateTimeService() throws Exception { DateTimeService dateTimeService = Mockito.mock(DateTimeService.class); Mockito.when(dateTimeService.toDateTimeStringForFilename(Mockito.any())).then(this::formatDate); <START> Mockito.when(dateTimeService.getCurrentDate()).thenReturn(new Date()); <END> return dateTimeService; }</code><technical_language>This setup getCurrentDate() return Date time, instead of building a new Date invocation in code. (Also, similar ParameterService refactoring in this PR, returned Date objects mock DateTimeService mutable.) is safe share Date object, I suggest setting a lambda expression method reference return new Date objects invocation</technical_language>

Target:
private DateTimeService buildMockDateTimeService() throws Exception { DateTimeService dateTimeService = Mockito.mock(DateTimeService.class); Mockito.when(dateTimeService.toDateTimeStringForFilename(Mockito.any())).then(this::formatDate); Mockito.when(dateTimeService.getCurrentDate()).then(this::buildNewDate); return dateTimeService; }
Source:
<code>public void onComplete(ISegmentStore<ISegment> sysCalls) { if (fTableViewer != null) { <START> fTableViewer.updateModel(getData()); <END> } }</code><technical_language>method recompute ISegmentStore receive parameter</technical_language>

Target:
public void onComplete(ISegmentStore<ISegment> sysCalls) { if (fTableViewer != null){ fTableViewer.updateModel(LatencyViewerUtils.storeAndGet(sysCalls)); } }
Source:
<code>public LttngUstCallStackAnalysisRequirement(ILttngUstEventLayout layout) { super(REQUIRMENT_TYPE); Set<@NonNull String> requiredEventsFields = ImmutableSet.of( layout.contextProcname(), layout.contextVtid()); TmfAnalysisEventFieldRequirement requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFuncEntry(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fEntryRequirements.add(requirement); addValue(layout.eventCygProfileFuncEntry(), ValuePriorityLevel.MANDATORY); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFastFuncEntry(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fEntryRequirements.add(requirement); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFuncExit(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fExitRequirements.add(requirement); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFastFuncExit(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fExitRequirements.add(requirement); addValue(layout.eventCygProfileFuncExit(), ValuePriorityLevel.MANDATORY); <START> addValue(layout.eventCygProfileFuncExit(), ValuePriorityLevel.MANDATORY); <END> addValues(requiredEventsFields, ValuePriorityLevel.MANDATORY); addInformation(nullToEmptyString(Messages.LttnUstCallStackAnalysisModule_EventsLoadingInformation)); }</code><technical_language>afraid I do difference 2 previous lines..</technical_language>

Target:
public LttngUstCallStackAnalysisRequirement(ILttngUstEventLayout layout) { super(REQUIREMENT_TYPE); Set<@NonNull String> requiredEventsFields = ImmutableSet.of( layout.contextProcname(), layout.contextVtid()); TmfAnalysisEventFieldRequirement requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFuncEntry(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fEntryRequirements.add(requirement); addValue(layout.eventCygProfileFuncEntry(), ValuePriorityLevel.MANDATORY); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFastFuncEntry(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fEntryRequirements.add(requirement); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFuncExit(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fExitRequirements.add(requirement); requirement = new TmfAnalysisEventFieldRequirement( layout.eventCygProfileFastFuncExit(), requiredEventsFields, ValuePriorityLevel.MANDATORY); fExitRequirements.add(requirement); addValue(layout.eventCygProfileFuncExit(), ValuePriorityLevel.MANDATORY); addValues(requiredEventsFields, ValuePriorityLevel.MANDATORY); addInformation(nullToEmptyString(Messages.LttnUstCallStackAnalysisModule_EventsLoadingInformation)); }
Source:
<code>private void correctKSUDateFormatIfNecessary(final Table<String, String, String> table, final List<MeasurementVariable> measurementVariables) { final List<String> dateMeasurementVariables = measurementVariables.stream().filter(measurementVariable -> measurementVariable.getDataTypeId() == TermId.DATE_VARIABLE .getId()).collect(Collectors.toList()).stream().map(measurementVariable -> measurementVariable.getName()).collect(Collectors.toList()); if (dateMeasurementVariables != null) { for (final String obsUnit : table.rowKeySet()) { for (final String colVariable : table.columnKeySet()) { if (dateMeasurementVariables.contains(colVariable)) { String value = table.get(obsUnit, colVariable); <START> final Date parsed = Util.tryParseDateAccurately(value, Util.DATE_AS_NUMBER_FORMAT); <END> if (parsed == null) { final Date ksuParsed = Util.tryParseDateAccurately(value, Util.DATE_AS_NUMBER_FORMAT_KSU); if (ksuParsed != null){ value = Util.formatDateAsStringValue(ksuParsed, Util.DATE_AS_NUMBER_FORMAT); table.put(obsUnit, colVariable, value); } } } } } } }</code><technical_language>@gelli-leafnode , this line straight checking if is in KSU format. If is proceed changing valid format</technical_language>

Target:
private void correctKSUDateFormatIfNecessary(final Table<String, String, String> table, final List<MeasurementVariable> measurementVariables) { final List<String> dateVariables = measurementVariables.stream().filter( measurementVariable -> measurementVariable.getDataTypeId() != null && measurementVariable.getDataTypeId() == TermId.DATE_VARIABLE.getId()) .map(measurementVariable -> measurementVariable.getName()).collect(Collectors.toList()); if (!CollectionUtils.isEmpty(dateVariables)) { for (final String colVariable : table.columnKeySet()) { if (dateVariables.contains(colVariable)) { for (final String obsUnit : table.rowKeySet()) { String value = table.get(obsUnit, colVariable); final Date ksuParsed = Util.tryParseDate(value, Util.DATE_AS_NUMBER_FORMAT_KSU); if (ksuParsed != null) { value = Util.formatDateAsStringValue(ksuParsed, Util.DATE_AS_NUMBER_FORMAT); table.put(obsUnit, colVariable, value); } } } } } }
Source:
<code>ZoneId getZoneId() { <START> throw new UnsupportedTemporalUnitException( "Cannot get the timezone of: %s" + this ); <END> }</code><technical_language>need a String.format %s</technical_language>

Target:
ZoneId getZoneId() { throw new UnsupportedTemporalUnitException( String.format( "Cannot get the timezone of: %s", this ) ); }
Source:
<code>protected BAMIndexContent getQueryResults(final int referenceIndex) { if(lastReferenceIndex!=null && lastReferenceIndex == referenceIndex){ if(lastReference != null) { cacheHits++; return lastReference; } else { throw new RuntimeException("Expected to find a cached reference but we found null. This is a bug."); } } <START> BAMIndexContent queryResults = query(referenceIndex,1,-1); <END> if(queryResults != null) { cacheMisses++; lastReferenceIndex = referenceIndex; lastReference = queryResults; return lastReference; } return null; }</code><technical_language>query() returns null, do want clear out cache</technical_language>

Target:
protected BAMIndexContent getQueryResults(final int referenceIndex) { if(lastReferenceIndex!=null && lastReferenceIndex == referenceIndex){ cacheHits++; return lastReference; } final BAMIndexContent queryResults = query(referenceIndex,1,-1); cacheMisses++; lastReferenceIndex = referenceIndex; lastReference = queryResults; return lastReference; }
Source:
<code>public byte[] userToBytes(GenericRecord user) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(out, null); DatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schema); writer.write(user, encoder); encoder.flush(); <START> out.close(); <END> return out.toByteArray(); }</code><technical_language>do this..</technical_language>

Target:
public byte[] userToBytes(GenericRecord user) throws IOException { return recordToBytes(user, schema); }
Source:
<code>protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws ServletException, IOException { SiteContext siteContext = SiteContext.getCurrent(); HierarchicalConfiguration corsConfig = siteContext.getConfig().configurationAt(CONFIG_KEY); <START> HttpServletResponseWrapper responseWrapper = new HttpServletResponseWrapper(response); <END> responseWrapper.setHeader(CORSFilter.ALLOW_ORIGIN, corsConfig.getString(ALLOW_ORIGIN_KEY)); responseWrapper.setHeader(CORSFilter.ALLOW_CREDENTIALS, corsConfig.getString(ALLOW_CREDENTIALS_KEY)); responseWrapper.setHeader(CORSFilter.ALLOW_METHODS, corsConfig.getString(ALLOW_METHODS_KEY)); responseWrapper.setHeader(CORSFilter.ALLOW_HEADERS, corsConfig.getString(ALLOW_HEADERS_KEY)); responseWrapper.setHeader(CORSFilter.MAX_AGE, corsConfig.getString(MAX_AGE_KEY)); filterChain.doFilter(request, responseWrapper); }</code><technical_language>need wrap modify response</technical_language>

Target:
protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws ServletException, IOException { SiteContext siteContext = SiteContext.getCurrent(); HierarchicalConfiguration corsConfig = siteContext.getConfig().configurationAt(CONFIG_KEY); response.setHeader(CORSFilter.ALLOW_ORIGIN, corsConfig.getString(ALLOW_ORIGIN_KEY, ALLOW_ORIGIN_DEFAULT)); response.setHeader(CORSFilter.ALLOW_CREDENTIALS, corsConfig.getString(ALLOW_CREDENTIALS_KEY, ALLOW_CREDENTIALS_DEFAULT)); response.setHeader(CORSFilter.ALLOW_METHODS, corsConfig.getString(ALLOW_METHODS_KEY, ALLOW_METHODS_DEFAULT)); response.setHeader(CORSFilter.ALLOW_HEADERS, corsConfig.getString(ALLOW_HEADERS_KEY, ALLOW_HEADERS_DEFAULT)); response.setHeader(CORSFilter.MAX_AGE, corsConfig.getString(MAX_AGE_KEY, MAX_AGE_DEFAULT)); filterChain.doFilter(request, response); }
Source:
<code>private void assertExistsRewrittenToAggregationAboveJoin(@Language("SQL") String actual, @Language("SQL") String expected, boolean extraAggregation) { Consumer<Plan> singleAggregationValidator = plan -> assertEquals(countSingleAggregationNodes(plan), 1); Consumer<Plan> finalAggregationValidator = plan -> assertEquals(countFinalAggregationNodes(plan), extraAggregation ? 1 : 0); assertions.assertQueryAndPlan(actual, expected, anyTree( <START> aggregation(ImmutableMap.of("COUNT", functionCall("count", ImmutableList.of("NON_NULL"))), <END> node(JoinNode.class, anyTree( node(ValuesNode.class)), anyTree( node(ProjectNode.class, anyTree( node(ValuesNode.class))) .withAlias("NON_NULL", expression("true")))))), singleAggregationValidator.andThen(finalAggregationValidator)); }</code><technical_language>optional: explicitly test aggregation step here</technical_language>

Target:
private void assertExistsRewrittenToAggregationAboveJoin(@Language("SQL") String actual, @Language("SQL") String expected, boolean extraAggregation) { Consumer<Plan> singleStreamingAggregationValidator = plan -> assertEquals(countSingleStreamingAggregations(plan), 1); Consumer<Plan> finalAggregationValidator = plan -> assertEquals(countFinalAggregationNodes(plan), extraAggregation ? 1 : 0); assertions.assertQueryAndPlan(actual, expected, anyTree( aggregation( ImmutableMap.of("COUNT", functionCall("count", ImmutableList.of("NON_NULL"))), SINGLE, node(JoinNode.class, anyTree( node(ValuesNode.class)), anyTree( node(ProjectNode.class, anyTree( node(ValuesNode.class))) .withAlias("NON_NULL", expression("true")))))), singleStreamingAggregationValidator.andThen(finalAggregationValidator)); }
Source:
<code>private void parseReportsXML() { <START> RequestBuilder requestBuilder = <END> new RequestBuilder(RequestBuilder.GET, "/" + BaseContextPathData.getInstance().getRelativePath() + "services/reports-xml"); try { requestBuilder.sendRequest(null, new RequestCallback() { @Override public void onError(Request request, Throwable exception) { scheduleCheckStatus(); setXmlInitialized(); } @Override public void onResponseReceived(Request request, Response response) { try { switch (response.getStatusCode()) { case Response.SC_NOT_FOUND: scheduleCheckStatus(); break; case Response.SC_OK: if (ReportParser.getInstance().parseReport(response.getText())) { resourceMap = ReportParser.getInstance().getResourceMap(); dashboardMap = ReportParser.getInstance().getDashboardMap(); isCommunityEdition = ReportParser.getInstance().isCommunityEdition(); } break; } } catch (DOMParseException e) { } finally { setXmlInitialized(); } } }); } catch (RequestException e) { setXmlInitialized(); } }</code><technical_language>is small difference this requestBuilder status builder. Please extract creation of builder a new method. in of places</technical_language>

Target:
private void parseReportsXML() { try { constructRequestBuilder("/" + BaseContextPathData.getInstance().getRelativePath() + "services/reports-xml").sendRequest(null, new RequestCallback() { @Override public void onError(Request request, Throwable exception) { if (!reportBaseUrl.trim().isEmpty()) { scheduleCheckStatus(); } setXmlInitialized(); } @Override public void onResponseReceived(Request request, Response response) { try { switch (response.getStatusCode()) { case Response.SC_NOT_FOUND: if (!reportBaseUrl.trim().isEmpty()) { scheduleCheckStatus(); } break; case Response.SC_OK: if (ReportParser.getInstance().parseReport(response.getText())) { resourceMap = ReportParser.getInstance().getResourceMap(); dashboardMap = ReportParser.getInstance().getDashboardMap(); isCommunityEdition = ReportParser.getInstance().isCommunityEdition(); } break; } } catch (DOMParseException e) { } finally { setXmlInitialized(); } } }); } catch (RequestException e) { setXmlInitialized(); } }
Source:
<code>public File getWorkDir() throws IllegalStateException { <START> if (getConfig().getBoolean("core", "bare", false)) <END> throw new IllegalStateException( "Bare Repository does not have a working directory"); return workDir; }</code><technical_language>Deciding "bareness" is more core.bare in configuration file. IIRC algorithm is like: IF core.bare is set core.bare ELSE IF GIT_DIR explicitly GIT_WORK_TREE ASSUME bare ELSE IF getDirectory().getName() is ".git" ASSUME bare ELSE ASSUME bare this is complex enough, code throws exception if bare, introduce a: public boolean isBare() method perform decision making, define getWorkDir throw isBare() is true. Also, bare repositories index files, getIndex() getIndexFile() throw exception</technical_language>

Target:
public File getWorkDir() throws IllegalStateException { if (getConfig().getBoolean(Constants.CONFIG_CORE_SECTION, Constants.CONFIG_KEY_BARE, false)) throw new IllegalStateException( "Bare Repository does not have a working directory"); return workDir; }
Source:
<code>public CompositeEvent(CompositeEvent compositeEvent) { <START> this.events = compositeEvent.events; <END> this.similarityBetweenEvents = compositeEvent.similarityBetweenEvents; }</code><technical_language>means list. if change this.events, impact compositeEvent.events too</technical_language>

Target:
public CompositeEvent(CompositeEvent compositeEvent) { this.events = new ArrayList<>(compositeEvent.events); this.similarityBetweenEvents = compositeEvent.similarityBetweenEvents; }
Source:
<code>public Mono<AccessToken> getToken(String... scopes) { if (clientId() == null) { <START> throw new IllegalArgumentException("Must provide non-null value for client id in " + this.getClass().getSimpleName()); <END> } return identityClient.authenticateWithCurrentlyLoggedInAccount(scopes).onErrorResume(t -> Mono.empty()) .switchIfEmpty(identityClient.authenticateWithBrowserInteraction(clientId(), scopes, port)); }</code><technical_language>do this check time call getToken. this done front credential is constructed</technical_language>

Target:
public Mono<AccessToken> getToken(String... scopes) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithUserRefreshToken(scopes, cachedToken.get()).onErrorResume(t -> Mono.empty()); } else { return Mono.empty(); } }).switchIfEmpty(Mono.defer(() -> identityClient.authenticateWithBrowserInteraction(scopes, port))) .map(msalToken -> { cachedToken.set(msalToken); return msalToken; }); }
Source:
<code>public synchronized void check() { LOG.debug("Runtimes consistency checks is running"); for (String runningWorkspaceId : workspaceRuntimes.getRunning()) { checkOne(runningWorkspaceId); <START> } <END> }</code><technical_language>for a classic example parallel stream used, no? saving threads :-)</technical_language>

Target:
public void check() { LOG.debug("Runtimes consistency check is running"); for (String runningWorkspaceId : workspaceRuntimes.getRunning()) { try { checkOne(runningWorkspaceId); } catch (InfrastructureException e) { LOG.error( "Checking consistency of runtime for workspace `{}` is failed. Cause: ", e.getMessage(), e); } } }
Source:
<code>private double evaluateRootTimed(int timeout) throws EvaluationException { Future<Double> result = evalThread.submit(this::evaluateRoot); try { return result.get(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } catch (TimeoutException e) { result.cancel(true); throw new ExpressionTimeoutException("Calculations exceeded time limit."); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (cause instanceof ReturnException) { throw (ReturnException) cause; } if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } <START> throw new RuntimeException(cause); <END> } }</code><technical_language>yo add a case for EvaluationException, break Exception checking introducing Future? if (cause instanceof EvaluationException) { throw (EvaluationException) cause; }</technical_language>

Target:
private double evaluateRootTimed(int timeout) throws EvaluationException { Future<Double> result = evalThread.submit(this::evaluateRoot); try { return result.get(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } catch (TimeoutException e) { result.cancel(true); throw new ExpressionTimeoutException("Calculations exceeded time limit."); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (cause instanceof EvaluationException) { throw (EvaluationException) cause; } if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } throw new RuntimeException(cause); } }
Source:
<code>public static Update addWriteOptions(Update update, WriteOptions writeOptions) { Assert.notNull(update, "Update must not be null"); addQueryOptions(update, writeOptions); if (!writeOptions.getTtl().isNegative()) { update.using(QueryBuilder.ttl(Math.toIntExact(writeOptions.getTtl().getSeconds()))); } <START> if (!(writeOptions.getTimestamp() < 0)) { <END> update.using(QueryBuilder.timestamp(writeOptions.getTimestamp())); } return update; }</code><technical_language>WriteOptions (and QueryOptions in general) nullable properties presence/absence of options</technical_language>

Target:
public static Update addWriteOptions(Update update, WriteOptions writeOptions) { Assert.notNull(update, "Update must not be null"); addQueryOptions(update, writeOptions); if (!writeOptions.getTtl().isNegative()) { update.using(QueryBuilder.ttl(Math.toIntExact(writeOptions.getTtl().getSeconds()))); } if (writeOptions.getTimestamp() != null) { update.using(QueryBuilder.timestamp(writeOptions.getTimestamp())); } return update; }
Source:
<code>public void run() { try { final ODatabaseDocumentEmbedded newDb = new ODatabaseDocumentEmbedded(storage); newDb.activateOnCurrentThread(); newDb.resetInitialization(); newDb.internalOpen("admin", "nopass", null, false); final Collection<ODocument> indexesToRebuild; acquireExclusiveLock(); try { final Collection<ODocument> knownIndexes = document.field(CONFIG_INDEXES); if (knownIndexes == null) { OLogManager.instance().warn(this, "List of indexes is empty"); indexesToRebuild = Collections.emptyList(); } else { indexesToRebuild = new ArrayList<>(); for (ODocument index : knownIndexes) indexesToRebuild.add(index.copy()); } } finally { releaseExclusiveLock(); } if (storage instanceof OAbstractPaginatedStorage) { final OAbstractPaginatedStorage abstractPaginatedStorage = (OAbstractPaginatedStorage) storage; abstractPaginatedStorage.getAtomicOperationsManager().switchOnUnsafeMode(); } try { recreateIndexes(indexesToRebuild, newDb); } finally { <START> if (storage instanceof OAbstractPaginatedStorage) { <END> final OAbstractPaginatedStorage abstractPaginatedStorage = (OAbstractPaginatedStorage) storage; abstractPaginatedStorage.getAtomicOperationsManager().switchOffUnsafeMode(); abstractPaginatedStorage.synch(); } newDb.close(); } } catch (Exception e) { OLogManager.instance().error(this, "Error when attempt to restore indexes after crash was performed", e); } }</code><technical_language>Switch unsafe mode force sync is needed anymore, check if this method is I propose delete it</technical_language>

Target:
public void run() { try { final ODatabaseDocumentEmbedded newDb = new ODatabaseDocumentEmbedded(storage); newDb.activateOnCurrentThread(); newDb.resetInitialization(); newDb.internalOpen("admin", "nopass", null, false); final Collection<ODocument> indexesToRebuild; acquireExclusiveLock(); try { final Collection<ODocument> knownIndexes = document.field(CONFIG_INDEXES); if (knownIndexes == null) { OLogManager.instance().warn(this, "List of indexes is empty"); indexesToRebuild = Collections.emptyList(); } else { indexesToRebuild = new ArrayList<>(); for (ODocument index : knownIndexes) indexesToRebuild.add(index.copy()); } } finally { releaseExclusiveLock(); } try { recreateIndexes(indexesToRebuild, newDb); } finally { if (storage instanceof OAbstractPaginatedStorage) { final OAbstractPaginatedStorage abstractPaginatedStorage = (OAbstractPaginatedStorage) storage; abstractPaginatedStorage.synch(); } newDb.close(); } } catch (Exception e) { OLogManager.instance().error(this, "Error when attempt to restore indexes after crash was performed", e); } }
Source:
<code>private void initContentNode() { final Node contentRootNode = nodeService.getByPath( ContentConstants.CONTENT_ROOT_PATH ); final User user = ContextAccessor.current().getAuthInfo().getUser(); if ( contentRootNode == null ) { LOG.info( "Content root-node not found, creating" ); PropertyTree data = new PropertyTree(); data.setString( ContentPropertyNames.TYPE, "base:folder" ); data.setString( ContentPropertyNames.DISPLAY_NAME, "Content" ); data.addSet( ContentPropertyNames.DATA ); data.addSet( ContentPropertyNames.FORM ); data.setString( ContentPropertyNames.CREATOR, user.getKey().toString() ); data.setInstant( ContentPropertyNames.CREATED_TIME, Instant.now() ); final Node contentRoot = nodeService.create( CreateNodeParams.create(). data( data ). name( ContentConstants.CONTENT_ROOT_NAME ). parent( NodePath.ROOT ). <START> permissions( this.accessControlList != null ? this.accessControlList : CONTENT_ROOT_DEFAULT_ACL ). <END> childOrder( CONTENT_DEFAULT_CHILD_ORDER ). build() ); LOG.info( "Created content root-node: " + contentRoot.path() ); nodeService.refresh( RefreshMode.ALL ); nodeService.push( NodeIds.from( contentRoot.id() ), ContentConstants.BRANCH_DRAFT ); } }</code><technical_language>I move null check constructor</technical_language>

Target:
private void initContentNode() { final Node contentRootNode = nodeService.getByPath( ContentConstants.CONTENT_ROOT_PATH ); final User user = ContextAccessor.current().getAuthInfo().getUser(); if ( contentRootNode == null ) { LOG.info( "Content root-node not found, creating" ); PropertyTree data = new PropertyTree(); data.setString( ContentPropertyNames.TYPE, "base:folder" ); data.setString( ContentPropertyNames.DISPLAY_NAME, "Content" ); data.addSet( ContentPropertyNames.DATA ); data.addSet( ContentPropertyNames.FORM ); data.setString( ContentPropertyNames.CREATOR, user.getKey().toString() ); data.setInstant( ContentPropertyNames.CREATED_TIME, Instant.now() ); final Node contentRoot = nodeService.create( CreateNodeParams.create(). data( data ). name( ContentConstants.CONTENT_ROOT_NAME ). parent( NodePath.ROOT ). permissions( this.accessControlList ). childOrder( CONTENT_DEFAULT_CHILD_ORDER ). build() ); LOG.info( "Created content root-node: " + contentRoot.path() ); nodeService.refresh( RefreshMode.ALL ); nodeService.push( NodeIds.from( contentRoot.id() ), ContentConstants.BRANCH_DRAFT ); } }
Source:
<code>public String getId() { <START> return "DISTANCE"; <END> }</code><technical_language>ID return name (and name return ID) - for Mixins of this type</technical_language>

Target:
public String getId() { return "minecraft:distance"; }
Source:
<code>JPAConfiguration provideConfiguration(PropertiesProvider propertiesProvider) throws FileNotFoundException, ConfigurationException { PropertiesConfiguration dataSource = propertiesProvider.getConfiguration("james-database"); return JPAConfiguration.builder() .driverName(dataSource.getString("database.driverClassName")) .driverURL(dataSource.getString("database.url")) .testOnBorrow(dataSource.getBoolean("datasource.testOnBorrow", false)) <START> .validationQueryTimeoutSec(dataSource.getInt("datasource.validationQueryTimeoutSec", -1)) <END> .validationQuery(dataSource.getString("datasource.validationQuery", null)) .build(); }</code><technical_language>missed this -1 :)</technical_language>

Target:
JPAConfiguration provideConfiguration(PropertiesProvider propertiesProvider) throws FileNotFoundException, ConfigurationException { PropertiesConfiguration dataSource = propertiesProvider.getConfiguration("james-database"); return JPAConfiguration.builder() .driverName(dataSource.getString("database.driverClassName")) .driverURL(dataSource.getString("database.url")) .testOnBorrow(dataSource.getBoolean("datasource.testOnBorrow", false)) .validationQueryTimeoutSec(dataSource.getInt("datasource.validationQueryTimeoutSec", JPAConstants.VALIDATION_NO_TIMEOUT)) .validationQuery(dataSource.getString("datasource.validationQuery", null)) .build(); }
Source:
<code>public CachedMongoClientProvider(int duration, TimeUnit unit) { final RemovalListener<MongoClientURI, MongoClient> removalListener = notification -> { final MongoClient client = notification.getValue(); try { LOGGER.debug("Closing '{}' due to '{}'.", client, notification.getCause()); client.close(); } catch (Exception e) { LOGGER.error("Unable to properly close '{}'.", client, e); } }; final CacheLoader<MongoClientURI, MongoClient> factory = new CacheLoader<MongoClientURI, MongoClient>() { public MongoClient load(MongoClientURI uri) throws Exception { try { LOGGER.debug("Adding new mongo client for '{}'.", uri); return new MongoClient(uri); } catch (UnknownHostException e) { throw new InvalidDataAccessResourceUsageException("Unable to retrieve host information.", e); } } }; cache = CacheBuilder.newBuilder() <START> .concurrencyLevel(100) END> .maximumSize(100) .expireAfterAccess(duration, unit) .removalListener(removalListener) .build(factory); }</code><technical_language>concurrentLevel maximumSize externalized in constructor signature, eventually 2 versions default values</technical_language>

Target:
public CachedMongoClientProvider(int duration, TimeUnit unit) { this(duration, unit, 100, 100); }
Source:
<code>public boolean rollUp() { <START> if (row < 1) { <END> return false; } setRow(row - 1); return true; }</code><technical_language>condition if (row <= 1). row equals 1, setRow(0) called exception</technical_language>

Target:
public boolean rollUp() { if (row <= 1) { return false; } setRow(row - 1); return true; }
Source:
<code>public Collection<ConfigDescription> getConfigDescriptions(Locale locale) { <START> return null; <END> }</code><technical_language>this means /config-descriptions show for things. This is necessarily expected, deal - returning a description for single is a bit much. @dnobel Is this ok for other side effects</technical_language>

Target:
public Collection<ConfigDescription> getConfigDescriptions(Locale locale) { return Collections.emptySet(); }
Source:
<code>private void handleWorkItemHandlerException(ProcessWorkItemHandlerException handlerException, WorkItem workItem) { Map<String, Object> parameters = new HashMap<>(); parameters.put("DeploymentId", workItem.getDeploymentId()); parameters.put("ProcessInstanceId", workItem.getProcessInstanceId()); parameters.put("WorkItemId", workItem.getId()); parameters.put("NodeInstanceId", this.getId()); parameters.put("ErrorMessage", handlerException.getMessage()); parameters.put("Error", handlerException); parameters.putAll(workItem.getParameters()); KieRuntime kruntime = getKieRuntimeForSubprocess(); ProcessInstance processInstance = ( ProcessInstance ) kruntime.createProcessInstance(handlerException.getProcessId(), parameters); this.exceptionHandlingProcessInstanceId = processInstance.getId(); ((ProcessInstanceImpl) processInstance).setMetaData("ParentProcessInstanceId", getProcessInstance().getId()); ((ProcessInstanceImpl) processInstance).setMetaData("ParentNodeInstanceId", getUniqueId()); ((ProcessInstanceImpl) processInstance).setParentProcessInstanceId(getProcessInstance().getId()); ((ProcessInstanceImpl) processInstance).setSignalCompletion(true); addExceptionProcessListener(); kruntime.startProcessInstance(processInstance.getId()); <START> } <END></code><technical_language>skipping check of process instance state</technical_language>

Target:
private void handleWorkItemHandlerException(ProcessWorkItemHandlerException handlerException, WorkItem workItem) { Map<String, Object> parameters = new HashMap<>(); parameters.put("DeploymentId", workItem.getDeploymentId()); parameters.put("ProcessInstanceId", workItem.getProcessInstanceId()); parameters.put("WorkItemId", workItem.getId()); parameters.put("NodeInstanceId", this.getId()); parameters.put("ErrorMessage", handlerException.getMessage()); parameters.put("Error", handlerException); parameters.putAll(workItem.getParameters()); KieRuntime kruntime = getKieRuntimeForSubprocess(); ProcessInstance processInstance = ( ProcessInstance ) kruntime.createProcessInstance(handlerException.getProcessId(), parameters); this.exceptionHandlingProcessInstanceId = processInstance.getId(); ((ProcessInstanceImpl) processInstance).setMetaData("ParentProcessInstanceId", getProcessInstance().getId()); ((ProcessInstanceImpl) processInstance).setMetaData("ParentNodeInstanceId", getUniqueId()); ((ProcessInstanceImpl) processInstance).setParentProcessInstanceId(getProcessInstance().getId()); ((ProcessInstanceImpl) processInstance).setSignalCompletion(true); kruntime.startProcessInstance(processInstance.getId()); if (processInstance.getState() == ProcessInstance.STATE_COMPLETED || processInstance.getState() == ProcessInstance.STATE_ABORTED) { exceptionHandlingCompleted(processInstance, handlerException); } else { addExceptionProcessListener(); } }
Source:
<code>public Response deleteApiMember( @Parameter(name = "user", required = true) @NotNull @QueryParam("user") String userId) { apiService.findById(api); try { userService.findById(userId); } catch (UserNotFoundException unfe) { return Response.status(Response.Status.BAD_REQUEST).entity(unfe.getMessage()).build(); } membershipService.deleteReferenceMember(MembershipReferenceType.API, api, MembershipMemberType.USER, userId); <START> return Response.noContent().build(); <END> }</code><technical_language>right. a breaking change some users, API UI, affected this kind of changes. Please revert</technical_language>

Target:
public Response deleteApiMember( @Parameter(name = "user", required = true) @NotNull @QueryParam("user") String userId) { apiService.findById(api); try { userService.findById(userId); } catch (UserNotFoundException unfe) { return Response.status(Response.Status.BAD_REQUEST).entity(unfe.getMessage()).build(); } membershipService.deleteReferenceMember(MembershipReferenceType.API, api, MembershipMemberType.USER, userId); return Response.ok().build(); }
Source:
<code>public int getCurrentCycle() { Calendar now = Calendar.getInstance(); switch (duration) { case DAY: return (int) Math.ceil((now.getTimeInMillis() - startDate.getTimeInMillis()) / (24*60*60*1000.0)); case WEEK: return (int) Math.ceil((now.getTimeInMillis() - startDate.getTimeInMillis()) / (7*24*60*60*1000.0)); case FORTNIGHT: <START> return (int) Math.ceil((now.getTimeInMillis() - startDate.getTimeInMillis()) / (14*24*60*60*1000.0)); <END> case MONTH: return ((now.get(Calendar.YEAR) - startDate.get(Calendar.YEAR)) * 12) + (now.get(Calendar.MONTH) - startDate.get(Calendar.MONTH)) + (now.get(Calendar.DAY_OF_MONTH) < startDate.get(Calendar.DAY_OF_MONTH) ? 0 : 1); case YEAR: int startYear = startDate.get(Calendar.YEAR); int thisYear = now.get(Calendar.YEAR); if ((startYear % 4 == 0) && (startYear % 100 != 0) || (startYear % 400 == 0)) { if (startDate.get(Calendar.DAY_OF_YEAR) > 60 && !((thisYear % 4 == 0) && (thisYear % 100 != 0) || (thisYear % 400 == 0))) return thisYear - startYear + (now.get(Calendar.DAY_OF_YEAR) < startDate.get(Calendar.DAY_OF_YEAR) + 1 ? 0 : 1); } return thisYear - startYear + (now.get(Calendar.DAY_OF_YEAR) < startDate.get(Calendar.DAY_OF_YEAR) ? 0 : 1); case OTHER: return (int) Math.ceil((now.getTimeInMillis() - startDate.getTimeInMillis()) / (otherDuration*24*60*60*1000.0)); } throw new IllegalStateException("Budget must have a duration type specified."); }</code><technical_language>If decompose calls multiple statements, code more readable. Also, define constants for of numbers</technical_language>

Target:
public int getCurrentCycle() { Calendar now = Calendar.getInstance(); long timeDiffInMillis = now.getTimeInMillis() - startDate.getTimeInMillis(); switch (duration) { case DAY: return (int) Math.ceil(timeDiffInMillis / (double) ONE_DAY); case WEEK: return (int) Math.ceil(timeDiffInMillis / (double) 7 * ONE_DAY); case FORTNIGHT: return (int) Math.ceil(timeDiffInMillis / (double) 14 * ONE_DAY); case MONTH: return ((now.get(Calendar.YEAR) - startDate.get(Calendar.YEAR)) * 12) + (now.get(Calendar.MONTH) - startDate.get(Calendar.MONTH)) + (now.get(Calendar.DAY_OF_MONTH) < startDate.get(Calendar.DAY_OF_MONTH) ? 0 : 1); case YEAR: int startYear = startDate.get(Calendar.YEAR); int thisYear = now.get(Calendar.YEAR); if ((startYear % 4 == 0) && (startYear % 100 != 0) || (startYear % 400 == 0)) { if (startDate.get(Calendar.DAY_OF_YEAR) > 60 && !((thisYear % 4 == 0) && (thisYear % 100 != 0) || (thisYear % 400 == 0))) return thisYear - startYear + (now.get(Calendar.DAY_OF_YEAR) < startDate.get(Calendar.DAY_OF_YEAR) + 1 ? 0 : 1); } return thisYear - startYear + (now.get(Calendar.DAY_OF_YEAR) < startDate.get(Calendar.DAY_OF_YEAR) ? 0 : 1); case OTHER: return (int) Math.ceil(timeDiffInMillis / (double) otherDuration * ONE_DAY); } throw new IllegalStateException("Budget must have a duration type specified."); }
Source:
<code>public void newSelection(final TmfPieChartViewer context) { if (context.isDisposed()) { return; } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { <START> synchronized (context.getMutexLayoutChange()) { <END> if (!context.isDisposed()) { context.updateTimeRangeSelectionPieChart(); context.getTimeRangePC().redraw(); context.layout(); } } } }); }</code><technical_language>context</technical_language>

Target:
public void newSelection(final TmfPieChartViewer context) { if (context.isDisposed()) { return; } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { synchronized (context) { if (!context.isDisposed()) { context.updateTimeRangeSelectionPieChart(); context.getTimeRangePC().redraw(); context.layout(); } } } }); }
Source:
<code><START> protected void initialize(final ProductThumbnailViewModel viewModel, final ProductWithVariant productWithVariant) { <END> fillProduct(viewModel, productWithVariant); fillNew(viewModel, productWithVariant); fillSale(viewModel, productWithVariant); }</code><technical_language>remove final? this class need extended if create a more concrete view model, in case a initialize method is implemented calls this (and class is abstract). If final is developers tempted modify this initialize is initially intended</technical_language>

Target:
protected final void initialize(final ProductThumbnailViewModel viewModel, final ProductWithVariant productWithVariant) { fillProduct(viewModel, productWithVariant); fillNew(viewModel, productWithVariant); fillSale(viewModel, productWithVariant); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { <START> chain.doFilter(request, response); <END> String headerValue = req.getHeader("Authorization"); if (headerValue != null && headerValue.startsWith("Basic ")) { String[] creds = new String( Base64.decodeBase64(headerValue.substring("Basic".length())), Charset.forName("UTF-8") ).split(":", 2); handleCredentials(request, creds); } } chain.doFilter(request, response); }</code><technical_language>filter here? This is time</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { String headerValue = req.getHeader("Authorization"); if (headerValue != null && headerValue.startsWith("Basic ")) { String[] creds = new String( Base64.decodeBase64(headerValue.substring("Basic".length())), Charset.forName("UTF-8") ).split(":", 2); handleCredentials(request, creds); } } chain.doFilter(request, response); }
Source:
<code>public R visit(Constant node, P p) throws E { <START> return visit((Term) node, p); <END> }</code><technical_language>this is wrong. In AbstractVisitor, need call visit parent class. ProductionReference for Constant TermCons</technical_language>

Target:
public R visit(Constant node, P p) throws E { return visit((ProductionReference) node, p); }
Source:
<code>private List<ElasticsearchColumn> buildColumns(ElasticsearchTableDescription tableDescription) { List<ElasticsearchColumn> columns = new ArrayList<>(); TransportClient client = clients.get(tableDescription.getClusterName()); verify(client != null, "client is null"); for (String index : getIndices(tableDescription)) { GetMappingsRequest mappingsRequest = new GetMappingsRequest().types(tableDescription.getType()); if (!isNullOrEmpty(index)) { mappingsRequest.indices(index); } ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = client.admin() .indices() .getMappings(mappingsRequest) .actionGet(timeout.toMillis()) .getMappings(); Iterator<String> indexIterator = mappings.keysIt(); while (indexIterator.hasNext()) { MappingMetaData mappingMetaData = mappings.get(indexIterator.next()).get(tableDescription.getType()); <START> JsonNode rootNode = null; <END> try { rootNode = objecMapper.readTree(mappingMetaData.source().uncompressed()); } catch (IOException e) { throw new PrestoException(ELASTICSEARCH_CORRUPTED_MAPPING_METADATA, e); } JsonNode mappingNode = rootNode.get(tableDescription.getType()); JsonNode propertiesNode = mappingNode.get("properties"); List<String> lists = new ArrayList<>(); JsonNode metaNode = mappingNode.get("_meta"); if (metaNode != null) { JsonNode arrayNode = metaNode.get("lists"); if (arrayNode != null && arrayNode.isArray()) { ArrayNode arrays = (ArrayNode) arrayNode; for (int i = 0; i < arrays.size(); i++) { lists.add(arrays.get(i).textValue()); } } } populateColumns(propertiesNode, lists, columns); } } return columns; }</code><technical_language>need initialize null</technical_language>

Target:
private List<ElasticsearchColumn> buildColumns(ElasticsearchTableDescription tableDescription) { List<ElasticsearchColumn> columns = new ArrayList<>(); TransportClient client = clients.get(tableDescription.getClusterName()); verify(client != null, "client is null"); for (String index : getIndices(tableDescription)) { GetMappingsRequest mappingsRequest = new GetMappingsRequest().types(tableDescription.getType()); if (!isNullOrEmpty(index)) { mappingsRequest.indices(index); } ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getMappings(client, mappingsRequest); Iterator<String> indexIterator = mappings.keysIt(); while (indexIterator.hasNext()) { MappingMetaData mappingMetaData = mappings.get(indexIterator.next()).get(tableDescription.getType()); JsonNode rootNode; try { rootNode = objecMapper.readTree(mappingMetaData.source().uncompressed()); } catch (IOException e) { throw new PrestoException(ELASTICSEARCH_CORRUPTED_MAPPING_METADATA, e); } JsonNode mappingNode = rootNode.get(tableDescription.getType()); JsonNode propertiesNode = mappingNode.get("properties"); List<String> lists = new ArrayList<>(); JsonNode metaNode = mappingNode.get("_meta"); if (metaNode != null) { JsonNode arrayNode = metaNode.get("lists"); if (arrayNode != null && arrayNode.isArray()) { ArrayNode arrays = (ArrayNode) arrayNode; for (int i = 0; i < arrays.size(); i++) { lists.add(arrays.get(i).textValue()); } } } populateColumns(propertiesNode, lists, columns); } } return columns; }
Source:
<code>public void testSignalAllConnections() throws OpenTokException { String sessionId = "SESSIONID"; String path = "/v2/project/" + apiKey + "/session/" + sessionId + "/signal"; stubFor(post(urlEqualTo(path)) .willReturn(aResponse() .withStatus(204))); SignalProperties properties = new SignalProperties.Builder().type("test").data("Signal test string").build(); <START> sdk.signal(sessionId, properties); <END> verify(postRequestedFor(urlMatching(path))); verify(postRequestedFor(urlMatching(path)) .withHeader("Content-Type", equalTo("application/json"))); verify(postRequestedFor(urlMatching(path)) .withRequestBody(equalToJson("{ \"type\":\"test\",\"data\":\"Signal test string\" }"))); assertTrue(Helpers.verifyTokenAuth(apiKey, apiSecret, findAll(postRequestedFor(urlMatching(path))))); Helpers.verifyUserAgent(); }</code><technical_language>signal method throws exception, implement a try/catch statement sending signal</technical_language>

Target:
public void testSignalAllConnections() throws OpenTokException { String sessionId = "SESSIONID"; Boolean exceptionThrown = false; String path = "/v2/project/" + apiKey + "/session/" + sessionId + "/signal"; stubFor(post(urlEqualTo(path)) .willReturn(aResponse() .withStatus(204))); SignalProperties properties = new SignalProperties.Builder().type("test").data("Signal test string").build(); try { sdk.signal(sessionId, properties); verify(postRequestedFor(urlMatching(path))); verify(postRequestedFor(urlMatching(path)) .withHeader("Content-Type", equalTo("application/json"))); verify(postRequestedFor(urlMatching(path)) .withRequestBody(equalToJson("{ \"type\":\"test\",\"data\":\"Signal test string\" }"))); assertTrue(Helpers.verifyTokenAuth(apiKey, apiSecret, findAll(postRequestedFor(urlMatching(path))))); Helpers.verifyUserAgent(); } catch (Exception e) { exceptionThrown = true; } assertFalse(exceptionThrown); }
Source:
<code>public Decoder(String codecName) { MediaCodec codec = null; try { codec = MediaCodec.createByCodecName(codecName); } catch (Exception e) { throw new RuntimeException("couldn't create codec " + codecName, e); } Log.i(TAG, "using codec: " + codec.getName()); mCodec = codec; mDoChecksum = false; mQueuedEos = false; <START> mTimeStamps = <END> new ArrayList<Long>(); mWarnings = new ArrayList<String>(); }</code><technical_language>set false</technical_language>

Target:
public Decoder(String codecName) { MediaCodec codec = null; try { codec = MediaCodec.createByCodecName(codecName); } catch (Exception e) { throw new RuntimeException("couldn't create codec " + codecName, e); } Log.i(TAG, "using codec: " + codec.getName()); mCodec = codec; mDoChecksum = false; mQueuedEos = false; mTimeStamps = new ArrayList<Long>(); mWarnings = new ArrayList<String>(); mConfigured = false; }