auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> private TrackGroupArray initSortedTrackGroups(TrackGroupArray trackGroups) { <END> TrackGroupArray trackGroupArray = trackGroups; if(comparator != null) { TrackGroupArray trackGroupsArray = mappedTrackInfo.getTrackGroups(rendererIndex); for (int groupIndex = 0; groupIndex < trackGroupsArray.length; groupIndex++) { TrackGroup group = trackGroupsArray.get(groupIndex); Format[] listFormats = new Format[group.length]; for (int formatIndex = 0; formatIndex < group.length; formatIndex++) { listFormats[formatIndex] = group.getFormat(formatIndex); } Arrays.sort(listFormats, comparator); trackGroupArray = new TrackGroupArray(new TrackGroup(listFormats)); } } return trackGroupArray; }</code><technical_language>I this method right thing. In particular, suppose multiple groups in TrackGroupArray. L394 rewrites a single group. this other groups lost</technical_language>

Target:
private TrackGroupArray initSortedTrackGroups(TrackGroupArray trackGroups) { TrackGroupArray trackGroupArray = trackGroups; if(comparator != null) { TrackGroup[] tg = new TrackGroup[trackGroupArray.length]; for (int groupIndex = 0; groupIndex < trackGroupArray.length; groupIndex++) { TrackGroup group = trackGroupArray.get(groupIndex); Format[] listFormats = new Format[group.length]; for (int formatIndex = 0; formatIndex < group.length; formatIndex++) { listFormats[formatIndex] = group.getFormat(formatIndex); } Arrays.sort(listFormats, comparator); tg[groupIndex] = new TrackGroup(listFormats); } trackGroupArray = new TrackGroupArray(tg); } return trackGroupArray; }
Source:
<code>private void initPropertiesUri(String propertiesURI) { try { if (propertiesURI == null) { this.propertiesURI = new URI(System.getProperty(VERSION_PROPERTIES_URI_KEY, DEFAULT_PROPERTIES_URI)); } else { this.propertiesURI = new URI(propertiesURI); } } catch (URISyntaxException e) { <START> e.printStackTrace(); <END> this.propertiesURI = URI.create(DEFAULT_PROPERTIES_URI); } }</code><technical_language>Do need printStackTrace() here</technical_language>

Target:
private void initPropertiesUri(String propertiesURI) { try { if (propertiesURI == null) { this.propertiesURI = new URI(System.getProperty(VERSION_PROPERTIES_URI_KEY, DEFAULT_PROPERTIES_URI)); } else { this.propertiesURI = new URI(propertiesURI); } } catch (URISyntaxException e) { FoundationCorePlugin.pluginLog().logError( "Invalid URI format (" + propertiesURI + ") for " + VERSION_PROPERTIES_URI_KEY + ". Falling back on " + DEFAULT_PROPERTIES_URI, e); this.propertiesURI = URI.create(DEFAULT_PROPERTIES_URI); } }
Source:
<code>public @Nonnull EnvVars getEnvironment(@Nonnull TaskListener log) throws IOException, InterruptedException { Computer c = Computer.currentComputer(); <START> Node n = c==null ? null : c.getNode(); <END> EnvVars env = getParent().getEnvironment(n,log); env.putAll(getParent().getEnvironment(n,log)); FilePath ws = getWorkspace(); if (ws!=null) env.put("WORKSPACE", ws.getRemote()); project.getScm().buildEnvVars(this,env); for (EnvironmentContributor ec : EnvironmentContributor.all().reverseView()) ec.buildEnvironmentFor(this,env,log); if (buildEnvironments!=null) for (Environment e : buildEnvironments) e.buildEnvVars(env); for (EnvironmentContributingAction a : getActions(EnvironmentContributingAction.class)) a.buildEnvVars(this,env); env.putAll(getCharacteristicEnvVars()); EnvVars.resolve(env); return env; }</code><technical_language>Missing null check below? <LINK_0></technical_language>

Target:
public @Nonnull EnvVars getEnvironment(@Nonnull TaskListener log) throws IOException, InterruptedException { Computer c = Computer.currentComputer(); Node n = c==null ? null : c.getNode(); EnvVars env = new EnvVars(); if (n != null) { env.putAll(getParent().getEnvironment(n,log)); } FilePath ws = getWorkspace(); if (ws!=null) env.put("WORKSPACE", ws.getRemote()); project.getScm().buildEnvVars(this,env); for (EnvironmentContributor ec : EnvironmentContributor.all().reverseView()) ec.buildEnvironmentFor(this,env,log); if (buildEnvironments!=null) for (Environment e : buildEnvironments) e.buildEnvVars(env); for (EnvironmentContributingAction a : getActions(EnvironmentContributingAction.class)) a.buildEnvVars(this,env); env.putAll(getCharacteristicEnvVars()); EnvVars.resolve(env); return env; }
Source:
<code><START> public void setUp() { <END> cmd = spy(new ReconstructMasterDomainCommand<>(new ReconstructMasterParameters())); masterDomainIsoMap = new StoragePoolIsoMap(masterStorageDomainId, storagePoolId, StorageDomainStatus.Active); regularDomainIsoMap = new StoragePoolIsoMap(regularStorageDomainId, storagePoolId, StorageDomainStatus.Active); StorageDomain masterStorageDomain = new StorageDomain(); masterStorageDomain.setStoragePoolIsoMapData(masterDomainIsoMap); doReturn(Arrays.asList(masterDomainIsoMap, regularDomainIsoMap)).when(storagePoolIsoMapDao).getAllForStoragePool(storagePoolId); StoragePool storagePool = new StoragePool(); storagePool.setId(storagePoolId); StoragePoolValidator storagePoolValidator = spy(new StoragePoolValidator(storagePool)); doReturn(storagePoolIsoMapDao).when(storagePoolValidator).getStoragePoolIsoMapDao(); doReturn(masterStorageDomain).when(cmd).getStorageDomain(); doReturn(storagePool).when(cmd).getStoragePool(); doReturn(storagePoolValidator).when(cmd).createStoragePoolValidator(); }</code><technical_language>suggest export logic methods ease read "initializeDomains" , "initializeStoragePoolValidator" shoretn code here</technical_language>

Target:
public void setUp() { cmd = spy(new ReconstructMasterDomainCommand<>(new ReconstructMasterParameters())); initializeStorageDomains(); initializeStoragePool(); initializeStoragePoolValidator(); }
Source:
<code>private void writeValidConfigFiles() throws FileNotFoundException{ PrintWriter writer1 = new PrintWriter(PROPERTY_1); writer1.println("sonar.foo=bar"); <START> writer1.close(); <END> PrintWriter writer2 = new PrintWriter(PROPERTY_2); writer2.println("sonar.bar=bazz"); writer2.close(); }</code><technical_language>Apache FileUtils convinient methods write lines a file</technical_language>

Target:
private void writeValidConfigFiles() throws IOException { FileUtils.writeStringToFile(new File(PROPERTY_1), "sonar.foo=bar"); FileUtils.writeStringToFile(new File(PROPERTY_2), "sonar.bar=bazz"); }
Source:
<code>public boolean match(Object value) { try { <START> if (expected == null) { <END> return false; } Object actual = ObjectGraph.from(value).navigate(attribute).value(); return expected.matcher(asString(actual)).matches(); } catch (JXPathException e) { throw new MatcherException(String.format("Could not navigate to specific path: '%s'", attribute), e); } }</code><technical_language>This</technical_language>

Target:
public boolean match(Object value) { try { Object actual = ObjectGraph.from(value).navigate(attribute).value(); return expected.matcher(asString(actual)).matches(); } catch (JXPathException e) { throw new MatcherException(String.format("Could not navigate to specific path: '%s'", attribute), e); } }
Source:
<code>public boolean matches(final WebContext context) { CommonHelper.assertNotBlank("headerName", headerName); final Optional<String> headerValue = context.getRequestHeader(this.headerName); <START> final boolean headerNull = expectedValue == null && !headerValue.isPresent(); <END> final boolean headerMatches = headerValue.isPresent() && pattern != null && pattern.matcher(headerValue.get()).matches(); return headerNull || headerMatches; }</code><technical_language>is strange code handle null if optional..</technical_language>

Target:
public boolean matches(final WebContext context) { CommonHelper.assertNotBlank("headerName", headerName); final Optional<String> headerValue = context.getRequestHeader(this.headerName); final boolean headerNull = expectedValue == null && !headerValue.isPresent(); final boolean headerMatches = headerValue.flatMap( hv -> Optional.ofNullable(pattern).map(p -> p.matcher(hv).matches()) ).orElse(false); return headerNull || headerMatches; }
Source:
<code>private void deliver(BitmapHunter hunter) { if (hunter.isCancelled()) { return; } Result result = hunter.getResult(); if (result != null) { if (result instanceof Result.Bitmap) { Bitmap bitmap = ((Result.Bitmap) result).getBitmap(); bitmap.prepareToDraw(); } } Message message = mainThreadHandler.obtainMessage(HUNTER_COMPLETE, hunter); <START> if (hunter.getPriority() == Picasso.Priority.HIGH) { <END> mainThreadHandler.sendMessageAtFrontOfQueue(message); } else { mainThreadHandler.sendMessage(message); } logDelivery(hunter); }</code><technical_language>revert (@JvmField declaration)</technical_language>

Target:
private void deliver(BitmapHunter hunter) { if (hunter.isCancelled()) { return; } Result result = hunter.getResult(); if (result != null) { if (result instanceof Result.Bitmap) { Bitmap bitmap = ((Result.Bitmap) result).getBitmap(); bitmap.prepareToDraw(); } } Message message = mainThreadHandler.obtainMessage(HUNTER_COMPLETE, hunter); if (hunter.priority == Picasso.Priority.HIGH) { mainThreadHandler.sendMessageAtFrontOfQueue(message); } else { mainThreadHandler.sendMessage(message); } logDelivery(hunter); }
Source:
<code>private static void printGroup(GroupInfo group, boolean detailed) { <START> System.out.println(String.format("Group id: %s\n Group name: %s \n active: %s", <END> Base64.encodeBytes(group.groupId), group.name, group.active)); if (detailed) { System.out.println(" Members:"); for (String member : group.members) { System.out.println(" " + member); } } }</code><technical_language>prefer group in a single line, e.g.: "Id: %s Name: \"%s\" Active: %s Members: ..."</technical_language>

Target:
private static void printGroup(GroupInfo group, boolean detailed) { if (detailed) { System.out.println(String.format("Id: %s Name: %s Active: %s Members: %s", Base64.encodeBytes(group.groupId), group.name, group.active, group.members)); } else { System.out.println(String.format("Id: %s Name: %s Active: %s", Base64.encodeBytes(group.groupId), group.name, group.active)); } }
Source:
<code>protected void executeQueryCommand() { Job jobWithSteps = jobRepository.getJobWithSteps(getParameters().getId()); if (getParameters().isFiltered()) { Guid userId = getUserID(); <START> if (jobWithSteps.getOwnerId().equals(userId) && jobWithSteps.getEngineSessionSeqId() == getEngineSessionSeqId()) { <END> getQueryReturnValue().setReturnValue(jobWithSteps); } } else { getQueryReturnValue().setReturnValue(jobWithSteps); } }</code><technical_language>Please check if empty results properly user try fetch existing job executed user</technical_language>

Target:
protected void executeQueryCommand() { Job jobWithSteps = jobRepository.getJobWithSteps(getParameters().getId()); if (getParameters().isFiltered()) { if (jobWithSteps.getEngineSessionSeqId() == getEngineSessionSeqId()) { getQueryReturnValue().setReturnValue(jobWithSteps); } } else { getQueryReturnValue().setReturnValue(jobWithSteps); } }
Source:
<code>public static IonDatagram[] roundTripDatagram(IonDatagram input) throws IOException{ IonSystem system = IonSystemBuilder.standard().build(); IonLoader loader = system.getLoader(); ByteArrayOutputStream textOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream binaryOutputStream = new ByteArrayOutputStream(); IonWriter textWriter = IonTextWriterBuilder.standard().build(textOutputStream); IonWriter binaryWriter = IonBinaryWriterBuilder.standard().build(binaryOutputStream); IonReader reader = system.newReader(input); textWriter.writeValues(reader); <START> textWriter.close(); <END> reader = system.newReader(input); binaryWriter.writeValues(reader); binaryWriter.close(); IonDatagram[] data = new IonDatagram[3]; data[0] = input; data[1] = loader.load(new ByteArrayInputStream(textOutputStream.toByteArray())); data[2] = loader.load(new ByteArrayInputStream(binaryOutputStream.toByteArray())); return data; }</code><technical_language>Put in a try/finally textWriter is closed</technical_language>

Target:
public static IonDatagram[] roundTripDatagram(IonDatagram input) throws IOException { IonSystem system = IonSystemBuilder.standard().build(); IonLoader loader = system.getLoader(); ByteArrayOutputStream textOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream binaryOutputStream = new ByteArrayOutputStream(); IonReader textReader = null, binaryReader = null; IonWriter textWriter = null, binaryWriter = null; IonDatagram[] data = new IonDatagram[3]; try { textReader = system.newReader(input); textWriter = IonTextWriterBuilder.standard().build(textOutputStream); textWriter.writeValues(textReader); binaryWriter = IonBinaryWriterBuilder.standard().build(binaryOutputStream); binaryReader = system.newReader(input); binaryWriter.writeValues(binaryReader); } finally { textWriter.close(); binaryWriter.close(); textReader.close(); binaryReader.close(); } data[0] = input; data[1] = loader.load(new ByteArrayInputStream(textOutputStream.toByteArray())); data[2] = loader.load(new ByteArrayInputStream(binaryOutputStream.toByteArray())); return data; }
Source:
<code>ReplicationConfig(final Injector injector, final WorkQueue workQueue, final RemoteConfig rc, final Config cfg, SchemaFactory<ReviewDb> db, final ReplicationUser.Factory replicationUserFactory) { remote = rc; delay = Math.max(0, getInt(rc, cfg, "replicationdelay", 15)); final int poolSize = Math.max(0, getInt(rc, cfg, "threads", 1)); final String poolName = "ReplicateTo-" + rc.getName(); pool = workQueue.createQueue(poolSize, poolName); String[] authGroupNames = cfg.getStringList("remote", rc.getName(), "authGroup"); authEnabled = authGroupNames.length > 0; Set<AccountGroup.Id> authGroups = <START> ReplicationConfig.groupsFor(db, authGroupNames); <END> final ReplicationUser remoteUser = replicationUserFactory.create(authGroups); projectControlFactory = injector.createChildInjector(new AbstractModule() { @Override protected void configure() { bind(CurrentUser.class).toInstance(remoteUser); } }).getInstance(ProjectControl.Factory.class); opFactory = injector.createChildInjector(new AbstractModule() { @Override protected void configure() { bind(PushReplication.ReplicationConfig.class).toInstance( ReplicationConfig.this); bind(RemoteConfig.class).toInstance(remote); bind(PushOp.Factory.class).toProvider( FactoryProvider.newFactory(PushOp.Factory.class, PushOp.class)); } }).getInstance(PushOp.Factory.class); }</code><technical_language>Style-nit: include class name calling private static method in class declared in</technical_language>

Target:
ReplicationConfig(final Injector injector, final WorkQueue workQueue, final RemoteConfig rc, final Config cfg, SchemaFactory<ReviewDb> db, final ReplicationUser.Factory replicationUserFactory) { remote = rc; delay = Math.max(0, getInt(rc, cfg, "replicationdelay", 15)); final int poolSize = Math.max(0, getInt(rc, cfg, "threads", 1)); final String poolName = "ReplicateTo-" + rc.getName(); pool = workQueue.createQueue(poolSize, poolName); String[] authGroupNames = cfg.getStringList("remote", rc.getName(), "authGroup"); authEnabled = authGroupNames.length > 0; Set<AccountGroup.Id> authGroups = groupsFor(db, authGroupNames); final ReplicationUser remoteUser = replicationUserFactory.create(authGroups); projectControlFactory = injector.createChildInjector(new AbstractModule() { @Override protected void configure() { bind(CurrentUser.class).toInstance(remoteUser); } }).getInstance(ProjectControl.Factory.class); opFactory = injector.createChildInjector(new AbstractModule() { @Override protected void configure() { bind(PushReplication.ReplicationConfig.class).toInstance( ReplicationConfig.this); bind(RemoteConfig.class).toInstance(remote); bind(PushOp.Factory.class).toProvider( FactoryProvider.newFactory(PushOp.Factory.class, PushOp.class)); } }).getInstance(PushOp.Factory.class); }
Source:
<code>protected void postLoad(Group group, Version loadedVersion) { EList<Viewpoint> ownedViewpoints = group.getOwnedViewpoints(); for (Viewpoint viewpoint : ownedViewpoints) { for (TableDescription tableDescription : Iterables.filter(viewpoint.getOwnedRepresentations(), TableDescription.class)) { <START> Iterator<EObject> creationTools = Iterators.filter(tableDescription.eAllContents(), Predicates.instanceOf(CreateTool.class)); while (creationTools.hasNext()) { AbstractToolDescription tool = (AbstractToolDescription) creationTools.next(); tool.setElementsToSelect(ELEMENTS_TO_SELECT_EXPRESSION); } <END> } if (!Iterables.filter(viewpoint.getOwnedJavaExtensions(), new Predicate<JavaExtension>() { @Override public boolean apply(JavaExtension input) { return JAVA_EXTENSION_QUALIFIED_NAME.equals(input.getQualifiedClassName()); } }).iterator().hasNext()) { JavaExtension javaExtension = DescriptionFactory.eINSTANCE.createJavaExtension(); javaExtension.setQualifiedClassName(JAVA_EXTENSION_QUALIFIED_NAME); viewpoint.getOwnedJavaExtensions().add(javaExtension); } } }</code><technical_language>more simple Iterator<CreateTool> creationTools = Iterators.filter(tableDescription.eAllContents(), CreateTool.class); while (creationTools.hasNext()) { CreateTool tool = creationTools.next(); tool.setElementsToSelect(ELEMENTS_TO_SELECT_EXPRESSION); }</technical_language>

Target:
protected void postLoad(Group group, Version loadedVersion) { if (loadedVersion.compareTo(MIGRATION_VERSION) < 0) { EList<Viewpoint> ownedViewpoints = group.getOwnedViewpoints(); for (Viewpoint viewpoint : ownedViewpoints) { boolean atLeastOneChange = false; for (TableDescription tableDescription : Iterables.filter(viewpoint.getOwnedRepresentations(), TableDescription.class)) { Iterator<CreateTool> creationTools = Iterators.filter(tableDescription.eAllContents(), CreateTool.class); while (creationTools.hasNext()) { CreateTool tool = creationTools.next(); tool.setElementsToSelect(ELEMENTS_TO_SELECT_EXPRESSION); atLeastOneChange = true; } } if (atLeastOneChange) { if (!Iterables.any(viewpoint.getOwnedJavaExtensions(), new Predicate<JavaExtension>() { @Override public boolean apply(JavaExtension input) { return JAVA_EXTENSION_QUALIFIED_NAME.equals(input.getQualifiedClassName()); } })) { JavaExtension javaExtension = DescriptionFactory.eINSTANCE.createJavaExtension(); javaExtension.setQualifiedClassName(JAVA_EXTENSION_QUALIFIED_NAME); viewpoint.getOwnedJavaExtensions().add(javaExtension); } } } } }
Source:
<code>public void of(TableReader reader, int columnIndex) { this.symbolMapReader = reader.getSymbolMapReader(columnIndex); this.numberOfSymbols = symbolMapReader.size(); this.reader = reader; <START> this.recordA.of(reader, columnIndex); <END> this.recordB.of(reader, columnIndex); }</code><technical_language>need pass TableReader record. Record needs SymbolMapReader</technical_language>

Target:
public void of(TableReader reader, int columnIndex) { this.reader = reader; this.symbolMapReader = reader.getSymbolMapReader(columnIndex); this.numberOfSymbols = symbolMapReader.size() + (symbolMapReader.containsNullValue() ? 1 : 0); this.recordA.reset(); }
Source:
<code>private Collection<Snapshot> getSnapshotsToBeExportedWithMemory() { if (getParameters().getCopyCollapse()) { Snapshot activeSnapshot = snapshotDao.get(getVmId(), SnapshotType.ACTIVE); return !activeSnapshot.getMemoryVolume().isEmpty() ? Collections.singleton(activeSnapshot) : Collections.emptyList(); } else <START> { <END> return snapshotDao.getAll(getVmId()).stream().filter(s -> !StringUtils.EMPTY.equals(s.getMemoryVolume())) .map(Function.identity()).collect(Collectors.toList()); } }</code><technical_language>Previously snapshots inserted a hash map. means if snapshots ID (memoryVolume), in list of snapshots db remained. collect a list, means more snapshots before. happen if get identical values getMemoryVolume(). ok it</technical_language>

Target:
private Collection<Snapshot> getSnapshotsToBeExportedWithMemory() { if (getParameters().getCopyCollapse()) { Snapshot activeSnapshot = snapshotDao.get(getVmId(), SnapshotType.ACTIVE); return !activeSnapshot.getMemoryVolume().isEmpty() ? Collections.singleton(activeSnapshot) : Collections.emptyList(); } else { return snapshotDao.getAll(getVmId()).stream().filter(s -> !StringUtils.EMPTY.equals(s.getMemoryVolume())) .collect(Collectors.toList()); } }
Source:
<code>static URI addHostIfMissing(URI original, URI withHost) { checkNotNull(withHost, "URI withHost cannot be null"); checkArgument(withHost.getHost() != null, "URI withHost must have host:" + withHost); if (original == null) return null; if (original.getHost() != null) return original; <START> URI baseURI = withHost; <END> if (!withHost.toString().endsWith("/")){ baseURI = URI.create(withHost.toString() + "/"); } return baseURI.resolve(original); }</code><technical_language>inline if avoid creating a variable reassign immediately after</technical_language>

Target:
static URI addHostIfMissing(URI original, URI withHost) { checkNotNull(withHost, "URI withHost cannot be null"); checkArgument(withHost.getHost() != null, "URI withHost must have host:" + withHost); if (original == null) return null; if (original.getHost() != null) return original; String host = withHost.toString(); URI baseURI = host.endsWith("/") ? withHost : URI.create(host + "/"); return baseURI.resolve(original); }
Source:
<code>private Map<JdbcType, TypeHandler<?>> getJdbcHandlerMap(Type type) { Map<JdbcType, TypeHandler<?>> jdbcHandlerMap = typeHandlerMap.get(type); if (NULL_TYPE_HANDLER_MAP.equals(jdbcHandlerMap)) { return null; } if (jdbcHandlerMap == null && type instanceof Class) { Class<?> clazz = (Class<?>) type; <START> if (clazz.isEnum() || (clazz.isAnonymousClass() && clazz.getEnclosingClass().isEnum())) { <END> clazz = clazz.isAnonymousClass() ? clazz.getEnclosingClass() : clazz; jdbcHandlerMap = getJdbcHandlerMapForEnumInterfaces(clazz, clazz); if (jdbcHandlerMap == null) { register(clazz, getInstance(clazz, defaultEnumTypeHandler)); return typeHandlerMap.get(clazz); } } else { jdbcHandlerMap = getJdbcHandlerMapForSuperclass(clazz); } } typeHandlerMap.put(type, jdbcHandlerMap == null ? NULL_TYPE_HANDLER_MAP : jdbcHandlerMap); return jdbcHandlerMap; }</code><technical_language>I check works, test please? suggestion if (Enum.class.isAssignableFrom(clazz)) {</technical_language>

Target:
private Map<JdbcType, TypeHandler<?>> getJdbcHandlerMap(Type type) { Map<JdbcType, TypeHandler<?>> jdbcHandlerMap = typeHandlerMap.get(type); if (NULL_TYPE_HANDLER_MAP.equals(jdbcHandlerMap)) { return null; } if (jdbcHandlerMap == null && type instanceof Class) { Class<?> clazz = (Class<?>) type; if (Enum.class.isAssignableFrom(clazz)) { Class<?> enumClass = clazz.isAnonymousClass() ? clazz.getSuperclass() : clazz; jdbcHandlerMap = getJdbcHandlerMapForEnumInterfaces(enumClass, enumClass); if (jdbcHandlerMap == null) { register(enumClass, getInstance(enumClass, defaultEnumTypeHandler)); return typeHandlerMap.get(enumClass); } } else { jdbcHandlerMap = getJdbcHandlerMapForSuperclass(clazz); } } typeHandlerMap.put(type, jdbcHandlerMap == null ? NULL_TYPE_HANDLER_MAP : jdbcHandlerMap); return jdbcHandlerMap; }
Source:
<code>public void visit(String name, Object value) { checkNotNull(name, "name"); switch (name) { case "id": if (!(value instanceof String)) { <START> throw new InvalidPluginException("Plugin annotation has invalid element 'id'"); <END> } this.id = (String) value; return; case "version": if (!(value instanceof String)) { throw new InvalidPluginException("Plugin annotation has invalid element 'version'"); } this.version = (String) value; return; case "optional": if (!(value instanceof Boolean)) { throw new InvalidPluginException("Plugin annotation has invalid element 'optional'"); } this.optional = (boolean) value; return; default: super.visit(name, value); } }</code><technical_language>Plugin annotation -> Dependency annotation for exceptions in this file</technical_language>

Target:
public void visit(String name, Object value) { checkNotNull(name, "name"); switch (name) { case "id": if (!(value instanceof String)) { throw new InvalidPluginException("Dependency annotation has invalid element 'id'"); } this.id = (String) value; return; case "version": if (!(value instanceof String)) { throw new InvalidPluginException("Dependency annotation has invalid element 'version'"); } this.version = (String) value; return; case "optional": if (!(value instanceof Boolean)) { throw new InvalidPluginException("Dependency annotation has invalid element 'optional'"); } this.optional = (boolean) value; return; default: super.visit(name, value); } }
Source:
<code>public void referenceNonExistentCaseId() { MockDataUtils.parseIntoSandbox(this.getClass().getResourceAsStream("/case_create_basic.xml"), sandbox); EvaluationContext ec = MockDataUtils.getInstanceContexts(sandbox, "casedb", CaseTestUtils.CASE_INSTANCE); <START> Assert.assertTrue(CaseTestUtils.xpathEval(ec, "instance('casedb')/casedb/case[@case_id = 'no-case']", "")); <END> }</code><technical_language>Oh, hm, good question. I dereferenced another value, requested raw is fine for return ""</technical_language>

Target:
public void referenceNonExistentCaseId() throws XPathSyntaxException { MockDataUtils.parseIntoSandbox(this.getClass().getResourceAsStream("/case_create_basic.xml"), sandbox); EvaluationContext ec = MockDataUtils.buildContextWithInstance(sandbox, "casedb", CaseTestUtils.CASE_INSTANCE); Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(ec, "instance('casedb')/casedb/case[@case_id = 'no-case']", "")); }
Source:
<code>public void onNext(FailedEvaluator evaluator) { LOG.log(Level.WARNING, "Container:{0} failed", evaluator.getId()); HeronWorker worker = multiKeyWorkerMap.lookupByEvaluatorId(evaluator.getId()); <START> if (worker == null) { <END> LOG.log(Level.WARNING, "Unknown executor id for failed container: {0}, skip renew action", evaluator.getId()); return; } LOG.log(Level.INFO, "Trying to relaunch executor {0} running on failed container {1}", new Object[]{worker.workerId, evaluator.getId()}); multiKeyWorkerMap.detachEvaluatorAndRemove(worker); try { launchContainerForExecutor(worker); } catch (ContainerAllocationException e) { LOG.log(Level.SEVERE, "Failed to relaunch failed container: " + worker.workerId, e); } }</code><technical_language>Optional in lookupByEvaluatorId(..)</technical_language>

Target:
public void onNext(FailedEvaluator evaluator) { LOG.log(Level.WARNING, "Container:{0} failed", evaluator.getId()); Optional<HeronWorker> worker = multiKeyWorkerMap.lookupByEvaluatorId(evaluator.getId()); if (!worker.isPresent()) { LOG.log(Level.WARNING, "Unknown executor id for failed container: {0}, skip renew action", evaluator.getId()); return; } LOG.log(Level.INFO, "Trying to relaunch executor {0} running on failed container {1}", new Object[]{worker.get().workerId, evaluator.getId()}); multiKeyWorkerMap.detachEvaluatorAndRemove(worker.get()); try { launchContainerForExecutor(worker.get()); } catch (ContainerAllocationException e) { LOG.log(Level.SEVERE, "Failed to relaunch failed container: " + worker.get().workerId, e); } }
Source:
<code>private RefUpdate.Result modify(TreeOperation op, ChangeEdit edit, String file, byte[] content) throws AuthException, IOException, InvalidChangeOperationException { if (!currentUser.get().isIdentifiedUser()) { throw new AuthException("Authentication required"); } IdentifiedUser me = (IdentifiedUser) currentUser.get(); Repository repo = gitManager.openRepository(edit.getChange().getProject()); try { RevWalk rw = new RevWalk(repo); ObjectInserter inserter = repo.newObjectInserter(); ObjectReader reader = repo.newObjectReader(); try { String refName = edit.getRefName(); RevCommit prevEdit = edit.getEditCommit(); RevCommit base = prevEdit.getParent(0); base = rw.parseCommit(base); <START> if (base.getParentCount() == 0) { <END> throw new InvalidChangeOperationException( "Modify edit against root commit not implemented"); } ObjectId newTree = writeNewTree(op, repo, rw, inserter, prevEdit, reader, file, content, base); if (ObjectId.equals(newTree, prevEdit.getTree())) { throw new InvalidChangeOperationException("no changes were made"); } ObjectId commit = createCommit(me, inserter, prevEdit, base, newTree); inserter.flush(); return update(repo, me, refName, rw, prevEdit, commit); } finally { rw.release(); inserter.release(); reader.release(); } } finally { repo.close(); } }</code><technical_language>This is longer accurate, edit a root commit is prevEdit.getParentCount() == 0. this check need get moved getParent(0) l. 296</technical_language>

Target:
private RefUpdate.Result modify(TreeOperation op, ChangeEdit edit, String file, byte[] content) throws AuthException, IOException, InvalidChangeOperationException { if (!currentUser.get().isIdentifiedUser()) { throw new AuthException("Authentication required"); } IdentifiedUser me = (IdentifiedUser) currentUser.get(); Repository repo = gitManager.openRepository(edit.getChange().getProject()); try { RevWalk rw = new RevWalk(repo); ObjectInserter inserter = repo.newObjectInserter(); ObjectReader reader = repo.newObjectReader(); try { String refName = edit.getRefName(); RevCommit prevEdit = edit.getEditCommit(); if (prevEdit.getParentCount() == 0) { throw new InvalidChangeOperationException( "Modify edit against root commit not implemented"); } RevCommit base = prevEdit.getParent(0); base = rw.parseCommit(base); ObjectId newTree = writeNewTree(op, repo, rw, inserter, prevEdit, reader, file, content, base); if (ObjectId.equals(newTree, prevEdit.getTree())) { throw new InvalidChangeOperationException("no changes were made"); } ObjectId commit = createCommit(me, inserter, prevEdit, base, newTree); inserter.flush(); return update(repo, me, refName, rw, prevEdit, commit); } finally { rw.release(); inserter.release(); reader.release(); } } finally { repo.close(); } }
Source:
<code>private String getInboundReplyToHeader(WebServiceContext context) { MessageContext messageContext = context.getMessageContext(); if (messageContext == null || !(messageContext instanceof WrappedMessageContext)) { return null; } Message message = ((WrappedMessageContext) messageContext).getWrappedMessage(); AddressingProperties maps = (AddressingProperties) message.get(NhincConstants.INBOUND_REPLY_TO_HEADER); <START> return (maps.getReplyTo().getAddress().getValue()); <END> }</code><technical_language>Unnecessary parens return value</technical_language>

Target:
private String getInboundReplyToHeader(WebServiceContext context) { MessageContext messageContext = context.getMessageContext(); if (messageContext == null || !(messageContext instanceof WrappedMessageContext)) { return null; } Message message = ((WrappedMessageContext) messageContext).getWrappedMessage(); AddressingProperties maps = (AddressingProperties) message.get(NhincConstants.INBOUND_REPLY_TO_HEADER); return maps.getReplyTo().getAddress().getValue(); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PlanNodeStatsEstimate that = (PlanNodeStatsEstimate) o; <START> return Double.compare(that.outputRowCount, outputRowCount) == 0 && <END> Double.compare(that.outputSizeInBytes, outputSizeInBytes) == 0 && Objects.equals(symbolStatistics, that.symbolStatistics); }</code><technical_language>Change Object.equals Double.compare part of previous commit</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PlanNodeStatsEstimate that = (PlanNodeStatsEstimate) o; return Double.compare(outputRowCount, that.outputRowCount) == 0 && Objects.equals(symbolStatistics, that.symbolStatistics); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } <START> Rule<?> rule = (Rule<?>) o; <END> return Objects.equals(ruleType, rule.ruleType) && Objects.equals(name, rule.name) && Objects.equals(visibility, rule.visibility) && Objects.equals(labels, rule.labels) && Objects.equals(extraBuckOpts, rule.extraBuckOpts); }</code><technical_language>do name? a single buck file rules name</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Rule<?> rule = (Rule<?>) o; return Objects.equals(name, rule.name); }
Source:
<code>protected <T, X> void createObserverMethod(RIBean<X> declaringBean, BeanManagerImpl beanManager, EnhancedAnnotatedMethod<T, ? super X> method, Set<ObserverInitializationContext<?, ?>> observerMethodInitializers, boolean isAsync) { ObserverMethodImpl<T, X> observer = ObserverFactory.create(method, declaringBean, beanManager, isAsync); ObserverInitializationContext<T, X> observerMethodInitializer = ObserverInitializationContext.of(observer, method); <START> if (Observers.CONTAINER_LIFECYCLE_EVENT_TYPES.contains(Reflections.getRawType(observer.getObservedType()))) { <END> if (isAsync) { throw EventLogger.LOG.asyncContainerLifecycleEventObserver(observer, Formats.formatAsStackTraceElement(method.getJavaMember())); } if (method.isStatic()) { throw EventLogger.LOG.staticContainerLifecycleEventObserver(observer, Formats.formatAsStackTraceElement(method.getJavaMember())); } } observerMethodInitializers.add(observerMethodInitializer); }</code><technical_language>Actually, I replace CONTAINER_LIFECYCLE_EVENT_TYPES.contains() Observers.isContainerLifecycleObserverMethod()..</technical_language>

Target:
protected <T, X> void createObserverMethod(RIBean<X> declaringBean, BeanManagerImpl beanManager, EnhancedAnnotatedMethod<T, ? super X> method, Set<ObserverInitializationContext<?, ?>> observerMethodInitializers, boolean isAsync) { ObserverMethodImpl<T, X> observer = ObserverFactory.create(method, declaringBean, beanManager, isAsync); ObserverInitializationContext<T, X> observerMethodInitializer = ObserverInitializationContext.of(observer, method); if (Observers.isContainerLifecycleObserverMethod(observer)) { if (isAsync) { throw EventLogger.LOG.asyncContainerLifecycleEventObserver(observer, Formats.formatAsStackTraceElement(method.getJavaMember())); } if (method.isStatic()) { throw EventLogger.LOG.staticContainerLifecycleEventObserver(observer, Formats.formatAsStackTraceElement(method.getJavaMember())); } } observerMethodInitializers.add(observerMethodInitializer); }
Source:
<code><START> private Cohort getCohort() { <END> return cohort; }</code><technical_language>getter public, setter private</technical_language>

Target:
public Cohort getCohort() { return cohort; }
Source:
<code>public synchronized void asyncRefresh() { Duration sinceUpdate = nanosSince(lastUpdateNanos.get()); if (sinceUpdate.toMillis() > 1_000 && future.get() == null) { ListenableFuture<Integer> responseFuture = thriftClient.getServerState(); <START> future.compareAndSet(null, responseFuture); <END> Futures.addCallback(responseFuture, new FutureCallback<Integer>() { @Override public void onSuccess(@Nullable Integer result) { lastUpdateNanos.set(System.nanoTime()); future.compareAndSet(responseFuture, null); if (result != null) { nodeState.set(Optional.of(NodeState.valueOf(result))); } } @Override public void onFailure(Throwable t) { lastUpdateNanos.set(System.nanoTime()); future.compareAndSet(responseFuture, null); } }, directExecutor()); } }</code><technical_language>If this returns false, want cancel it</technical_language>

Target:
public void asyncRefresh() { Duration sinceUpdate = nanosSince(lastUpdateNanos.get()); if (sinceUpdate.toMillis() > 1_000 && requestInflight.compareAndSet(false, true)) { ListenableFuture<Integer> responseFuture = thriftClient.getServerState(); Futures.addCallback(responseFuture, new FutureCallback<Integer>() { @Override public void onSuccess(@Nullable Integer result) { lastUpdateNanos.set(System.nanoTime()); requestInflight.compareAndSet(true, false); if (result != null) { nodeState.set(Optional.of(NodeState.valueOf(result))); } } @Override public void onFailure(Throwable t) { lastUpdateNanos.set(System.nanoTime()); requestInflight.compareAndSet(true, false); } }, directExecutor()); } }
Source:
<code>protected boolean isPassthrough( StepField originalFieldName ) { String[] inFields = baseStepMeta.getFieldInStream(); String origFieldName = originalFieldName.getFieldName(); boolean isPassthrough = true; for ( int i = 0; i < inFields.length; i++ ) { if ( inFields[i].equals( origFieldName ) && Const.isEmpty( baseStepMeta.getFieldOutStream()[i] ) ) { <START> isPassthrough = false; <END> } } return isPassthrough; }</code><technical_language>want short circuit loop (break out of it)</technical_language>

Target:
protected boolean isPassthrough( StepField originalFieldName ) { String[] inFields = baseStepMeta.getFieldInStream(); String origFieldName = originalFieldName.getFieldName(); for ( int i = 0; i < inFields.length; i++ ) { if ( inFields[i].equals( origFieldName ) && Const.isEmpty( baseStepMeta.getFieldOutStream()[i] ) ) { return false; } } return true; }
Source:
<code>public Iterator<ImageTypeSpecifier> getImageTypes(int pImageIndex) throws IOException { checkBounds(pImageIndex); <START> return Collections.singletonList(getRawImageType(pImageIndex)).iterator(); <END> }</code><technical_language>TODO changed line reason for a multi list here... of course, change this return multiple values</technical_language>

Target:
public Iterator<ImageTypeSpecifier> getImageTypes(int pImageIndex) throws IOException { checkBounds(pImageIndex); return Arrays.asList(getRawImageType(pImageIndex)).iterator(); }
Source:
<code>public static String generateToString(final ImmutableList<String> enumValues) { final StringBuilder outputBuilder = new StringBuilder(); final int numEnumValues = enumValues.size(); <START> if (numEnumValues <= 0) { <END> LOG.warn("Empty enumValues list."); return ""; } for (int currentEnum = 0; currentEnum < numEnumValues; currentEnum++) { outputBuilder.append(indent(1)); if (currentEnum > 0) { outputBuilder.append("} else "); } final String currentEnumName = enumValues.get(currentEnum); outputBuilder.append("if (input == ").append(currentEnumName).append(") {\n"); outputBuilder.append(indent(2)).append("return \"").append(currentEnumName).append("\";\n"); } outputBuilder.append(indent(1)).append("} else {\n"); outputBuilder.append(indent(2)).append("return \"\";\n"); outputBuilder.append(indent(1)).append("}\n"); return outputBuilder.toString(); }</code><technical_language>isEmpty(enumValues) instead of checking size</technical_language>

Target:
public static String generateToString(final ImmutableList<String> enumValues) { if (isEmpty(enumValues)) { LOG.warn("Empty enumValues list."); return ""; } final int numEnumValues = enumValues.size(); final StringBuilder outputBuilder = new StringBuilder(); for (int currentEnum = 0; currentEnum < numEnumValues; currentEnum++) { outputBuilder.append(indent(1)); if (currentEnum > 0) { outputBuilder.append("} else "); } final String currentEnumName = enumValues.get(currentEnum); outputBuilder.append("if (input == ").append(currentEnumName).append(") {\n"); outputBuilder.append(indent(2)).append("return \"").append(currentEnumName).append("\";\n"); } outputBuilder.append(indent(1)).append("} else {\n"); outputBuilder.append(indent(2)).append("return \"\";\n"); outputBuilder.append(indent(1)).append("}\n"); return outputBuilder.toString(); }
Source:
<code>public @Nullable String transform(String filename, String source) throws TransformationException { Objects.requireNonNull(filename, "the given parameter 'filename' must not be null"); <START> Objects.requireNonNull(source, "the given parameter 'source' must not be null"); <END> final long startTime = System.currentTimeMillis(); logger.debug("about to transform '{}' by the JavaScript '{}'", source, filename); String result = ""; try { final CompiledScript cScript = manager.getScript(filename); final Bindings bindings = cScript.getEngine().createBindings(); bindings.put("input", source); result = String.valueOf(cScript.eval(bindings)); return result; } catch (ScriptException e) { throw new TransformationException("An error occurred while executing script. " + e.getMessage(), e); } finally { logger.trace("JavaScript execution elapsed ms. Result: {}", System.currentTimeMillis() - startTime, result); } }</code><technical_language>change TransformationException a NullPointerException</technical_language>

Target:
public @Nullable String transform(String filename, String source) throws TransformationException { if (filename == null || source == null) { throw new TransformationException("the given parameters 'filename' and 'source' must not be null"); } final long startTime = System.currentTimeMillis(); logger.debug("about to transform '{}' by the JavaScript '{}'", source, filename); String result = ""; try { final CompiledScript cScript = manager.getScript(filename); final Bindings bindings = cScript.getEngine().createBindings(); bindings.put("input", source); result = String.valueOf(cScript.eval(bindings)); return result; } catch (ScriptException e) { throw new TransformationException("An error occurred while executing script. " + e.getMessage(), e); } finally { logger.trace("JavaScript execution elapsed ms. Result: {}", System.currentTimeMillis() - startTime, result); } }
Source:
<code><START> void shouldSerializeCustomProblem() { <END> final int balance = 10; final int debit = 100; final Problem problem = new InsufficientFundsProblem(balance, debit); final String json = gson.toJson(problem); assertThat("json", Objects.nonNull(json)); with(json) .assertThat("$.type", is(InsufficientFundsProblem.TYPE_VALUE)) .assertThat("$.title", is("Insufficient Funds")) .assertThat("$.status", is(BAD_REQUEST.getStatusCode())) .assertThat("$.balance", is(balance)) .assertThat("$.debit", is(debit)); }</code><technical_language>Is serialize a custom problem registered before</technical_language>

Target:
void shouldSerializeCustomProblem() { final int balance = 10; final int debit = 100; final InsufficientFundsProblem problem = new InsufficientFundsProblem(balance, debit); problem.set("foo", "bar"); final String json = gson.toJson(problem); assertThat("json", Objects.nonNull(json)); System.out.println(json); with(json) .assertThat("$.*", hasSize(6)) .assertThat("$.type", is(InsufficientFundsProblem.TYPE_VALUE)) .assertThat("$.title", is("Insufficient Funds")) .assertThat("$.status", is(BAD_REQUEST.getStatusCode())) .assertThat("$.foo", is("bar")) .assertThat("$.balance", is(balance)) .assertThat("$.debit", is(debit)); }
Source:
<code>public Object evalRaw(DataInstance model, EvaluationContext evalContext) { try { return FunctionUtils.unpack(expr.eval(model, evalContext)); } catch (XPathUnsupportedException e) { if (xpath != null) { throw new XPathUnsupportedException(xpath); } else { <START> if (evalContext.isConstraint) { <END> String contextMessage = String.format(" Question with id: \'%s\' has issue with condition expression: \'%s\'", evalContext.getContextRef().getNameLast(), expr); e.setMessagePrefix(contextMessage); } throw e; } } }</code><technical_language>@rristovic specific reason need add this condition</technical_language>

Target:
public Object evalRaw(DataInstance model, EvaluationContext evalContext) { try { return FunctionUtils.unpack(expr.eval(model, evalContext)); } catch (XPathUnsupportedException e) { if (xpath != null) { throw new XPathUnsupportedException(xpath); } else { String contextMessage = String.format("Error calculating expression: \"%s\", being calculated for \"%s\"", expr.toPrettyString(), evalContext.getContextRef()); throw new XPathUnsupportedException(contextMessage); } } }
Source:
<code>private void tryPushItem() { boolean emptySlot = false; for (IExtInvSlot slot : InventoryIterator.get(this)) { <START> if (slot.getStack().getCount() == slot.maxStackSize()) { <END> ItemStack left = TrainTransferHelper.INSTANCE.pushStack(this, slot.getStack()); if (InvTools.isEmpty(left)) { emptySlot = true; } slot.setStack(left); } else if (!slot.hasStack()) { emptySlot = true; } } if (emptySlot) return; for (IExtInvSlot slot : InventoryIterator.get(this)) { ItemStack left = TrainTransferHelper.INSTANCE.pushStack(this, slot.getStack()); slot.setStack(left); if (InvTools.isEmpty(left)) { return; } } }</code><technical_language>want consider ItemStack max stack size well, slot max capacity</technical_language>

Target:
private void tryPushItem() { boolean emptySlot = false; for (IExtInvSlot slot : InventoryIterator.get(this)) { if (slot.getStack().getCount() == slot.getMaxStackSize()) { ItemStack left = TrainTransferHelper.INSTANCE.pushStack(this, slot.getStack()); if (InvTools.isEmpty(left)) { emptySlot = true; } slot.setStack(left); } else if (!slot.hasStack()) { emptySlot = true; } } if (emptySlot) return; for (IExtInvSlot slot : InventoryIterator.get(this)) { ItemStack left = TrainTransferHelper.INSTANCE.pushStack(this, slot.getStack()); slot.setStack(left); if (InvTools.isEmpty(left)) { return; } } }
Source:
<code>public static void startAndSetupContainer() throws Exception { <START> LOGGER.info("*** starting server"); <END> controller.start(); ManagementClient managementClient = controller.getClient(); LOGGER.info("*** will configure server now"); serverSetup(managementClient.getControllerClient()); LOGGER.info("*** reloading server"); reloadServer(); }</code><technical_language>trace</technical_language>

Target:
public static void startAndSetupContainer() throws Exception { controller.start(); ManagementClient managementClient = controller.getClient(); serverSetup(managementClient.getControllerClient()); reloadServer(); }
Source:
<code>public CharSequence getPageTitle(int position) { <START> if (position < mTabsTitle.length) <END> return mTabsTitle[position]; return null; }</code><technical_language>{ }</technical_language>

Target:
public CharSequence getPageTitle(int position) { return mTabsTitle[position]; }
Source:
<code>public DiscoveryResult build() { return new DiscoveryResultImpl(thingTypeUID, thingUID, bridgeUID, properties, representationProperty, label, <START> ttl, null); <END> }</code><technical_language>I agree @sjka require users of Builder add a new method call everywhere, derived automatically (or stay null, if is a mandatory property)</technical_language>

Target:
public DiscoveryResult build() { return new DiscoveryResultImpl(thingTypeUID, thingUID, bridgeUID, properties, representationProperty, label, ttl); }
Source:
<code>private ConfigurationBuilder getConfigurationBuilder(ConfigurationBuilderHolder holder, String name, boolean template, String baseConfigurationName) { <START> if (holder.getNamedConfigurationBuilders().get(name) != null) { <END> throw log.duplicateCacheName(name); } ConfigurationBuilder builder = holder.newConfigurationBuilder(name).template(template); if (baseConfigurationName != null) { ConfigurationBuilder baseConfigurationBuilder = holder.getNamedConfigurationBuilders().get(baseConfigurationName); if (baseConfigurationBuilder == null) { throw log.undeclaredConfiguration(baseConfigurationName, name); } Configuration baseConfiguration = baseConfigurationBuilder.build(); if (!baseConfiguration.isTemplate()) { throw log.noConfiguration(baseConfigurationName); } builder.read(baseConfiguration); } return builder; }</code><technical_language>containsKey</technical_language>

Target:
private ConfigurationBuilder getConfigurationBuilder(ConfigurationBuilderHolder holder, String name, boolean template, String baseConfigurationName) { if (holder.getNamedConfigurationBuilders().containsKey(name)) { throw log.duplicateCacheName(name); } ConfigurationBuilder builder = holder.newConfigurationBuilder(name).template(template); if (baseConfigurationName != null) { ConfigurationBuilder baseConfigurationBuilder = holder.getNamedConfigurationBuilders().get(baseConfigurationName); if (baseConfigurationBuilder == null) { throw log.undeclaredConfiguration(baseConfigurationName, name); } Configuration baseConfiguration = baseConfigurationBuilder.build(); if (!baseConfiguration.isTemplate()) { throw log.noConfiguration(baseConfigurationName); } builder.read(baseConfiguration); } return builder; }