auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected JDBCDataStore createDataStoreInternal(JDBCDataStore dataStore, Map params) throws IOException { String storageEngine = (String) STORAGE_ENGINE.lookUp( params ); if (storageEngine == null) { storageEngine = (String) STORAGE_ENGINE.sample; } Boolean enhancedSpatialFlag = (Boolean) ENHANCED_SPATIAL_SUPPORT.lookUp( params ); if (enhancedSpatialFlag == null) { enhancedSpatialSupport = isMySqlVersion56(dataStore); } else if (enhancedSpatialFlag && !isMySqlVersion56(dataStore)) { System.out.println("MySQL version does not support enhancedSpatialSupport. Disabling it"); enhancedSpatialSupport = false; } SQLDialect dialect = dataStore.getSQLDialect(); if (dialect instanceof MySQLDialectBasic) { ((MySQLDialectBasic)dialect).setStorageEngine(storageEngine); ((MySQLDialectBasic)dialect).setUsePreciseSpatialOps(enhancedSpatialSupport); } else { ((MySQLDialectPrepared)dialect).setStorageEngine(storageEngine); ((MySQLDialectPrepared)dialect).setUsePreciseSpatialOps(enhancedSpatialSupport); } return dataStore; }

Target:
protected JDBCDataStore createDataStoreInternal(JDBCDataStore dataStore, Map params) throws IOException { String storageEngine = (String) STORAGE_ENGINE.lookUp( params ); if (storageEngine == null) { storageEngine = (String) STORAGE_ENGINE.sample; } Boolean enhancedSpatialFlag = (Boolean) ENHANCED_SPATIAL_SUPPORT.lookUp( params ); if (enhancedSpatialFlag == null) { enhancedSpatialSupport = isMySqlVersion56(dataStore); } else if (enhancedSpatialFlag && !isMySqlVersion56(dataStore)) { dataStore.getLogger().info("MySQL version does not support enhancedSpatialSupport. Disabling it"); enhancedSpatialSupport = false; } SQLDialect dialect = dataStore.getSQLDialect(); if (dialect instanceof MySQLDialectBasic) { ((MySQLDialectBasic)dialect).setStorageEngine(storageEngine); ((MySQLDialectBasic)dialect).setUsePreciseSpatialOps(enhancedSpatialSupport); } else { ((MySQLDialectPrepared)dialect).setStorageEngine(storageEngine); ((MySQLDialectPrepared)dialect).setUsePreciseSpatialOps(enhancedSpatialSupport); } return dataStore; }
Source:
public void shutdown(RequestMonitor requestMonitor) { fAddressSizes.clear(); super.shutdown(requestMonitor); }

Target:
public void shutdown(RequestMonitor requestMonitor) { unregister(); getSession().removeServiceEventListener(this); fAddressSizes.clear(); super.shutdown(requestMonitor); }
Source:
private String getName(Type sourceType, Type targetType) { String fromName = getName( sourceType ); String toName = getName( targetType ); String with = nullValueMappingStrategy != null ? "WithNvms" + camelizeEnumConstant( nullValueMappingStrategy ) : ""; return Strings.decapitalize( fromName + "To" + toName + with ); }

Target:
private String getName(Type sourceType, Type targetType ) { String fromName = getName( sourceType ); String toName = getName( targetType ); return Strings.decapitalize( fromName + "To" + toName ); }
Source:
public void testSetDependencies() { Assert.assertNotNull(this.c.getDependencies()); final Set<String> dependencies = Sets.newHashSet(); dependencies.add("s3://netflix/jars/myJar.jar"); this.c.setDependencies(dependencies); Assert.assertEquals(dependencies, this.c.getDependencies()); this.c.setDependencies(null); Assert.assertThat(this.c.getDependencies(), Matchers.empty()); }

Target:
public void testSetDependencies() { Assert.assertNotNull(this.c.getDependencies()); final Set<String> dependencies = Sets.newHashSet("s3://netflix/jars/myJar.jar"); this.c.setDependencies(dependencies); Assert.assertEquals(dependencies, this.c.getDependencies()); this.c.setDependencies(null); Assert.assertThat(this.c.getDependencies(), Matchers.empty()); }
Source:
public void onStart() { super.onStart(); BottomSheetBehavior.from((View) getView().getParent()).setPeekHeight((int) DimenUtil .dpToPx(DimenUtil.getDimension(R.dimen.readingListSheetPeekHeight))); }

Target:
public void onStart() { super.onStart(); BottomSheetBehavior.from((View) getView().getParent()).setPeekHeight(DimenUtil .roundedDpToPx(DimenUtil.getDimension(R.dimen.readingListSheetPeekHeight))); }
Source:
public void testProxyHostUnknown() throws Exception { startProxy(0, null); CountDownLatch latch = new CountDownLatch(1); final HttpClientOptions options = new HttpClientOptions() .setProxyOptions(new ProxyOptions() .setType(ProxyType.HTTP) .setHost("localhost") .setPort(proxy.getPort())); HttpClient client = vertx.createHttpClient(options); client.getAbs("https://unknown.hostname/", resp -> { log.info("this request is supposed to fail"); fail(); }) .exceptionHandler(e -> { log.warn("Exception", e); latch.countDown(); }) .end(); latch.await(); }

Target:
public void testProxyHostUnknown() throws Exception { startProxy(0, null); final HttpClientOptions options = new HttpClientOptions() .setProxyOptions(new ProxyOptions() .setType(ProxyType.HTTP) .setHost("localhost") .setPort(proxy.getPort())); HttpClient client = vertx.createHttpClient(options); client.getAbs("https://unknown.hostname/", resp -> { fail(); }) .exceptionHandler(e -> testComplete()) .end(); await(); }
Source:
public void setExplainPlan(String plan){ CompilerContext.DataSetProcessorType type = this.activation.getLanguageConnectionContext().getDataSetProcessorType(); if (type == CompilerContext.DataSetProcessorType.SPARK) explainPlan=(plan==null?"":plan.replace("n=","RS=").replace("->","").trim()); }

Target:
public void setExplainPlan(String plan){ CompilerContext.DataSetProcessorType type = this.activation.getLanguageConnectionContext().getDataSetProcessorType(); if (type == CompilerContext.DataSetProcessorType.SPARK || type == CompilerContext.DataSetProcessorType.FORCED_SPARK) explainPlan=(plan==null?"":plan.replace("n=","RS=").replace("->","").trim()); }
Source:
private static String[] getCache() { String[] cache; if (softCache != null) { cache = softCache.get(); if (cache != null) { return cache; } } long time = System.nanoTime(); if (softCacheCreated != 0 && time - softCacheCreated < TimeUnit.SECONDS.toNanos(5)) { return null; } try { cache = new String[SysProperties.OBJECT_CACHE_SIZE]; softCache = new SoftReference<String[]>(cache); return cache; } finally { softCacheCreated = System.nanoTime(); } }

Target:
private static String[] getCache() { String[] cache; if (softCache != null) { cache = softCache.get(); if (cache != null) { return cache; } } long time = System.nanoTime(); if (softCacheCreatedNs != 0 && time - softCacheCreatedNs < TimeUnit.SECONDS.toNanos(5)) { return null; } try { cache = new String[SysProperties.OBJECT_CACHE_SIZE]; softCache = new SoftReference<String[]>(cache); return cache; } finally { softCacheCreatedNs = System.nanoTime(); } }
Source:
private void writeFeatures() { if (vm.getClusterArch().getFamily() != ArchitectureType.x86) { return; } boolean acpiEnabled = vm.getAcpiEnable(); boolean kaslr = vmInfoBuildUtils.isKASLRDumpEnabled(vm.getVmOsId()); if (!acpiEnabled && !hypervEnabled && !kaslr) { return; } writer.writeStartElement("features"); if (acpiEnabled) { writer.writeStartElement("acpi"); writer.writeEndElement(); } if (hypervEnabled) { writer.writeStartElement("hyperv"); writer.writeStartElement("relaxed"); writer.writeAttributeString("state", "on"); writer.writeEndElement(); writer.writeStartElement("vapic"); writer.writeAttributeString("state", "on"); writer.writeEndElement(); writer.writeStartElement("spinlocks"); writer.writeAttributeString("state", "on"); writer.writeAttributeString("retries", "8191"); writer.writeEndElement(); writer.writeEndElement(); } if (kaslr) { writer.writeStartElement("vmcoreinfo"); writer.writeEndElement(); } writer.writeEndElement(); }

Target:
private void writeFeatures() { if (vm.getClusterArch().getFamily() != ArchitectureType.x86) { return; } boolean acpiEnabled = vm.getAcpiEnable(); boolean kaslr = vmInfoBuildUtils.isKASLRDumpEnabled(vm.getVmOsId()); if (!acpiEnabled && !hypervEnabled && !kaslr) { return; } writer.writeStartElement("features"); if (acpiEnabled) { writer.writeStartElement("acpi"); writer.writeEndElement(); } if (hypervEnabled) { writer.writeStartElement("hyperv"); writer.writeStartElement("relaxed"); writer.writeAttributeString("state", "on"); writer.writeEndElement(); writer.writeStartElement("vapic"); writer.writeAttributeString("state", "on"); writer.writeEndElement(); writer.writeStartElement("spinlocks"); writer.writeAttributeString("state", "on"); writer.writeAttributeString("retries", "8191"); writer.writeEndElement(); writer.writeEndElement(); } if (kaslr) { writer.writeElement("vmcoreinfo"); } writer.writeEndElement(); }
Source:
public void testUpdateProtocolMappers() { ClientScopeRepresentation templateRep = new ClientScopeRepresentation(); templateRep.setName("testUpdateProtocolMappers"); templateRep.setProtocol("openid-connect"); String templateId = createClientScope(templateRep); ProtocolMapperRepresentation mapper = new ProtocolMapperRepresentation(); mapper.setName("test"); mapper.setProtocol("openid-connect"); mapper.setProtocolMapper("oidc-usermodel-attribute-mapper"); Map<String, String> m = new HashMap<>(); m.put("user.attribute", "test"); m.put("claim.name", ""); m.put("jsonType.label", ""); mapper.setConfig(m); ProtocolMappersResource protocolMappers = clientScopes().get(templateId).getProtocolMappers(); Response response = protocolMappers.createMapper(mapper); String mapperId = ApiUtil.getCreatedId(response); mapper = protocolMappers.getMapperById(mapperId); mapper.getConfig().put("claim.name", "claim"); protocolMappers.update(mapperId, mapper); List<ProtocolMapperRepresentation> mappers = protocolMappers.getMappers(); assertEquals(1, mappers.size()); assertEquals(2, mappers.get(0).getConfig().size()); assertEquals("test", mappers.get(0).getConfig().get("user.attribute")); assertEquals("claim", mappers.get(0).getConfig().get("claim.name")); clientScopes().get(templateId).remove(); }

Target:
public void testUpdateProtocolMappers() { ClientScopeRepresentation scopeRep = new ClientScopeRepresentation(); scopeRep.setName("testUpdateProtocolMappers"); scopeRep.setProtocol("openid-connect"); String scopeId = createClientScope(scopeRep); ProtocolMapperRepresentation mapper = new ProtocolMapperRepresentation(); mapper.setName("test"); mapper.setProtocol("openid-connect"); mapper.setProtocolMapper("oidc-usermodel-attribute-mapper"); Map<String, String> m = new HashMap<>(); m.put("user.attribute", "test"); m.put("claim.name", ""); m.put("jsonType.label", ""); mapper.setConfig(m); ProtocolMappersResource protocolMappers = clientScopes().get(scopeId).getProtocolMappers(); Response response = protocolMappers.createMapper(mapper); String mapperId = ApiUtil.getCreatedId(response); mapper = protocolMappers.getMapperById(mapperId); mapper.getConfig().put("claim.name", "claim"); protocolMappers.update(mapperId, mapper); List<ProtocolMapperRepresentation> mappers = protocolMappers.getMappers(); assertEquals(1, mappers.size()); assertEquals(2, mappers.get(0).getConfig().size()); assertEquals("test", mappers.get(0).getConfig().get("user.attribute")); assertEquals("claim", mappers.get(0).getConfig().get("claim.name")); clientScopes().get(scopeId).remove(); }
Source:
public void testGetElementPositionWithNull() { int elementCount = 100; int initialTypedSetEntryCount = 10; TypedSet typedSet = new TypedSet(BIGINT, initialTypedSetEntryCount, FUNCTION_NAME); BlockBuilder blockBuilder = BIGINT.createFixedSizeBlockBuilder(elementCount); for (int i = 0; i < elementCount; i++) { if (i % 10 == 0) { blockBuilder.appendNull(); } else { BIGINT.writeLong(blockBuilder, i); } typedSet.add(blockBuilder, i); } assertEquals(typedSet.size(), elementCount - elementCount / 10 + 1); int nullCountMinusOne = -1; for (int j = 0; j < blockBuilder.getPositionCount(); j++) { if (!blockBuilder.isNull(j)) { assertEquals(typedSet.positionOf(blockBuilder, j), j - nullCountMinusOne); } else { assertEquals(typedSet.positionOf(blockBuilder, j), 0); nullCountMinusOne++; } } }

Target:
public void testGetElementPositionWithNull() { int elementCount = 100; int initialTypedSetEntryCount = 10; TypedSet typedSet = new TypedSet(BIGINT, initialTypedSetEntryCount, FUNCTION_NAME); BlockBuilder blockBuilder = BIGINT.createFixedSizeBlockBuilder(elementCount); for (int i = 0; i < elementCount; i++) { if (i % 10 == 0) { blockBuilder.appendNull(); } else { BIGINT.writeLong(blockBuilder, i); } typedSet.add(blockBuilder, i); } assertEquals(typedSet.size(), elementCount - elementCount / 10 + 1); int nullCount = 0; for (int j = 0; j < blockBuilder.getPositionCount(); j++) { if (!blockBuilder.isNull(j)) { assertEquals(typedSet.positionOf(blockBuilder, j), j - nullCount + 1); } else { assertEquals(typedSet.positionOf(blockBuilder, j), 0); nullCount++; } } }
Source:
public void initialise() { this.renderingConfig = config.getRendering(); this.chunkShader = worldRenderer.getMaterial("engine:prog.chunk"); this.playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new BindFBO(SCENE_REFLECTED_FBO)); addDesiredStateChange(new SetViewportSizeOf(SCENE_REFLECTED_FBO)); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); }

Target:
public void initialise() { this.renderingConfig = config.getRendering(); this.chunkShader = worldRenderer.getMaterial("engine:prog.chunk"); this.playerCamera = worldRenderer.getActiveCamera(); requiresFBO(new FBOConfig(REFLECTED, HALF_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(REFLECTED, displayResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(REFLECTED, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableFaceCulling()); addDesiredStateChange(new SetFacesToCull(GL_FRONT)); }
Source:
private void startOnlinePlay(DownloadEntry model) { if (!isPlayerVisible()) { showPlayer(); } addVideoDatatoDb(model); playVideoModel(model); notifyAdapter(); }

Target:
private void startOnlinePlay(DownloadEntry model) { if (!isPlayerVisible()) { showPlayer(); } addVideoDatatoDb(model); playVideoModel(model); }
Source:
public void compressTarForSubmitting(Path projectDir, Path tmcLangs, Path tmcrun, Path targetLocation) { TarCreator tarCompresser = new TarCreator(); log.info("Copying files to directory " + projectDir.toString() + " and creating tar ball"); try { tarCompresser.createTarFromProject(projectDir, tmcLangs, tmcrun, targetLocation); } catch (IOException | ArchiveException ex) { log.error(ex.toString()); } }

Target:
public void compressTarForSubmitting(Path projectDir, Path tmcLangs, Path tmcrun, Path targetLocation) throws IOException, ArchiveException { TarCreator tarCompresser = new TarCreator(); log.info("Copying files to directory " + projectDir.toString() + " and creating tar ball"); tarCompresser.createTarFromProject(projectDir, tmcLangs, tmcrun, targetLocation); }
Source:
private String getContentText(int currentPage, boolean hasChunks) throws NoOpenCoreException, SolrServerException { final Server solrServer = KeywordSearch.getServer(); if (hasChunks == false) { String msg = null; if (content instanceof AbstractFile) { boolean isKnown = TskData.FileKnown.KNOWN.equals(((AbstractFile)content).getKnown()); if (isKnown && KeywordSearchSettings.getSkipKnown()) { msg = NbBundle.getMessage(ExtractedContentViewer.class, "ExtractedContentViewer.getSolrContent.knownFileMsg", content.getName()); } } if(msg == null) { msg = NbBundle.getMessage(ExtractedContentViewer.class, "ExtractedContentViewer.getSolrContent.noTxtYetMsg", "file"); } String htmlMsg = NbBundle.getMessage(ExtractedContentViewer.class, "ExtractedContentViewer.getSolrContent.txtBodyItal", msg); return htmlMsg; } int chunkId = currentPage; if (cachedString != null) { if (cachedChunk == chunkId) { return cachedString; } } String indexedText = solrServer.getSolrContent(this.objectId, chunkId); if (indexedText == null || indexedText.isEmpty()) { return NbBundle.getMessage(ExtractedContentViewer.class, "ExtractedContentViewer.getSolrContent.noTxtYetMsg", "file"); } cachedString = EscapeUtil.escapeHtml(indexedText).trim(); StringBuilder sb = new StringBuilder(cachedString.length() + 20); sb.append("<pre>").append(cachedString).append("</pre>"); cachedString = sb.toString(); cachedChunk = chunkId; return cachedString; }

Target:
private String getContentText(int currentPage, boolean hasChunks) throws NoOpenCoreException, SolrServerException { final Server solrServer = KeywordSearch.getServer(); if (hasChunks == false) { String msg = null; if (content instanceof AbstractFile) { boolean isKnown = TskData.FileKnown.KNOWN.equals(((AbstractFile) content).getKnown()); if (isKnown && KeywordSearchSettings.getSkipKnown()) { msg = Bundle.IndexedText_warningMessage_knownFile(); } } if (msg == null) { msg = Bundle.IndexedText_warningMessage_noTextAvailable(); } return msg; } int chunkId = currentPage; if (cachedString != null) { if (cachedChunk == chunkId) { return cachedString; } } String indexedText = solrServer.getSolrContent(this.objectId, chunkId); if (indexedText == null) { if (content instanceof AbstractFile) { return Bundle.IndexedText_errorMessage_errorGettingText(); } else { return Bundle.IndexedText_warningMessage_noTextAvailable(); } } else if (indexedText.isEmpty()) { return Bundle.IndexedText_warningMessage_noTextAvailable(); } cachedString = EscapeUtil.escapeHtml(indexedText).trim(); StringBuilder sb = new StringBuilder(cachedString.length() + 20); sb.append("<pre>").append(cachedString).append("</pre>"); cachedString = sb.toString(); cachedChunk = chunkId; return cachedString; }
Source:
public void start() throws Exception { if (trace) { log.tracef("Starting StateTransferManager of cache %s on node %s", cacheName, rpcManager.getAddress()); } CacheJoinInfo joinInfo = new CacheJoinInfo(pickConsistentHashFactory(), configuration.clustering().hash().hash(), configuration.clustering().hash().numSegments(), configuration.clustering().hash().numOwners(), configuration.clustering().stateTransfer().timeout(), configuration.transaction().transactionProtocol().isTotalOrder(), configuration.clustering().cacheMode().isDistributed(), configuration.clustering().hash().capacityFactor(), persistentStateChecksum); CacheTopology initialTopology = localTopologyManager.join(cacheName, joinInfo, new CacheTopologyHandler() { @Override public void updateConsistentHash(CacheTopology cacheTopology) { doTopologyUpdate(cacheTopology, false); } @Override public void rebalance(CacheTopology cacheTopology) { doTopologyUpdate(cacheTopology, true); } }, partitionHandlingManager); if (trace) { if (initialTopology != null) { log.tracef("StateTransferManager of cache %s on node %s received initial topology %s", cacheName, rpcManager.getAddress(), initialTopology); } } }

Target:
public void start() throws Exception { if (trace) { log.tracef("Starting StateTransferManager of cache %s on node %s", cacheName, rpcManager.getAddress()); } CacheJoinInfo joinInfo = new CacheJoinInfo(pickConsistentHashFactory(), configuration.clustering().hash().hash(), configuration.clustering().hash().numSegments(), configuration.clustering().hash().numOwners(), configuration.clustering().stateTransfer().timeout(), configuration.transaction().transactionProtocol().isTotalOrder(), configuration.clustering().cacheMode().isDistributed(), configuration.clustering().hash().capacityFactor(), localTopologyManager.getPersistentUUID(), persistentStateChecksum); CacheTopology initialTopology = localTopologyManager.join(cacheName, joinInfo, new CacheTopologyHandler() { @Override public void updateConsistentHash(CacheTopology cacheTopology) { doTopologyUpdate(cacheTopology, false); } @Override public void rebalance(CacheTopology cacheTopology) { doTopologyUpdate(cacheTopology, true); } }, partitionHandlingManager); if (trace) { log.tracef("StateTransferManager of cache %s on node %s received initial topology %s", cacheName, rpcManager.getAddress(), initialTopology); } }
Source:
public String getUrl() { return this.url; }

Target:
public String getUrl() { return url; }
Source:
public ITmfTrace getActiveTrace() { return fCurrentTrace; }

Target:
public synchronized ITmfTrace getActiveTrace() { return fCurrentTrace; }
Source:
protected DataBuffer reallocate(DataBuffer buffer) { int newSize = (int) buffer.length() * 2; DataBuffer newBuffer = null; if (buffer instanceof DoubleBuffer){ newBuffer = new DoubleBuffer(newSize); newBuffer.setData(buffer.asDouble()); } else if (buffer instanceof IntBuffer) { newBuffer = new IntBuffer(newSize); newBuffer.setData(buffer.asInt()); }else if (buffer instanceof FloatBuffer) { newBuffer = new FloatBuffer(newSize); newBuffer.setData(buffer.asFloat()); } return newBuffer; }

Target:
protected DataBuffer reallocate(DataBuffer buffer) { int newSize = (int) buffer.length() * 2; DataBuffer newBuffer = Nd4j.createBuffer(newSize); switch (buffer.dataType()) { case INT: newBuffer.setData(buffer.asInt()); break; case DOUBLE: newBuffer.setData(buffer.asDouble()); break; case FLOAT: newBuffer.setData(buffer.asFloat()); break; case HALF: throw new UnsupportedOperationException(); case COMPRESSED: throw new UnsupportedOperationException(); default: throw new UnsupportedOperationException(); } return newBuffer; }
Source:
public static void setup() { UM7LT sensor = new UM7LT(Igneous.makeRS232_MXP(115200, "UM7-LT")); sensor.autoreportFaults.set(true); sensor.start(); pitch = sensor.pitch; yaw = sensor.yaw; roll = sensor.roll; pitchRate = sensor.pitchRate; yawRate = sensor.yawRate; rollRate = sensor.rollRate; zeroGyro = sensor.zeroGyro; absoluteYaw = FloatMixing.addition.of(FloatMixing.multiplication.of((FloatInput) accumulator, 360), yaw); Igneous.globalPeriodic.send(new EventOutput() { public void event() { float currentyaw = yaw.get(); float oldyaw = oldYaw.get(); if (Math.abs(currentyaw - oldyaw) > 180) { if (oldyaw > 180) { accumulator.set(accumulator.get() + 1); } else if (oldyaw < -180) { accumulator.set(accumulator.get() - 1); } } oldYaw.set(yaw.get()); } }); Cluck.publish("Accumulator", accumulator); Cluck.publish("Absolute Yaw", absoluteYaw); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Zero", zeroGyro); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Pitch", pitch); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Yaw", yaw); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Roll", roll); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Pitch Rate", pitchRate); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Yaw Rate", yawRate); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Roll Rate", rollRate); }

Target:
public static void setup() { UM7LT sensor = new UM7LT(Igneous.makeRS232_MXP(115200, "UM7-LT")); sensor.autoreportFaults.set(true); sensor.start(); pitch = sensor.pitch; yaw = sensor.yaw; roll = sensor.roll; pitchRate = sensor.pitchRate; yawRate = sensor.yawRate; rollRate = sensor.rollRate; zeroGyro = sensor.zeroGyro; absoluteYaw = FloatMixing.addition.of((FloatInput) accumulator, yaw); Igneous.globalPeriodic.send(new EventOutput() { float oldyaw = 0; public void event() { float currentyaw = yaw.get(); if (Math.abs(currentyaw - oldyaw) > 180) { if (oldyaw > 180) { accumulator.set(accumulator.get() + 360); } else if (oldyaw < -180) { accumulator.set(accumulator.get() - 360); } } oldyaw = yaw.get(); } }); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Zero", zeroGyro); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Reset Accumulator", resetAccumulator); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Pitch", pitch); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Yaw", yaw); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Absolute Yaw", absoluteYaw); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Roll", roll); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Pitch Rate", pitchRate); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Yaw Rate", yawRate); Cluck.publish(QuasarHelios.testPrefix + "Heading Sensor Roll Rate", rollRate); }
Source:
public void validate(FailureCollector collector) { super.validate(collector); if (!containsMacro("username") && (Strings.isNullOrEmpty(username) ^ Strings.isNullOrEmpty(password))) { collector.addFailure("You must either set both username and password or neither username nor password.", "Leave username and password fields empty or provide values for both fields") .withConfigProperty("username").withConfigProperty("password"); } if (!containsMacro("sender")) { try { InternetAddress[] addresses = InternetAddress.parse(sender); if (addresses.length == 0) { collector.addFailure("Sender email was not specified.", "Provide a sender email address.") .withConfigProperty("sender"); } if (addresses.length > 1) { collector.addFailure(String.format( "%s is an invalid sender email address. Only one sender is supported.", sender), "Only specify one sender email address.").withConfigProperty("sender"); } } catch (AddressException e) { collector.addFailure(String.format("%s is an invalid sender email address. Reason: %s", sender, e.getMessage()), "").withConfigProperty("sender"); } } if (!containsMacro("recipients")) { try { InternetAddress.parse(recipients); } catch (AddressException e) { collector.addFailure(String.format("%s is an invalid list of recipient email addresses. Reason: %s", recipients, e.getMessage()), "").withConfigProperty("recipients"); } } }

Target:
public void validate(FailureCollector collector) { super.validate(collector); if (!containsMacro(USERNAME) && (Strings.isNullOrEmpty(username) ^ Strings.isNullOrEmpty(password))) { collector.addFailure("Both username and password must be given, or neither of them must be given.", "Leave username and password fields empty or provide values for both fields.") .withConfigProperty(USERNAME).withConfigProperty(PASSWORD); } if (!containsMacro(SENDER)) { try { InternetAddress[] addresses = InternetAddress.parse(sender); if (addresses.length == 0) { collector.addFailure("Sender email was not specified.", null).withConfigProperty(SENDER); } if (addresses.length > 1) { collector.addFailure( String.format("%s is an invalid sender email address. Only one sender is supported.", sender), "Only specify one sender email address.").withConfigProperty(SENDER); } } catch (AddressException e) { collector.addFailure(String.format("%s is an invalid sender email address. Reason: %s", sender, e.getMessage()), null).withConfigProperty(SENDER); } } if (!containsMacro(RECIPIENTS)) { try { InternetAddress.parse(recipients); } catch (AddressException e) { collector.addFailure(String.format("%s is an invalid list of recipient email addresses. Reason: %s", recipients, e.getMessage()), null) .withConfigProperty(RECIPIENTS); } } }
Source:
public String getPromptMessage() { String message = "Updates to the script definitions are available. Updating your definitions may erase current scripts."; if (scriptGeneratorModel.isDirty()) { message += "\n WARNING: There are uncommitted changes to the script defintions. These will be lost if you update."; } return message; }

Target:
public String getPromptMessage() { String message = "Updates to the script definitions are available. Updating your definitions may erase current scripts."; if (scriptGeneratorModel.isDirty()) { message += "\n WARNING: There are uncommitted changes to the script definitions. These will be lost if you update."; } return message; }
Source:
private List<Map<String, Object>> parseDisks(XmlDocument document, List<VmDevice> devices, Guid vmId) { List<VmDevice> dbDevices = filterDevices(devices, VmDeviceGeneralType.DISK); List<Map<String, Object>> result = new ArrayList<>(); for (XmlNode node : selectNodes(document, VmDeviceGeneralType.DISK)) { Map<String, Object> dev = new HashMap<>(); dev.put(VdsProperties.Type, VmDeviceGeneralType.DISK.getValue()); String diskType = parseAttribute(node, DEVICE); dev.put(VdsProperties.Device, diskType); dev.put(VdsProperties.Address, parseAddress(node)); dev.put(VdsProperties.Alias, parseAlias(node)); String path = parseDiskPath(node); VmDevice dbDev = dbDevices.stream() .filter(d -> d.getDevice().equals(diskType)) .filter(d -> { switch(diskType) { case "cdrom": String devicePath = (String) d.getSpecParams().get("path"); return devicePath != null ? path.contains(devicePath) : true; case "floppy": return true; default: return path.contains(d.getId().getDeviceId().toString()); } }) .findFirst() .orElse(null); if (dbDev == null) { log.warn("unmanaged disk with path '{}' is ignored", path); continue; } dbDevices.remove(dbDev); dev.put(VdsProperties.DeviceId, dbDev.getId().getDeviceId().toString()); dev.put(VdsProperties.SpecParams, dbDev.getSpecParams()); result.add(dev); } return result; }

Target:
private List<Map<String, Object>> parseDisks(XmlDocument document, List<VmDevice> devices, Guid vmId) { List<VmDevice> dbDevices = filterDevices(devices, VmDeviceGeneralType.DISK); List<Map<String, Object>> result = new ArrayList<>(); for (XmlNode node : selectNodes(document, VmDeviceGeneralType.DISK)) { Map<String, Object> dev = new HashMap<>(); dev.put(VdsProperties.Type, VmDeviceGeneralType.DISK.getValue()); String diskType = parseAttribute(node, DEVICE); dev.put(VdsProperties.Device, diskType); dev.put(VdsProperties.Address, parseAddress(node)); dev.put(VdsProperties.Alias, parseAlias(node)); String path = parseDiskPath(node); VmDevice dbDev = dbDevices.stream() .filter(d -> d.getDevice().equals(diskType)) .filter(d -> { switch(diskType) { case "cdrom": String devicePath = (String) d.getSpecParams().get("path"); return devicePath == null || path.contains(devicePath); case "floppy": return true; default: return path.contains(d.getId().getDeviceId().toString()); } }) .findFirst() .orElse(null); if (dbDev == null) { log.warn("unmanaged disk with path '{}' is ignored", path); continue; } dbDevices.remove(dbDev); dev.put(VdsProperties.DeviceId, dbDev.getId().getDeviceId().toString()); dev.put(VdsProperties.SpecParams, dbDev.getSpecParams()); result.add(dev); } return result; }
Source:
public SshCommand(String hostname, String[] execString) { super(execString); mHostName = hostname; mCommand = new String[]{"bash", "-c", String.format("ssh %s %s %s", ShellUtils.COMMON_SSH_OPTS, hostname, String.join(" ", execString))}; }

Target:
public SshCommand(String hostname, String[] execString) { super(new String[]{"bash", "-c", String.format("ssh %s %s %s", ShellUtils.COMMON_SSH_OPTS, hostname, String.join(" ", execString))}); mHostName = hostname; }
Source:
public void getsManagementChannel() { final Sender sender = mock(Sender.class); final Receiver receiver = mock(Receiver.class); final Record linkRecord = mock(Record.class); when(session.sender(any())).thenReturn(sender); when(session.receiver(any())).thenReturn(receiver); when(sender.attachments()).thenReturn(linkRecord); when(receiver.attachments()).thenReturn(linkRecord); when(handlerProvider.createReceiveLinkHandler(eq(CONNECTION_ID), eq(HOSTNAME), anyString(), anyString())) .thenReturn(new ReceiveLinkHandler(CONNECTION_ID, HOSTNAME, "receiver-name", "test-entity-path")); when(handlerProvider.createSendLinkHandler(eq(CONNECTION_ID), eq(HOSTNAME), anyString(), anyString())) .thenReturn(new SendLinkHandler(CONNECTION_ID, HOSTNAME, "sender-name", "test-entity-path")); final EventHubReactorAmqpConnection connection = new EventHubReactorAmqpConnection(CONNECTION_ID, connectionOptions, "event-hub-name", reactorProvider, handlerProvider, tokenManagerProvider, messageSerializer, product, clientVersion); StepVerifier.create(connection.getManagementNode()) .assertNext(node -> Assertions.assertTrue(node instanceof ManagementChannel)) .verifyComplete(); StepVerifier.create(connection.createSendLink("send-name", "test-entity-path", new AmqpRetryOptions())) .verifyError(); StepVerifier.create(connection.createReceiveLink("receiver-name", "test-entity-path", EventPosition.latest(), new ReceiveOptions())) .verifyError(); }

Target:
public void getsManagementChannel() { final Sender sender = mock(Sender.class); final Receiver receiver = mock(Receiver.class); final Record linkRecord = mock(Record.class); when(session.sender(any())).thenReturn(sender); when(session.receiver(any())).thenReturn(receiver); when(sender.attachments()).thenReturn(linkRecord); when(receiver.attachments()).thenReturn(linkRecord); when(handlerProvider.createReceiveLinkHandler(eq(CONNECTION_ID), eq(HOSTNAME), anyString(), anyString())) .thenReturn(new ReceiveLinkHandler(CONNECTION_ID, HOSTNAME, "receiver-name", "test-entity-path")); when(handlerProvider.createSendLinkHandler(eq(CONNECTION_ID), eq(HOSTNAME), anyString(), anyString())) .thenReturn(new SendLinkHandler(CONNECTION_ID, HOSTNAME, "sender-name", "test-entity-path")); final EventHubReactorAmqpConnection connection = new EventHubReactorAmqpConnection(CONNECTION_ID, connectionOptions, "event-hub-name", reactorProvider, handlerProvider, tokenManagerProvider, messageSerializer, product, clientVersion); StepVerifier.create(connection.getManagementNode()) .assertNext(node -> Assertions.assertTrue(node instanceof ManagementChannel)) .verifyComplete(); }
Source:
public static URL parseURL(String address, Map<String, String> defaults) { return new URL(UrlUtils.parseURL(address, defaults)); }

Target:
public static URL parseURL(String address, Map<String, String> defaults) { return new URL(org.apache.dubbo.common.utils.UrlUtils.parseURL(address, defaults)); }
Source:
private void addErrataCountForType(ErrataData errataData, ErrataType errataType) { Stream<Erratum> typedErrata = errataData.getErrata().stream().filter(erratum -> erratum.getType() == errataType); long totalcount = typedErrata.count(); if (totalcount > 0) { Map<ErrataSeverity, Long> errataBySeverity = errataData.getErrata().stream().collect( Collectors.groupingBy(Erratum::getSeverityOrDefault, Collectors.counting())); ErrataCount errataCount = new ErrataCount(); errataCount.setTotalCount((int) totalcount); errataBySeverity.entrySet() .stream() .forEach(entry -> errataCount.getCountBySeverity().put(entry.getKey(), entry.getValue().intValue())); errataData.getErrataCounts().getErrataCountByType().put(errataType, errataCount); } }

Target:
private void addErrataCountForType(ErrataData errataData, ErrataType errataType) { Stream<Erratum> typedErrata = errataData.getErrata().stream().filter(erratum -> erratum.getType() == errataType); long totalCount = typedErrata.count(); if (totalCount > 0) { Map<ErrataSeverity, Long> errataBySeverity = errataData.getErrata().stream().collect( Collectors.groupingBy(Erratum::getSeverityOrDefault, Collectors.counting())); ErrataCount errataCount = new ErrataCount(); errataCount.setTotalCount((int) totalCount); errataBySeverity.entrySet() .stream() .forEach(entry -> errataCount.getCountBySeverity().put(entry.getKey(), entry.getValue().intValue())); errataData.getErrataCounts().getErrataCountByType().put(errataType, errataCount); } }
Source:
private static ParameterSpec<EventEnvelope>[] combinedSpecs() { ParameterSpec<EventEnvelope>[] values1 = EventAcceptingMethodParams.values(); ParameterSpec<EventEnvelope>[] values2 = StateSubscriberSpec.values(); @SuppressWarnings("unchecked") ParameterSpec<EventEnvelope>[] result = ObjectArrays.concat(values1, values2, ParameterSpec.class); return result; }

Target:
private static ParameterSpec<EventEnvelope>[] combinedSpecs() { ParameterSpec<EventEnvelope>[] eventParams = EventAcceptingMethodParams.values(); ParameterSpec<EventEnvelope>[] stateParams = StateSubscriberSpec.values(); @SuppressWarnings("unchecked") ParameterSpec<EventEnvelope>[] result = ObjectArrays.concat(eventParams, stateParams, ParameterSpec.class); return result; }
Source:
public DownloadParams getDownloadParams() { return downloadParams; }

Target:
public DownloadParams getDownloadParams() { if (downloadParams == null) { downloadParams = new DownloadParams(); } return downloadParams; }
Source:
protected List<MemoryUsageTreeModel> getTree(ITmfStateSystem ss, TimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { boolean filtered = false; if (filter instanceof FilterTimeQueryFilter) { filtered = ((FilterTimeQueryFilter) filter).isFiltered(); } List<ITmfStateInterval> nameFullState = ss.queryFullState(ss.getCurrentEndTime()); List<ITmfStateInterval> activeFullState = ss.queryFullState(Long.max(filter.getStart(), ss.getStartTime())); List<Integer> tidQuarks = ss.getSubAttributes(-1, false); ImmutableList.Builder<MemoryUsageTreeModel> builder = ImmutableList.builder(); long traceId = getId(ITmfStateSystem.ROOT_ATTRIBUTE); builder.add(new MemoryUsageTreeModel(traceId, -1L, -1, getTrace().getName())); for (int quark : tidQuarks) { int memoryAttribute = ss.optQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE); int procNameQuark = ss.optQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE); if (memoryAttribute != ITmfStateSystem.INVALID_ATTRIBUTE && procNameQuark != ITmfStateSystem.INVALID_ATTRIBUTE) { ITmfStateInterval threadMemoryInterval = activeFullState.get(memoryAttribute); if (!filtered || threadMemoryInterval.getEndTime() < filter.getEnd()) { String name = String.valueOf(nameFullState.get(procNameQuark).getValue()); int tid = Integer.parseInt(ss.getAttributeName(quark)); Long id = getId(quark); builder.add(new MemoryUsageTreeModel(id, traceId, tid, name)); } } } return builder.build(); }

Target:
protected List<MemoryUsageTreeModel> getTree(ITmfStateSystem ss, TimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { boolean filtered = false; if (filter instanceof FilterTimeQueryFilter) { filtered = ((FilterTimeQueryFilter) filter).isFiltered(); } List<ITmfStateInterval> nameFullState = ss.queryFullState(ss.getCurrentEndTime()); List<ITmfStateInterval> activeFullState = ss.queryFullState(Long.max(filter.getStart(), ss.getStartTime())); List<Integer> tidQuarks = ss.getSubAttributes(-1, false); ImmutableList.Builder<MemoryUsageTreeModel> builder = ImmutableList.builder(); long rootId = getId(ITmfStateSystem.ROOT_ATTRIBUTE); builder.add(new MemoryUsageTreeModel(rootId, -1L, -1, getTrace().getName())); for (int quark : tidQuarks) { int memoryAttribute = ss.optQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE); int procNameQuark = ss.optQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE); if (memoryAttribute != ITmfStateSystem.INVALID_ATTRIBUTE && procNameQuark != ITmfStateSystem.INVALID_ATTRIBUTE) { ITmfStateInterval threadMemoryInterval = activeFullState.get(memoryAttribute); if (!filtered || threadMemoryInterval.getEndTime() < filter.getEnd()) { String name = String.valueOf(nameFullState.get(procNameQuark).getValue()); int tid = Integer.parseInt(ss.getAttributeName(quark)); Long id = getId(quark); builder.add(new MemoryUsageTreeModel(id, rootId, tid, name)); } } } return builder.build(); }
Source:
public void cancelTokens(File tokenFile, String userToProxy, Logger logger) throws HadoopSecurityManagerException { Credentials cred = null; try { cred = Credentials.readTokenStorageFile(new Path(tokenFile.toURI()), new Configuration()); for (Token<? extends TokenIdentifier> t : cred.getAllTokens()) { logger.info("Got token: " + t.toString()); logger.info("Token kind: " + t.getKind()); logger.info("Token id: " + new String(t.getIdentifier())); logger.info("Token service: " + t.getService()); if (t.getKind().equals(new Text("HIVE_DELEGATION_TOKEN"))) { logger.info("Cancelling hive token " + new String(t.getIdentifier())); cancelHiveToken(t, userToProxy); } else if (t.getKind().equals(new Text("RM_DELEGATION_TOKEN"))) { logger.info("Cancelling mr job tracker token " + new String(t.getIdentifier())); } else if (t.getKind().equals(new Text("HDFS_DELEGATION_TOKEN"))) { logger.info("Cancelling namenode token " + new String(t.getIdentifier())); } else if (t.getKind().equals(new Text("MR_DELEGATION_TOKEN"))) { logger.info("Cancelling jobhistoryserver mr token " + new String(t.getIdentifier())); } else { logger.info("unknown token type " + t.getKind()); } } } catch (Exception e) { e.printStackTrace(); } }

Target:
public void cancelTokens(File tokenFile, String userToProxy, Logger logger) throws HadoopSecurityManagerException { Credentials cred = null; try { cred = Credentials.readTokenStorageFile(new Path(tokenFile.toURI()), new Configuration()); for (Token<? extends TokenIdentifier> t : cred.getAllTokens()) { logger.info("Got token: " + t.toString()); logger.info("Token kind: " + t.getKind()); logger.info("Token id: " + new String(t.getIdentifier())); logger.info("Token service: " + t.getService()); if (t.getKind().equals(new Text("HIVE_DELEGATION_TOKEN"))) { logger.info("Cancelling hive token " + new String(t.getIdentifier())); cancelHiveToken(t, userToProxy); } else if (t.getKind().equals(new Text("RM_DELEGATION_TOKEN"))) { logger.info("Cancelling mr job tracker token " + new String(t.getIdentifier())); } else if (t.getKind().equals(new Text("HDFS_DELEGATION_TOKEN"))) { logger.info("Cancelling namenode token " + new String(t.getIdentifier())); } else if (t.getKind().equals(new Text("MR_DELEGATION_TOKEN"))) { logger.info("Cancelling jobhistoryserver mr token " + new String(t.getIdentifier())); } else { logger.info("unknown token type " + t.getKind()); } } } catch (Exception e) { throw new HadoopSecurityManagerException("Failed to cancel tokens " + e.getMessage() + e.getCause(), e); } }
Source:
public PostgreSQLQuarterDiffFunction() { super("(select sign(i2) * floor(abs(i2)) from ( select (date_part('year', t1) * 12 + date_part('month', t1))/-3 from (values (age(?1,?2))) as temp(t1)) as temp2(i2))"); }

Target:
public PostgreSQLQuarterDiffFunction() { super("(select -cast(trunc((date_part('year', t1) * 12 + date_part('month', t1))/3) as integer) from (values (age(?1,?2))) as temp(t1))"); }
Source:
public boolean isBare() { boolean bare = getConfig().getBoolean( ConfigConstants.CONFIG_CORE_SECTION, ConfigConstants.CONFIG_KEY_BARE, false); if (bare) return true; String workTree = getConfig().getString( ConfigConstants.CONFIG_CORE_SECTION, null, "worktree"); if (workTree != null) return false; if (getDirectory().getName().equals(Constants.DOT_GIT)) return false; return true; }

Target:
public boolean isBare() { boolean bareSet = getConfig().getString( ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_BARE) != null; if (bareSet) return getConfig().getBoolean(ConfigConstants.CONFIG_CORE_SECTION, ConfigConstants.CONFIG_KEY_BARE, false); if (gitDirExplicit && workDir == null) return true; if (getDirectory().getName().equals(Constants.DOT_GIT)) return false; return true; }
Source:
public void addRole(String username, String role) { throw new RuntimeException("Adding a role is not supporting in LDAP"); }

Target:
public void addRole(String username, String role) { throw new UnsupportedOperationException("Adding a role is not supporting in LDAP"); }
Source:
public static Map<String, String> map(Map<String, String> attributes, Map<String, String> extensions) { Assert.notNull(attributes, "'attributes' must noy be null"); Assert.notNull(extensions, "'extensions' must noy be null"); Map<String, String> result = attributes.entrySet() .stream() .filter(attribute -> attribute.getValue() != null && !ContextAttributes.datacontenttype.name().equals(attribute.getKey())) .map(header -> new AbstractMap.SimpleEntry<>( CloudEventHeaders.PREFIX + header.getKey().toLowerCase(Locale.US), header.getValue())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); result.putAll( extensions.entrySet() .stream() .filter(extension -> extension.getValue() != null) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)) ); Optional.ofNullable(attributes .get(ContextAttributes.datacontenttype.name())) .ifPresent((dataContentType) -> { result.put(MessageHeaders.CONTENT_TYPE, dataContentType); }); return result; }

Target:
public static Map<String, String> map(Map<String, String> attributes, Map<String, String> extensions) { Assert.notNull(attributes, "'attributes' must not be null"); Assert.notNull(extensions, "'extensions' must not be null"); Map<String, String> result = attributes.entrySet() .stream() .filter(attribute -> attribute.getValue() != null && !ContextAttributes.datacontenttype.name().equals(attribute.getKey())) .map(header -> new AbstractMap.SimpleEntry<>( CloudEventHeaders.PREFIX + header.getKey().toLowerCase(Locale.US), header.getValue())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); result.putAll( extensions.entrySet() .stream() .filter(extension -> extension.getValue() != null) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)) ); Optional.ofNullable(attributes .get(ContextAttributes.datacontenttype.name())) .ifPresent((dataContentType) -> { result.put(MessageHeaders.CONTENT_TYPE, dataContentType); }); return result; }
Source:
private void load(File directory) throws ConfigurationException { if (!directory.exists()) { log.warn("The directory \"" + directory.getAbsolutePath() + "\" containing the configuration files doesn't " + "exist."); } else { File[] files = directory.listFiles(); if (files != null) { sort(files); for (File file : files) { if (file.getName().endsWith(".properties")) { try { ExtensionEntry entry = new ExtensionEntry(file); ExtensionEntry alreadyLoded = loadedEntries.get(entry.getName()); if (alreadyLoded != null) { throw new ConfigurationException(String.format("Could not load the configuration file \"%1$s\". The configuration file + \"%2$s\" already has the name %3$s", file.getAbsolutePath(), alreadyLoded.file.getAbsolutePath(), entry.getName())); } loadedEntries.put(entry.name, entry); } catch (IOException exception) { throw new ConfigurationException(String.format("Can't load object configuration file \"%1$s\"", file.getAbsolutePath())); } } } } } }

Target:
private void load(File directory) throws ConfigurationException { if (!directory.exists()) { log.warn(String.format("The directory '%1$s' cotaning configuration files does not exist.", directory.getAbsolutePath())); } else { File[] files = directory.listFiles(); if (files != null) { sort(files); for (File file : files) { if (file.getName().endsWith(".properties")) { try { ExtensionEntry entry = new ExtensionEntry(file); ExtensionEntry alreadyLoded = loadedEntries.get(entry.getName()); if (alreadyLoded != null) { throw new ConfigurationException(String.format("Could not load the configuration file '%1$s'. The configuration file '%2$s' already has the name '%3$s'", file.getAbsolutePath(), alreadyLoded.file.getAbsolutePath(), entry.getName())); } loadedEntries.put(entry.name, entry); } catch (IOException exception) { throw new ConfigurationException(String.format("Can't load object configuration file '%1$s'", file.getAbsolutePath())); } } } } } }
Source:
public void setColumns(List<ElasticsearchColumn> columns) { this.columns = columns; }

Target:
public void setColumns(List<ElasticsearchColumn> columns) { this.columns = ImmutableList.copyOf(columns); }