auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void fireTagCallForClick(@NonNull final OSInAppMessageAction action) { <START> if (action.tag != null) { <END> OSInAppMessageTag tags = action.tag; if (tags.getTagsToAdd() != null) OneSignal.sendTags(tags.getTagsToAdd()); if (tags.getTagsToRemove() != null) OneSignal.deleteTags(tags.getTagsToRemove(), null); } }</code><technical_language>Lets change action.tags</technical_language>

Target:
private void fireTagCallForClick(@NonNull final OSInAppMessageAction action) { if (action.tags != null) { OSInAppMessageTag tags = action.tags; if (tags.getTagsToAdd() != null) OneSignal.sendTags(tags.getTagsToAdd()); if (tags.getTagsToRemove() != null) OneSignal.deleteTags(tags.getTagsToRemove(), null); } }
Source:
<code>private static ReaderBlogIdPostIdList getBlogIdPostIdsWithTagType(ReaderTagType tagType, int maxPosts) { if (tagType == null) { return new ReaderBlogIdPostIdList(); } String sql = "SELECT blog_id, post_id FROM tbl_posts WHERE tag_name=? AND tag_type=?"; if (maxPosts > 0) { sql += " LIMIT " + Integer.toString(maxPosts); } <START> String[] args = {Integer.toString(tagType.toInt())}; <END> return getBlogIdPostIds(sql, args); }</code><technical_language>this, wanted confirm in case - SQL query takes arguments, give one. query properly execute in this case</technical_language>

Target:
private static ReaderBlogIdPostIdList getBlogIdPostIdsWithTagType(ReaderTagType tagType, int maxPosts) { if (tagType == null) { return new ReaderBlogIdPostIdList(); } String sql = "SELECT blog_id, post_id FROM tbl_posts WHERE tag_type=?"; if (maxPosts > 0) { sql += " LIMIT " + Integer.toString(maxPosts); } String[] args = {Integer.toString(tagType.toInt())}; return getBlogIdPostIds(sql, args); }
Source:
<code>public void run() throws Throwable { for (String className : testClassNames) { if (!shouldIncludeTest(className)) { continue; } final Class<?> testClass = Class.forName(className); <START> <END> List<TestResult> results; if (!mightBeATestClass(testClass)) { results = Collections.emptyList(); } else { results = new ArrayList<>(); TestNG testng = new TestNG(); testng.setUseDefaultListeners(false); testng.setAnnotationTransformer(new FilteringAnnotationTransformer(results)); testng.setTestClasses(new Class<?>[]{testClass}); testng.addListener(new TestListener(results)); testng.addListener(new SuiteHTMLReporter()); testng.addListener((IReporter) new FailedReporter()); testng.addListener(new XMLReporter()); testng.addListener(new EmailableReporter()); testng.addListener(new JUnitReportReporterImproved()); testng.run(); } writeResult(className, results); } }</code><technical_language>breaking formatting here... Please google-format fix formatting issues</technical_language>

Target:
public void run() throws Throwable { for (String className : testClassNames) { if (!shouldIncludeTest(className)) { continue; } final Class<?> testClass = Class.forName(className); List<TestResult> results; if (!mightBeATestClass(testClass)) { results = Collections.emptyList(); } else { results = new ArrayList<>(); TestNG testng = new TestNG(); testng.setUseDefaultListeners(false); testng.setAnnotationTransformer(new FilteringAnnotationTransformer(results)); testng.setTestClasses(new Class<?>[] {testClass}); testng.addListener(new TestListener(results)); testng.addListener(new SuiteHTMLReporter()); testng.addListener((IReporter) new FailedReporter()); testng.addListener(new XMLReporter()); testng.addListener(new EmailableReporter()); testng.addListener(new JUnitReportReporterWithMethodParameters()); testng.run(); } writeResult(className, results); } }
Source:
<code>public org.kie.dmn.model.api.InputData dmnFromNode(final Node<View<InputData>, ?> node) { InputData source = node.getContent().getDefinition(); org.kie.dmn.model.api.InputData result = new org.kie.dmn.model.v1_2.TInputData(); result.setId(source.getId().getValue()); result.setDescription(DescriptionPropertyConverter.dmnFromWB(source.getDescription())); result.setName(source.getName().getValue()); org.kie.dmn.model.api.InformationItem variable = InformationItemPropertyConverter.dmnFromWB(source.getVariable()); <START> variable.setParent(result); <END> result.setVariable(variable); return result; }</code><technical_language>Ok, InformationItemPropertyConverter.dmnFromWB(source.getVariable()); possibly assigns null variable this variable here, I more defensive</technical_language>

Target:
public org.kie.dmn.model.api.InputData dmnFromNode(final Node<View<InputData>, ?> node) { InputData source = node.getContent().getDefinition(); org.kie.dmn.model.api.InputData result = new org.kie.dmn.model.v1_2.TInputData(); result.setId(source.getId().getValue()); result.setDescription(DescriptionPropertyConverter.dmnFromWB(source.getDescription())); result.setName(source.getName().getValue()); org.kie.dmn.model.api.InformationItem variable = InformationItemPropertyConverter.dmnFromWB(source.getVariable()); if (variable != null) { variable.setParent(result); } result.setVariable(variable); return result; }
Source:
<code>public void return_leak_period_date() throws Exception { setServerProperty(orchestrator, "sonar.leak.period", "previous_version"); Date leakPeriodDate = toDate("2016-12-31"); String projectKey1 = newProjectKey(); analyzeProject(projectKey1, "shared/xoo-sample", formatDate(leakPeriodDate)); analyzeProject(projectKey1, "shared/xoo-sample"); String projectKey2 = newProjectKey(); analyzeProject(projectKey2, "shared/xoo-sample"); String projectKey3 = newProjectKey(); newAdminWsClient(orchestrator).projects().create(CreateRequest.builder().setKey(projectKey3).setName(projectKey3).setOrganization(organizationKey).build()); <START> <END> SearchProjectsWsResponse response = searchProjects( SearchProjectsRequest.builder().setAdditionalFields(singletonList("leakPeriodDate")).setOrganization(organizationKey).build()); assertThat(response.getComponentsList()).extracting(Component::getKey, Component::hasLeakPeriodDate) .containsOnly( tuple(projectKey1, true), tuple(projectKey2, false), tuple(projectKey3, false)); Component project1 = response.getComponentsList().stream().filter(component -> component.getKey().equals(projectKey1)).findFirst() .orElseThrow(() -> new IllegalStateException("Project1 is not found")); assertThat(project1.getLeakPeriodDate()).startsWith("2016-12-31"); }</code><technical_language>Do parse date</technical_language>

Target:
public void return_leak_period_date() throws Exception { setServerProperty(orchestrator, "sonar.leak.period", "previous_version"); String projectKey1 = newProjectKey(); analyzeProject(projectKey1, "shared/xoo-sample", "2016-12-31"); analyzeProject(projectKey1, "shared/xoo-sample"); String projectKey2 = newProjectKey(); analyzeProject(projectKey2, "shared/xoo-sample"); String projectKey3 = newProjectKey(); newAdminWsClient(orchestrator).projects().create(CreateRequest.builder().setKey(projectKey3).setName(projectKey3).setOrganization(organizationKey).build()); SearchProjectsWsResponse response = searchProjects( SearchProjectsRequest.builder().setAdditionalFields(singletonList("leakPeriodDate")).setOrganization(organizationKey).build()); assertThat(response.getComponentsList()).extracting(Component::getKey, Component::hasLeakPeriodDate) .containsOnly( tuple(projectKey1, true), tuple(projectKey2, false), tuple(projectKey3, false)); Component project1 = response.getComponentsList().stream().filter(component -> component.getKey().equals(projectKey1)).findFirst() .orElseThrow(() -> new IllegalStateException("Project1 is not found")); assertThat(sanitizeTimezones(project1.getLeakPeriodDate())).isEqualTo("2016-12-31T00:00:00+0000"); }
Source:
<code>private String getQuestionResultStatistics(List<FeedbackResponseAttributes> responses, Map<String, Integer> answerFrequency) { <START> isContainsNonEmptyResponse = false; END> for (String option : msqChoices) { answerFrequency.put(option, 0); } if (otherEnabled) { answerFrequency.put("Other", 0); } int numChoicesSelected = 0; for (FeedbackResponseAttributes response : responses) { numChoicesSelected = getNumOfChoicesSelected(response, numChoicesSelected, answerFrequency); } if (!isContainsNonEmptyResponse) { return ""; } return Integer.toString(numChoicesSelected); }</code><technical_language>containsNonEmptyResponse do</technical_language>

Target:
private int getQuestionResultStatistics( List<FeedbackResponseAttributes> responses, Map<String, Integer> answerFrequency) { containsNonEmptyResponse = false; for (String option : msqChoices) { answerFrequency.put(option, 0); } if (otherEnabled) { answerFrequency.put("Other", 0); } int numChoicesSelected = 0; for (FeedbackResponseAttributes response : responses) { numChoicesSelected = numChoicesSelected + getNumOfChoicesSelected(response, answerFrequency); } if (!containsNonEmptyResponse) { return -1; } return numChoicesSelected; }
Source:
<code>private int countLines(File input) throws IOException { <START> return Files.readAllLines(input.toPath()).size(); <END> }</code><technical_language>if this is a good idea, input file large loaded memory this (the is true for other cases in HttpApiSentenceChecler)..</technical_language>

Target:
private int countLines(File input) throws IOException { int count = 0; try (BufferedReader reader = Files.newBufferedReader(input.toPath())) { while (reader.readLine() != null) { count++; } } return count; }
Source:
<code>private void setEpisodeIndex(MemberOfType memberOf, Item item) { Episode episode = (Episode) item; Integer episodeNumber = episode.getEpisodeNumber(); if (episodeNumber != null) { memberOf.setIndex(Long.valueOf(episodeNumber)); <START> } else if (!item.getReleaseDates().isEmpty()) { <END> int index = generateIndexFromReleaseDate(item.getReleaseDates()); memberOf.setIndex(Long.valueOf(index)); } }</code><technical_language>This needs check if a release date of correct type, release date</technical_language>

Target:
private void setEpisodeIndex(MemberOfType memberOf, Item item) { Episode episode = (Episode) item; Integer episodeNumber = episode.getEpisodeNumber(); if (episodeNumber != null) { memberOf.setIndex(Long.valueOf(episodeNumber)); } else if (!item.getReleaseDates().isEmpty()) { for (ReleaseDate releaseDate : item.getReleaseDates()) { if (releaseDate.type().equals(ReleaseType.FIRST_BROADCAST)) { int index = generateIndexFromReleaseDate(releaseDate); memberOf.setIndex(Long.valueOf(index)); } } } }
Source:
<code>public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, TimeRange timeRange, Mutation mutation) throws IOException { CheckAndMutate.Builder builder = CheckAndMutate.newBuilder(row) .ifMatches(family, qualifier, op, comparator.getValue()).timeRange(timeRange); try { if (mutation instanceof Put) { return checkAndMutate(builder.build((Put) mutation)).isSuccess(); } else if (mutation instanceof Delete) { return checkAndMutate(builder.build((Delete) mutation)).isSuccess(); } else { throw new DoNotRetryIOException( "Unsupported mutate type: " + mutation.getClass().getSimpleName().toUpperCase()); } } catch (IllegalArgumentException e) { <START> throw new DoNotRetryIOException(e.getMessage()); <END> } }</code><technical_language>do throw this exception out? Catching a RuntimeException strange me</technical_language>

Target:
public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, TimeRange timeRange, Mutation mutation) throws IOException { CheckAndMutate checkAndMutate; try { CheckAndMutate.Builder builder = CheckAndMutate.newBuilder(row) .ifMatches(family, qualifier, op, comparator.getValue()).timeRange(timeRange); if (mutation instanceof Put) { checkAndMutate = builder.build((Put) mutation); } else if (mutation instanceof Delete) { checkAndMutate = builder.build((Delete) mutation); } else { throw new DoNotRetryIOException("Unsupported mutate type: " + mutation.getClass() .getSimpleName().toUpperCase()); } } catch (IllegalArgumentException e) { throw new DoNotRetryIOException(e.getMessage()); } return checkAndMutate(checkAndMutate).isSuccess(); }
Source:
<code><START> private void cacheNegotiatingProfiles() { <END> synchronized (this) { schemes = new ArrayList<String>(); profiles = new ArrayList<AuthenticationProfile>(); for (AuthenticationProfile profile : AuthenticationProfileRepository.getInstance().getProfiles()) { ExtMap authnContext = profile.getAuthn().getContext(); if ((authnContext.<Long> get(Authn.ContextKeys.CAPABILITIES).longValue() & caps) != 0) { profiles.add(profile); schemes.addAll(authnContext.<Collection<String>>get(Authn.ContextKeys.HTTP_AUTHENTICATION_SCHEME, Collections.<String>emptyList())); } } Collections.sort( profiles, new Comparator<AuthenticationProfile>() { @Override public int compare(AuthenticationProfile o1, AuthenticationProfile o2) { return Integer.valueOf(o1.getNegotiationPriority()).compareTo(o2.getNegotiationPriority()); } } ); } }</code><technical_language>private synchronized void cacheNegotiationProfiles,</technical_language>

Target:
private synchronized void cacheNegotiatingProfiles() { schemes = new ArrayList<String>(); profiles = new ArrayList<AuthenticationProfile>(); for (AuthenticationProfile profile : AuthenticationProfileRepository.getInstance().getProfiles()) { ExtMap authnContext = profile.getAuthn().getContext(); if ((authnContext.<Long> get(Authn.ContextKeys.CAPABILITIES).longValue() & caps) != 0) { profiles.add(profile); schemes.addAll(authnContext.<Collection<String>>get(Authn.ContextKeys.HTTP_AUTHENTICATION_SCHEME, Collections.<String>emptyList())); } } Collections.sort( profiles, new Comparator<AuthenticationProfile>() { @Override public int compare(AuthenticationProfile o1, AuthenticationProfile o2) { return Integer.valueOf(o1.getNegotiationPriority()).compareTo(o2.getNegotiationPriority()); } } ); }
Source:
<code>public static double[] getLocationByIP() { String location; try { URL url = new URL("<LINK_0>"); <START> InputStream is = url.openStream(); <END> byte[] b = new byte[BUF_SIZE + 1]; char[] c = new char[is.read(b) + 2]; for (int i = 0; b[i] > 0 && i < BUF_SIZE; i++) { c[i] = (char) b[i]; } location = String.valueOf(c). split("\"loc\": \"")[1].split("\"")[0]; } catch (Exception e) { System.err.println( "Не получается определить местоположение," + " попробуйте использовать --place"); return null; } return new double[]{ Double.parseDouble(location.split(",")[0]), Double.parseDouble(location.split(",")[1]), DEFAULT_RADIUS }; }</code><technical_language>try-with-resources</technical_language>

Target:
public static double[] getLocationByIP() { String location = ""; try { URL url = new URL("<LINK_0>"); try (InputStream is = url.openStream()) { byte[] b = new byte[BUF_SIZE + 1]; char[] c = new char[is.read(b) + 2]; for (int i = 0; b[i] > 0 && i < BUF_SIZE; i++) { c[i] = (char) b[i]; } location = String.valueOf(c). split("\"loc\": \"")[1].split("\"")[0]; try { is.close(); } catch (Exception e) { System.err.println("Соединение с ipinfo не закрылось"); } } catch (Exception e) { System.err.println( "Не получается определить местоположение," + " попробуйте использовать --place"); return null; } } catch (MalformedURLException e) { System.err.println( "http уже не считается протоколом, а вы используете мою программу О_о" ); } return new double[]{ Double.parseDouble(location.split(",")[0]), Double.parseDouble(location.split(",")[1]), DEFAULT_RADIUS }; }
Source:
<code>protected void refreshBootParameters(RunVmParams runVmParameters) { <START> super.refreshBootParameters(runVmParameters); <END> getVm().setinitrd_url(runVmParameters.getinitrd_url()); getVm().setkernel_url(runVmParameters.getkernel_url()); getVm().setkernel_params(runVmParameters.getkernel_params()); getVm().setCustomProperties(runVmParameters.getCustomProperties()); }</code><technical_language>super is needed call preforms setboot_seq. I a "template" style currently abuse. wont this enough? RunVmCommand protected void refreshBootParameters(...) // inline refreshBootSequenceParameter RunVmOnceCommand protected void refreshBootParameters(...) // set initrd,kernel custom properties // set boot sequence params</technical_language>

Target:
protected void refreshBootParameters(RunVmParams runVmParameters) { if (runVmParameters == null) { return; } getVm().setinitrd_url(runVmParameters.getinitrd_url()); getVm().setkernel_url(runVmParameters.getkernel_url()); getVm().setkernel_params(runVmParameters.getkernel_params()); getVm().setCustomProperties(runVmParameters.getCustomProperties()); getVm().setboot_sequence(runVmParameters.getBootSequence()); }
Source:
<code>private void collectCoverageInformation() { try { final InputStream execDataStream; try { execDataStream = new ByteArrayInputStream(RT.getAgent().getExecutionData(false)); } catch (IllegalStateException e) { System.err.println( "If the error notes: 'JaCoCo agent not started', the issue is likely " + "that the Jacoco agent is not included as a Java agent."); System.err.println( "To do so, add " + "'-Xbootclasspath/a:/path/to/jacocoagent.jar -javaagent:jacocoagent.jar' " + "to the command line argument."); throw (e); } final ExecutionDataReader reader = new ExecutionDataReader(execDataStream); reader.setSessionInfoVisitor( <START> new ISessionInfoVisitor() { <END> @Override public void visitSessionInfo(final SessionInfo info) }); reader.setExecutionDataVisitor( new IExecutionDataVisitor() { @Override public void visitClassExecution(final ExecutionData data) { executionData.put(data); } }); reader.read(); execDataStream.close(); } catch (IOException e) { System.err.println("Error in Coverage Tracker in collecting coverage information."); e.printStackTrace(); System.exit(1); } }</code><technical_language>Minor: I find clearer create a private singleton class DummySessionInfoVisitor here</technical_language>

Target:
private void collectCoverageInformation() { try { final InputStream execDataStream; try { execDataStream = new ByteArrayInputStream(RT.getAgent().getExecutionData(false)); } catch (IllegalStateException e) { System.err.println( "If the error notes: 'JaCoCo agent not started', the issue is likely " + "that the Jacoco agent is not included as a Java agent."); System.err.println( "To do so, add " + "'-Xbootclasspath/a:/path/to/jacocoagent.jar -javaagent:jacocoagent.jar' " + "to the command line argument."); throw (e); } final ExecutionDataReader reader = new ExecutionDataReader(execDataStream); reader.setSessionInfoVisitor(DummySessionInfoVisitor.instance); reader.setExecutionDataVisitor( new IExecutionDataVisitor() { @Override public void visitClassExecution(final ExecutionData data) { executionData.put(data); } }); reader.read(); execDataStream.close(); } catch (IOException e) { System.err.println("Error in Coverage Tracker in collecting coverage information."); e.printStackTrace(); System.exit(1); } }
Source:
<code>private static PlanFragment createFragment(PlanNode planNode) { ImmutableMap.Builder<Symbol, Type> types = ImmutableMap.builder(); for (Symbol symbol : planNode.getOutputSymbols()) { types.put(symbol, VARCHAR); } return new PlanFragment( new PlanFragmentId(planNode.getId() + "_fragment_id"), planNode, types.build(), SOURCE_DISTRIBUTION, ImmutableList.of(planNode.getId()), new PartitioningScheme(Partitioning.create(SINGLE_DISTRIBUTION, ImmutableList.of()), planNode.getOutputSymbols()), StageExecutionStrategy.ungroupedExecution(), <START> emptyMap(), <END> emptyMap()); }</code><technical_language>ImmutableMap.of()</technical_language>

Target:
private static PlanFragment createFragment(PlanNode planNode) { ImmutableMap.Builder<Symbol, Type> types = ImmutableMap.builder(); for (Symbol symbol : planNode.getOutputSymbols()) { types.put(symbol, VARCHAR); } return new PlanFragment( new PlanFragmentId(planNode.getId() + "_fragment_id"), planNode, types.build(), SOURCE_DISTRIBUTION, ImmutableList.of(planNode.getId()), new PartitioningScheme(Partitioning.create(SINGLE_DISTRIBUTION, ImmutableList.of()), planNode.getOutputSymbols()), StageExecutionStrategy.ungroupedExecution(), StatsAndCosts.empty()); }
Source:
<code>public Set<ResourceType<?>> getResourceTypes() { <START> Set<ResourceType<?>> resourceType = new HashSet<>(); <END> resourceType.add(ClusteredResourceType.Types.DEDICATED); resourceType.add(ClusteredResourceType.Types.SHARED); resourceType.add(ClusteredResourceType.Types.UNKNOWN); return resourceType; }</code><technical_language>a constant? size set 3</technical_language>

Target:
public Set<ResourceType<?>> getResourceTypes() { Set<ResourceType<?>> resourceType = new HashSet<>(3); resourceType.add(ClusteredResourceType.Types.DEDICATED); resourceType.add(ClusteredResourceType.Types.SHARED); resourceType.add(ClusteredResourceType.Types.UNKNOWN); return Collections.unmodifiableSet(resourceType); }
Source:
<code>public void subscribeToDataStore() { Log.v(TAG, "subscribeToDataStore"); <START> compositeSubscription.add( <END> Observable.switchOnNext( Observable.switchOnNext(searchString) .filter((string) -> string.length() > 2) .throttleLast(500, TimeUnit.MILLISECONDS) .map(dataLayer::getGitHubRepositorySearch) ) .flatMap((repositorySearch) -> { final List<Observable<GitHubRepository>> observables = new ArrayList<>(); for (int repositoryId : repositorySearch.getItems()) { Log.d(TAG, "Process repositoryId: " + repositoryId); final Observable<GitHubRepository> observable = dataLayer.getGitHubRepository(repositoryId); observables.add(observable); } return Observable.combineLatest( observables, (args) -> { Log.v(TAG, "Combine items into a list"); final List<GitHubRepository> list = new ArrayList<>(); for (Object repository : args) { list.add((GitHubRepository) repository); } return list; } ); }) .subscribe((repositories) -> { Log.d(TAG, "Publishing " + repositories.size() + " repositories from the ViewModel"); RepositoriesViewModel.this.repositories.onNext(repositories); })); }</code><technical_language>subscribing unsubscribing times it. CompositeSubscription recreated then. <LINK_0></technical_language>

Target:
public void subscribeToDataStore() { Log.v(TAG, "subscribeToDataStore"); if (compositeSubscription == null) { compositeSubscription = new CompositeSubscription(); } compositeSubscription.add( Observable.switchOnNext( Observable.switchOnNext(searchString) .filter((string) -> string.length() > 2) .throttleLast(500, TimeUnit.MILLISECONDS) .map(dataLayer::getGitHubRepositorySearch) ) .flatMap((repositorySearch) -> { Log.d(TAG, "Found " + repositorySearch.getItems().size() + " repositories with search " + repositorySearch.getSearch()); final List<Observable<GitHubRepository>> observables = new ArrayList<>(); for (int repositoryId : repositorySearch.getItems()) { Log.v(TAG, "Process repositoryId: " + repositoryId); final Observable<GitHubRepository> observable = dataLayer.getGitHubRepository(repositoryId) .doOnNext((repository) -> Log.v(TAG, "Received repository " + repository.getId())); observables.add(observable); if (observables.size() >= MAX_REPOSITORIES_DISPLAYED) { break; } } return Observable.combineLatest( observables, (args) -> { Log.v(TAG, "Combine items into a list"); final List<GitHubRepository> list = new ArrayList<>(); for (Object repository : args) { list.add((GitHubRepository) repository); } return list; } ); }) .subscribe((repositories) -> { Log.d(TAG, "Publishing " + repositories.size() + " repositories from the ViewModel"); RepositoriesViewModel.this.repositories.onNext(repositories); })); }
Source:
<code>public StructField getStructField(String columnName) { StructField childStructField = null; if (typeId.isArray()) { <START> assert typeDescriptor!=null:"Catalog Type"; assert typeDescriptor.getChildren() != null:"Catalog Type"; <END> TypeDescriptorImpl childTypeDescriptor = (TypeDescriptorImpl) typeDescriptor.getChildren()[0]; TypeId childTypeId = TypeId.getBuiltInTypeId(childTypeDescriptor.getTypeId().getJDBCTypeId()); childStructField = childTypeId.getStructField("co", childTypeDescriptor.getPrecision(), childTypeDescriptor.getScale(), null); } return typeId.getStructField(columnName, getPrecision(), getScale(), childStructField); }</code><technical_language>a bit confused error message. suggest typeDescriptor == null is valid in some cases? If so, assert here</technical_language>

Target:
public StructField getStructField(String columnName) { StructField childStructField = null; if (typeId.isArray()) { assert typeDescriptor.getChildren() != null:"ArrayType should have the child type specified"; TypeDescriptorImpl childTypeDescriptor = (TypeDescriptorImpl) typeDescriptor.getChildren()[0]; TypeId childTypeId = TypeId.getBuiltInTypeId(childTypeDescriptor.getTypeId().getJDBCTypeId()); childStructField = childTypeId.getStructField("co", childTypeDescriptor.getPrecision(), childTypeDescriptor.getScale(), null); } return typeId.getStructField(columnName, getPrecision(), getScale(), childStructField); }
Source:
<code><START> public void isSameInstanceType(String columnClassName, String value, boolean expectedResult) { <END> FactIdentifier factIdentifierMock = mock(FactIdentifier.class); when(factIdentifierMock.getClassNameWithoutPackage()).thenReturn(columnClassName); when(factMappingMock.getFactIdentifier()).thenReturn(factIdentifierMock); when(simulationDescriptorMock.getFactMappingByIndex(COLUMN_INDEX)).thenReturn(factMappingMock); boolean result = scenarioGridModel.isSameInstanceType(COLUMN_INDEX, value); verify(simulationMock, times(1)).getSimulationDescriptor(); verify(simulationDescriptorMock, times(1)).getFactMappingByIndex(eq(COLUMN_INDEX)); assertEquals(result, expectedResult); }</code><technical_language>private I</technical_language>

Target:
private void isSameInstanceType(String columnClassName, String value, boolean expectedResult) { FactIdentifier factIdentifierMock = mock(FactIdentifier.class); when(factIdentifierMock.getClassNameWithoutPackage()).thenReturn(columnClassName); when(factMappingMock.getFactIdentifier()).thenReturn(factIdentifierMock); when(simulationDescriptorMock.getFactMappingByIndex(COLUMN_INDEX)).thenReturn(factMappingMock); boolean result = scenarioGridModel.isSameInstanceType(COLUMN_INDEX, value); verify(simulationMock, times(1)).getSimulationDescriptor(); verify(simulationDescriptorMock, times(1)).getFactMappingByIndex(eq(COLUMN_INDEX)); assertEquals(result, expectedResult); }
Source:
<code>protected void doInit() { <START> Assert.state(this.queryExpression != null || this.collectionCallback != null, "no query specified"); <END> Assert.state(this.collectionNameExpression != null, "no collection name specified"); if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); TypeLocator typeLocator = this.evaluationContext.getTypeLocator(); if (typeLocator instanceof StandardTypeLocator) { ((StandardTypeLocator) typeLocator).registerImport(Query.class.getPackage().getName()); } } if (this.mongoTemplate == null) { this.mongoTemplate = new MongoTemplate(this.mongoDbFactory, this.mongoConverter); } }</code><technical_language>exception message reflection reality: "no query collectionCallback is specified"</technical_language>

Target:
protected void doInit() { Assert.state(this.queryExpression != null || this.collectionCallback != null, "no query or collectionCallback is specified"); Assert.state(this.collectionNameExpression != null, "no collection name specified"); if (this.queryExpression != null && this.collectionCallback != null) { throw new IllegalStateException("query and collectionCallback are mutually exclusive"); } if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); TypeLocator typeLocator = this.evaluationContext.getTypeLocator(); if (typeLocator instanceof StandardTypeLocator) { ((StandardTypeLocator) typeLocator).registerImport(Query.class.getPackage().getName()); } } if (this.mongoTemplate == null) { this.mongoTemplate = new MongoTemplate(this.mongoDbFactory, this.mongoConverter); } }
Source:
<code>public static void main(String[] args) { try { Map<String, Object> argMap = parseArgs(args); setupLogger(argMap); List<String> others = (List<String>) argMap.get("__other__"); Map<String, ModuleService> moduleServices = loadModules(ModuleService.class); if (argMap.containsKey(ARG_HELP)) { List<String> modules = new ArrayList<>(moduleServices.keySet()); Collections.sort(modules); System.out.println("Modules: " + StringUtils.join(modules, ", ")); <START> System.exit(0); <END> } if(others.isEmpty()) { throw new IllegalArgumentException("Module must be provided"); } String module = others.remove(0); ModuleService moduleService = moduleServices.get(module); if (moduleService == null) { throw new IllegalArgumentException( String.format("No such '%1$s' module exists. To list existing modules use --help argument.", module) ); } moduleService.parseArguments(others); if(moduleService.isHelp()) { System.out.println(module + " help"); return; } loadExtensions(moduleService, argMap); moduleService.run(); } catch (Throwable t) { String message = t.getMessage() != null ? t.getMessage() : t.getClass().getName(); System.err.println(message); logger.error(message); logger.debug(message, t); System.exit(1); } }</code><technical_language>avoid exit middle of program... conditionals and/or divide smaller functions</technical_language>

Target:
public static void main(String[] args) { try { Map<String, Object> argMap = parseArgs(args); setupLogger(argMap); List<String> others = (List<String>) argMap.get("__other__"); Map<String, ModuleService> moduleServices = loadModules(ModuleService.class); if (argMap.containsKey(ARG_HELP)) { printModules(moduleServices.keySet()); } else { if (others.isEmpty()) { throw new IllegalArgumentException("Module must be provided"); } String module = others.remove(0); ModuleService moduleService = moduleServices.get(module); if (moduleService == null) { throw new IllegalArgumentException( String.format("No such '%1$s' module exists.", module) ); } moduleService.parseArguments(others); if (moduleService.doHelp()) { System.out.println(module + " help"); return; } loadExtensions(moduleService, argMap); moduleService.run(); } } catch (Throwable t) { String message = t.getMessage() != null ? t.getMessage() : t.getClass().getName(); logger.error(message); logger.debug(message, t); System.exit(1); } }
Source:
<code>private void connect(){ findViewById(R.id.sign_in_button).setVisibility(View.INVISIBLE); findViewById(R.id.textViewGoogleConnecting).setVisibility(View.VISIBLE); findViewById(R.id.buttonCancelGoogleConnection).setVisibility(View.VISIBLE); findViewById(R.id.progressBarGoogleConnection).setVisibility(View.VISIBLE); <START> <END> mGoogleApiClient.connect(); }</code><technical_language>want store view a field in class if multiple time. findViewById a negligible cost</technical_language>

Target:
private void connect(){ mGoogleSingInButton.setVisibility(View.INVISIBLE); mTextViewGoogleConnecting.setVisibility(View.VISIBLE); mButtonCancelGoogleConnection.setVisibility(View.VISIBLE); mProgressBarGoogleConnection.setVisibility(View.VISIBLE); mGoogleApiClient.connect(); }
Source:
<code>public boolean performNextOperation(int completedChildCount) { if (getParameters().getOvfUpdateStep() == OvfUpdateStep.OVF_STORES_CREATION) { setOvfUpdateStep(OvfUpdateStep.OVF_UPLOAD); if (!updateOvfStoreContent()) { setSucceeded(false); log.error("Failed to update OVF_STORE content"); throw new <START> EngineException(EngineError.UPLOAD_FAILURE); <END> } return true; } return false; }</code><technical_language>I is reason error type (Actually I removed form engine), I translate verbally CoCo do log anywhere. simple ENGINE exception</technical_language>

Target:
public boolean performNextOperation(int completedChildCount) { if (getParameters().getOvfUpdateStep() == OvfUpdateStep.OVF_STORES_CREATION) { setOvfUpdateStep(OvfUpdateStep.OVF_UPLOAD); if (!updateOvfStoreContent()) { setSucceeded(false); log.error("Failed to update OVF_STORE content"); throw new RuntimeException(); } return true; } return false; }
Source:
<code>public void evictStaleEntries(final StalenessTracker stalenessTracker) { for (Map.Entry<JmxCollector.Rule, Map<String, MatchedRule>> entry : cachedRules.entrySet()) { JmxCollector.Rule rule = entry.getKey(); Map<String, MatchedRule> cachedRulesForRule = entry.getValue(); for (String cacheKey : cachedRulesForRule.keySet()) { if (!stalenessTracker.contains(rule, cacheKey)) { cachedRulesForRule.remove(cacheKey); } } <START> if (cachedRulesForRule.size() == 0) { <END> cachedRules.remove(rule); } } }</code><technical_language>need evict these, grow time. I missed some locking here</technical_language>

Target:
public void evictStaleEntries(final StalenessTracker stalenessTracker) { for (Map.Entry<JmxCollector.Rule, Map<String, MatchedRule>> entry : cachedRules.entrySet()) { JmxCollector.Rule rule = entry.getKey(); Map<String, MatchedRule> cachedRulesForRule = entry.getValue(); for (String cacheKey : cachedRulesForRule.keySet()) { if (!stalenessTracker.contains(rule, cacheKey)) { cachedRulesForRule.remove(cacheKey); } } } }
Source:
<code>private void addRepository(File repositoryDir) { util.addConfiguredRepository(repositoryDir); <START> if (doAutoShare()) { <END> autoShareProjects(repositoryDir); } }</code><technical_language>style nit: braces single line block</technical_language>

Target:
private void addRepository(File repositoryDir) { util.addConfiguredRepository(repositoryDir); if (doAutoShare()) autoShareProjects(repositoryDir); }
Source:
<code>public void process() { PerformanceMonitor.startActivity("rendering/backdrop"); skyMaterial.setFloat("viewingDistance", renderingConfig.getViewDistance().getChunkDistance().x * 8.0f, true); skyMaterial.setFloat("daylight", backdropProvider.getDaylight(), true); skyMaterial.setFloat("tick", worldRenderer.getMillisecondsSinceRenderingStart(), true); skyMaterial.setFloat("sunlightValueAtPlayerPos", worldRenderer.getTimeSmoothedMainLightIntensity(), true); <START> activeCamera = worldRenderer.getActiveCamera(); <END> cameraDir = activeCamera.getViewingDirection(); cameraPosition = activeCamera.getPosition(); skyMaterial.setFloat("swimming", activeCamera.isUnderWater() ? 1.0f : 0.0f, true); skyMaterial.setFloat3("cameraPosition", cameraPosition.x, cameraPosition.y, cameraPosition.z, true); skyMaterial.setFloat3("cameraDirection", cameraDir.x, cameraDir.y, cameraDir.z, true); skyMaterial.setFloat3("cameraParameters", activeCamera.getzNear(), activeCamera.getzFar(), 0.0f, true); sunDirection = backdropProvider.getSunDirection(false); skyMaterial.setFloat3("sunVec", sunDirection.x, sunDirection.y, sunDirection.z, true); skyMaterial.setFloat("time", worldProvider.getTime().getDays(), true); skyMaterial.setFloat("colorExp", backdropProvider.getColorExp(), true); zenithColor = getAllWeatherZenith(sunDirection.y, backdropProvider.getTurbidity()); skyMaterial.setFloat("sunAngle", backdropProvider.getSunPositionAngle(), true); skyMaterial.setFloat("turbidity", backdropProvider.getTurbidity(), true); skyMaterial.setFloat3("zenith", (float) zenithColor.x, (float) zenithColor.y, (float) zenithColor.z, true); skyMaterial.setFloat4("skySettings", sunExponent, moonExponent, skyDaylightBrightness, skyNightBrightness, true); glCallList(skySphere); PerformanceMonitor.endActivity(); }</code><technical_language>This needed if do in initialize()</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("rendering/backdrop"); sunDirection = backdropProvider.getSunDirection(false); turbidity = backdropProvider.getTurbidity(); skyMaterial.setFloat("daylight", backdropProvider.getDaylight(), true); skyMaterial.setFloat3("sunVec", sunDirection, true); skyMaterial.setFloat3("zenith", getAllWeatherZenith(backdropProvider.getSunDirection(false).y, turbidity), true); skyMaterial.setFloat("turbidity", turbidity, true); skyMaterial.setFloat("colorExp", backdropProvider.getColorExp(), true); skyMaterial.setFloat4("skySettings", sunExponent, moonExponent, skyDaylightBrightness, skyNightBrightness, true); glCallList(skySphere); PerformanceMonitor.endActivity(); }
Source:
<code>public Node visitClazz(ClazzContext ctx) { String superclass; String clazzName = ctx.classname.getText(); if (ctx.superclass != null) { superclass = ctx.superclass.getText().replace('\\', '/'); } else { superclass = "org/twnc/runtime/BObject"; } DeclsNode decls; if (ctx.decls() != null) { decls = (DeclsNode) visit(ctx.decls()); } else { <START> decls = new DeclsNode(new ArrayList<VarDeclNode>()); <END> } List<MethodNode> methods = new ArrayList<>(); for (MthdContext m : ctx.mthd()) { methods.add((MethodNode) visit(m)); } return new ClazzNode(clazzName, superclass, decls, methods); }</code><technical_language>sense add a no-args DeclsNode constructor empty list</technical_language>

Target:
public Node visitClazz(ClazzContext ctx) { String superclass; String clazzName = ctx.classname.getText(); if (ctx.superclass != null) { superclass = ctx.superclass.getText().replace('\\', '/'); } else { superclass = "org/twnc/runtime/BObject"; } DeclsNode decls; if (ctx.decls() != null) { decls = (DeclsNode) visit(ctx.decls()); } else { decls = new DeclsNode(); } List<MethodNode> methods = new ArrayList<>(); for (MthdContext m : ctx.mthd()) { methods.add((MethodNode) visit(m)); } return new ClazzNode(clazzName, superclass, decls, methods); }
Source:
<code>public boolean isConfirmationEmailBoxTicked() { <START> WebElement sendEmailChecbox = browser.driver.findElement(By.name(Const.ParamsNames.SEND_SUBMISSION_EMAIL)); <END> return sendEmailChecbox.isSelected(); }</code><technical_language>sendEmailCheckbox</technical_language>

Target:
public boolean isConfirmationEmailBoxTicked() { WebElement sendEmailCheckbox = browser.driver.findElement(By.name(Const.ParamsNames.SEND_SUBMISSION_EMAIL)); return sendEmailCheckbox.isSelected(); }
Source:
<code>public void testFormReceiptFailure() throws Exception{ MockEventListener mockEventListener = new MockEventListener(MOCK_ID_2); registry.registerListener(mockEventListener,EventSubjects.FORM_FAIL); String badConfigName = "bad_config_name"; HttpPost request = new HttpPost(String.format("http://localhost:%d/odk/forms/%s/%s", TestContext.getJettyPort(), badConfigName, TITLE)); StringEntity entity = new StringEntity(getJson()); request.setEntity(entity); HttpResponse response = getHttpClient().execute(request); assertEquals(response.getStatusLine().getStatusCode(), HttpStatus.SC_OK); int count = 0; while (mockEventListener.getEvents().size() < EXPECTED_EVENTS_FAIL && count < WAIT_COUNT) { count++; getLogger().debug("Number of events: " + mockEventListener.getEvents().size()); if (count == WAIT_COUNT) { <START> getLogger().error("Timeout"); <END> fail(); } Thread.sleep(2000); } MotechEvent event = mockEventListener.getEvents().get(0); assertNotNull(event); assertEquals(event.getSubject(), EventSubjects.FORM_FAIL); assertEquals(event.getParameters().get(EventParameters.FORM_TITLE), TITLE); assertEquals(event.getParameters().get(EventParameters.CONFIGURATION_NAME), badConfigName); }</code><technical_language>pass this message for fail()</technical_language>

Target:
public void testFormReceiptFailure() throws Exception { MockEventListener mockEventListener = new MockEventListener(MOCK_ID_2); registry.registerListener(mockEventListener, EventSubjects.FORM_FAIL); String badConfigName = "bad_config_name"; HttpPost request = new HttpPost(String.format("http://localhost:%d/odk/forms/%s/%s", TestContext.getJettyPort(), badConfigName, TITLE)); StringEntity entity = new StringEntity(getJson()); request.setEntity(entity); HttpResponse response = getHttpClient().execute(request); assertEquals(response.getStatusLine().getStatusCode(), HttpStatus.SC_OK); int count = 0; while (mockEventListener.getEvents().size() < EXPECTED_EVENTS_FAIL && count < WAIT_COUNT) { count++; getLogger().debug("Number of events: " + mockEventListener.getEvents().size()); if (count == WAIT_COUNT) { fail(TIMEOUT); } Thread.sleep(2000); } MotechEvent event = mockEventListener.getEvents().get(0); assertNotNull(event); assertEquals(event.getSubject(), EventSubjects.FORM_FAIL); assertEquals(event.getParameters().get(EventParameters.FORM_TITLE), TITLE); assertEquals(event.getParameters().get(EventParameters.CONFIGURATION_NAME), badConfigName); }
Source:
<code><START> public int hashCode() { <END> int result = Objects.hashCode(fullName); result += Objects.hashCode(name); return result * 31; }</code><technical_language>|We replace hashcode implementation *Objects.hash(...)*</technical_language>

Target:
public int hashCode() { return Objects.hash(name, fullName); }
Source:
<code>private ListenableFuture<Void> stopTasksInGroup(TaskGroup taskGroup) { if (taskGroup == null) { return Futures.immediateFuture(null); } final List<ListenableFuture<Void>> futures = Lists.newArrayList(); for (Map.Entry<String, TaskData> entry : taskGroup.tasks.entrySet()) { if (!entry.getValue().status.isComplete()) { futures.add(stopTask(entry.getKey(), false)); } } return Futures.transform( Futures.successfulAsList(futures), new Function<List<Void>, Void>() { @Nullable @Override public Void apply(@Nullable List<Void> input) { return null; } <START> } <END> ); }</code><technical_language>fine in a lot of situations cast it, is cast returned Void a Void, a bad cast runtime. But, eh</technical_language>

Target:
private ListenableFuture<?> stopTasksInGroup(TaskGroup taskGroup) { if (taskGroup == null) { return Futures.immediateFuture(null); } final List<ListenableFuture<Void>> futures = Lists.newArrayList(); for (Map.Entry<String, TaskData> entry : taskGroup.tasks.entrySet()) { if (!entry.getValue().status.isComplete()) { futures.add(stopTask(entry.getKey(), false)); } } return Futures.successfulAsList(futures); }
Source:
<code>boolean addOverride(long changeId, String packageName, boolean enabled, IOverrideValidator validator) { boolean alreadyKnown = true; try { if (!validator.allowOverride(changeId, packageName)) { <START> return alreadyKnown; <END> } } catch (RemoteException e) { throw new RuntimeException("Unable to call override validator!", e); } synchronized (mChanges) { CompatChange c = mChanges.get(changeId); if (c == null) { alreadyKnown = false; c = new CompatChange(changeId); addChange(c); } c.addPackageOverride(packageName, enabled); } return alreadyKnown; }</code><technical_language>I feel this is right behaviour in this instance. For example, If adb command try override a change is allowed, I want know: 1. allowed 2. allowed (e.g. 'app is debuggable') throwing a security exception better</technical_language>

Target:
boolean addOverride(long changeId, String packageName, boolean enabled, IOverrideValidator validator) throws RemoteException, SecurityException { boolean alreadyKnown = true; enforceOverridePolicy(changeId, packageName, validator); synchronized (mChanges) { CompatChange c = mChanges.get(changeId); if (c == null) { alreadyKnown = false; c = new CompatChange(changeId); addChange(c); } c.addPackageOverride(packageName, enabled); } return alreadyKnown; }
Source:
<code>public int getUnsortedEncodedKeyComponentHashCode(@Nullable Double key) { <START> return Objects.hashCode(key); <END> }</code><technical_language>above, nullToZero(key).hashCode(). for Long Float</technical_language>

Target:
public int getUnsortedEncodedKeyComponentHashCode(@Nullable Double key) { return DimensionHandlerUtils.nullToZero(key).hashCode(); }
Source:
<code>Map getNetworksMap(Host host) { Map resultMap = map(); Map ovirtmgmtMap = map(); resultMap.put(AppConfig.getInstance().getNetworkBridgeName(), ovirtmgmtMap); ovirtmgmtMap.put("iface", AppConfig.getInstance().getNetworkBridgeName()); ovirtmgmtMap.put("addr", host.getIpAddress()); Map cfgMap = map(); cfgMap.put("DEVICE", AppConfig.getInstance().getNetworkBridgeName()); cfgMap.put("DELAY", "0"); cfgMap.put("BOOTPROTO", "dhcp"); cfgMap.put("TYPE", "Ethernet"); cfgMap.put("ONBOOT", "yes"); ovirtmgmtMap.put("cfg", cfgMap); ovirtmgmtMap.put("mtu", "1500"); ovirtmgmtMap.put("netmask", "255.255.252.0"); ovirtmgmtMap.put("stp", "off"); ovirtmgmtMap.put("bridged", Boolean.TRUE); ovirtmgmtMap.put("gateway", "10.34.63.254"); <START> ovirtmgmtMap.put("switch", "legacy"); <END> List portsList = lst(); portsList.add("em1"); ovirtmgmtMap.put("ports", portsList); return resultMap; }</code><technical_language>a prior commit? Is else needed vdsmfake work 4.0 master</technical_language>

Target:
Map getNetworksMap(Host host) { Map resultMap = map(); Map ovirtmgmtMap = map(); resultMap.put(AppConfig.getInstance().getNetworkBridgeName(), ovirtmgmtMap); ovirtmgmtMap.put("iface", AppConfig.getInstance().getNetworkBridgeName()); ovirtmgmtMap.put("addr", host.getIpAddress()); Map cfgMap = map(); cfgMap.put("DEVICE", AppConfig.getInstance().getNetworkBridgeName()); cfgMap.put("DELAY", "0"); cfgMap.put("BOOTPROTO", "dhcp"); cfgMap.put("TYPE", "Ethernet"); cfgMap.put("ONBOOT", "yes"); ovirtmgmtMap.put("cfg", cfgMap); ovirtmgmtMap.put("mtu", "1500"); ovirtmgmtMap.put("netmask", "255.255.252.0"); ovirtmgmtMap.put("stp", "off"); ovirtmgmtMap.put("bridged", Boolean.TRUE); ovirtmgmtMap.put("gateway", "10.34.63.254"); List portsList = lst(); portsList.add("em1"); ovirtmgmtMap.put("ports", portsList); return resultMap; }
Source:
<code>public Saveable[] getSaveables() { if (!hasSaveablesProvider()) { IEditorPart saveablePart = getSite().getPage().getActiveEditor(); <START> return saveablePart instanceof ISaveablesSource ? ((ISaveablesSource) saveablePart).getSaveables() <END> : new Saveable[] { new DefaultSaveable(saveablePart) }; } return super.getSaveables(); }</code><technical_language>Case of null return empty array</technical_language>

Target:
public Saveable[] getSaveables() { if (!hasSaveablesProvider()) { IEditorPart saveablePart = getSite().getPage().getActiveEditor(); return saveablePart != null ? saveablePart instanceof ISaveablesSource ? ((ISaveablesSource) saveablePart).getSaveables() : new Saveable[] { new DefaultSaveable(saveablePart) } : new Saveable[] {}; } return super.getSaveables(); }
Source:
<code>public ListCertificatesResponseMessageType listChainOfTrust(ListChainOfTrustRequestMessageType request) { LOG.debug("listChainOfTrust--begin"); String alias = request.getAlias(); if(StringUtils.isBlank(alias)){ <START> return buildListCertificatesResponseMessageType(false, "Certificate Alias is required for chain-of-trust"); <END> } try { ListCertificatesResponseMessageType response = new ListCertificatesResponseMessageType(); response.getCertList().addAll(buildChain(alias, getTrustStore())); return response; } catch (KeyStoreException | CertificateEncodingException ex) { LOG.error("unable to build chain-of-trust: {}", ex.getMessage(), ex); return buildListCertificatesResponseMessageType(false, "ERROR: Unable to build the chain-of-trust."); } finally { LOG.debug("listChainOfTrust--end"); } }</code><technical_language>remove -'s</technical_language>

Target:
public ListCertificatesResponseMessageType listChainOfTrust(ListChainOfTrustRequestMessageType request) { LOG.debug("listChainOfTrust: begin"); String alias = request.getAlias(); if(StringUtils.isBlank(alias)){ return buildListCertificatesResponseMessageType(false, "Certificate Alias is required for chain of trust"); } try { ListCertificatesResponseMessageType response = new ListCertificatesResponseMessageType(); response.getCertList().addAll(buildChain(alias, getTrustStore())); return response; } catch (KeyStoreException | CertificateEncodingException ex) { LOG.error("unable to build chain-of-trust: {}", ex.getMessage(), ex); return buildListCertificatesResponseMessageType(false, "Unable to build the chain of trust."); } finally { LOG.debug("listChainOfTrust: end"); } }