auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SpecialPathInfo getSpecialPathInfo( Transfer transfer, String pkgType ) { if ( transfer != null ) { <START> return getSpecialPathInfo( transfer.getLocation(), transfer.getStoragePath(), pkgType ); <END> } return null; }</code><technical_language>This result in getPathInfo(..) executing calculating storage path of this storage path...I need pass in logical path (the getPath() output)</technical_language>

Target:
public SpecialPathInfo getSpecialPathInfo( Transfer transfer, String pkgType ) { if ( transfer != null ) { return getSpecialPathInfo( transfer.getLocation(), transfer.getPath(), pkgType ); } return null; }
Source:
<code>public void passesValidationForNullPaymentOutcome() { CreateTelephonePaymentRequest telephonePaymentRequest = telephoneRequestBuilder .paymentOutcome(null) .build();; Set<ConstraintViolation<CreateTelephonePaymentRequest>> constraintViolations = validator.validate(telephonePaymentRequest); assertThat(constraintViolations.size(), is(1)); assertThat(constraintViolations.iterator().next().getMessage().equals("Field [payment_outcome] must include a valid status and error code"), is(false)); <START> } <END></code><technical_language>If this PaymentOutcome level Set<ConstraintViolation<PaymentOutcome>> constraintViolations = validator.validate(telephonePaymentRequest); passesValidationForNullPaymentOutcome assertion assertThat(constraintViolations.isEmpty(), is(true)); , test actual constraint violation is (applies validation tests). For other validator tests - deepest validator level (which in some cases impossible difficult do), is general test for CreateTelephonePaymentRequest, checking for actual null violation a part of them</technical_language>

Target:
public void passesValidationForNullPaymentOutcome() { CreateTelephonePaymentRequest telephonePaymentRequest = telephoneRequestBuilder .withPaymentOutcome(null) .build();; Set<ConstraintViolation<CreateTelephonePaymentRequest>> constraintViolations = validator.validate(telephonePaymentRequest); assertThat(constraintViolations.size(), is(1)); assertThat(constraintViolations.iterator().next().getMessage().equals("Field [payment_outcome] must include a valid status and error code"), is(false)); }
Source:
<code>public AttributeDefinition getAttributeDefinition() { AttributeDefinition attr = new AttributeDefinition(); attr.setNamespace(AttributesManager.NS_MEMBER_ATTR_DEF); attr.setFriendlyName("mail"); <START> attr.setDisplayName("Mails"); <END> attr.setType(String.class.getName()); attr.setDescription("Member's trusted mail."); return attr; }</code><technical_language>"Mail" instead of "Mails". is trusted mail</technical_language>

Target:
public AttributeDefinition getAttributeDefinition() { AttributeDefinition attr = new AttributeDefinition(); attr.setNamespace(AttributesManager.NS_MEMBER_ATTR_DEF); attr.setFriendlyName("mail"); attr.setDisplayName("Mail"); attr.setType(String.class.getName()); attr.setDescription("Member's trusted mail."); return attr; }
Source:
<code>public void givenASinglePostRequestWhenResponseThenLog() throws InterruptedException { AtomicInteger completedReqs = new AtomicInteger(0); WSClient ws = play.test.WSTestClient.newClient(port); ws.url(url) .setContentType("application/x-www-form-urlencoded") .post("key1=value1&key2=value2") .thenAccept(r -> { log.debug("Thread#" + Thread.currentThread() .getId() + " Request complete: Response code = " + r.getStatus() + " | Response: " + r.getBody() + " | Current Time:" + System.currentTimeMillis()); completedReqs.incrementAndGet(); }); log.debug( "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis()); while (completedReqs.get() != 1) { Thread.sleep(100); <START> } <END> log.debug("All requests have been completed. Exiting test."); }</code><technical_language>Another good case for CountDownLatch</technical_language>

Target:
public void givenASinglePostRequestWhenResponseThenLog() throws Exception { CountDownLatch latch = new CountDownLatch(1); WSClient ws = play.test.WSTestClient.newClient(port); ws.url(url) .setContentType("application/x-www-form-urlencoded") .post("key1=value1&key2=value2") .thenAccept(r -> { log.debug("Thread#" + Thread.currentThread() .getId() + " Request complete: Response code = " + r.getStatus() + " | Response: " + r.getBody() + " | Current Time:" + System.currentTimeMillis()); latch.countDown(); }); log.debug( "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis()); latch.await(5, TimeUnit.SECONDS ); assertEquals(0, latch.getCount()); log.debug("All requests have been completed. Exiting test."); }
Source:
<code>private boolean isInDayset(String daysetName, ZonedDateTime date) { if (daysets.containsKey(daysetName)) { DayOfWeek dow = date.getDayOfWeek(); return daysets.get(daysetName).contains(dow); } else { <START> logger.warn("This dayset does is not configured : {}", daysetName); <END> return false; } }</code><technical_language>remove "does"</technical_language>

Target:
private boolean isInDayset(String daysetName, ZonedDateTime date) { if (daysets.containsKey(daysetName)) { DayOfWeek dow = date.getDayOfWeek(); return daysets.get(daysetName).contains(dow); } else { logger.warn("This dayset is not configured : {}", daysetName); return false; } }
Source:
<code>public static void main(String[] args) throws Exception { final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); <START> DataSet<String> text = getTextDataSet(env); <END> DataSet<Tuple2<String, Integer>> counts = text.flatMap(new LineSplitter()) .groupBy(0) .aggregate(Aggregations.SUM, 1); counts.print(); env.execute("WordCount Example"); }</code><technical_language>Inline this function</technical_language>

Target:
public static void main(String[] args) throws Exception { final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<String> text = env.fromElements( "To be, or not to be,--that is the question:--", "Whether 'tis nobler in the mind to suffer", "The slings and arrows of outrageous fortune", "Or to take arms against a sea of troubles," ); DataSet<Tuple2<String, Integer>> counts = text.flatMap(new LineSplitter()) .groupBy(0) .aggregate(Aggregations.SUM, 1); counts.print(); env.execute("WordCount Example"); }
Source:
<code>protected TestTransactionManager constructTestTransactionManager() { <START> return new WrappingTestTransactionManagerImpl( <END> metricsManager, keyValueService, timestampService, timestampService, lockClient, lockService, transactionService, conflictDetectionManager, sweepStrategyManager, sweepQueue, MoreExecutors.newDirectExecutorService(), transactionWrapper, keyValueServiceWrapper); }</code><technical_language>do need a constructTetsTransactionManager, is sufficient wrap before? confused</technical_language>

Target:
protected TestTransactionManager constructTestTransactionManager() { return new TestTransactionManagerImpl( metricsManager, keyValueService, timestampService, timestampService, lockClient, lockService, transactionService, conflictDetectionManager, sweepStrategyManager, sweepQueue, MoreExecutors.newDirectExecutorService(), transactionWrapper, keyValueServiceWrapper); }
Source:
<code>protected JoinAccumulator hashJoin(List<Tuple> tuples) { clearHashedInputs(); JoinAccumulator probe = new JoinAccumulator(); String firstStream = streamJoinOrder.get(0); for (Tuple t : tuples) { <START> TupleImpl tuple = (TupleImpl) t; <END> String streamId = getStreamSelector(tuple); if ( ! streamId.equals(firstStream) ) { Object key = getKeyField(streamId, tuple); ArrayList<TupleImpl> recs = hashedInputs.get(streamId).get(key); if(recs == null) { recs = new ArrayList<TupleImpl>(); hashedInputs.get(streamId).put(key, recs); } recs.add(tuple); } else { ResultRecord probeRecord = new ResultRecord(tuple, streamJoinOrder.size() == 1); probe.insert( probeRecord ); } } for (int i = 1; i < streamJoinOrder.size(); i++) { String streamName = streamJoinOrder.get(i) ; boolean finalJoin = (i==streamJoinOrder.size()-1); probe = doJoin(probe, hashedInputs.get(streamName), joinCriteria.get(streamName), finalJoin ); } return probe; }</code><technical_language>I do need typecast t TupleImpl methods tuple object in Tuple. So, want TupleImpl instead of Tuple</technical_language>

Target:
protected JoinAccumulator hashJoin(List<Tuple> tuples) { clearHashedInputs(); JoinAccumulator probe = new JoinAccumulator(); String firstStream = joinCriteria.keySet().iterator().next(); for (Tuple tuple : tuples) { String streamId = getStreamSelector(tuple); if ( ! streamId.equals(firstStream) ) { Object key = getKeyField(streamId, tuple); ArrayList<Tuple> recs = hashedInputs.get(streamId).get(key); if(recs == null) { recs = new ArrayList<Tuple>(); hashedInputs.get(streamId).put(key, recs); } recs.add(tuple); } else { ResultRecord probeRecord = new ResultRecord(tuple, joinCriteria.size() == 1); probe.insert( probeRecord ); } } int i=0; for (String streamName : joinCriteria.keySet() ) { boolean finalJoin = (i==joinCriteria.size()-1); if(i>0) { probe = doJoin(probe, hashedInputs.get(streamName), joinCriteria.get(streamName), finalJoin); } ++i; } return probe; }
Source:
<code>protected static ModelNode executeWhoAmI() throws IOException { <START> ModelControllerClient client = ModelControllerClient.Factory <END> .create(new ModelControllerClientConfiguration.Builder().setHostName(TestSuiteEnvironment.getServerAddress()) .setPort(PORT_NATIVE).setProtocol("remote").setConnectionTimeout(CONNECTION_TIMEOUT_IN_MS).build()); ModelNode operation = new ModelNode(); operation.get("operation").set("whoami"); operation.get("verbose").set("true"); return client.execute(operation); }</code><technical_language>This in a try-with-resources block</technical_language>

Target:
protected static ModelNode executeWhoAmI() throws IOException { try (ModelControllerClient client = ModelControllerClient.Factory .create(new ModelControllerClientConfiguration.Builder().setHostName(TestSuiteEnvironment.getServerAddress()) .setPort(PORT_NATIVE).setProtocol("remote").setConnectionTimeout(CONNECTION_TIMEOUT_IN_MS).build())) { ModelNode operation = new ModelNode(); operation.get("operation").set("whoami"); operation.get("verbose").set("true"); return client.execute(operation); } }
Source:
<code>private Iterable<NameKey> scan() { if (matchPrefix != null) { return projectCache.byName(matchPrefix); } else if (type == FilterType.PARENT_CANDIDATES) { SortedSet<Project.NameKey> parents = new TreeSet<Project.NameKey>(); for (NameKey pName : projectCache.all()) { ProjectState e = projectCache.get(pName); if (e == null) { continue; } ProjectState parentState = e.getParentState(); if (parentState != null) { <START> ProjectControl parentCtrl = parentState.controlFor(currentUser); <END> if (parentCtrl.isVisible() || parentCtrl.isOwner()) { parents.add(parentState.getProject().getNameKey()); } } } return parents; } else { return projectCache.all(); } }</code><technical_language>This solution this lookup tests potentially times for parent project. limit returned values, incurring cost of iterating project here</technical_language>

Target:
private Iterable<NameKey> scan() { if (matchPrefix != null) { return projectCache.byName(matchPrefix); } else if (type == FilterType.PARENT_CANDIDATES) { SortedSet<Project.NameKey> parents = new TreeSet<Project.NameKey>(); for (NameKey pName : projectCache.all()) { ProjectState e = projectCache.get(pName); if (e == null) { continue; } ProjectState parentState = e.getParentState(); if (parentState != null && !parents.contains(parentState.getProject().getNameKey())) { ProjectControl parentCtrl = parentState.controlFor(currentUser); if (parentCtrl.isVisible() || parentCtrl.isOwner()) { parents.add(parentState.getProject().getNameKey()); } } } return parents; } else { return projectCache.all(); } }
Source:
<code>public void testCreateArtifactsEmpty() { DoorsTableRowCollector dtc = new DoorsTableRowCollector(extractor); RoughArtifact roughParent = new RoughArtifact(RoughArtifactKind.CONTAINER); RoughArtifactCollector collector = new RoughArtifactCollector(roughParent); dtc.createArtifacts(collector); <START> Assert.fail(); <END> }</code><technical_language>fail is unecesary if exception happen test fail</technical_language>

Target:
public void testCreateArtifactsEmpty() { RoughArtifact roughParent = new RoughArtifact(RoughArtifactKind.CONTAINER); RoughArtifactCollector collector = new RoughArtifactCollector(roughParent); dtc.createArtifacts(collector); }
Source:
<code>@Test public void throwingOnFailLogs() throws Exception { webServer.enqueue(new MockResponse().setResponseCode(200).setBody("Body")); final RuntimeException e = new RuntimeException(); clientListener.setNextEventDelegate(new WebSocketListener() { @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) { throw e; } }); newWebSocket(); <START> assertThat(testLogHandler.take()).isEqualTo(""); <END> }</code><technical_language>is "" logged</technical_language>

Target:
@Test public void throwingOnFailLogs() throws Exception { webServer.enqueue(new MockResponse().setResponseCode(200).setBody("Body")); final RuntimeException e = new RuntimeException("boom"); clientListener.setNextEventDelegate(new WebSocketListener() { @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) { throw e; } }); newWebSocket(); assertThat(testLogHandler.take()).isEqualTo("INFO: [WS client] onFailure"); }
Source:
<code>public void setEnabled (boolean enabled) { checkWidget(); long topHandle = topHandle (); if (this.enabled == enabled) return; this.enabled = enabled; <START> if (!enabled && disabledImage != null) setImage (disabledImage); <END> if (enabled && enabledImage != null) setImage (enabledImage); GTK.gtk_widget_set_sensitive (topHandle, enabled); }</code><technical_language>This calls setImage() disabled image. call _setImage()</technical_language>

Target:
public void setEnabled (boolean enabled) { checkWidget(); long topHandle = topHandle (); if (this.enabled == enabled) return; this.enabled = enabled; if (!enabled && disabledImage != null) _setImage (disabledImage); if (enabled && enabledImage != null) setImage (enabledImage); GTK.gtk_widget_set_sensitive (topHandle, enabled); }
Source:
<code>public boolean equals(Object obj) { <START> if (this == obj) <END> return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SamzaSqlRelMessage other = (SamzaSqlRelMessage) obj; if (key == null) { if (other.key != null) return false; } else if (!key.equals(other.key)) return false; if (samzaSqlRelRecord == null) { if (other.samzaSqlRelRecord != null) return false; } else if (!samzaSqlRelRecord.equals(other.samzaSqlRelRecord)) return false; return true; }</code><technical_language>Objects.equals()</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SamzaSqlRelMessage other = (SamzaSqlRelMessage) obj; return Objects.equals(key, other.key) && Objects.equals(samzaSqlRelRecord, other.samzaSqlRelRecord); }
Source:
<code>public void testClassFileIsCompiled() throws Exception { JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class, <START> Collections.<Class<? extends IToolchain>>singletonList(JillBasedToolchain.class)); <END> File[] defaultClasspath = toolchain.getDefaultBootClasspath(); File jackOut = AbstractTestTools.createTempFile("jackOut", toolchain.getLibraryExtension()); File classOut = AbstractTestTools.createTempDir(); File sourceDir = AbstractTestTools.getTestRootDir("com.android.jack.classfile.test001"); toolchain.addProperty(Options.EMIT_CLASS_FILES.getName(), "true"); toolchain.addProperty(Options.EMIT_CLASS_FILES_FOLDER.getName(), classOut.getPath()); toolchain.addToClasspath(defaultClasspath) .srcToLib(jackOut, true, sourceDir); Assert.assertTrue( new File(classOut, "com/android/jack/classfile/test001/jack/ClassTest.class").isFile()); }</code><technical_language>understandable source code in IDE</technical_language>

Target:
public void testClassFileIsCompiled() throws Exception { List<Class<? extends IToolchain>> excludeList = Collections.<Class<? extends IToolchain>>singletonList(JillBasedToolchain.class); JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class, excludeList); File[] defaultClasspath = toolchain.getDefaultBootClasspath(); File jackOut = AbstractTestTools.createTempFile("jackOut", toolchain.getLibraryExtension()); File classOut = AbstractTestTools.createTempDir(); File sourceDir = AbstractTestTools.getTestRootDir("com.android.jack.classfile.test001"); toolchain.addProperty(Options.EMIT_CLASS_FILES.getName(), "true"); toolchain.addProperty(Options.EMIT_CLASS_FILES_FOLDER.getName(), classOut.getPath()); toolchain.addToClasspath(defaultClasspath) .srcToLib(jackOut, true, sourceDir); Assert.assertTrue( new File(classOut, "com/android/jack/classfile/test001/jack/ClassTest.class").isFile()); }
Source:
<code>public void beforeClass() { _bucketDataAccessor = new ZkBucketDataAccessor(ZK_ADDR); <START> LIST_FIELD = new ArrayList<>(); <END> LIST_FIELD.add("1"); LIST_FIELD.add("2"); MAP_FIELD = new HashMap<>(); MAP_FIELD.put("1", "2"); }</code><technical_language>get rid of beforeClass method set inline? For example, private static final List<String> LIST_FIELDS = ImmutableList.of("1", "2"); private static final Map<String, String> MAP_FIELD = ImmutableMap.of("1", "2");</technical_language>

Target:
public void beforeClass() { _bucketDataAccessor = new ZkBucketDataAccessor(ZK_ADDR); }
Source:
<code>public static String appendIfNotBlank(final String str, final String suffix) { <START> return isBlank(str) ? EMPTY : str + defaultString(suffix); <END> }</code><technical_language>suggestion return isBlank(str) ? str : str + defaultString(suffix);</technical_language>

Target:
public static String appendIfNotBlank(final String str, final String suffix) { if (isEmpty(suffix) || isBlank(str)) { return str; } return str + suffix; }
Source:
<code>private static ILaunchConfigurationWorkingCopy getWorkingCopy(ILaunchConfiguration configuration) throws CoreException { ILaunchConfigurationWorkingCopy wc = null; if (configuration.isWorkingCopy()) { <START> wc = (ILaunchConfigurationWorkingCopy) configuration; <END> } else { wc = configuration.getWorkingCopy(); } return wc; }</code><technical_language>return</technical_language>

Target:
private static ILaunchConfigurationWorkingCopy getWorkingCopy(ILaunchConfiguration configuration) throws CoreException { if (configuration.isWorkingCopy()) { return (ILaunchConfigurationWorkingCopy) configuration; } return configuration.getWorkingCopy(); }
Source:
<code>Ref doPeel(Ref leaf) throws MissingObjectException, IOException { try (RevWalk rw = new RevWalk(repository)) { RevObject obj = rw.parseAny(leaf.getObjectId()); if (obj instanceof RevTag) { return new ObjectIdRef.PeeledTag( leaf.getStorage(), leaf.getName(), leaf.getObjectId(), rw.peel(obj).copy(), hasVersioning() ? leaf.getUpdateIndex() : <START> Ref.UNDEFINED_UPDATE_INDEX); <END> } else { return new ObjectIdRef.PeeledNonTag( leaf.getStorage(), leaf.getName(), leaf.getObjectId(), hasVersioning() ? leaf.getUpdateIndex() : Ref.UNDEFINED_UPDATE_INDEX); } } }</code><technical_language>optional: import static</technical_language>

Target:
Ref doPeel(Ref leaf) throws MissingObjectException, IOException { try (RevWalk rw = new RevWalk(repository)) { RevObject obj = rw.parseAny(leaf.getObjectId()); if (obj instanceof RevTag) { return new ObjectIdRef.PeeledTag( leaf.getStorage(), leaf.getName(), leaf.getObjectId(), rw.peel(obj).copy(), hasVersioning() ? leaf.getUpdateIndex() : UNDEFINED_UPDATE_INDEX); } else { return new ObjectIdRef.PeeledNonTag( leaf.getStorage(), leaf.getName(), leaf.getObjectId(), hasVersioning() ? leaf.getUpdateIndex() : UNDEFINED_UPDATE_INDEX); } } }
Source:
<code>public void updateRtt(long ssrc, long rtt) { receiveStats.setRtt(rtt); sendStats.setRtt(rtt); if (ssrc < 0) return; ReceiveTrackStatsImpl receiveStat = receiveSsrcStats.get(ssrc); if (receiveStat != null) receiveStat.setRtt(rtt); SendTrackStatsImpl sendStats = sendSsrcStats.get(ssrc); if (sendStats != null) <START> sendStats.setRtt(rtt); <END> }</code><technical_language>consistent naming (e.g. receiveSsrcStat, sendSsrcStat) add braces</technical_language>

Target:
public void updateRtt(long ssrc, long rtt) { receiveStats.setRtt(rtt); sendStats.setRtt(rtt); if (ssrc < 0) return; ReceiveTrackStatsImpl receiveSsrcStat = receiveSsrcStats.get(ssrc); if (receiveSsrcStat != null) receiveSsrcStat.setRtt(rtt); SendTrackStatsImpl sendSsrcStat = sendSsrcStats.get(ssrc); if (sendSsrcStat != null) sendSsrcStat.setRtt(rtt); }
Source:
<code>private <T extends BaseConfigurationItem> T newInstance(Type type, String id) { try { RemoteDescriptor remoteDescriptor = (RemoteDescriptor) getDescriptor(type); T ci = remoteDescriptor.newInstance(id); for (PropertyDescriptor pd : remoteDescriptor.getPropertyDescriptors()) { if (pd.isAsContainment()) { String propertyName = pd.getName(); if (null == ci.getProperty(propertyName)) { switch (pd.getKind()) { case LIST_OF_CI: ci.setProperty(propertyName, newArrayList()); break; case SET_OF_CI: ci.setProperty(propertyName, newHashSet()); break; default: break; } } } } prefillPropertiesWithDefaultValues(ci, type); return ci; <START> } catch (Throwable e) { <END> String errorMsg = String.format("Unable to instantiate CI '%s' with id '%s'. %s", type, id, e.getMessage()); throw new RuntimeException(errorMsg, e); } }</code><technical_language>Throwable</technical_language>

Target:
private ConfigurationItem newInstance(Type type, String id) { try { RemoteDescriptor remoteDescriptor = (RemoteDescriptor) getDescriptor(type); BaseConfigurationItem ci; if (remoteDescriptor.isAssignableTo(typeForClass(EmbeddedDeployable.class))) { ci = new BaseEmbeddedDeployable(); } else if (remoteDescriptor.isAssignableTo(typeForClass(SourceArtifact.class))) { if (remoteDescriptor.isAssignableTo(typeForClass(FolderArtifact.class))) { ci = new BaseDeployableFolderArtifact(); } else { ci = new BaseDeployableFileArtifact(); } } else if (remoteDescriptor.isAssignableTo(typeForClass(Deployable.class))) { ci = new BaseDeployable(); } else { ci = new BaseConfigurationItem(); } ci.setId(id); ci.setType(type); for (PropertyDescriptor pd : remoteDescriptor.getPropertyDescriptors()) { if (pd.isAsContainment()) { String propertyName = pd.getName(); if (null == ci.getProperty(propertyName)) { switch (pd.getKind()) { case LIST_OF_CI: ci.setProperty(propertyName, newArrayList()); break; case SET_OF_CI: ci.setProperty(propertyName, newHashSet()); break; default: break; } } } } initSyntheticProperties(ci, type); return ci; } catch (Throwable e) { String errorMsg = String.format("Unable to instantiate CI '%s' with id '%s'. %s", type, id, e.getMessage()); throw new RuntimeException(errorMsg, e); } }
Source:
<code>public void executeQueryCommand() { <START> VDSGroup cluster = getVdsGroupDao().get(getParameters().getId()); <END> getQueryReturnValue().setReturnValue(cluster.isGlusterCliBasedSchedulingOn()); }</code><technical_language>injection for VdsGroupDao instead</technical_language>

Target:
public void executeQueryCommand() { VDSGroup cluster = clusterDao.get(getParameters().getId()); getQueryReturnValue().setReturnValue(cluster.isGlusterCliBasedSchedulingOn()); }
Source:
<code>private Point getPreferredSize(SWTGridCell gridCell) { <START> return gridCell.getPreferredSize() != null ? gridCell.getPreferredSize() : SWTGridCell.DEFAULT_PREFERRED_SIZE; <END> }</code><technical_language>default preferred size is here, or? I move this this class, is implementation specific -1,-1 is treated default</technical_language>

Target:
private Point getPreferredSize(SWTGridCell gridCell) { return gridCell.getPreferredSize() != null ? gridCell.getPreferredSize() : DEFAULT_PREFERRED_SIZE; }
Source:
<code>private Status checkStatus(int status) { Status responseStatus; switch (status) { case 0: responseStatus = Status.OK; break; case 400: responseStatus = Status.BAD_REQUEST; break; case 403: responseStatus = Status.FORBIDDEN; break; case 404: responseStatus = Status.NOT_FOUND; break; case 500: responseStatus = Status.ERROR; break; case 503: responseStatus = Status.SERVICE_UNAVAILABLE; break; default: <START> responseStatus = Status.OK; <END> break; } return responseStatus; }</code><technical_language>default response status OK? explicitly check for good status report a false OK</technical_language>

Target:
private Status checkStatus(int status) { Status responseStatus; switch (status) { case 0: responseStatus = Status.OK; break; case 400: responseStatus = Status.BAD_REQUEST; break; case 403: responseStatus = Status.FORBIDDEN; break; case 404: responseStatus = Status.NOT_FOUND; break; case 500: responseStatus = Status.ERROR; break; case 503: responseStatus = Status.SERVICE_UNAVAILABLE; break; default: responseStatus = Status.UNEXPECTED_STATE; break; } return responseStatus; }
Source:
<code>private URI getStatsBaseUri() throws URISyntaxException { VariantSource source = getVariantSource(); return URLHelper.getStatsBaseUri( <START> outputParameters.getOutputDirStatistics(), source.getStudyId(), source.getFileId()); <END> }</code><technical_language>Pretty done relying getVariantSource() function</technical_language>

Target:
private URI getStatsBaseUri() throws URISyntaxException { return URLHelper.getStatsBaseUri( outputParameters.getOutputDirStatistics(), inputParameters.getStudyId(), inputParameters.getVcfId()); }
Source:
<code>public Pair split(final LayoutContext context, final int maxWidth, final boolean force) { <START> return null; <END> }</code><technical_language>return a null object (new Pair(this, null)) throw UnsupportedOperationException</technical_language>

Target:
public Pair split(final LayoutContext context, final int maxWidth, final boolean force) { throw new UnsupportedOperationException("split method not supported"); }
Source:
<code>protected Filter[] getAllStoredFilters(boolean defaults) { Filter[] filters = null; String[] activefilters, inactivefilters; IPreferenceStore store = getPreferenceStore(); if (defaults) { activefilters = ScriptDebugOptionsManager .parseList(store .getDefaultString(IDLTKDebugUIPreferenceConstants.PREF_ACTIVE_FILTERS_LIST)); inactivefilters = ScriptDebugOptionsManager .parseList(store .getDefaultString(IDLTKDebugUIPreferenceConstants.PREF_INACTIVE_FILTERS_LIST)); } else { activefilters = ScriptDebugOptionsManager .parseList(store .getString(IDLTKDebugUIPreferenceConstants.PREF_ACTIVE_FILTERS_LIST)); inactivefilters = ScriptDebugOptionsManager .parseList(store .getString(IDLTKDebugUIPreferenceConstants.PREF_INACTIVE_FILTERS_LIST)); } filters = new Filter[activefilters.length + inactivefilters.length]; for (int i = 0; i < activefilters.length; i++) { String[] split = activefilters[i].split(":"); if (split.length == 1) { filters[i] = new Filter(split[0], true, 0); } else { filters[i] = new Filter(split[0], true, (Integer.valueOf(split[1])) .intValue()); } } for (int i = 0; i < inactivefilters.length; i++) { String[] split = inactivefilters[i].split(":"); if (split.length == 1) { filters[i + activefilters.length] = new Filter(split[0], false, 0); } else { filters[i + activefilters.length] = new Filter(split[0], false, <START> (Integer.valueOf(split[1])).intValue()); <END> } } return filters; }</code><technical_language>parseInt(),</technical_language>

Target:
protected Filter[] getAllStoredFilters(boolean defaults) { Filter[] filters = null; String[] activefilters, inactivefilters; IPreferenceStore store = getPreferenceStore(); if (defaults) { activefilters = ScriptDebugOptionsManager .parseList(store.getDefaultString( IDLTKDebugUIPreferenceConstants.PREF_ACTIVE_FILTERS_LIST)); inactivefilters = ScriptDebugOptionsManager .parseList(store.getDefaultString( IDLTKDebugUIPreferenceConstants.PREF_INACTIVE_FILTERS_LIST)); } else { activefilters = ScriptDebugOptionsManager.parseList(store.getString( IDLTKDebugUIPreferenceConstants.PREF_ACTIVE_FILTERS_LIST)); inactivefilters = ScriptDebugOptionsManager .parseList(store.getString( IDLTKDebugUIPreferenceConstants.PREF_INACTIVE_FILTERS_LIST)); } filters = new Filter[activefilters.length + inactivefilters.length]; for (int i = 0; i < activefilters.length; i++) { String[] split = activefilters[i].split(":"); if (split.length == 1) { filters[i] = new Filter(split[0], true, 0); } else { filters[i] = new Filter(split[0], true, Integer.parseInt(split[1])); } } for (int i = 0; i < inactivefilters.length; i++) { String[] split = inactivefilters[i].split(":"); if (split.length == 1) { filters[i + activefilters.length] = new Filter(split[0], false, 0); } else { filters[i + activefilters.length] = new Filter(split[0], false, Integer.parseInt(split[1])); } } return filters; }
Source:
<code>public void canBuildFromEmptyClientLimits() { assertThat(ImmutableQosServiceRuntimeConfig.builder().clientLimits(new HashMap<>()).build()) <START> .isInstanceOf(QosServiceRuntimeConfig.class); <END> }</code><technical_language>nit: checking throw? if need for class check</technical_language>

Target:
public void canBuildFromEmptyClientLimits() { ImmutableQosServiceRuntimeConfig.builder().clientLimits(ImmutableMap.of()).build(); }
Source:
<code><START> public void addObserver(RemoteEmfObserver<EParentObjectType, EObjectType, LocalKeyType, ObjectCurrentType> observer) { <END> if (observer != null) { RemoteEmfObserver<EParentObjectType, EObjectType, LocalKeyType, ObjectCurrentType> remoteEmfObserver = observer; if (remoteEmfObserver.getConsumer() != null && remoteEmfObserver.getConsumer() != this) { remoteEmfObserver.getConsumer().removeObserver(remoteEmfObserver); } remoteEmfObserver.internalSetConsumer(this); } remoteEmfObservers.add(observer); }</code><technical_language>I calling this method in workspace, is needed</technical_language>

Target:
public void addObserver(RemoteEmfObserver<EParentObjectType, EObjectType, LocalKeyType, ObjectCurrentType> observer) { if (observer != null) { RemoteEmfObserver<EParentObjectType, EObjectType, LocalKeyType, ObjectCurrentType> remoteEmfObserver = observer; if (remoteEmfObserver.getConsumer() != null && remoteEmfObserver.getConsumer() != this) { remoteEmfObserver.getConsumer().removeObserver(remoteEmfObserver); } remoteEmfObserver.internalSetConsumer(this); remoteEmfObservers.add(observer); } }
Source:
<code>public PredicateActionResult conditionalCompute(String originator, TaskId taskid, String channel, String key, String predicate, String thenRemappingFunction, String elseRemappingFunction) throws InvalidChannelException, CompilationException, IOException { PredicateActionResult answer; try { Channel chosenChannel = getChannel(channel); Serializable value = chosenChannel.get(key); if (evaluateClosure(predicate, BiPredicate.class).test(key, value)) { answer = new PredicateActionResult(true, chosenChannel.compute(key, (BiFunction<? super String, ? super Serializable, ? extends Serializable>) evaluateClosure(thenRemappingFunction, BiFunction.class))); <START> } else { <END> answer = new PredicateActionResult(false, chosenChannel.compute(key, (BiFunction<? super String, ? super Serializable, ? extends Serializable>) evaluateClosure(elseRemappingFunction, BiFunction.class))); } commitIfNeeded(channel); logWithContext(taskid, channel, "Run conditionalCompute" + ON_KEY + QUOTE + key + QUOTE + RESULT_IS + answer, Level.DEBUG); } catch (InvalidChannelException | CompilationException | IOException e) { throw e; } catch (Exception e) { throw new ClosureEvaluationException(EXCEPTION_WHEN_EVALUATING_CLOSURE + StackTraceUtil.getStackTrace(e)); } return answer; }</code><technical_language>rename test method executePredicate</technical_language>

Target:
public PredicateActionResult conditionalCompute(String originator, TaskId taskid, String channel, String key, String predicate, String thenRemappingFunction, String elseRemappingFunction) throws InvalidChannelException, CompilationException, IOException { PredicateActionResult answer; try { Channel chosenChannel = getChannel(channel); Serializable value = chosenChannel.get(key); if (evaluateClosure(predicate, BiPredicate.class).test(key, value)) { answer = new PredicateActionResult(true, chosenChannel.compute(key, (BiFunction<? super String, ? super Serializable, ? extends Serializable>) evaluateClosure(thenRemappingFunction, BiFunction.class))); } else { answer = new PredicateActionResult(false, chosenChannel.compute(key, (BiFunction<? super String, ? super Serializable, ? extends Serializable>) evaluateClosure(elseRemappingFunction, BiFunction.class))); } logWithContextAndPersist(taskid, channel, "Run conditionalCompute" + ON_KEY + QUOTE + key + QUOTE + RESULT_IS + answer, Level.DEBUG); } catch (InvalidChannelException | CompilationException | IOException e) { throw e; } catch (Exception e) { throw new ClosureEvaluationException(EXCEPTION_WHEN_EVALUATING_CLOSURE + StackTraceUtil.getStackTrace(e)); } return answer; }
Source:
<code>public void userCapsNodeChanged(String user, ArrayList<String> fullJids, String node, boolean online) { OperationSetPresence opsetPresence = parentProvider.getOperationSet(OperationSetPresence.class); if (opsetPresence != null) { <START> if(LibJitsi.getConfigurationService() <END> .getBoolean( XMPPConfigForm.PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES, XMPPConfigForm.USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT)) { String bareJid = StringUtils.parseBareAddress(user); Contact contact = opsetPresence.findContactByID(bareJid); if (contact != null) { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent.SUPPORTED_OPERATION_SETS_CHANGED, getLargestSupportedOperationSet(fullJids)); } } else { String jid = StringUtils.parseBareAddress(user); Contact contact = opsetPresence.findContactByID(jid); if (contact != null) { if(online) { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent.SUPPORTED_OPERATION_SETS_CHANGED, getSupportedOperationSets(user, online)); } else { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent.SUPPORTED_OPERATION_SETS_CHANGED, getSupportedOperationSets(contact)); } } } } }</code><technical_language>access config service this. needs obtained GeneralConfigPluginActivator.getConfigurationService()</technical_language>

Target:
public void userCapsNodeChanged(String user, ArrayList<String> fullJids, String node, boolean online) { OperationSetPresence opsetPresence = parentProvider.getOperationSet(OperationSetPresence.class); if (opsetPresence != null) { if(JabberActivator.getConfigurationService() .getBoolean( PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES, USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT)) { String bareJid = StringUtils.parseBareAddress(user); Contact contact = opsetPresence.findContactByID(bareJid); if (contact != null) { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent. SUPPORTED_OPERATION_SETS_CHANGED, getLargestSupportedOperationSet(fullJids)); } } else { String jid = StringUtils.parseBareAddress(user); Contact contact = opsetPresence.findContactByID(jid); if (contact != null) { if(online) { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent. SUPPORTED_OPERATION_SETS_CHANGED, getSupportedOperationSets(user, online)); } else { fireContactCapabilitiesEvent( contact, ContactCapabilitiesEvent. SUPPORTED_OPERATION_SETS_CHANGED, getSupportedOperationSets(contact)); } } } } }
Source:
<code>public void setUp() throws Exception { database = SQLiteDatabase.create(null); database.execSQL("CREATE TABLE table_name(" + "id INTEGER PRIMARY KEY, " + "name VARCHAR(255), " + "long_value BIGINT," + "float_value REAL," + <START> "double_value DOUBLE, " + <END> "blob_value BINARY, " + "clob_value CLOB );"); addPeople(); setupCursor(); }</code><technical_language>this tests needs some cleaning merge back</technical_language>

Target:
public void setUp() throws Exception { database = SQLiteDatabase.create(null); database.execSQL("CREATE TABLE table_name(" + "id INTEGER PRIMARY KEY, " + "name VARCHAR(255), " + "long_value BIGINT," + "float_value REAL," + "double_value DOUBLE, " + "blob_value BINARY, " + "clob_value CLOB );"); addPeople(); cursor = createCursor(); }
Source:
<code>public DashboardSettings(DashboardSettings other) { <START> this.newItemsRegistry = new LinkedList<ItemRegistry>(other.newItemsRegistry); <END> }</code><technical_language>Please add check for null for newItemsRegistry</technical_language>

Target:
public DashboardSettings(DashboardSettings other) { this.newItemsRegistry = (other.newItemsRegistry != null) ? new LinkedList<ItemRegistry>(other.newItemsRegistry) : null; }
Source:
<code>public void should_expose_warnings_on_execution_info() { final String query = String.format( "BEGIN UNLOGGED BATCH\n" + "INSERT INTO test (k, v) VALUES (1, '%s')\n" + "INSERT INTO test (k, v) VALUES (2, '%s')\n" + "APPLY BATCH", Strings.repeat("1", 2 * 1024), Strings.repeat("1", 3 * 1024)); Statement<?> st = SimpleStatement.builder(String.format(query)).build(); ResultSet result = SESSION_RULE.session().execute(st); ExecutionInfo executionInfo = result.getExecutionInfo(); assertThat(executionInfo).isNotNull(); List<String> warnings = executionInfo.getWarnings(); assertThat(warnings).isNotNull(); assertThat(warnings).isNotEmpty(); <START> Mockito.verify(appender, after(500).times(1)).doAppend(loggingEventCaptor.capture()); <END> assertThat(loggingEventCaptor.getValue().getMessage()).isNotNull(); String logMessage = loggingEventCaptor.getValue().getFormattedMessage(); assertThat(logMessage) .startsWith("Query '") .contains( query.substring( 0, SESSION_RULE .session() .getContext() .getConfig() .getDefaultProfile() .getInt(DefaultDriverOption.REQUEST_LOGGER_MAX_QUERY_LENGTH))) .contains("' generated server side warning(s): ") .contains( String.format( "Batch for [%s.test] is of size 5152, exceeding specified threshold of 5120 by 32.", SESSION_RULE.keyspace().asCql(true))); }</code><technical_language>contribution guidelines changed, static-import Mockito methods</technical_language>

Target:
public void should_expose_warnings_on_execution_info() { final String query = String.format( "BEGIN UNLOGGED BATCH\n" + "INSERT INTO test (k, v) VALUES (1, '%s')\n" + "INSERT INTO test (k, v) VALUES (2, '%s')\n" + "APPLY BATCH", Strings.repeat("1", 2 * 1024), Strings.repeat("1", 3 * 1024)); Statement<?> st = SimpleStatement.builder(String.format(query)).build(); ResultSet result = SESSION_RULE.session().execute(st); ExecutionInfo executionInfo = result.getExecutionInfo(); assertThat(executionInfo).isNotNull(); List<String> warnings = executionInfo.getWarnings(); assertThat(warnings).isNotEmpty(); verify(appender, after(500).times(1)).doAppend(loggingEventCaptor.capture()); assertThat(loggingEventCaptor.getValue().getMessage()).isNotNull(); String logMessage = loggingEventCaptor.getValue().getFormattedMessage(); assertThat(logMessage) .startsWith("Query '") .contains(query.substring(0, RequestLogger.DEFAULT_REQUEST_LOGGER_MAX_QUERY_LENGTH)) .contains("' generated server side warning(s): ") .contains( String.format( "Batch for [%s.test] is of size 5152, exceeding specified threshold of 5120 by 32.", SESSION_RULE.keyspace().asCql(true))); }
Source:
<code>private static EntityGraph<?> tryGetFetchGraph(EntityManager em, JpaEntityGraph jpaEntityGraph, Class<?> entityType) { Assert.notNull(em, "EntityManager must not be null!"); Assert.notNull(jpaEntityGraph, "EntityGraph must not be null!"); Assert.notNull(entityType, "EntityType must not be null!"); Assert.isTrue(JPA21_AVAILABLE, "The EntityGraph-Feature requires at least a JPA 2.1 persistence provider!"); Assert.isTrue(GET_ENTITY_GRAPH_METHOD != null, "It seems that you have the JPA 2.1 API but a JPA 2.0 implementation on the classpath!"); try { return em.getEntityGraph(jpaEntityGraph.getName()); <START> } catch (Exception ex) { <END> return PersistenceProvider.fromEntityManager(em).createDynamicEntityGraph(em, jpaEntityGraph, entityType); } }</code><technical_language>a issues I suspect popping here: exception thrown render EntityManager unusable defined JPA spec (see paragraph page 79, JPA 2.1 spec). need create a separate EntityManager instance for check avoid lookup altogether. generally feels a bit wrong basically register in EntityManager in a method lookup stuff. change general model do registration bootstrap time remember name of entity graph. actual method execution graph name if present skip this step entirely</technical_language>

Target:
private static EntityGraph<?> tryGetFetchGraph(EntityManager em, JpaEntityGraph jpaEntityGraph, Class<?> entityType) { Assert.notNull(em, "EntityManager must not be null!"); Assert.notNull(jpaEntityGraph, "EntityGraph must not be null!"); Assert.notNull(entityType, "EntityType must not be null!"); Assert.isTrue(JPA21_AVAILABLE, "The EntityGraph-Feature requires at least a JPA 2.1 persistence provider!"); Assert.isTrue(GET_ENTITY_GRAPH_METHOD != null, "It seems that you have the JPA 2.1 API but a JPA 2.0 implementation on the classpath!"); if (!jpaEntityGraph.isDynamicEntityGraph()) { return em.getEntityGraph(jpaEntityGraph.getName()); } return createDynamicEntityGraph(em, jpaEntityGraph, entityType); }
Source:
<code>public JaversBuilder scanTypeNames(String packagesToScan){ if(packagesToScan==null || packagesToScan.trim().isEmpty()) return this; <START> Class<?>[] list = ReflectionUtil.getClasses(TypeName.class, packagesToScan.split(",")); <END> for (Class<?> c : list) { scanTypeName(c); } return this; }</code><technical_language>see, indentation is messed (use spaces, tabs)</technical_language>

Target:
public JaversBuilder scanTypeNames(String packagesToScan){ if(packagesToScan==null || packagesToScan.trim().isEmpty()) { return this; } List<Class<?>> list = ReflectionUtil.getClasses(TypeName.class, packagesToScan.split(",")); for (Class<?> c : list) { scanTypeName(c); } return this; }
Source:
<code>private Map<CodeSystemEntry, IVersioningManager> createVersioningManagers(final ServiceProvider context, Map<String, CodeSystemEntry> codeSystemsByShortName, final CodeSystemEntry baseCodeSystem) { final Map<CodeSystemEntry, IVersioningManager> versioningManagersByCodeSystem = Maps.newHashMap(); final IVersioningManager versioningManager = VersioningManagerBroker.INSTANCE.createVersioningManager(baseCodeSystem.getTerminologyComponentId()); versioningManagersByCodeSystem.put(baseCodeSystem, versioningManager); <START> CoreTerminologyBroker.getInstance().getAffectedCodeSystemsForTeminology(baseCodeSystem.getTerminologyComponentId()) <END> .stream() .map(affectedCodeSystemShortName -> codeSystemsByShortName.get(affectedCodeSystemShortName)) .forEach(affectedCodeSystem -> { final IVersioningManager affectedVersioningManager = VersioningManagerBroker.INSTANCE.createVersioningManager(affectedCodeSystem.getTerminologyComponentId()); versioningManagersByCodeSystem.put(affectedCodeSystem, affectedVersioningManager); }); return versioningManagersByCodeSystem; }</code><technical_language>Try new CodeSystemEntry.getDependencies() method</technical_language>

Target:
private Map<CodeSystemEntry, IVersioningManager> createVersioningManagers(final ServiceProvider context, Map<String, CodeSystemEntry> codeSystemsByShortName, final CodeSystemEntry baseCodeSystem) { final Map<CodeSystemEntry, IVersioningManager> versioningManagersByCodeSystem = Maps.newHashMap(); baseCodeSystem.getDependenciesAndSelf() .stream() .map(affectedCodeSystemShortName -> codeSystemsByShortName.get(affectedCodeSystemShortName)) .forEach(affectedCodeSystem -> { final IVersioningManager affectedVersioningManager = VersioningManagerBroker.INSTANCE.createVersioningManager(affectedCodeSystem.getTerminologyComponentId()); versioningManagersByCodeSystem.put(affectedCodeSystem, affectedVersioningManager); }); return versioningManagersByCodeSystem; }
Source:
<code>public void testSuiteStarted(Description description) { String uid = this.generateSuiteUid(description.getDisplayName()); String suiteName = System.getProperty("fitnesseSuiteToRun"); if(null == suiteName) { suiteName = description.getAnnotation(FitNesseRunner.Suite.class).value(); } TestSuiteStartedEvent event = new TestSuiteStartedEvent(uid, suiteName); AnnotationManager am = new AnnotationManager(description.getAnnotations()); am.update(event); <START> event.withLabels(AllureModelUtils.createTestFrameworkLabel("JUnit")); <END> this.getLifecycle().fire(event); }</code><technical_language>this FitNesse</technical_language>

Target:
private void testSuiteStarted(Description description) { String uid = this.generateSuiteUid(description.getDisplayName()); String suiteName = System.getProperty("fitnesseSuiteToRun"); if(null == suiteName) { suiteName = description.getAnnotation(FitNesseRunner.Suite.class).value(); } TestSuiteStartedEvent event = new TestSuiteStartedEvent(uid, suiteName); AnnotationManager am = new AnnotationManager(description.getAnnotations()); am.update(event); event.withLabels(AllureModelUtils.createTestFrameworkLabel("FitNesse")); this.getLifecycle().fire(event); }
Source:
<code>private static void writeTargetFactorNormalizeReadCountsAndTargetFactors(final File outFile, final ReadCountCollection readCounts, final double[] targetFactors, final List<Target> rawTargets) { final List<String> sampleNames = readCounts.columnNames(); final List<String> targetNames = readCounts.targets().stream() .map(Target::getName) .collect(Collectors.toList()); try (final HDF5File file = new HDF5File(outFile, HDF5File.OpenMode.CREATE)) { final HDF5PoN pon = new HDF5PoN(file); logger.info("Creating " + outFile.getAbsolutePath() + "..."); logger.info("Setting sample names ..."); pon.setSampleNames(sampleNames); logger.info("Setting target names ..."); pon.setTargetNames(targetNames); logger.info("Setting target factors (" + targetFactors.length + ") ..."); pon.setTargetFactors(new Array2DRowRealMatrix(targetFactors)); <START> logger.info("Setting normal counts (" + readCounts.counts().getRowDimension() + <END> " x " + readCounts.counts().getColumnDimension() + ") (T)..."); pon.setNormalCounts(readCounts.counts()); logger.info("Setting targets ..."); pon.setTargets(readCounts.targets()); logger.info("Setting raw targets ..."); pon.setRawTargets(rawTargets); logger.info("Setting raw target names ..."); pon.setRawTargetNames(rawTargets.stream().map(Target::getName).collect(Collectors.toList())); } }</code><technical_language>more explicit normal. ambiguity normalized counts of normals</technical_language>

Target:
private static void writeTargetFactorNormalizeReadCountsAndTargetFactors(final File outFile, final ReadCountCollection readCounts, final double[] targetFactors, final List<Target> rawTargets) { final List<String> sampleNames = readCounts.columnNames(); final List<String> targetNames = readCounts.targets().stream() .map(Target::getName) .collect(Collectors.toList()); try (final HDF5File file = new HDF5File(outFile, HDF5File.OpenMode.CREATE)) { final HDF5PoN pon = new HDF5PoN(file); logger.info("Creating " + outFile.getAbsolutePath() + "..."); logger.info("Setting sample names ..."); pon.setSampleNames(sampleNames); logger.info("Setting target names ..."); pon.setTargetNames(targetNames); logger.info("Setting target factors (" + targetFactors.length + ") ..."); pon.setTargetFactors(new Array2DRowRealMatrix(targetFactors)); logger.info("Setting coverage profile (" + readCounts.counts().getRowDimension() + " x " + readCounts.counts().getColumnDimension() + ") (T)..."); pon.setNormalCounts(readCounts.counts()); logger.info("Setting targets ..."); pon.setTargets(readCounts.targets()); logger.info("Setting raw targets ..."); pon.setRawTargets(rawTargets); logger.info("Setting raw target names ..."); pon.setRawTargetNames(rawTargets.stream().map(Target::getName).collect(Collectors.toList())); } }
Source:
<code>public void process() { PerformanceMonitor.startActivity("rendering/toneMapping"); sceneToneMapped = dynamicFBM.getFBO(TONE_MAPPED_URN); <START> sceneOpaque = dynamicFBM.getFBO(DefaultDynamicFBOs.ReadOnlyGBuffer.getResourceUrn()); <END> toneMapping.enable(); sceneToneMapped.bind(); setViewportToSizeOf(sceneToneMapped); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderFullscreenQuad(); bindDisplay(); setViewportToSizeOf(sceneOpaque); PerformanceMonitor.endActivity(); }</code><technical_language>Notice in cases this line needed this node SetViewportToSizeOf state change</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("rendering/toneMapping"); sceneToneMapped = displayResolutionDependentFBOs.get(TONE_MAPPED); toneMapping.enable(); sceneToneMapped.bind(); setViewportToSizeOf(sceneToneMapped); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderFullscreenQuad(); bindDisplay(); setViewportToSizeOf(READ_ONLY_GBUFFER); PerformanceMonitor.endActivity(); }