auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setupPinery() throws Exception { assertNotNull(System.getProperty("pineryWar"), "pineryWar is null"); File pineryWar = FileUtils.getFile(System.getProperty("pineryWar")); assertTrue(pineryWar.exists(), "pineryWar [ " + System.getProperty("pineryWar") + "] does not exist"); WebAppContext appContext = new WebAppContext(pineryWar.getAbsolutePath(), "/"); appContext.setParentLoaderPriority(true); appContext.setInitParameter("spring.profiles.active", "mock"); <START> server = new Server(9999); <END> server.setHandler(appContext); server.start(); DispatcherServlet dispatcherServlet = (DispatcherServlet) appContext.getServletHandler().getServlet("spring").getServletInstance(); assertNotNull(dispatcherServlet, "Unable to get spring servlet"); WebApplicationContext webApplicationContext = dispatcherServlet.getWebApplicationContext(); Log.debug("pinery beans = " + Arrays.toString(webApplicationContext.getBeanDefinitionNames())); limsMock = webApplicationContext.getBean(ca.on.oicr.pinery.api.Lims.class); assertNotNull(limsMock, "Pinery Lims mock is null"); pineryClient = new PineryClient("http://localhost:9999"); }</code><technical_language>Is a good idea this hardcoded 9999? I testing I some future shaking fists launch tests port is hardcoded</technical_language>

Target:
public void setupPinery() throws Exception { assertNotNull(System.getProperty("pineryWar"), "pineryWar is null"); File pineryWar = FileUtils.getFile(System.getProperty("pineryWar")); assertTrue(pineryWar.exists(), "pineryWar [ " + System.getProperty("pineryWar") + "] does not exist"); WebAppContext appContext = new WebAppContext(pineryWar.getAbsolutePath(), "/"); appContext.setParentLoaderPriority(true); appContext.setInitParameter("spring.profiles.active", "mock"); server = new Server(0); server.setHandler(appContext); server.start(); pineryUrl = "http://localhost:" + ((ServerConnector) server.getConnectors()[0]).getLocalPort(); DispatcherServlet dispatcherServlet = (DispatcherServlet) appContext.getServletHandler().getServlet("spring").getServletInstance(); assertNotNull(dispatcherServlet, "Unable to get spring servlet"); WebApplicationContext webApplicationContext = dispatcherServlet.getWebApplicationContext(); Log.debug("pinery beans = " + Arrays.toString(webApplicationContext.getBeanDefinitionNames())); limsMock = webApplicationContext.getBean(ca.on.oicr.pinery.api.Lims.class); assertNotNull(limsMock, "Pinery Lims mock is null"); pineryClient = new PineryClient(pineryUrl); }
Source:
<code>public int hashCode() { <START> return Objects.hash(super.getTokenValue(), jws); <END> }</code><technical_language>nit: In theory raw token parsed JsonWebSignature referencing data</technical_language>

Target:
public int hashCode() { return Objects.hash( super.getTokenValue(), jsonWebSignature.getHeader(), jsonWebSignature.getPayload()); }
Source:
<code>protected void addCommands() { UICommand <START> command = <END> UICommand.createDefaultOkUiCommand("OnSave", this); getCommands().add(command); getCommands().add(UICommand.createCancelUiCommand("Cancel", this)); }</code><technical_language>inline this local variable</technical_language>

Target:
protected void addCommands() { getCommands().add(UICommand.createDefaultOkUiCommand("OnSave", this)); getCommands().add(UICommand.createCancelUiCommand("Cancel", this)); }
Source:
<code><START> public int appendFrom(ByteBuffer buffer) <END> throws IOException { int bytesWritten = 0; if (state.equals(State.SEALED)) { ensureNext(metrics.overflowWriteError); bytesWritten = next.appendFrom(buffer); } else if (endOffset.get() + buffer.remaining() > capacityInBytes) { logger.info("{} : Writing data of size from a buffer. Current end offset is and capacity is {}", file.getAbsolutePath(), buffer.remaining(), getEndOffset(), capacityInBytes); ensureNext(metrics.overflowWriteError); state = State.SEALED; bytesWritten = next.appendFrom(buffer); } else { state = State.ACTIVE; while (buffer.hasRemaining()) { bytesWritten += fileChannel.write(buffer, endOffset.get()); } endOffset.addAndGet(bytesWritten); } return bytesWritten; }</code><technical_language>Is this class thread safe? I guards considered if multiple threads access methods</technical_language>

Target:
public int appendFrom(ByteBuffer buffer) throws IOException { int bytesWritten = 0; if (endOffset.get() + buffer.remaining() > capacityInBytes) { metrics.overflowWriteError.inc(); throw new IllegalArgumentException( "Buffer cannot be written to segment [" + file.getAbsolutePath() + "] because " + "it exceeds the capacity [" + capacityInBytes + "]"); } else { while (buffer.hasRemaining()) { bytesWritten += fileChannel.write(buffer, endOffset.get()); } endOffset.addAndGet(bytesWritten); } return bytesWritten; }
Source:
<code>private boolean containsDDF(UUID uuid) { <START> return mDDFCache.asMap().containsKey(uuid); <END> }</code><technical_language>this is potentially costly, depends asMap is doing. getIfPresent check for null result</technical_language>

Target:
private boolean containsDDF(UUID uuid) { return (mDDFCache.asMap().containsKey(uuid) || mDDFwithNameCache.asMap().containsKey(uuid)); }
Source:
<code>public static FundingRecord adaptFundingRecord(BitmexWalletTransaction walletTransaction) { String datePattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); Date dateFunding = null; if (walletTransaction.getTransactTime() != null) { try { <START> dateFunding = dateFormat.parse(walletTransaction.getTransactTime()); <END> } catch (ParseException e) { throw new IllegalArgumentException(e); } } FundingRecord.Type type = adaptFundingRecordtype(walletTransaction); return new FundingRecord( walletTransaction.getAddress(), dateFunding, adaptCurrency(walletTransaction.getCurrency()), walletTransaction.getAmount().abs().divide(SATOSHIS_BY_BTC), walletTransaction.getTransactID(), walletTransaction.getTx(), type, adaptFundingRecordStatus(walletTransaction.getTransactStatus()), null, walletTransaction.getFee() != null ? walletTransaction.getFee().abs().divide(SATOSHIS_BY_BTC) : null, walletTransaction.getText()); }</code><technical_language>Date instead of String for WalletTransaction#transactTime attribute proper Jackson annotations Jackson parse this</technical_language>

Target:
public static FundingRecord adaptFundingRecord(BitmexWalletTransaction walletTransaction) { return new FundingRecord( walletTransaction.getAddress(), walletTransaction.getTransactTime(), adaptCurrency(walletTransaction.getCurrency()), walletTransaction.getAmount().abs(), walletTransaction.getTransactID(), walletTransaction.getTx(), adaptFundingRecordtype(walletTransaction), adaptFundingRecordStatus(walletTransaction.getTransactStatus()), walletTransaction.getWalletBalance(), walletTransaction.getFee(), walletTransaction.getText()); }
Source:
<code>public void write(ByteBuffer buff) throws IOException { if (buff != this.appBuffer) { int attempts = 0; while (buff.hasRemaining()) { SSLEngineResult result = this.engine.wrap(buff, this.packetBuffer); this.packetBuffer.flip(); <START> int read = this.channel.write(this.packetBuffer); <END> if (result.bytesConsumed() == 0 && read == 0) { attempts++; if (attempts > MAX_ATTEMPTS) { this.packetBuffer.clear(); } } this.packetBuffer.compact(); } return; } this.appBuffer.flip(); this.engine.wrap(this.appBuffer, this.packetBuffer); this.appBuffer.compact(); this.packetBuffer.flip(); this.channel.write(this.packetBuffer); this.packetBuffer.compact(); }</code><technical_language>written</technical_language>

Target:
public void write(ByteBuffer buff) throws IOException { if (buff != this.appBuffer) { int attempts = 0; while (buff.hasRemaining()) { SSLEngineResult result = this.engine.wrap(buff, this.packetBuffer); this.packetBuffer.flip(); int written = this.channel.write(this.packetBuffer); if (result.bytesConsumed() == 0 && written == 0) { attempts++; if (attempts > MAX_ATTEMPTS) { this.packetBuffer.clear(); } } this.packetBuffer.compact(); } return; } this.appBuffer.flip(); this.engine.wrap(this.appBuffer, this.packetBuffer); this.appBuffer.compact(); this.packetBuffer.flip(); this.channel.write(this.packetBuffer); this.packetBuffer.compact(); }
Source:
<code>public void loadMyStep(int id) { try { <START> if (!Objects.equals(id, null)) { <END> setMySchritt(this.serviceManager.getTaskService().getById(id)); } } catch (DAOException e) { Helper.setFehlerMeldung("Error retrieving task with ID '" + id + "'; ", e.getMessage()); } }</code><technical_language>int type null, want Integer type null. other places comparing this 0, a wrong written condition</technical_language>

Target:
public void loadMyStep(int id) { try { setMySchritt(this.serviceManager.getTaskService().getById(id)); } catch (DAOException e) { Helper.setFehlerMeldung("Error retrieving task with ID '" + id + "'; ", e.getMessage()); } }
Source:
<code>private synchronized void onReceiverInitialized(final String receiverId) { <START> stateMachine.checkState("INIT"); <END> receiverStateMachineMap.get(receiverId).checkState("RECEIVING"); LOG.log(Level.FINE, "A receiver is initialized " + receiverId); initializedReceiverNum++; broadcastIfAllReceiversAreInitialized(); }</code><technical_language>do do checkState fails</technical_language>

Target:
private synchronized void onReceiverInitialized(final String receiverId) { stateMachine.checkState(INIT); receiverStateMachineMap.get(receiverId).checkState(PushShuffleReceiverState.RECEIVING); LOG.log(Level.FINE, "A receiver is initialized " + receiverId); numInitializedReceivers++; broadcastIfAllReceiversAreInitialized(); }
Source:
<code>private void closeTestingServerSocket(ServerSocket serverSocket) throws IOException { serverSocket.close(); wizard.showMessage("Closing test socket"); <START> while (!serverSocket.isClosed()) <END> wizard.showMessage("Test socket closed"); }</code><technical_language>add Thread.sleep(500) unnecessarily strain system</technical_language>

Target:
private void closeTestingServerSocket(ServerSocket serverSocket) throws IOException { serverSocket.close(); while (!serverSocket.isClosed()) { try { Thread.sleep(500); } catch (InterruptedException e) { log.debug(e.toString()); } } }
Source:
<code>public static final String[] getLine( LogChannelInterface log, InputStreamReader reader, EncodingType encodingType, int fileFormatType, StringBuilder line, String regex, long lineNumberInFile ) throws KettleFileException { String sline = getLine( log, reader, encodingType, fileFormatType, line ); while ( sline != null ) { if ( checkPattern( sline, regex ) % 2 == 0 ) { return new String[] { sline, String.valueOf( lineNumberInFile ) }; } String nextLine = getLine( log, reader, encodingType, fileFormatType, line ); if ( nextLine == null ) { break; } sline = sline + nextLine; lineNumberInFile++; } <START> return new String[] { sline, String.valueOf( lineNumberInFile ) }; <END> }</code><technical_language>This a hack me. Instead of array, a simple class string line number in file? cleaner looking, avoid data conversion. For a 10-line file, String.valueOf a problem. In a billion-line file though, consume a significant amount of time</technical_language>

Target:
public static final TextFileLine getLine( LogChannelInterface log, InputStreamReader reader, EncodingType encodingType, int fileFormatType, StringBuilder line, String regex, long lineNumberInFile ) throws KettleFileException { String sline = getLine( log, reader, encodingType, fileFormatType, line ); while ( sline != null ) { if ( checkPattern( sline, regex ) % 2 == 0 ) { return new TextFileLine( sline, lineNumberInFile, null ); } String nextLine = getLine( log, reader, encodingType, fileFormatType, line ); if ( nextLine == null ) { break; } sline = sline + nextLine; lineNumberInFile++; } return new TextFileLine( sline, lineNumberInFile, null ); }
Source:
<code><START> public boolean equals(Object o) { <END> if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PingNuageVspCommand that = (PingNuageVspCommand) o; if (shouldAudit != that.shouldAudit) return false; return true; }</code><technical_language>This equals implementation include attributes PingCommand super class</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PingNuageVspCommand)) return false; if (!super.equals(o)) return false; PingNuageVspCommand that = (PingNuageVspCommand) o; if (shouldAudit != that.shouldAudit) return false; return true; }
Source:
<code>public static void setUp() throws Exception { QueryRunnerFactory factory = new TopNQueryRunnerFactory( new StupidPool<ByteBuffer>( new Supplier<ByteBuffer>() { @Override public ByteBuffer get() { <START> return ByteBuffer.allocate(2000); <END> } } ), new TopNQueryQueryToolChest(new TopNQueryConfig()), QueryRunnerTestHelper.NOOP_QUERYWATCHER ); testCaseMap.put( TestCases.rtIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new IncrementalIndexSegment(TestIndex.getIncrementalTestIndex(false), segmentId) ) ); testCaseMap.put( TestCases.mMappedTestIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new QueryableIndexSegment(segmentId, TestIndex.getMMappedTestIndex()) ) ); testCaseMap.put( TestCases.mergedRealtimeIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new QueryableIndexSegment(segmentId, TestIndex.mergedRealtimeIndex()) ) ); testCaseMap.put( TestCases.rtIndexOffheap, QueryRunnerTestHelper.makeQueryRunner( factory, new IncrementalIndexSegment(TestIndex.getIncrementalTestIndex(true), segmentId) ) ); }</code><technical_language>This a direct buffer, alternatively, OffheapBufferPool</technical_language>

Target:
public static void setUp() throws Exception { QueryRunnerFactory factory = new TopNQueryRunnerFactory( new StupidPool<ByteBuffer>( new Supplier<ByteBuffer>() { @Override public ByteBuffer get() { return ByteBuffer.allocateDirect(2000); } } ), new TopNQueryQueryToolChest(new TopNQueryConfig()), QueryRunnerTestHelper.NOOP_QUERYWATCHER ); testCaseMap.put( TestCases.rtIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new IncrementalIndexSegment(TestIndex.getIncrementalTestIndex(false), segmentId) ) ); testCaseMap.put( TestCases.mMappedTestIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new QueryableIndexSegment(segmentId, TestIndex.getMMappedTestIndex()) ) ); testCaseMap.put( TestCases.mergedRealtimeIndex, QueryRunnerTestHelper.makeQueryRunner( factory, new QueryableIndexSegment(segmentId, TestIndex.mergedRealtimeIndex()) ) ); testCaseMap.put( TestCases.rtIndexOffheap, QueryRunnerTestHelper.makeQueryRunner( factory, new IncrementalIndexSegment(TestIndex.getIncrementalTestIndex(true), segmentId) ) ); }
Source:
<code>RemoteCommand(bnd bnd, RemoteOptions options) throws Exception { super(bnd); this.bnd = bnd; use(bnd); launcher = new LauncherSupervisor(); launcher.connect(host = options.host("localhost"), port = options.port(Agent.DEFAULT_PORT)); agent = launcher.getAgent(); List<BundleDTO> installedBundles = agent.getBundles(); if (options.list()) { installedBundles.forEach(b -> prettyPrintBundleDTO(b)); return; } <START> String bundlePath = options.installOrUpdate(null); END> if (bundlePath != null) { File file = new File(bundlePath); Jar bundle = null; try { bundle = new Jar(file); } catch (Exception e) { error("Error occurred while parsing the specified file - %s", e.getMessage()); return; } String bsn = bundle.getBsn(); String version = bundle.getVersion(); Optional<BundleDTO> installedBundle = installedBundles.stream() .filter(b -> bsn.equals(b.symbolicName) && !version.equals(b.version)) .findAny(); if (installedBundle.isPresent()) { bnd.out.println("Bundle will be installed since a bundle in the framework matches the BSN " + "and the version of the specified bundle"); } else { bnd.out.println("Bundle will be updated since no bundle in the framework matches the BSN and " + "the version of the specified bundle"); } bnd.out.println(); try { String location = "reference:" + bsn + ":" + version; BundleDTO dto = agent.install(location, Files.readAllBytes(file.toPath())); prettyPrintBundleDTO(dto); } catch (Exception e) { error("Bundle cannot be installed or updated. Reason - %s", e.getMessage()); } } }</code><technical_language>This code belong</technical_language>

Target:
RemoteCommand(bnd bnd, RemoteOptions options) throws Exception { super(bnd); this.bnd = bnd; use(bnd); launcher = new LauncherSupervisor(); launcher.connect(host = options.host("localhost"), port = options.port(Agent.DEFAULT_PORT)); agent = launcher.getAgent(); }
Source:
<code>public void release() { v8.getLocker().checkThread(); <START> if (isReleased()) { <END> return; } releasing = true; try { for (V8Value reference : references) { reference.close(); } v8.removeReferenceHandler(memoryManagerReferenceHandler); references.clear(); } finally { releasing = false; } released = true; }</code><technical_language>need change this part of this commit. field accessor for internal calls</technical_language>

Target:
public void release() { v8.getLocker().checkThread(); if (released) { return; } releasing = true; try { for (V8Value reference : references) { reference.close(); } v8.removeReferenceHandler(memoryManagerReferenceHandler); references.clear(); } finally { releasing = false; } released = true; }
Source:
<code>@Test public void invokeMethod_vs_DefaultGroovyMethods() throws Exception { MetaMethod m1 = InvokerHelper.getMetaClass(ClassWithInvokeMethod.class).pickMethod("asBoolean",new Class[0]); <START> assert m1!=null; <END> assert (Boolean)m1.invoke(new ClassWithInvokeMethod(),new Object[0]); assertEvaluate( new ProxyWhitelist( new GenericWhitelist(), new AbstractWhitelist() { @Override public boolean permitsConstructor(Constructor<?> constructor, Object[] args) { return constructor.getDeclaringClass()==ClassWithInvokeMethod.class; } } ), true, "def c = new org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptorTest.ClassWithInvokeMethod(); c.asBoolean()" ); }</code><technical_language>JUnit assert* methods here</technical_language>

Target:
@Test public void invokeMethod_vs_DefaultGroovyMethods() throws Exception { MetaMethod m1 = InvokerHelper.getMetaClass(ClassWithInvokeMethod.class).pickMethod("asBoolean",new Class[0]); assertNotNull(m1); assertTrue((Boolean) m1.invoke(new ClassWithInvokeMethod(), new Object[0])); assertEvaluate( new ProxyWhitelist( new GenericWhitelist(), new StaticWhitelist("new " + ClassWithInvokeMethod.class.getName()) ), true, "def c = new " + ClassWithInvokeMethod.class.getCanonicalName() + "(); c.asBoolean()" ); }
Source:
<code>public ImmutableList<Arguments> toParamList(final ImmutableList<Ds3ResponseCode> ds3ResponseCodes) { final ImmutableList.Builder<Arguments> builder = ImmutableList.builder(); builder.add(new Arguments("int", "RetryAfterSeconds")); builder.add(new Arguments("Status", "Status")); if (hasContent(ds3ResponseCodes)) { final ImmutableList<Arguments> responseCodeArgs = ds3ResponseCodes.stream() <START> .filter(i -> i.getCode() < 300) END> .map(BaseResponseGenerator::toParam) .filter(Optional::isPresent) .map(Optional::get) .collect(GuavaCollectors.immutableList()); builder.addAll(responseCodeArgs); } return builder.build().stream() .sorted(new CustomArgumentComparator()) .collect(GuavaCollectors.immutableList()); }</code><technical_language>const this magic number somewhere? this 300 stand for</technical_language>

Target:
public ImmutableList<Arguments> toParamList(final ImmutableList<Ds3ResponseCode> ds3ResponseCodes) { final ImmutableList.Builder<Arguments> builder = ImmutableList.builder(); builder.add(new Arguments("int", "RetryAfterSeconds")); builder.add(new Arguments("Status", "Status")); if (hasContent(ds3ResponseCodes)) { final ImmutableList<Arguments> responseCodeArgs = ds3ResponseCodes.stream() .filter(i -> i.getCode() < ERROR_CODE_THRESHOLD) .map(BaseResponseGenerator::toParam) .filter(Optional::isPresent) .map(Optional::get) .collect(GuavaCollectors.immutableList()); builder.addAll(responseCodeArgs); } return builder.build().stream() .sorted(new CustomArgumentComparator()) .collect(GuavaCollectors.immutableList()); }
Source:
<code>public void testBasicInjection() throws Exception { final CaffeineCacheConfig config = new CaffeineCacheConfig(); Injector injector = Initialization.makeInjectorWithModules( GuiceInjectors.makeStartupInjector(), ImmutableList.of( <START> new Module() <END> { @Override public void configure(Binder binder) { binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/test/redis"); binder.bindConstant().annotatedWith(Names.named("servicePort")).to(0); binder.bind(CaffeineCacheConfig.class).toInstance(config); binder.bind(Cache.class).toProvider(CaffeineCacheProviderWithConfig.class).in(ManageLifecycle.class); } } ) ); final Lifecycle lifecycle = injector.getInstance(Lifecycle.class); lifecycle.start(); try { Cache cache = injector.getInstance(Cache.class); Assert.assertEquals(CaffeineCache.class, cache.getClass()); } finally { lifecycle.stop(); } }</code><technical_language>fyi, I a lambda expression (SAM interface) binder -> { ... }</technical_language>

Target:
public void testBasicInjection() throws Exception { final CaffeineCacheConfig config = new CaffeineCacheConfig(); Injector injector = Initialization.makeInjectorWithModules( GuiceInjectors.makeStartupInjector(), ImmutableList.<Module>of( binder -> { binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/test/redis"); binder.bindConstant().annotatedWith(Names.named("servicePort")).to(0); binder.bind(CaffeineCacheConfig.class).toInstance(config); binder.bind(Cache.class).toProvider(CaffeineCacheProviderWithConfig.class).in(ManageLifecycle.class); } ) ); final Lifecycle lifecycle = injector.getInstance(Lifecycle.class); lifecycle.start(); try { Cache cache = injector.getInstance(Cache.class); Assert.assertEquals(CaffeineCache.class, cache.getClass()); } finally { lifecycle.stop(); } }
Source:
<code>@Override public boolean handle(TraceContext context, MutableSpan span) { if (!context.isLocalRoot()) { parentToChildren.add(context.parentIdString(), span); } <START> Iterable<MutableSpan> children = parentToChildren.remove(context.spanIdString()); <END> FinishedChildrenHandler.this.handle(span, children != null ? children : emptyList()); return true; }</code><technical_language>if copy another list passing handler</technical_language>

Target:
@Override public boolean handle(TraceContext context, MutableSpan span) { if (!context.isLocalRoot()) { parentToChildren.add(context.parentIdString(), span); } Set<MutableSpan> children = parentToChildren.remove(context.spanIdString()); Iterator<MutableSpan> child = children != null ? children.iterator() : emptyIterator(); FinishedChildrenHandler.this.handle(span, child); return true; }
Source:
<code>public IndexingLevel getIndexingLevel(EClass type) { Object key = toKey(type); IndexingLevel level = directlyObservedClasses.get(key); if (level == null) { level = delayedClasses.get(key); } level = level == null ? wildcardMode : <START> level; <END> return level == null ? IndexingLevel.NONE : level; }</code><technical_language>If wildcard mode is higher registered mode (which achieved setting wildcard mode a register call), this method return registered mode. I in this case this return merged mode instead, e.g. return wildcardMode.merge(level);</technical_language>

Target:
public IndexingLevel getIndexingLevel(EClass type) { Object key = toKey(type); IndexingLevel level = directlyObservedClasses.get(key); if (level == null) { level = delayedClasses.get(key); } return wildcardMode.merge(level); }
Source:
<code>public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); if (!isAdded() || ((PageActivity)getActivity()).isSearching()) { return; } MenuItem savePageMenu = menu.findItem(R.id.menu_save_page); if (savePageMenu == null) { return; } MenuItem shareMenu = menu.findItem(R.id.menu_share_page); MenuItem otherLangMenu = menu.findItem(R.id.menu_other_languages); MenuItem findInPageMenu = menu.findItem(R.id.menu_find_in_page); MenuItem themeChooserMenu = menu.findItem(R.id.menu_themechooser); switch (state) { case STATE_NO_FETCH: case STATE_INITIAL_FETCH: savePageMenu.setEnabled(false); shareMenu.setEnabled(false); otherLangMenu.setEnabled(false); findInPageMenu.setEnabled(false); themeChooserMenu.setEnabled(false); break; case STATE_COMPLETE_FETCH: savePageMenu.setEnabled(true); shareMenu.setEnabled(true); <START> if (page.getPageProperties().getLanguageCount() == 0) { <END> otherLangMenu.setVisible(false); } else { otherLangMenu.setEnabled(true); } findInPageMenu.setEnabled(true); themeChooserMenu.setEnabled(true); if (subState == SUBSTATE_PAGE_SAVED) { savePageMenu.setEnabled(false); savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_page_saved)); } else if (subState == SUBSTATE_SAVED_PAGE_LOADED) { savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_refresh_saved_page)); } else { savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_save_page)); } break; default: throw new RuntimeException("This can't happen"); } }</code><technical_language>simplify this by: otherLangMenu.setVisible(page.getPageProperties().getLanguageCount() != 0)</technical_language>

Target:
public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); if (!isAdded() || ((PageActivity)getActivity()).isSearching()) { return; } MenuItem savePageMenu = menu.findItem(R.id.menu_save_page); if (savePageMenu == null) { return; } MenuItem shareMenu = menu.findItem(R.id.menu_share_page); MenuItem otherLangMenu = menu.findItem(R.id.menu_other_languages); MenuItem findInPageMenu = menu.findItem(R.id.menu_find_in_page); MenuItem themeChooserMenu = menu.findItem(R.id.menu_themechooser); switch (state) { case STATE_NO_FETCH: case STATE_INITIAL_FETCH: savePageMenu.setEnabled(false); shareMenu.setEnabled(false); otherLangMenu.setEnabled(false); findInPageMenu.setEnabled(false); themeChooserMenu.setEnabled(false); break; case STATE_COMPLETE_FETCH: savePageMenu.setEnabled(true); shareMenu.setEnabled(true); otherLangMenu.setVisible(page.getPageProperties().getLanguageCount() != 0); findInPageMenu.setEnabled(true); themeChooserMenu.setEnabled(true); if (subState == SUBSTATE_PAGE_SAVED) { savePageMenu.setEnabled(false); savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_page_saved)); } else if (subState == SUBSTATE_SAVED_PAGE_LOADED) { savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_refresh_saved_page)); } else { savePageMenu.setTitle(WikipediaApp.getInstance().getString(R.string.menu_save_page)); } break; default: throw new RuntimeException("This can't happen"); } }
Source:
<code>protected void processResults(final List<? extends Command> response, final List<CommandAndHandler> commandsAndHandlers) { if (LOG.isDebugEnabled() && response.size() > 0) { StringBuffer buffer = new StringBuffer(); for (Command command : response) { buffer.append(command.getClass().getSimpleName()); buffer.append(", "); } LOG.trace("Processing commands from server: {}", response.size(), buffer.substring(0, buffer.length() - 2)); } else { LOG.trace("Processing commands from server", response.size()); } for (Command serverCommand : response) { dispatchHandle(serverCommand); } OnFinishedHandler callback = commandsAndHandlers.get(0).getHandler(); if (callback != null) { LOG.trace("Handling registered callback"); try { callback.onFinished(); } catch (Exception e) { <START> LOG.info("Error in handling callback", e); <END> throw e; } } }</code><technical_language>This error</technical_language>

Target:
protected void processResults(final List<? extends Command> response, final List<CommandAndHandler> commandsAndHandlers) { if (LOG.isDebugEnabled() && response.size() > 0) { StringBuffer buffer = new StringBuffer(); for (Command command : response) { buffer.append(command.getClass().getSimpleName()); buffer.append(", "); } LOG.trace("Processing commands from server: {}", response.size(), buffer.substring(0, buffer.length() - 2)); } else { LOG.trace("Processing commands from server", response.size()); } for (Command serverCommand : response) { dispatchHandle(serverCommand); } OnFinishedHandler callback = commandsAndHandlers.get(0).getHandler(); if (callback != null) { LOG.trace("Handling registered callback"); try { callback.onFinished(); } catch (Exception e) { LOG.error("Error in handling callback", e); throw e; } } }
Source:
<code>public boolean doPreUpdateIdP(String oldIdPName, IdentityProvider identityProvider) throws IdentityProviderManagementException { String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain(); try { destroyConnector(oldIdPName, tenantDomain); } catch (IdentityProvisioningException e) { <START> log.error("Error when provisioning IDP update", e); <END> throw new IdentityProviderManagementException("Error when provisioning IDP update",e); } return true; }</code><technical_language>log throw anti patttern</technical_language>

Target:
public boolean doPreUpdateIdP(String oldIdPName, IdentityProvider identityProvider) throws IdentityProviderManagementException { String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain(); try { destroyConnector(oldIdPName, tenantDomain); } catch (IdentityProvisioningException e) { throw new IdentityProviderManagementException("Error when provisioning IDP update", e); } return true; }
Source:
<code>public DataMapKey() { <START> super(); <END> }</code><technical_language>spared, called implicitly</technical_language>

Target:
public DataMapKey() { }
Source:
<code>public Stream<Condition> getConditions(BaselineExperiment experiment) { <START> ImmutableSetMultimap<String, String> assayAccession2OntologyTerms = <END> efoLookupService .expandOntologyTerms(experiment.getExperimentDesign().getAllOntologyTermIdsByAssayAccession()); return experiment.getDataColumnDescriptors().stream() .flatMap(assayGroup -> assayGroup.assaysAnalyzedForThisDataColumn().stream() .map(assayAccession -> new Condition( experiment.getAccession(), assayGroup.getId(), collectAssayProperties( experiment, assayAccession, assayAccession2OntologyTerms.get(assayAccession))))); }</code><technical_language>This in a separate (private) function avoid code duplication: lines 60-63 identical this block, missing something..</technical_language>

Target:
public Stream<Condition> getConditions(BaselineExperiment experiment) { ImmutableSetMultimap<String, String> assayAccession2OntologyTerms = mapAssayAccessionsToOntologyTerms(experiment.getExperimentDesign()); return experiment.getDataColumnDescriptors().stream() .flatMap(assayGroup -> assayGroup.assaysAnalyzedForThisDataColumn().stream() .map(assayAccession -> new Condition( experiment.getAccession(), assayGroup.getId(), collectAssayProperties( experiment, assayAccession, assayAccession2OntologyTerms.get(assayAccession))))); }
Source:
<code>private Consumer createConsumerForHypervisorId(String incHypervisorId, Owner owner, Principal principal, Consumer incoming) { Consumer consumer = new Consumer(); consumer.setName(sanitizeHypervisorId(incHypervisorId)); consumer.setType(this.hypervisorType); consumer.setFact("uname.machine", "x86_64"); consumer.setGuestIds(new ArrayList<GuestId>()); consumer.setOwner(owner); <START> consumer.setAutoheal(!owner.getAutobindDisabled()); <END> consumer.setCanActivate(subAdapter.canActivateSubscription(consumer)); if (owner.getDefaultServiceLevel() != null) { consumer.setServiceLevel(owner.getDefaultServiceLevel()); } else { consumer.setServiceLevel(""); } if (principal.getUsername() != null) { consumer.setUsername(principal.getUsername()); } consumerResource.sanitizeConsumerFacts(consumer); HypervisorId hypervisorId = new HypervisorId(consumer, incHypervisorId); consumer.setHypervisorId(hypervisorId); consumerResource.checkForFactsUpdate(consumer, incoming); consumer.setGuestIds(incoming.getGuestIds()); if (consumer.getGuestIds() != null) { for (GuestId g : consumer.getGuestIds()) { g.setConsumer(consumer); } } complianceRules.getStatus(consumer, null, false, false); return consumer; }</code><technical_language>I this is this setting is for. owner.AutobindDisabled for maintenance mode</technical_language>

Target:
private Consumer createConsumerForHypervisorId(String incHypervisorId, Owner owner, Principal principal, Consumer incoming) { Consumer consumer = new Consumer(); if (incoming.getName() != null) { consumer.setName(incoming.getName()); } else { consumer.setName(sanitizeHypervisorId(incHypervisorId)); } consumer.setType(this.hypervisorType); consumer.setFact("uname.machine", "x86_64"); consumer.setGuestIds(new ArrayList<GuestId>()); consumer.setOwner(owner); consumer.setAutoheal(true); consumer.setCanActivate(subAdapter.canActivateSubscription(consumer)); if (owner.getDefaultServiceLevel() != null) { consumer.setServiceLevel(owner.getDefaultServiceLevel()); } else { consumer.setServiceLevel(""); } if (principal.getUsername() != null) { consumer.setUsername(principal.getUsername()); } consumer.setEntitlementCount(0L); consumerResource.sanitizeConsumerFacts(consumer); HypervisorId hypervisorId = new HypervisorId(consumer, incHypervisorId); consumer.setHypervisorId(hypervisorId); consumerResource.checkForFactsUpdate(consumer, incoming); consumer.setGuestIds(incoming.getGuestIds()); if (consumer.getGuestIds() != null) { for (GuestId g : consumer.getGuestIds()) { g.setConsumer(consumer); } } complianceRules.getStatus(consumer, null, false, false); return consumer; }
Source:
<code>public Obs saveObs(Obs obs, String changeMessage) throws APIException { if(obs == null){ throw new APIException("Obs.error.cannot.be.null", (Object[]) null); } if(obs.getId() != null && changeMessage == null){ throw new APIException("Obs.error.ChangeMessage.required", (Object[]) null); } handleExistingObsWithComplexConcept(obs); ensureRequirePrivilege(obs); if (obs.getObsId() == null || obs.getVoided()) { <START> if (obs.getObsId() == null){ <END> obs = check_patient(obs); } return saveNewOrVoidedObs(obs,changeMessage); } else if(!obs.isDirty()){ setPersonFromEncounter(obs); return saveObsNotDirty(obs, changeMessage); } else { setPersonFromEncounter(obs); return saveExistingObs(obs,changeMessage); } }</code><technical_language>obs.getObsId() tested previous line</technical_language>

Target:
public Obs saveObs(Obs obs, String changeMessage) throws APIException { if(obs == null){ throw new APIException("Obs.error.cannot.be.null", (Object[]) null); } if(obs.getId() != null && changeMessage == null){ throw new APIException("Obs.error.ChangeMessage.required", (Object[]) null); } handleExistingObsWithComplexConcept(obs); ensureRequirePrivilege(obs); if (obs.getObsId() == null || obs.getVoided()) { return saveNewOrVoidedObs(obs,changeMessage); } else if(!obs.isDirty()){ setPersonFromEncounter(obs); return saveObsNotDirty(obs, changeMessage); } else { setPersonFromEncounter(obs); return saveExistingObs(obs,changeMessage); } }
Source:
<code>public static ProducerInfo getProducerInfo(String tenantId, Span serverSpan, SpanCache spanCache) { String clientSpanId = SpanUniqueIdGenerator.getClientId(serverSpan.getId()); if (spanCache != null && clientSpanId != null) { Span clientSpan = spanCache.get(tenantId, clientSpanId); Span rootOrServerSpan = findRootOrServerSpan(tenantId, clientSpan, spanCache); if (rootOrServerSpan != null) { ProducerInfo pi = new ProducerInfo(); pi.setDuration(TimeUnit.MILLISECONDS.convert(clientSpan.getDuration(), TimeUnit.MICROSECONDS)); pi.setTimestamp(TimeUnit.MILLISECONDS.convert(clientSpan.getTimestamp(), TimeUnit.MICROSECONDS)); pi.setFragmentId(clientSpan.getId()); pi.getProperties().addAll(clientSpan.binaryAnnotationMapping().getProperties()); pi.setHostAddress(clientSpan.ipv4()); <START> if (serverSpan.service() != null) { <END> pi.getProperties().add(new Property(Constants.PROP_SERVICE_NAME, serverSpan.service())); } pi.setId(clientSpan.getId()); pi.setMultipleConsumers(false); pi.setSourceOperation(SpanDeriverUtil.deriveOperation(rootOrServerSpan)); if (rootOrServerSpan.serverSpan()) { pi.setSourceUri(rootOrServerSpan.url().getPath()); } else { pi.setSourceUri(Constants.URI_CLIENT_PREFIX + clientSpan.url().getPath()); } return pi; } } return null; }</code><technical_language>clientSpan.service() - matter client server spans in service - of other information populating ProducerInfo is based clientSpan</technical_language>

Target:
public static ProducerInfo getProducerInfo(String tenantId, Span serverSpan, SpanCache spanCache) { String clientSpanId = SpanUniqueIdGenerator.getClientId(serverSpan.getId()); if (spanCache != null && clientSpanId != null) { Span clientSpan = spanCache.get(tenantId, clientSpanId); Span rootOrServerSpan = findRootOrServerSpan(tenantId, clientSpan, spanCache); if (rootOrServerSpan != null) { ProducerInfo pi = new ProducerInfo(); pi.setDuration(TimeUnit.MILLISECONDS.convert(clientSpan.getDuration(), TimeUnit.MICROSECONDS)); pi.setTimestamp(TimeUnit.MILLISECONDS.convert(clientSpan.getTimestamp(), TimeUnit.MICROSECONDS)); pi.setFragmentId(clientSpan.getId()); pi.getProperties().addAll(clientSpan.binaryAnnotationMapping().getProperties()); pi.setHostAddress(clientSpan.ipv4()); if (clientSpan.service() != null) { pi.getProperties().add(new Property(Constants.PROP_SERVICE_NAME, clientSpan.service())); } pi.setId(clientSpan.getId()); pi.setMultipleConsumers(false); pi.setSourceOperation(SpanDeriverUtil.deriveOperation(rootOrServerSpan)); if (rootOrServerSpan.serverSpan()) { pi.setSourceUri(rootOrServerSpan.url().getPath()); } else { pi.setSourceUri(Constants.URI_CLIENT_PREFIX + clientSpan.url().getPath()); } return pi; } } return null; }
Source:
<code>private boolean copyFile(URI srcUri, URI dstUri) throws IOException { try { String encodedUrl = null; try { encodedUrl = URLEncoder.encode(srcUri.getHost() + srcUri.getPath(), StandardCharsets.UTF_8.toString()); } catch (UnsupportedEncodingException e) { <START> LOGGER.info("URL could not be encoded: {}", e.getMessage()); <END> } String dstPath = sanitizePath(dstUri.getPath()); CopyObjectRequest copyReq = CopyObjectRequest.builder() .copySource(encodedUrl) .destinationBucket(dstUri.getHost()) .destinationKey(dstPath) .build(); CopyObjectResponse copyObjectResponse = s3Client.copyObject(copyReq); return copyObjectResponse.sdkHttpResponse().isSuccessful(); }catch(S3Exception e){ throw new IOException(e); } }</code><technical_language>log.info continue, instead of throwing exception</technical_language>

Target:
private boolean copyFile(URI srcUri, URI dstUri) throws IOException { try { String encodedUrl = null; try { encodedUrl = URLEncoder.encode(srcUri.getHost() + srcUri.getPath(), StandardCharsets.UTF_8.toString()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } String dstPath = sanitizePath(dstUri.getPath()); CopyObjectRequest copyReq = CopyObjectRequest.builder().copySource(encodedUrl).destinationBucket(dstUri.getHost()).destinationKey(dstPath) .build(); CopyObjectResponse copyObjectResponse = _s3Client.copyObject(copyReq); return copyObjectResponse.sdkHttpResponse().isSuccessful(); } catch (S3Exception e) { throw new IOException(e); } }
Source:
<code>public void remove(String tenantId, String id) { Property<?> remove = propertyCache.remove(id); if (remove != null) { <START> eventListener.observersMap.remove(id); <END> } }</code><technical_language>I removal of observers done client - add property back, expecting observers registered. i.e. if client adds observer, responsible for removing it</technical_language>

Target:
public void remove(String tenantId, String id) { propertyCache.remove(id); }
Source:
<code>private void addAnimalHandler() { this.playerCount++; <START> if (!this.eventSend && this.AllTeamsHaveOnePlayer()) { <END> this.eventSend = true; GameAboutToStartEvent event = new GameAboutToStartEvent(); event.setSeconds(DELAY); this.eventDispatcher.dispatch(event); final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); scheduler.schedule(this::start, DELAY, TimeUnit.SECONDS); } }</code><technical_language>change function name AllTeamsHaveAPlayer()</technical_language>

Target:
private void addAnimalHandler() { this.playerCount++; if (!this.eventSend && this.AllTeamsHaveAPlayer()) { this.eventSend = true; GameAboutToStartEvent event = new GameAboutToStartEvent(); event.setSeconds(DELAY); this.eventDispatcher.dispatch(event); final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); scheduler.schedule(this::start, DELAY, TimeUnit.SECONDS); } }
Source:
<code>public static void main(String[] args) throws IOException, RunnerException { BenchmarkData data = new BenchmarkData(); data.setup(); <START> new BenchmarkSTContains().stContainsInnerPoint(data); <END> Options options = new OptionsBuilder() .verbosity(VerboseMode.NORMAL) .include(".*" + BenchmarkSTContains.class.getSimpleName() + ".*") .build(); new Runner(options).run(); }</code><technical_language>throw if contains</technical_language>

Target:
public static void main(String[] args) throws IOException, RunnerException { BenchmarkData data = new BenchmarkData(); data.setup(); BenchmarkSTContains benchmark = new BenchmarkSTContains(); if (!((Boolean) benchmark.stContainsInnerPoint(data)).booleanValue()) { throw new IllegalStateException("ST_Contains for inner point expected to return true, got false."); } if (((Boolean) benchmark.stContainsOuterPointInEnvelope(data)).booleanValue()) { throw new IllegalStateException("ST_Contains for outer point expected to return false, got true."); } Options options = new OptionsBuilder() .verbosity(VerboseMode.NORMAL) .include(".*" + BenchmarkSTContains.class.getSimpleName() + ".*") .build(); new Runner(options).run(); }
Source:
<code>public String getDefaultMetaVariable() { T[] enumConstants = enumType.getEnumConstants(); List<String> items = new ArrayList<>(enumConstants.length); for (Enum<T> item : enumConstants) { try { if (enumType.getField(item.name()).getAnnotation(Deprecated.class) == null) { items.add(item.name()); } } catch (NoSuchFieldException e) { <START> throw new AssertionError(); <END> } catch (SecurityException e) { throw new AssertionError(); } } return new StringBuffer() .append('[') .append(Joiner.on(" | ").join(items)) .append(']') .toString(); }</code><technical_language>For me, oK</technical_language>

Target:
public String getDefaultMetaVariable() { T[] enumConstants = enumType.getEnumConstants(); List<String> items = new ArrayList<>(enumConstants.length); for (Enum<T> item : enumConstants) { try { if (enumType.getField(item.name()).getAnnotation(Deprecated.class) == null) { items.add(item.name()); } } catch (NoSuchFieldException e) { throw new AssertionError(); } catch (SecurityException e) { items.add(item.name()); LoggerFactory.getLogger() .info( "A SecurityException occured while getting field '" + item.name() + "' from enum '" + enumType.getName() + "': " + e.getMessage()); } } return new StringBuffer() .append('[') .append(Joiner.on(" | ").join(items)) .append(']') .toString(); }
Source:
<code>private String getDateTimeFromTimeStamp(Instant instant) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); <START> return sdf.format(new Date(instant.toEpochMilli())); <END> }</code><technical_language>cleaner format instant. Java 8 a new formatter for temporals</technical_language>

Target:
private String getDateTimeFromTimeStamp(Instant instant) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX") .withZone(ZoneOffset.UTC); return formatter.format(instant); }
Source:
<code>default ColumnValueSelector<Double> makeColumnValueSelector(ReadableOffset offset, ImmutableBitmap nullValueBitmap) { class HistoricalDoubleColumnSelector implements DoubleColumnSelector, HistoricalColumnSelector<Double> { @Override public double getDouble() { return ColumnarDoubles.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { return ColumnarDoubles.this.get(offset); } @Override public boolean isNull() { <START> return nullValueBitmap.get(offset.getOffset()); <END> } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarDoubles.this); inspector.visit("offset", offset); } } return new HistoricalDoubleColumnSelector(); }</code><technical_language>inspected. for long float</technical_language>

Target:
default ColumnValueSelector<Double> makeColumnValueSelector(ReadableOffset offset, ImmutableBitmap nullValueBitmap) { if (nullValueBitmap.isEmpty()) { class HistoricalDoubleColumnSelector implements DoubleColumnSelector, HistoricalColumnSelector<Double> { @Override public boolean isNull() { return false; } @Override public double getDouble() { return ColumnarDoubles.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { return ColumnarDoubles.this.get(offset); } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarDoubles.this); inspector.visit("offset", offset); } } return new HistoricalDoubleColumnSelector(); } else { class HistoricalDoubleColumnSelectorWithNulls implements DoubleColumnSelector, HistoricalColumnSelector<Double> { @Override public boolean isNull() { return nullValueBitmap.get(offset.getOffset()); } @Override public double getDouble() { assert NullHandling.replaceWithDefault() || !isNull(); return ColumnarDoubles.this.get(offset.getOffset()); } @Override public double getDouble(int offset) { assert NullHandling.replaceWithDefault() || !nullValueBitmap.get(offset); return ColumnarDoubles.this.get(offset); } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("columnar", ColumnarDoubles.this); inspector.visit("offset", offset); inspector.visit("nullValueBitmap", nullValueBitmap); } } return new HistoricalDoubleColumnSelectorWithNulls(); } }
Source:
<code>public void allConfigurationFilesWithLocalPIDsAreProcessedAndConfigurationIsUpdated() { String configDirectory = configBaseDirectory + SEP + "local_pid_conf"; String servicesDirectory = "local_pid_services"; String defaultConfigFileName = configDirectory + SEP + "local.pid.default.file.cfg"; initialize(defaultConfigFileName); <START> String absoluteConfigDirectory = configDirectory + SEP + servicesDirectory; <END> ConfigDispatcher cd = new ConfigDispatcher(bundleContext, configAdmin); cd.processConfigFile(new File(absoluteConfigDirectory)); verifyValueOfConfigurationProperty("local.default.pid", "default.property", "default.value"); verifyValueOfConfigurationProperty("local.service.first.pid", "service.property", "service.value"); verifyValueOfConfigurationProperty("local.service.second.pid", "service.property", "service.value"); }</code><technical_language>worth extracting this block a method instead of repeating place</technical_language>

Target:
public void allConfigurationFilesWithLocalPIDsAreProcessedAndConfigurationIsUpdated() { String configDirectory = configBaseDirectory + SEP + "local_pid_conf"; String servicesDirectory = "local_pid_services"; String defaultConfigFileName = configDirectory + SEP + "local.pid.default.file.cfg"; initialize(defaultConfigFileName); cd.processConfigFile(new File(getAbsoluteConfigDirectory(configDirectory, servicesDirectory))); verifyValueOfConfigurationProperty("local.default.pid", "default.property", "default.value"); verifyValueOfConfigurationProperty("local.service.first.pid", "service.property", "service.value"); verifyValueOfConfigurationProperty("local.service.second.pid", "service.property", "service.value"); }