auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void checkTarget(IDebugTarget target, boolean checked) { fThreadViewer.setChecked(target, checked); if (checked) { fThreadViewer.expandToLevel(target, AbstractTreeViewer.ALL_LEVELS); IThread[] threads; try { threads= target.getThreads(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); return; } IThread thread; boolean checkedThread= false; for (IThread thread2 : threads) { thread= thread2; String name= null; try { name= thread.getName(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); } if (MAIN.equals(name)) { checkedThread= fThreadViewer.setChecked(thread, true); } } if (!checkedThread) { for (IThread thread2 : threads) { if (fThreadViewer.setChecked(thread2, true)) { break; } } } } else { IThread[] threads; try { threads= target.getThreads(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); return; } for (IThread thread : threads) { fThreadViewer.setChecked(thread, false); } } }

Target:
protected void checkTarget(IDebugTarget target, boolean checked) { fThreadViewer.setChecked(target, checked); if (checked) { fThreadViewer.expandToLevel(target, AbstractTreeViewer.ALL_LEVELS); IThread[] threads; try { threads= target.getThreads(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); return; } IThread thread; boolean checkedThread= false; for (IThread targetThread : threads) { thread= targetThread; String name= null; try { name= thread.getName(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); } if (MAIN.equals(name)) { checkedThread= fThreadViewer.setChecked(thread, true); } } if (!checkedThread) { for (IThread targetThread : threads) { if (fThreadViewer.setChecked(targetThread, true)) { break; } } } } else { IThread[] threads; try { threads= target.getThreads(); } catch (DebugException exception) { JDIDebugUIPlugin.log(exception); return; } for (IThread thread : threads) { fThreadViewer.setChecked(thread, false); } } }
Source:
public Long getSplitsPerNode() { return splitsPerNode; }

Target:
public Optional<Long> getSplitsPerNode() { return Optional.ofNullable(splitsPerNode); }
Source:
private void setToCButtonFadedIn(boolean shouldFadeIn) { if (shouldFadeIn) { tocButton.removeCallbacks(hideToCButtonRunnable); tocButton.show(); } else { tocButton.postDelayed(hideToCButtonRunnable, TOC_BUTTON_HIDE_DELAY); } }

Target:
private void setToCButtonFadedIn(boolean shouldFadeIn) { tocButton.removeCallbacks(hideToCButtonRunnable); if (shouldFadeIn) { tocButton.show(); } else { tocButton.postDelayed(hideToCButtonRunnable, TOC_BUTTON_HIDE_DELAY); } }
Source:
public void edit(HostSetupNetworksModel uicommonModel) { driver.edit(uicommonModel); uicommonModel.getNicsChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { HostSetupNetworksModel model = (HostSetupNetworksModel) sender; List<LogicalNetworkModel> networks = model.getNetworks(); List<NetworkInterfaceModel> nics = model.getNics(); updateNetworks(networks); updateNics(nics); rendered = true; } }); uicommonModel.getOperationCandidateEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { OperationCadidateEventArgs evtArgs = (OperationCadidateEventArgs) args; NetworkOperation candidate = evtArgs.getCandidate(); NetworkItemModel<?> op1 = evtArgs.getOp1(); NetworkItemModel<?> op2 = evtArgs.getOp2(); if (evtArgs.isDryRun()) { return; } if (candidate == null) { setErrorStatus(constants.noValidActionSetupNetwork()); } else { if (candidate.isErroneousOperation()) { setErrorStatus(candidate.getMessage(op1, op2)); } else { if (candidate.isDisplayNetworkAffected(op1, op2)) { setWarningStatus(applicationMessages.moveDisplayNetworkWarning(candidate.getMessage(op1, op2))); } else { setValidStatus(candidate.getMessage(op1, op2)); } } } } }); internalNetworkList.setSetupModel(uicommonModel); externalNetworkList.setSetupModel(uicommonModel); }

Target:
public void edit(HostSetupNetworksModel uicommonModel) { driver.edit(uicommonModel); uicommonModel.getNicsChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { HostSetupNetworksModel model = (HostSetupNetworksModel) sender; List<LogicalNetworkModel> networks = model.getNetworks(); List<NetworkInterfaceModel> nics = model.getNics(); if (!keepStatusText) { initStatusPanel(); } keepStatusText = false; updateNetworks(networks); updateNics(nics); rendered = true; } }); uicommonModel.getOperationCandidateEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { OperationCadidateEventArgs evtArgs = (OperationCadidateEventArgs) args; NetworkOperation candidate = evtArgs.getCandidate(); NetworkItemModel<?> op1 = evtArgs.getOp1(); NetworkItemModel<?> op2 = evtArgs.getOp2(); if (candidate == null) { setErrorStatus(constants.noValidActionSetupNetwork()); } else { if (candidate.isErroneousOperation()) { setErrorStatus(candidate.getMessage(op1, op2)); } else { if (candidate.isDisplayNetworkAffected(op1, op2)) { setWarningStatus(applicationMessages.moveDisplayNetworkWarning(candidate.getMessage(op1, op2))); } else { setValidStatus(candidate.getMessage(op1, op2)); } } } } }); internalNetworkList.setSetupModel(uicommonModel); externalNetworkList.setSetupModel(uicommonModel); }
Source:
protected boolean importDefinition() { File file = new File(getSchemaField().getText()); if (!file.canRead()) { showWarningDialog(Constant.messages.getString(MESSAGE_PREFIX + "badfile")); return false; } try { GraphQlParser.parse(FileUtils.readFileToString(file, "UTF-8"), getEndpointUri()); } catch (IOException e) { showWarningDialog(Constant.messages.getString(MESSAGE_PREFIX + "readerror")); } return true; }

Target:
protected boolean importDefinition() { try { getParser().importFile(getSchemaField().getText()); return true; } catch (IOException e) { showWarningDialog(e.getMessage()); } return false; }
Source:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Instance other = (Instance) obj; boolean equals = true; equals &= (this.hostname != null) ? (this.hostname.equals(other.hostname)) : (other.hostname == null); equals &= (this.cluster != null) ? (this.cluster.equals(other.cluster)) : (other.cluster == null); equals &= (this.isUp == other.isUp); if(attributes != null && attributes.get("port") != null){ String port = attributes.get("port"); if(other.getAttributes() != null && other.getAttributes().get("port") != null){ equals &= (port == other.getAttributes().get("port")); } } return equals; }

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Instance other = (Instance) obj; boolean equals = true; equals &= (this.hostname != null) ? (this.hostname.equals(other.hostname)) : (other.hostname == null); equals &= (this.cluster != null) ? (this.cluster.equals(other.cluster)) : (other.cluster == null); equals &= (this.isUp == other.isUp); if(attributes != null && attributes.get("port") != null){ String port = attributes.get("port"); if(other.getAttributes() != null && other.getAttributes().get("port") != null){ equals &= (port.equals(other.getAttributes().get("port"))); } } return equals; }
Source:
public Set<DiscoveryDruidNode> getAllNodes() { return ImmutableSet.<DiscoveryDruidNode>builder().addAll(nodes.values()).build(); }

Target:
public Collection<DiscoveryDruidNode> getAllNodes() { return Collections.unmodifiableCollection(nodes.values()); }
Source:
public void initColumnsWithTaskVarColumnsTest() { final ExtendedPagedTable<TaskSummary> currentListGrid = spy(new ExtendedPagedTable<>(new GridGlobalPreferences())); doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { final List<ColumnMeta> columns = (List<ColumnMeta>) invocationOnMock.getArguments()[0]; assertEquals(columns.size(), 18); return null; } }).when(currentListGrid).addColumns(anyList()); ArrayList<GridColumnPreference> columnPreferences = new ArrayList<GridColumnPreference>(); columnPreferences.add(new GridColumnPreference("var1", 0, "40")); columnPreferences.add(new GridColumnPreference("var2", 1, "40")); columnPreferences.add(new GridColumnPreference("var3", 1, "40")); when(currentListGrid.getGridPreferencesStore()).thenReturn(gridPreferencesStore); when(gridPreferencesStore.getColumnPreferences()).thenReturn(columnPreferences); getView().initColumns(currentListGrid); verify(currentListGrid).addColumns(anyList()); }

Target:
public void initColumnsWithTaskVarColumnsTest() { final ExtendedPagedTable<TaskSummary> currentListGrid = spy(new ExtendedPagedTable<>(new GridGlobalPreferences())); doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { final List<ColumnMeta> columns = (List<ColumnMeta>) invocationOnMock.getArguments()[0]; assertEquals(18, columns.size()); return null; } }).when(currentListGrid).addColumns(anyList()); ArrayList<GridColumnPreference> columnPreferences = new ArrayList<GridColumnPreference>(); columnPreferences.add(new GridColumnPreference("var1", 0, "40")); columnPreferences.add(new GridColumnPreference("var2", 1, "40")); columnPreferences.add(new GridColumnPreference("var3", 1, "40")); when(currentListGrid.getGridPreferencesStore()).thenReturn(gridPreferencesStore); when(gridPreferencesStore.getColumnPreferences()).thenReturn(columnPreferences); getView().initColumns(currentListGrid); verify(currentListGrid).addColumns(anyList()); }
Source:
private JSONArray buildMatchesJSONArray(final int fromIndex, final int toIndex) { Collections.sort(this.remoteMatches, new Comparator<RemotePatientSimilarityView>() { @Override public int compare(RemotePatientSimilarityView o1, RemotePatientSimilarityView o2) { double score1 = (Double) o1.getScore(); double score2 = (Double) o2.getScore(); return (int) Math.signum(score2 - score1); } }); final JSONArray matchesJson = new JSONArray(); for (int i = fromIndex; i <= toIndex; i++) { final JSONObject matchJson = this.remoteMatches.get(i).toJSON(); matchesJson.put(matchJson); } return matchesJson; }

Target:
private JSONArray buildMatchesJSONArray(final int fromIndex, final int toIndex) { Collections.sort(this.remoteMatches, new Comparator<RemotePatientSimilarityView>() { @Override public int compare(RemotePatientSimilarityView o1, RemotePatientSimilarityView o2) { double score1 = o1.getScore(); double score2 = o2.getScore(); return (int) Math.signum(score2 - score1); } }); final JSONArray matchesJson = new JSONArray(); for (int i = fromIndex; i <= toIndex; i++) { final JSONObject matchJson = this.remoteMatches.get(i).toJSON(); matchesJson.put(matchJson); } return matchesJson; }
Source:
static void cleanupSingletonSessionId() { File tempDir = new File(System.getProperty("java.io.tmpdir")); if (tempDir.exists()) { String[] jbpmSerFiles = tempDir.list(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith("-jbpmSessionId.ser"); } }); for (String file : jbpmSerFiles) { new File(tempDir, file).delete(); } } }

Target:
private static void cleanupSingletonSessionId() { File tempDir = new File(System.getProperty("java.io.tmpdir")); if (tempDir.exists()) { String[] jbpmSerFiles = tempDir.list(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith("-jbpmSessionId.ser"); } }); for (String file : jbpmSerFiles) { new File(tempDir, file).delete(); } } }}
Source:
public void stop() { httpServer.removeContext(httpContext); serviceManager.stop(); if (cleaner != null) { try { cleaner.stopServer(); } catch (InterruptedException exp) { System.err.println("Could not stop Jolokia server properly: " + exp); } } }

Target:
public void stop() { httpServer.removeContext(httpContext); serviceManager.stop(); if (cleaner != null) { try { cleaner.stopServer(); } catch (InterruptedException exp) { logHandler.error("Could not stop Jolokia server properly: ", exp); } } }
Source:
private static ClosableIterator<Tuple> doDistinct( final MongoDBQueryDescriptor queryDescriptor, final DBCollection collection) { List distinctFieldValues = collection.distinct( queryDescriptor.getFieldName(), queryDescriptor.getCriteria() ); MapTupleSnapshot snapshot = new MapTupleSnapshot( Collections.<String, Object>singletonMap( "n", distinctFieldValues ) ); return CollectionHelper.newClosableIterator( Collections.singletonList( new Tuple( snapshot, SnapshotType.UNKNOWN ) ) ); }

Target:
private static ClosableIterator<Tuple> doDistinct(final MongoDBQueryDescriptor queryDescriptor, final DBCollection collection) { DBCollectionDistinctOptions distinctOptions = new DBCollectionDistinctOptions().filter( queryDescriptor.getCriteria() ).collation( queryDescriptor.getCollation() ); List<?> distinctFieldValues = collection.distinct( queryDescriptor.getDistinctFieldName(), distinctOptions ); MapTupleSnapshot snapshot = new MapTupleSnapshot( Collections.<String, Object>singletonMap( "n", distinctFieldValues ) ); return CollectionHelper.newClosableIterator( Collections.singletonList( new Tuple( snapshot, SnapshotType.UNKNOWN ) ) ); }
Source:
public void keepAliveTest() { HttpMethod[] HTTP_METHODS = {HttpMethod.POST, HttpMethod.GET, HttpMethod.HEAD, HttpMethod.DELETE}; EmbeddedChannel channel = createEmbeddedChannel(); for (HttpMethod httpMethod : HTTP_METHODS) { for (Map.Entry<RestServiceErrorCode, HttpResponseStatus> entry : REST_SERVICE_ERROR_CODE_TO_HTTP_RESPONSE_STATUS_MAP .entrySet()) { HttpHeaders httpHeaders = new DefaultHttpHeaders(); httpHeaders.set(MockNettyMessageProcessor.REST_SERVICE_ERROR_CODE_HEADER_NAME, entry.getKey()); channel.writeInbound(RestTestUtils .createRequest(httpMethod, TestingUri.OnResponseCompleteWithRestException.toString(), httpHeaders)); HttpResponse response = (HttpResponse) channel.readOutbound(); assertEquals("Unexpected response status", entry.getValue(), response.getStatus()); if (!(response instanceof FullHttpResponse)) { while (channel.readOutbound() != null) { ; } } boolean shouldBeAlive = !httpMethod.equals(HttpMethod.POST) && !NettyResponseChannel.CLOSE_CONNECTION_ERROR_STATUSES .contains(entry.getValue()); assertEquals("Channel state (open/close) not as expected", shouldBeAlive, channel.isActive()); assertEquals("Connection header should be consistent with channel state", shouldBeAlive, HttpHeaders.isKeepAlive(response)); if (!shouldBeAlive) { channel = createEmbeddedChannel(); } } } channel.close(); }

Target:
public void keepAliveTest() { HttpMethod[] HTTP_METHODS = {HttpMethod.POST, HttpMethod.GET, HttpMethod.HEAD, HttpMethod.DELETE}; EmbeddedChannel channel = createEmbeddedChannel(); for (HttpMethod httpMethod : HTTP_METHODS) { for (Map.Entry<RestServiceErrorCode, HttpResponseStatus> entry : REST_ERROR_CODE_TO_HTTP_STATUS.entrySet()) { HttpHeaders httpHeaders = new DefaultHttpHeaders(); httpHeaders.set(MockNettyMessageProcessor.REST_SERVICE_ERROR_CODE_HEADER_NAME, entry.getKey()); channel.writeInbound(RestTestUtils .createRequest(httpMethod, TestingUri.OnResponseCompleteWithRestException.toString(), httpHeaders)); HttpResponse response = (HttpResponse) channel.readOutbound(); assertEquals("Unexpected response status", entry.getValue(), response.getStatus()); if (!(response instanceof FullHttpResponse)) { while (channel.readOutbound() != null) { ; } } boolean shouldBeAlive = !httpMethod.equals(HttpMethod.POST) && !NettyResponseChannel.CLOSE_CONNECTION_ERROR_STATUSES .contains(entry.getValue()); assertEquals("Channel state (open/close) not as expected", shouldBeAlive, channel.isActive()); assertEquals("Connection header should be consistent with channel state", shouldBeAlive, HttpHeaders.isKeepAlive(response)); if (!shouldBeAlive) { channel = createEmbeddedChannel(); } } } channel.close(); }
Source:
private Mono<HttpRequest> validateLength(final HttpRequest request) { Flux<ByteBuffer> body = request.body(); if (body == null) { return Mono.just(request); } Long expectedLength = Long.valueOf(request.headers().value("Content-Length")); return FluxUtil.collectBytesInByteBufferStream(body).doOnNext(bb -> { if (bb.length > expectedLength) { throw new UnexpectedLengthException( String.format("Request body emitted more bytes than the expected %d bytes.", expectedLength), bb.length, expectedLength); } else if (bb.length != expectedLength) { throw new UnexpectedLengthException( String.format("Request body emitted less bytes than the expected %d bytes.", expectedLength), bb.length, expectedLength); } }).then(Mono.just(request)); }

Target:
private Flux<ByteBuffer> validateLength(final HttpRequest request) { final Flux<ByteBuffer> bbFlux = request.body(); if (bbFlux == null) { return Flux.empty(); } return Flux.defer(() -> { Long expectedLength = Long.valueOf(request.headers().value("Content-Length")); final long[] currentTotalLength = new long[1]; return bbFlux.doOnEach(s -> { if (s.isOnNext()) { ByteBuffer byteBuffer = s.get(); int currentLength = (byteBuffer == null) ? 0 : byteBuffer.remaining(); currentTotalLength[0] += currentLength; if (currentTotalLength[0] > expectedLength) { throw logger.logExceptionAsError(new UnexpectedLengthException( String.format("Request body emitted %d bytes more than the expected %d bytes.", currentTotalLength[0], expectedLength), currentTotalLength[0], expectedLength)); } } else if (s.isOnComplete()) { if (expectedLength.compareTo(currentTotalLength[0]) != 0) { throw logger.logExceptionAsError(new UnexpectedLengthException( String.format("Request body emitted %d bytes less than the expected %d bytes.", currentTotalLength[0], expectedLength), currentTotalLength[0], expectedLength)); } } }); }); }
Source:
public static boolean isSystemDarkTheme () { boolean isDarkTheme = false; if (OS.WIN32_VERSION >= OS.VERSION (10, 0)) { TCHAR key = new TCHAR (0, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", true); TCHAR lpValueName = new TCHAR(0, "AppsUseLightTheme", true); try { int result = OS.readRegistryDword(OS.HKEY_CURRENT_USER, key, lpValueName); isDarkTheme = (result == 0); } catch (Exception e) { } } return isDarkTheme; }

Target:
public static boolean isSystemDarkTheme () { boolean isDarkTheme = false; if (OS.WIN32_VERSION >= OS.VERSION (10, 0)) { try { int result = OS.readRegistryDword(OS.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme"); isDarkTheme = (result == 0); } catch (Exception e) { } } return isDarkTheme; }
Source:
public void checkAttributeSyntax(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException { Integer minUID = attribute.valueAsInteger(); if(minUID != null && minUID<1) throw new WrongAttributeValueException(attribute, "Attribute value must be min 1."); }

Target:
public void checkAttributeSyntax(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException { Integer minUID = attribute.valueAsInteger(); if(minUID != null && minUID<1) throw new WrongAttributeValueException(attribute, "Attribute value must be bigger than 0."); }
Source:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BrowserInformation)) { return false; } BrowserInformation other = (BrowserInformation) o; if (!this.getBrowserName().equals(other.getBrowserName())) { return false; } return true; }

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BrowserInformation)) { return false; } return this.getBrowserName().equals(((BrowserInformation) o).getBrowserName()); }
Source:
public void testStopTasklet() throws Exception { JobInstance jobInstance = new JobInstance(123L, job.getName()); JobExecution jobExecution = new JobExecution(jobInstance, 111L, jobParameters); MockStoppableTasklet tasklet = new MockStoppableTasklet(); TaskletStep taskletStep = new TaskletStep(); taskletStep.setTasklet(tasklet); MockJob job = new MockJob(); job.taskletStep = taskletStep; JobRegistry jobRegistry = mock(JobRegistry.class); TaskletStep step = mock(TaskletStep.class); when(step.getTasklet()).thenReturn(tasklet); when(step.getName()).thenReturn("test_job.step1"); when(jobRegistry.getJob(anyString())).thenReturn(job); when(jobExplorer.getJobExecution(111L)).thenReturn(jobExecution); jobOperator.setJobRegistry(jobRegistry); jobExplorer.getJobExecution(111L); jobRepository.update(jobExecution); jobOperator.stop(111L); assertEquals(BatchStatus.STOPPING, jobExecution.getStatus()); assertTrue(tasklet.stopped); }

Target:
public void testStopTasklet() throws Exception { JobInstance jobInstance = new JobInstance(123L, job.getName()); JobExecution jobExecution = new JobExecution(jobInstance, 111L, jobParameters); StoppableTasklet tasklet = mock(StoppableTasklet.class); TaskletStep taskletStep = new TaskletStep(); taskletStep.setTasklet(tasklet); MockJob job = new MockJob(); job.taskletStep = taskletStep; JobRegistry jobRegistry = mock(JobRegistry.class); TaskletStep step = mock(TaskletStep.class); when(step.getTasklet()).thenReturn(tasklet); when(step.getName()).thenReturn("test_job.step1"); when(jobRegistry.getJob(anyString())).thenReturn(job); when(jobExplorer.getJobExecution(111L)).thenReturn(jobExecution); jobOperator.setJobRegistry(jobRegistry); jobExplorer.getJobExecution(111L); jobRepository.update(jobExecution); jobOperator.stop(111L); assertEquals(BatchStatus.STOPPING, jobExecution.getStatus()); }
Source:
public void execute(Context context) throws SQLException { IntegerColumnDef userLoginColumn = IntegerColumnDef.newIntegerColumnDefBuilder() .setColumnName("user_id") .setIsNullable(false) .build(); VarcharColumnDef qProfileUuidColumn = VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("qprofile_uuid") .setIsNullable(false) .setLimit(255) .build(); context.execute(new CreateTableBuilder(getDialect(), TABLE_NAME) .addPkColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("uuid") .setIsNullable(false) .setLimit(40) .build()) .addColumn(userLoginColumn) .addColumn(qProfileUuidColumn) .addColumn(newBigIntegerColumnDefBuilder() .setColumnName("created_at") .setIsNullable(false) .build()) .build() ); context.execute( new CreateIndexBuilder(getDialect()) .setTable(TABLE_NAME) .setName(TABLE_NAME + "_user") .addColumn(userLoginColumn) .setUnique(false) .build()); context.execute( new CreateIndexBuilder(getDialect()) .setTable(TABLE_NAME) .setName(TABLE_NAME + "_qprofile") .addColumn(qProfileUuidColumn) .setUnique(false) .build()); }

Target:
public void execute(Context context) throws SQLException { IntegerColumnDef userLoginColumn = IntegerColumnDef.newIntegerColumnDefBuilder() .setColumnName("user_id") .setIsNullable(false) .build(); VarcharColumnDef qProfileUuidColumn = VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("qprofile_uuid") .setIsNullable(false) .setLimit(255) .build(); context.execute(new CreateTableBuilder(getDialect(), TABLE_NAME) .addPkColumn(VarcharColumnDef.newVarcharColumnDefBuilder() .setColumnName("uuid") .setIsNullable(false) .setLimit(40) .build()) .addColumn(userLoginColumn) .addColumn(qProfileUuidColumn) .addColumn(newBigIntegerColumnDefBuilder() .setColumnName("created_at") .setIsNullable(false) .build()) .build() ); context.execute( new CreateIndexBuilder(getDialect()) .setTable(TABLE_NAME) .setName(TABLE_NAME + "_qprofile") .addColumn(qProfileUuidColumn) .setUnique(false) .build()); context.execute( new CreateIndexBuilder(getDialect()) .setTable(TABLE_NAME) .setName(TABLE_NAME + "_unique") .addColumn(userLoginColumn) .addColumn(qProfileUuidColumn) .setUnique(true) .build()); }
Source:
public SparkZeppelinContext( SparkContext sc, SQLContext sql, InterpreterHookRegistry hooks, int maxResult) { super(hooks, maxResult); this.sc = sc; this.sqlContext = sql; interpreterClassMap = new HashMap<String, String>(); interpreterClassMap.put("spark", "org.apache.zeppelin.spark.SparkInterpreter"); interpreterClassMap.put("sql", "org.apache.zeppelin.spark.SparkSqlInterpreter"); interpreterClassMap.put("dep", "org.apache.zeppelin.spark.DepInterpreter"); interpreterClassMap.put("pyspark", "org.apache.zeppelin.spark.PySparkInterpreter"); this.supportedClasses = new ArrayList<>(); try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.Dataset")); } catch (ClassNotFoundException e) { } try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.DataFrame")); } catch (ClassNotFoundException e) { } try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.SchemaRDD")); } catch (ClassNotFoundException e) { } if (supportedClasses.isEmpty()) { throw new InterpreterException("Can not road Dataset/DataFrame/SchemaRDD class"); } }

Target:
public SparkZeppelinContext( SparkContext sc, SQLContext sql, InterpreterHookRegistry hooks, int maxResult) { super(hooks, maxResult); this.sc = sc; this.sqlContext = sql; interpreterClassMap = new HashMap<String, String>(); interpreterClassMap.put("spark", "org.apache.zeppelin.spark.SparkInterpreter"); interpreterClassMap.put("sql", "org.apache.zeppelin.spark.SparkSqlInterpreter"); interpreterClassMap.put("dep", "org.apache.zeppelin.spark.DepInterpreter"); interpreterClassMap.put("pyspark", "org.apache.zeppelin.spark.PySparkInterpreter"); this.supportedClasses = new ArrayList<>(); try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.Dataset")); } catch (ClassNotFoundException e) { } try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.DataFrame")); } catch (ClassNotFoundException e) { } try { supportedClasses.add(this.getClass().forName("org.apache.spark.sql.SchemaRDD")); } catch (ClassNotFoundException e) { } if (supportedClasses.isEmpty()) { throw new InterpreterException("Can not load Dataset/DataFrame/SchemaRDD class"); } }
Source:
public Hooks list() { VdcQueryReturnValue result = runQuery(VdcQueryType.GetVdsHooksById2, new GetVdsHooksByIdParameters(asGuid(hostId))); HashMap<String, HashMap<String, HashMap<String, String>>> hooksMap = (HashMap<String, HashMap<String, HashMap<String, String>>>) result.getReturnValue(); Hooks hooks = mappingLocator.getMapper(HashMap.class, Hooks.class).map(hooksMap, null); return hooks; }

Target:
public Hooks list() { @SuppressWarnings("unchecked") HashMap<String, HashMap<String, HashMap<String, String>>> hooksMap = getEntity(HashMap.class, VdcQueryType.GetVdsHooksById2, new GetVdsHooksByIdParameters(asGuid(hostId)), null); return mapCollection(hooksMap); }
Source:
public long getStartingAddress() { if (startingAddress.get() == Address.NON_ADDRESS) { long dbStartingAddress = Optional.ofNullable(dataStore.get(STARTING_ADDRESS_RECORD)).orElse(ZERO_ADDRESS); startingAddress.set(dbStartingAddress); } return startingAddress.get(); }

Target:
public long getStartingAddress() { if (startingAddress.get() == Address.NON_ADDRESS) { startingAddress.set(dataStore.get(STARTING_ADDRESS_RECORD, ZERO_ADDRESS)); } return startingAddress.get(); }
Source:
public void testAllowCreatingEventTypeWithInformationalFieldsFromEffectiveSchema(){ final EventType et = EventTypeTestBuilder.builder() .category(EventCategory.DATA) .build(); et.setOrderingKeyFields(Collections.singletonList("metadata.occurred_at")); et.setOrderingInstanceIds(Collections.singletonList("metadata.partition")); eventTypeService.create(et, true); }

Target:
public void testAllowCreatingEventTypeWithInformationalFieldsFromEffectiveSchema() { final EventType et = EventTypeTestBuilder.builder() .category(EventCategory.DATA) .build(); et.setOrderingKeyFields(Collections.singletonList("metadata.occurred_at")); et.setOrderingInstanceIds(Collections.singletonList("metadata.partition")); try { eventTypeService.create(et, true); } catch (final InvalidEventTypeException e) { fail("Cannot create event with informational fields from effective schema"); } }
Source:
private List<String> getSubQuestions(Map<String, String[]> requestParameters, int numOfRubricSubQuestions) { List<String> rubricSubQuestions = new ArrayList<String>(); for (int i = 0; i < numOfRubricSubQuestions; i++) { String subQuestion = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_SUBQUESTION + "-" + i); if (!subQuestion.trim().isEmpty()) { rubricSubQuestions.add(subQuestion); } } return rubricSubQuestions; }

Target:
private List<String> getSubQuestions(Map<String, String[]> requestParameters, int numOfRubricSubQuestions) { List<String> rubricSubQuestions = new ArrayList<String>(); for (int i = 0; i < numOfRubricSubQuestions; i++) { String subQuestion = HttpRequestHelper.getValueFromParamMap(requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_SUBQUESTION + "-" + i); if (subQuestion != null) { rubricSubQuestions.add(subQuestion); } } return rubricSubQuestions; }
Source:
@Override public String toString() { return "ConfigKey{" + "type='" + type + '\'' + ", description='" + description + '\'' + ", alternateKey='" + alternateKey + '\'' + ", keyName='" + keyName + '\'' + ", value='" + value + '\'' + ", deprecated=" + deprecated + ", reloadable=" + reloadable + ", validValues=" + validValues + ", version='" + version + '\'' + ", valueHelper=" + valueHelper + ", defaultValue='" + defaultValue + '\'' + '}'; }

Target:
public String toString() { return new ToStringBuilder(this) .append("type", type) .append("description", description) .append("alternateKey", alternateKey) .append("keyName", keyName) .append("value", value) .append("deprecated", deprecated) .append("reloadable", reloadable) .append("validValues", validValues) .append("version", version) .append("valueHelper", valueHelper) .append("defaultValue", defaultValue) .toString(); }
Source:
public void process(WatchedEvent e) { if (e.getType() == Event.EventType.None) { return; } if (e.getState() == Event.KeeperState.SyncConnected) { event = e; latch.countDown(); } }

Target:
public void process(WatchedEvent e) { if (e.getType() != Event.EventType.None && e.getState() == Event.KeeperState.SyncConnected) { watched = true; } event = e; latch.countDown(); }
Source:
private LockManager() { locks = new Hashtable<URI, LockProvider>(); }

Target:
private LockManager() { locks = new HashMap<URI, LockProvider>(); }
Source:
public static CompressionFactory getInstance() { if (compressionFactoryInstance == null) { compressionFactoryInstance = new CompressionFactory(); } return compressionFactoryInstance; }

Target:
public static CompressionFactory getInstance() { return COMPRESSION_FACTORY_INSTANCE; }
Source:
public ForwardIborRateObservationFn() { super(); }

Target:
public ForwardIborRateObservationFn() { }
Source:
public void removeJob(JobID jobId) throws Exception { Preconditions.checkState(DefaultJobLeaderService.State.STARTED == state, "The service is currently not running."); Tuple2<LeaderRetrievalService, DefaultJobLeaderService.JobManagerLeaderListener> entry = jobLeaderServices.remove(jobId); if (entry != null) { LOG.info("Remove job from job leader monitoring.", jobId); LeaderRetrievalService leaderRetrievalService = entry.f0; DefaultJobLeaderService.JobManagerLeaderListener jobManagerLeaderListener = entry.f1; leaderRetrievalService.stop(); jobManagerLeaderListener.stop(); } }

Target:
public void removeJob(JobID jobId) { Preconditions.checkState(DefaultJobLeaderService.State.STARTED == state, "The service is currently not running."); Tuple2<LeaderRetrievalService, DefaultJobLeaderService.JobManagerLeaderListener> entry = jobLeaderServices.remove(jobId); if (entry != null) { LOG.info("Remove job from job leader monitoring.", jobId); LeaderRetrievalService leaderRetrievalService = entry.f0; DefaultJobLeaderService.JobManagerLeaderListener jobManagerLeaderListener = entry.f1; jobManagerLeaderListener.stop(); try { leaderRetrievalService.stop(); } catch (Exception e) { LOG.info("Could not properly stop the LeaderRetrievalService for job {}.", jobId, e); } } }
Source:
public BuildHistory(final AbstractBuild<?, ?> baseline, final Class<? extends ResultAction<? extends BuildResult>> type, final boolean usePreviousBuildAsReference, final boolean useStableBuildAsReference) { this.baseline = baseline; this.type = type; this.usePreviousBuildAsReference = usePreviousBuildAsReference; this.useStableBuildAsReference = useStableBuildAsReference; }

Target:
public BuildHistory(final AbstractBuild<?, ?> baseline, final Class<? extends ResultAction<? extends BuildResult>> type, final boolean usePreviousBuildAsReference, final boolean useStableBuildAsReference) { this((Run<?, ?>) baseline, type, usePreviousBuildAsReference, useStableBuildAsReference); }
Source:
public void addListener(MockitoListener listener) { if (listener instanceof MockCreationListener) { mockingProgress().addListener(listener); } }

Target:
public void addListener(MockitoListener listener) { assertNotNull(listener); mockingProgress().addListener(listener); }
Source:
public void startHosts(List<VDS> hostWithPMInStatusReboot) { for (VDS host : hostWithPMInStatusReboot) { RestartVdsCommand<FenceVdsActionParameters> restartVdsCommand = new RestartVdsCommand<>(new FenceVdsActionParameters(host.getId()), null); if (new HostFenceActionExecutor(host).isHostPoweredOff()) { if (host.getExternalStatus() != null && host.getExternalStatus() != ExternalStatus.Ok) { log.warn("Host '{}' ({}) was not started by PM Health Check Manager becuse it has external-status: '{}'.", host.getName(), host.getId(), host.getExternalStatus()); continue; } ActionReturnValue retValue = backend.get().runInternalAction(ActionType.RestartVds, restartVdsCommand.getParameters()); if (retValue!= null && retValue.getSucceeded()) { log.info("Host '{}' was started successfully by PM Health Check Manager", host.getName()); } else { log.info("PM Health Check Manager failed to start Host '{}'", host.getName()); } } } }

Target:
public void startHosts(List<VDS> hostWithPMInStatusReboot) { for (VDS host : hostWithPMInStatusReboot) { RestartVdsCommand<FenceVdsActionParameters> restartVdsCommand = new RestartVdsCommand<>(new FenceVdsActionParameters(host.getId()), null); if (new HostFenceActionExecutor(host).isHostPoweredOff()) { if (!ExternalStatus.Ok.equals(host.getExternalStatus())) { log.warn("Host '{}' ({}) was not started by PM Health Check Manager becuse it has external-status: '{}'.", host.getName(), host.getId(), host.getExternalStatus()); continue; } ActionReturnValue retValue = backend.get().runInternalAction(ActionType.RestartVds, restartVdsCommand.getParameters()); if (retValue!= null && retValue.getSucceeded()) { log.info("Host '{}' was started successfully by PM Health Check Manager", host.getName()); } else { log.info("PM Health Check Manager failed to start Host '{}'", host.getName()); } } } }
Source:
public ServletApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.asyncSupported = Reflections.isClassLoadable(ASYNC_LISTENER_CONTEXT_CLASS_NAME, resourceLoader); Class<ServletRequest> servletRequestClass = Reflections.loadClass(SERVLET_REQUEST_CLASS_NAME, resourceLoader); if (servletRequestClass != null) { try { isAsyncStartedMethod = servletRequestClass.getMethod(IS_ASYNC_STARTED_METHOD_NAME); } catch (NoSuchMethodException e) { ServletLogger.LOG.warn(e); } } }

Target:
public ServletApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.asyncSupported = Reflections.isClassLoadable(ASYNC_LISTENER_CONTEXT_CLASS_NAME, resourceLoader); Method isAsyncStartedMethodLocal = null; Class<ServletRequest> servletRequestClass = Reflections.loadClass(SERVLET_REQUEST_CLASS_NAME, resourceLoader); if (servletRequestClass != null) { try { isAsyncStartedMethodLocal = servletRequestClass.getMethod(IS_ASYNC_STARTED_METHOD_NAME); } catch (NoSuchMethodException e) { ServletLogger.LOG.servlet2Environment(); } } isAsyncStartedMethod = isAsyncStartedMethodLocal; }
Source:
public AuthenticationResponse apply(HttpResponse from) { releasePayload(from); final CaseInsensitiveMap services = new CaseInsensitiveMap(); for (final Entry<String, String> entry : from.getHeaders().entries()) { if (entry.getKey().toLowerCase().endsWith(URL_SUFFIX.toLowerCase())) services.put(entry.getKey(), getURI(entry.getValue())); } AuthenticationResponse response = new AuthenticationResponse(checkNotNull(from.getFirstHeaderOrNull(AUTH_TOKEN), AUTH_TOKEN), services); logger.debug("will connect to: ", response); return response; }

Target:
public AuthenticationResponse apply(HttpResponse from) { releasePayload(from); Builder<String, URI> builder = ImmutableMap.builder(); for (Entry<String, String> entry : from.getHeaders().entries()) { if (entry.getKey().toLowerCase().endsWith(URL_SUFFIX.toLowerCase())) builder.put(entry.getKey(), getURI(entry.getValue())); } AuthenticationResponse response = new AuthenticationResponse(checkNotNull(from.getFirstHeaderOrNull(AUTH_TOKEN), AUTH_TOKEN), builder.build()); logger.debug("will connect to: ", response); return response; }
Source:
private void injectTargetAccountAndContainerFromBlobId(String blobIdStr, RestRequest restRequest) throws RestServiceException { try { BlobId blobId = new BlobId(blobIdStr, clusterMap); Account targetAccount = accountService.getAccountById(blobId.getAccountId()); if (targetAccount == null) { frontendMetrics.getHeadDeleteUnrecognizedAccountCount.inc(); if (blobId.getAccountId() != Account.UNKNOWN_ACCOUNT_ID) { throw new RestServiceException( "Account from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " cannot be recognized", RestServiceErrorCode.InvalidAccount); } else { logger.warn( "Account cannot be identified for blobId={} with accountId={}. Setting targetAccount to UNKNOWN_ACCOUNT", blobIdStr, blobId.getAccountId()); targetAccount = Account.UNKNOWN_ACCOUNT; } } Container targetContainer = targetAccount.getContainerById(blobId.getContainerId()); if (targetContainer == null) { frontendMetrics.getHeadDeleteUnrecognizedContainerCount.inc(); throw new RestServiceException( "Container from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " containerId=" + blobId.getContainerId() + " cannot be recognized", RestServiceErrorCode.InvalidContainer); } RestUtils.setArg(restRequest, InternalKeys.TARGET_ACCOUNT_KEY, targetAccount, false); RestUtils.setArg(restRequest, InternalKeys.TARGET_CONTAINER_KEY, targetContainer, false); logger.trace("Sets targetAccount={} targetContainer={} for restRequest={} ", targetAccount, targetContainer, restRequest); } catch (RestServiceException e) { throw e; } catch (Exception e) { throw new RestServiceException( "Invalid blob id=" + blobIdStr + " during injecting account and container from blobId string", RestServiceErrorCode.BadRequest); } }

Target:
private void injectTargetAccountAndContainerFromBlobId(String blobIdStr, RestRequest restRequest) throws RestServiceException { BlobId blobId; try { blobId = new BlobId(blobIdStr, clusterMap); } catch (Exception e) { throw new RestServiceException("Invalid blob id=" + blobIdStr, RestServiceErrorCode.BadRequest); } Account targetAccount = accountService.getAccountById(blobId.getAccountId()); if (targetAccount == null) { frontendMetrics.getHeadDeleteUnrecognizedAccountCount.inc(); if (blobId.getAccountId() != Account.UNKNOWN_ACCOUNT_ID) { throw new RestServiceException( "Account from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " cannot be recognized", RestServiceErrorCode.InvalidAccount); } else { logger.debug( "Account cannot be found for blobId={} with accountId={}. Setting targetAccount to UNKNOWN_ACCOUNT", blobIdStr, blobId.getAccountId()); targetAccount = Account.UNKNOWN_ACCOUNT; } } Container targetContainer = targetAccount.getContainerById(blobId.getContainerId()); if (targetContainer == null) { frontendMetrics.getHeadDeleteUnrecognizedContainerCount.inc(); throw new RestServiceException( "Container from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " containerId=" + blobId.getContainerId() + " cannot be recognized", RestServiceErrorCode.InvalidContainer); } setTargetAccountAndContainerInRestRequest(restRequest, targetAccount, targetContainer); }
Source:
public void add(ActiveSubscription theActiveSubscription) { if (!myModelConfig.isSubscriptionMatchingEnabled()) { return; } String channelName = theActiveSubscription.getChannelName(); ourLog.info("Adding subscription to channel {}", theActiveSubscription.getId(), channelName); myActiveSubscriptionByChannelName.put(channelName, theActiveSubscription.getId()); if (mySubscriptionChannelCache.containsKey(channelName)) { ourLog.info("Channel already exists. Not creating.", channelName); return; } SubscribableChannel deliveryChannel; Optional<MessageHandler> deliveryHandler; deliveryChannel = mySubscriptionDeliveryChannelFactory.newDeliveryChannel(channelName); deliveryHandler = mySubscriptionDeliveryHandlerFactory.createDeliveryHandler(theActiveSubscription.getChannelType()); SubscriptionChannelWithHandlers subscriptionChannelWithHandlers = new SubscriptionChannelWithHandlers(channelName, deliveryChannel); deliveryHandler.ifPresent(subscriptionChannelWithHandlers::addHandler); mySubscriptionChannelCache.put(channelName, subscriptionChannelWithHandlers); }

Target:
public synchronized void add(ActiveSubscription theActiveSubscription) { if (!myModelConfig.isSubscriptionMatchingEnabled()) { return; } String channelName = theActiveSubscription.getChannelName(); ourLog.info("Adding subscription to channel {}", theActiveSubscription.getId(), channelName); myActiveSubscriptionByChannelName.put(channelName, theActiveSubscription.getId()); if (mySubscriptionChannelCache.containsKey(channelName)) { ourLog.info("Channel already exists. Not creating.", channelName); return; } SubscribableChannel deliveryChannel; Optional<MessageHandler> deliveryHandler; deliveryChannel = mySubscriptionDeliveryChannelFactory.newDeliveryChannel(channelName); deliveryHandler = mySubscriptionDeliveryHandlerFactory.createDeliveryHandler(theActiveSubscription.getChannelType()); SubscriptionChannelWithHandlers subscriptionChannelWithHandlers = new SubscriptionChannelWithHandlers(channelName, deliveryChannel); deliveryHandler.ifPresent(subscriptionChannelWithHandlers::addHandler); mySubscriptionChannelCache.put(channelName, subscriptionChannelWithHandlers); }
Source:
public void release(Statement statement) { log.tracev( "Releasing statement [{0}]", statement ); final Set<ResultSet> resultSets = xref.get( statement ); if ( resultSets != null ) { closeAll( resultSets ); xref.remove( statement ); } else if ( log.isDebugEnabled() ) { log.unregisteredStatement(); } close( statement ); if ( lastQuery == statement ) { lastQuery = null; } }

Target:
public void release(Statement statement) { log.tracev( "Releasing statement [{0}]", statement ); if ( log.isDebugEnabled() && !xref.containsKey( statement ) ) { log.unregisteredStatement(); } else { final Set<ResultSet> resultSets = xref.get( statement ); if ( resultSets != null ) { closeAll( resultSets ); } xref.remove( statement ); } close( statement ); if ( lastQuery == statement ) { lastQuery = null; } }
Source:
public JobMonitoringCoordinator( final String hostName, final JobSearchService jobSearchService, final ApplicationEventPublisher publisher, final ApplicationEventMulticaster eventMulticaster, final TaskScheduler scheduler, final Executor executor, final Registry registry, final Resource jobsDir, final JobsProperties jobsProperties, final JobSubmitterService jobSubmitterService ) throws IOException { this.hostName = hostName; this.jobSearchService = jobSearchService; this.publisher = publisher; this.eventMulticaster = eventMulticaster; this.scheduler = scheduler; this.executor = executor; this.registry = registry; this.jobsDir = jobsDir.getFile(); this.jobsProperties = jobsProperties; this.jobSubmitterService = jobSubmitterService; this.registry.mapSize("genie.jobs.running.gauge", this.jobs); this.registry.methodValue("genie.jobs.active.gauge", this, "getNumActiveJobs"); this.registry.methodValue("genie.jobs.memory.used.gauge", this, "getUsedMemory"); this.unableToCancel = registry.counter("genie.jobs.unableToCancel.rate"); this.unableToReAttach = registry.counter("genie.jobs.unableToReAttach.rate"); }

Target:
public JobMonitoringCoordinator( final String hostName, final JobSearchService jobSearchService, final ApplicationEventPublisher publisher, final ApplicationEventMulticaster eventMulticaster, final TaskScheduler scheduler, final Executor executor, final Registry registry, final Resource jobsDir, final JobsProperties jobsProperties, final JobSubmitterService jobSubmitterService ) throws IOException { super(jobSubmitterService, scheduler, publisher, registry); this.hostName = hostName; this.jobSearchService = jobSearchService; this.eventMulticaster = eventMulticaster; this.executor = executor; this.jobsDir = jobsDir.getFile(); this.jobsProperties = jobsProperties; this.unableToReAttach = registry.counter("genie.jobs.unableToReAttach.rate"); }
Source:
private HashMap<String, String> getCustomHeaders() { HashMap<String, String> customHeaders = new HashMap<>(); try { Set<String> allPropNames = getPropertyAccessor().getPropertyNames(NhincConstants.GATEWAY_PROPERTY_FILE); if (NullChecker.isNotNullish(allPropNames)) { for (String propName : allPropNames) { if (NullChecker.isNotNullish(propName) && propName.startsWith(NhincConstants.CUSTOM_HTTP_HEADERS)) { String propValue = getPropertyAccessor().getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, propName); propName = trimPropertyName(propName); if (NullChecker.isNotNullish(propValue) && NullChecker.isNotNullish(propName)) { customHeaders.put(propName, propValue); } } } } } catch (PropertyAccessException ex) { LOG.warn("Unable to access properties for custom http headers.", ex); } if (NullChecker.isNotNullish(assertion.getCONNECTCustomHttpHeaders())) { for (CONNECTCustomHttpHeadersType header : assertion.getCONNECTCustomHttpHeaders()) { customHeaders.put(header.getHeaderName(), header.getHeaderValue()); } } return customHeaders; }

Target:
private HashMap<String, String> getCustomHeaders() { HashMap<String, String> customHeaders = new HashMap<>(); try { Set<String> allPropNames = getPropertyAccessor().getPropertyNames(NhincConstants.GATEWAY_PROPERTY_FILE); if (NullChecker.isNotNullish(allPropNames)) { addPropertiesToCustomHeaders(allPropNames, customHeaders); } } catch (PropertyAccessException ex) { LOG.warn("Unable to access properties for custom http headers.", ex.getLocalizedMessage()); } for (CONNECTCustomHttpHeadersType header : assertion.getCONNECTCustomHttpHeaders()) { customHeaders.put(header.getHeaderName(), header.getHeaderValue()); } return customHeaders; }