auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testInitRepository() { String directory = new File(trash, "test1").getPath(); try { InitCommand command = new InitCommand(); command.setDirectory(directory); <START> Repository repository = command.call().getRepository(); <END> assertNotNull(repository); } catch (Exception e) { fail(e.getMessage()); } }</code><technical_language>debug this single test case stop here, resulting file system structure git repo structure twice, this weird, I is wrong : test1291411370681_0 - .git - branches - config - HEAD - logs - objects - refs - test1 - branches - config - HEAD - logs - objects - refs</technical_language>

Target:
public void testInitRepository() { try { File directory = createTempDirectory("testInitRepository"); InitCommand command = new InitCommand(); command.setDirectory(directory); Repository repository = command.call().getRepository(); assertNotNull(repository); } catch (Exception e) { fail(e.getMessage()); } }
Source:
<code>public void testExecScriptScriptDirFlagIsRespected() throws Exception { final String command = "if [[ \"$0\" == \"/var/tmp/\"* ]]; then true; else false; fi"; LocalhostMachineProvisioningLocation lhp = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().resolve("localhost", true, null).orNull(); SshMachineLocation sm = lhp.obtain(); Map<String, Object> props = ImmutableMap.<String, Object>builder() .put(SshTool.PROP_SCRIPT_DIR.getName(), "/var/tmp") .build(); <START> sm.execScript(props, "Test script directory execution", ImmutableList.of(command)); <END> }</code><technical_language>I need assert return is 0</technical_language>

Target:
public void testExecScriptScriptDirFlagIsRespected() throws Exception { final String command = "if [[ \"$0\" == \"/var/tmp/\"* ]]; then true; else false; fi"; LocalhostMachineProvisioningLocation lhp = (LocalhostMachineProvisioningLocation) mgmt.getLocationRegistry().resolve("localhost", true, null).orNull(); SshMachineLocation sm = lhp.obtain(); Map<String, Object> props = ImmutableMap.<String, Object>builder() .put(SshTool.PROP_SCRIPT_DIR.getName(), "/var/tmp") .build(); int rc = sm.execScript(props, "Test script directory execution", ImmutableList.of(command)); assertEquals(rc, 0); }
Source:
<code>@Override protected void executeQueryCommand() { try { executeQueryCommandChecked(); } catch (IOException ex) { <START> throw new RuntimeException("Failed to create signed websocket proxy ticket.", ex); <END> } }</code><technical_language>this other errors.. create EngineError key a message in vdsmerrors.{java/properties} files throw a EngineException this key</technical_language>

Target:
@Override protected void executeQueryCommand() { try { executeQueryCommandChecked(); } catch (IOException ex) { throw new EngineException(EngineError.FailedToCreateWebsocketProxyTicket, new RuntimeException(ex)); } }
Source:
<code>public IQ handleIQ(IQ iq) throws Exception { org.jivesoftware.smack.packet.IQ resultIQ = null; if (callControl == null) { <START> logger.warn("Call controller not initialized"); <END> } else { resultIQ = callControl.handleIQ(IQUtils.convert(iq)); } if (resultIQ != null) return IQUtils.convert(resultIQ); return super.handleIQSet(iq); }</code><technical_language>return XMPP Error service unavailable</technical_language>

Target:
public IQ handleIQ(IQ iq) throws Exception { org.jivesoftware.smack.packet.IQ resultIQ = null; if (callControl == null) { logger.warn("Call controller not initialized"); IQ error = IQ.createResultIQ(iq); error.setError(PacketError.Condition.service_unavailable); return error; } else { resultIQ = callControl.handleIQ(IQUtils.convert(iq)); } if (resultIQ != null) return IQUtils.convert(resultIQ); return super.handleIQSet(iq); }
Source:
<code>public BBContainer poll(OutputContainerFactory ocf) throws IOException { synchronized (PersistentBinaryDeque.this) { if (m_closed) { throw new IOException("Reader " + m_cursorId + " has been closed"); } assertions(); BBContainer retcont = null; PBDSegment segment = null; <START> long firstSegmentId = peekFirstSegment().segmentId(); <END> while (m_segmentId < firstSegmentId) m_segmentId++; long currSegmentId = m_segmentId; while (m_segments.containsKey(currSegmentId)) { PBDSegment s = m_segments.get(currSegmentId); if (!s.isOpenForReading(m_cursorId)) { s.openForRead(m_cursorId); } if (s.hasMoreEntries(m_cursorId)) { segment = s; retcont = segment.poll(m_cursorId, ocf); m_segmentId = currSegmentId; break; } currSegmentId++; } if (retcont == null) { return null; } decrementNumObjects(); assertions(); assert (retcont.b() != null); return wrapRetCont(segment, retcont); } }</code><technical_language>peekFirstSegment() null</technical_language>

Target:
public BBContainer poll(OutputContainerFactory ocf) throws IOException { synchronized (PersistentBinaryDeque.this) { if (m_closed) { throw new IOException("Reader " + m_cursorId + " has been closed"); } assertions(); moveToValidSegment(); PBDSegmentReader segmentReader = m_segment.getReader(m_cursorId); if (segmentReader == null) { segmentReader = m_segment.openForRead(m_cursorId); } long lastSegmentId = peekLastSegment().segmentId(); while (!segmentReader.hasMoreEntries()) { if (m_segment.segmentId() == lastSegmentId) { return null; } segmentReader.close(); m_segment = m_segments.higherEntry(m_segment.segmentId()).getValue(); segmentReader = m_segment.getReader(m_cursorId); if (segmentReader == null) segmentReader = m_segment.openForRead(m_cursorId); } BBContainer retcont = segmentReader.poll(ocf); m_numRead++; assertions(); assert (retcont.b() != null); return wrapRetCont(m_segment, retcont); } }
Source:
<code>public List<IAtsConfigObject> getInsertionFeatures(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid) throws Exception { <START> ArtifactReadable insertion = atsServer.getQuery().andUuid(insertionUuid).getResults().getExactlyOne(); <END> if (!insertion.getArtifactType().equals(AtsArtifactTypes.Insertion)) { throw new OseeCoreException("Given uuid not insertion type"); } ResultSet<ArtifactReadable> results = insertion.getRelated(AtsRelationTypes.InsertionToInsertionFeature_InsertionFeature); List<IAtsConfigObject> insertionFeatures = new LinkedList<IAtsConfigObject>(); for (ArtifactReadable insertionFeature : results) { insertionFeatures.add(atsServer.getConfigItemFactory().getInsertionFeature(insertionFeature)); } return insertionFeatures; }</code><technical_language>handle null case (same for rest below)</technical_language>

Target:
public Response getInsertionFeatures(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid) throws Exception { ArtifactReadable insertion = atsServer.getArtifactByUuid(insertionUuid); if (insertion == null) { throw new OseeCoreException("Given insertion uuid not found"); } if (!insertion.getArtifactType().equals(AtsArtifactTypes.Insertion)) { throw new OseeCoreException("Given uuid not insertion type"); } ResultSet<ArtifactReadable> results = insertion.getRelated(AtsRelationTypes.InsertionToInsertionFeature_InsertionFeature); List<IAtsConfigObject> insertionFeatures = new LinkedList<IAtsConfigObject>(); for (ArtifactReadable insertionFeature : results) { insertionFeatures.add(atsServer.getConfigItemFactory().getInsertionFeature(insertionFeature)); } GenericEntity<List<IAtsConfigObject>> entity = new GenericEntity<List<IAtsConfigObject>>(insertionFeatures) { }; return Response.ok(entity).build(); }
Source:
<code>public ModuleDefinitionService(WritableModuleRegistry registry, XDStreamParser parser, ModuleDependencyRepository dependencyRepository) { this.registry = registry; this.parser = parser; this.dependencyRepository = dependencyRepository; <START> composedJobParser = new JobParser(); <END> }</code><technical_language>this</technical_language>

Target:
public ModuleDefinitionService(WritableModuleRegistry registry, XDStreamParser parser, ModuleDependencyRepository dependencyRepository) { this.registry = registry; this.parser = parser; this.dependencyRepository = dependencyRepository; this.composedJobParser = new JobParser(); }
Source:
<code>protected void execute() { logger.debug("execute() method is called!"); for (WemoBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { logger.trace("Wemo switch '{}' state will be updated", itemName); try { String resp = wemoCall(itemName, "urn:Belkin:service:basicevent:1#GetBinaryState", IOUtils.toString(getClass().getResourceAsStream( "GetRequest.xml"))); String state = resp.replaceAll( "[\\d\\D]*<BinaryState>(.*)</BinaryState>[\\d\\D]*", "$1"); isOn = state.equals("1") ? true : false; logger.trace("{} state on = {}", itemName, isOn); if (state.equals("0")) { State itemState = OnOffType.valueOf("OFF"); logger.trace("Transformed state for item = {}", itemName, state); eventPublisher.postUpdate(itemName, itemState); } if (state.equals("1")) { State itemState = OnOffType.valueOf("ON"); logger.trace("Transformed state for item = {}", itemName, state); eventPublisher.postUpdate(itemName, itemState); <START> } <END> } catch (IOException e) { e.printStackTrace(); } } } }</code><technical_language>"?" operator avoid code duplication. Like: State itemState = state.equals("1") ? OnOffType.OFF : OnOffType.ON eventPublisher.postUpdate(itemName, itemState);</technical_language>

Target:
protected void execute() { logger.debug("execute() method is called!"); for (WemoBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { logger.trace("Wemo switch '{}' state will be updated", itemName); try { String resp = wemoCall(itemName, "urn:Belkin:service:basicevent:1#GetBinaryState", IOUtils.toString(getClass().getResourceAsStream( "GetRequest.xml"))); String state = resp.replaceAll( "[\\d\\D]*<BinaryState>(.*)</BinaryState>[\\d\\D]*", "$1"); State itemState = state.equals("1") ? OnOffType.ON : OnOffType.OFF; eventPublisher.postUpdate(itemName, itemState); } catch (IOException e) { e.printStackTrace(); } } } }
Source:
<code>void foo() { if (x == 0) { } else if (x == 1) { if(x == 2) { } <START> else if(x == 3) { <END> if (x == 5) { }else { } } } else { } if(x == 0) { }else if( x == 1) { } if(x==0) { } for(;;){ if(x == 10) { } if(x == 11) { } else if(x == 12){ } } }</code><technical_language>please reformat this test file a bit more compact coherent in term of style? remove empty lines</technical_language>

Target:
void foo() { if (x == 0) { } else if (x == 1) { if(x == 2) { } else if(x == 3) { if (x == 5) { }else { } } } else { } if(x == 0) { }else if( x == 1) { } if(x==0) { } for(;;){ if(x == 10) { } if(x == 11) { }else if(x == 12){ } } if(x == 0) else if(x == 13) { } else { if(x == 14) { }else if(x == 15) { } } if(x ==16) { }else if(x == 17) { }else if(x == 18) { } if(x ==16) { }else if(x == 17) { }else if(x == 18) { }else if(x ==16) { }else if(x == 17) { }else if(x == 18) { }else if(x == 19){} }
Source:
<code>private S3AFileSystem createUnguardedFS() throws Exception { S3AFileSystem testFS = getFileSystem(); Configuration config = new Configuration(testFS.getConf()); URI uri = testFS.getUri(); removeBaseAndBucketOverrides(uri.getHost(), config, S3_METADATA_STORE_IMPL); <START> removeBaseAndBucketOverrides(uri.getHost(), config, <END> METADATASTORE_AUTHORITATIVE); S3AFileSystem fs2 = new S3AFileSystem(); fs2.initialize(uri, config); return fs2; }</code><technical_language>need remove authoritative paths</technical_language>

Target:
private S3AFileSystem createUnguardedFS() throws Exception { S3AFileSystem testFS = getFileSystem(); Configuration config = new Configuration(testFS.getConf()); URI uri = testFS.getUri(); removeBaseAndBucketOverrides(uri.getHost(), config, S3_METADATA_STORE_IMPL, METADATASTORE_AUTHORITATIVE, AUTHORITATIVE_PATH); S3AFileSystem fs2 = new S3AFileSystem(); fs2.initialize(uri, config); return fs2; }
Source:
<code>public void validateTeams(List<StudentAttributes> studentList, String courseId) throws EntityDoesNotExistException, EnrollException { List<StudentAttributes> mergedList = getMergedList(studentList, courseId); if (mergedList.size() < 2) { return; } StringBuilder errorMessage = new StringBuilder(); <START> errorMessage.append(getTeamInvalidityInfo(mergedList)); <END> if (errorMessage.length() > 0) { throw new EnrollException(errorMessage.toString()); } }</code><technical_language>too, String errorMessage = ...</technical_language>

Target:
public void validateTeams(List<StudentAttributes> studentList, String courseId) throws EntityDoesNotExistException, EnrollException { List<StudentAttributes> mergedList = getMergedList(studentList, courseId); if (mergedList.size() < 2) { return; } String errorMessage = getTeamInvalidityInfo(mergedList); if (errorMessage.length() > 0) { throw new EnrollException(errorMessage); } }
Source:
<code>public MissingAmmoBin(int tonnage, EquipmentType et, int equipNum, boolean singleShot, boolean omniPodded, Campaign c) { <START> super(tonnage, et, equipNum, c, 1.0, 1, omniPodded); <END> this.oneShot = singleShot; if(null != name) { this.name += " Bin"; } }</code><technical_language>suggestion super(tonnage, et, equipNum, c, 1.0, 1.0, omniPodded);</technical_language>

Target:
public MissingAmmoBin(int tonnage, EquipmentType et, int equipNum, boolean singleShot, boolean omniPodded, Campaign c) { super(tonnage, et, equipNum, c, 1.0, 1.0, omniPodded); this.oneShot = singleShot; if(null != name) { this.name += " Bin"; } }
Source:
<code>private Set<LocalizedDescription> transformDescriptions( Set<org.atlasapi.media.entity.simple.LocalizedDescription> simpleLocalizedDescriptions ) { return simpleLocalizedDescriptions.stream() .map(input -> { LocalizedDescription localizedDescription = new LocalizedDescription(); localizedDescription.setDescription(input.getDescription()); localizedDescription.setShortDescription(input.getDescription()); localizedDescription.setMediumDescription(input.getMediumDescription()); localizedDescription.setLongDescription(input.getLongDescription()); localizedDescription.setLocale( <START> Strings.nullToEmpty(input.getLanguage()), <END> Strings.nullToEmpty(input.getRegion()) ); return localizedDescription; }) .collect(MoreCollectors.toImmutableSet()); }</code><technical_language>this method accept nullable fields anyway</technical_language>

Target:
private Set<LocalizedDescription> transformDescriptions( Set<org.atlasapi.media.entity.simple.LocalizedDescription> simpleLocalizedDescriptions ) { return simpleLocalizedDescriptions.stream() .map(input -> { LocalizedDescription localizedDescription = new LocalizedDescription(); localizedDescription.setDescription(input.getDescription()); localizedDescription.setShortDescription(input.getDescription()); localizedDescription.setMediumDescription(input.getMediumDescription()); localizedDescription.setLongDescription(input.getLongDescription()); localizedDescription.setLocale(input.getLanguage(), input.getRegion()); return localizedDescription; }) .collect(MoreCollectors.toImmutableSet()); }
Source:
<code>private String readFromAlias(String alias, List<String> excludeIdentifiers) { if (readIf("AS")) { alias = readAliasIdentifier(); <START> } else if (currentTokenType == IDENTIFIER && !excludeIdentifiers.contains(currentToken)) { <END> alias = readAliasIdentifier(); } return alias; }</code><technical_language>I need enhanced equalsToken() method of uppercasing</technical_language>

Target:
private String readFromAlias(String alias, List<String> excludeIdentifiers) { if (readIf("AS")) { alias = readAliasIdentifier(); } else if (currentTokenType == IDENTIFIER && !isTokenInList(excludeIdentifiers)) { alias = readAliasIdentifier(); } return alias; }
Source:
<code>private Set<Column> findOriginatingColumnsOfInputColumn(InputColumn<?> inputColumn) { final Set<Column> cachedOriginatingColumns = originatingColumnsOfInputColumnCache.get(inputColumn); if (cachedOriginatingColumns != null) { return cachedOriginatingColumns; } <START> Set<Column> originatingColumns = new HashSet<>(); <END> if (inputColumn != null) { if (inputColumn.isPhysicalColumn()) { originatingColumns.add(inputColumn.getPhysicalColumn()); } else { InputColumnSourceJob source = findInputColumnSource(inputColumn); originatingColumns.addAll(findOriginatingColumnsOfSource(source)); } } originatingColumnsOfInputColumnCache.put(inputColumn, originatingColumns); return originatingColumns; }</code><technical_language>final</technical_language>

Target:
private Set<Column> findOriginatingColumnsOfInputColumn(InputColumn<?> inputColumn) { final Set<Column> cachedOriginatingColumns = originatingColumnsOfInputColumnCache.get(inputColumn); if (cachedOriginatingColumns != null) { return cachedOriginatingColumns; } final Set<Column> originatingColumns = new HashSet<>(); if (inputColumn != null) { if (inputColumn.isPhysicalColumn()) { originatingColumns.add(inputColumn.getPhysicalColumn()); } else { InputColumnSourceJob source = findInputColumnSource(inputColumn); originatingColumns.addAll(findOriginatingColumnsOfSource(source)); } } originatingColumnsOfInputColumnCache.put(inputColumn, originatingColumns); return originatingColumns; }
Source:
<code>public Object convert(Class<? extends PersistableBusinessObject> businessObjectClass, RassPropertyDefinition propertyMapping, Object propertyValue) { List<RassXMLAwardPiCoPiEntry> rassAwardPiCoPiEntries = (List<RassXMLAwardPiCoPiEntry>) propertyValue; List<CGProjectDirector> projectDirectors = new ArrayList<>(); if (rassAwardPiCoPiEntries != null && rassAwardPiCoPiEntries.size() > 0) { for (RassXMLAwardPiCoPiEntry rassAwardPiCoPi : rassAwardPiCoPiEntries) { <START> CGProjectDirector projectDirector = createNewProjectDirectorInstance(); <END> Person projectDirectorPerson = personService.getPersonByPrincipalName(rassAwardPiCoPi.getProjectDirectorPrincipalName()); if (ObjectUtils.isNull(projectDirectorPerson)) { throw new RuntimeException("Cannot find person with principal name \"" + rassAwardPiCoPi.getProjectDirectorPrincipalName() + "\""); } if (!doesPersonHaveProjectDirectRole(projectDirectorPerson)) { LOG.info("convert, " + projectDirectorPerson.getPrincipalName() + " needs to be added to the project director role"); roleService.assignPrincipalToRole(projectDirectorPerson.getPrincipalId(), KFSConstants.CoreModuleNamespaces.KFS, KFSConstants.SysKimApiConstants.CONTRACTS_AND_GRANTS_PROJECT_DIRECTOR, new HashMap<String, String>()); } projectDirector.setPrincipalId(projectDirectorPerson.getPrincipalId()); ObjectPropertyUtils.setPropertyValue(projectDirector, projectDirectorPrimaryIndicatorPropertyName, getNullSafePrimaryDirectorFlag(rassAwardPiCoPi)); projectDirectors.add(projectDirector); } } return projectDirectors; }</code><technical_language>cleaner move code for loop a separate method</technical_language>

Target:
public Object convert(Class<? extends PersistableBusinessObject> businessObjectClass, RassPropertyDefinition propertyMapping, Object propertyValue) { List<RassXMLAwardPiCoPiEntry> rassAwardPiCoPiEntries = (List<RassXMLAwardPiCoPiEntry>) propertyValue; List<CGProjectDirector> projectDirectors = new ArrayList<>(); if (rassAwardPiCoPiEntries != null && rassAwardPiCoPiEntries.size() > 0) { for (RassXMLAwardPiCoPiEntry rassAwardPiCoPi : rassAwardPiCoPiEntries) { CGProjectDirector projectDirector = buildProjectDirector(rassAwardPiCoPi); projectDirectors.add(projectDirector); } } return projectDirectors; }
Source:
<code>public static double[] smudgeNoise(final double[] values, final double mean, final double stdDev, final int noiseLengthTolerance) { double[] noiseFreeValues = new double[values.length]; if (isNoise(values[0], mean, stdDev)) { noiseFreeValues[0] = mean; } else { noiseFreeValues[0] = values[0]; } for (int i = 1; i < values.length - noiseLengthTolerance; i++) { noiseFreeValues[i] = values[i]; if (!isNoise(values[i], mean, stdDev)) { noiseFreeValues[i] = values[i]; continue; } LOGGER.info("index {}: value is noise",i, values[i]); for (int j = 1; j <= noiseLengthTolerance; j++) { if (isNoise(values[i + j], mean, stdDev)) { continue; } double averageSurroundingValues = (noiseFreeValues[i - 1] + values[i + j]) / 2; int n = 0; <START> while (isNoise(averageSurroundingValues, mean, stdDev) & n <= 5) { <END> n++; averageSurroundingValues = 0.75 * averageSurroundingValues + 0.25 * mean; } noiseFreeValues[i] = averageSurroundingValues; } } for (int k = values.length - noiseLengthTolerance; k < values.length; k++) { if (isNoise(values[k], mean, stdDev)) { noiseFreeValues[k] = (noiseFreeValues[k - 2] + noiseFreeValues[k - 1]) / 2; } else { noiseFreeValues[k] = values[k]; } } return noiseFreeValues; }</code><technical_language>5 a constant</technical_language>

Target:
public static double[] smudgeNoise(final double[] values, final double mean, final double stdDev, final int noiseLengthTolerance) { double[] noiseFreeValues = new double[values.length]; if (isNoise(values[0], mean, stdDev)) { noiseFreeValues[0] = mean; } else { noiseFreeValues[0] = values[0]; } for (int i = 1; i < values.length - noiseLengthTolerance; i++) { noiseFreeValues[i] = values[i]; if (!isNoise(values[i], mean, stdDev)) { noiseFreeValues[i] = values[i]; continue; } for (int j = 1; j <= noiseLengthTolerance; j++) { if (isNoise(values[i + j], mean, stdDev)) { continue; } double averageSurroundingValues = (noiseFreeValues[i - 1] + values[i + j]) / 2; int n = 0; while (isNoise(averageSurroundingValues, mean, stdDev) & n <= MAXIMUM_NOISE_CORRECTIONS) { n++; averageSurroundingValues = 0.75 * averageSurroundingValues + 0.25 * mean; } noiseFreeValues[i] = averageSurroundingValues; } } for (int k = values.length - noiseLengthTolerance; k < values.length; k++) { if (isNoise(values[k], mean, stdDev)) { noiseFreeValues[k] = (noiseFreeValues[k - 2] + noiseFreeValues[k - 1]) / 2; } else { noiseFreeValues[k] = values[k]; } } return noiseFreeValues; }
Source:
<code>public void addToOrderBook(Order order) { if (order.isOrderType() == 1){ ArrayList<Order> <START> tempList = <END> sellOrders.get(order.getStockSymbol()); tempList.add(order); sellOrders.put(order.getStockSymbol(), tempList); } else if (order.isOrderType() == 2){ ArrayList<Order> tempList = buyOrders.get(order.getStockSymbol()); tempList.add(order); buyOrders.put(order.getStockSymbol(), tempList); } }</code><technical_language>change this variable a more descriptive name explains purpose</technical_language>

Target:
public void addToOrderBook(Order order) { if (order.isOrderType() == 1){ ArrayList<Order> tempOrders = sellOrders.get(order.getStockSymbol()); tempOrders.add(order); sellOrders.put(order.getStockSymbol(), tempOrders); } else if (order.isOrderType() == 2){ ArrayList<Order> tempOrders = buyOrders.get(order.getStockSymbol()); tempOrders.add(order); buyOrders.put(order.getStockSymbol(), tempOrders); } }
Source:
<code>void sendMessagesListExceedSize() { final int count = 4; final Mono<Integer> linkMaxSize = Mono.just(1); final byte[] contents = TEST_CONTENTS.getBytes(UTF_8); final ServiceBusMessage[] messages = new ServiceBusMessage[count]; IntStream.range(0, count).forEach(index -> { messages[index] = new ServiceBusMessage(contents).setMessageId(UUID.randomUUID().toString()); }); when(connection.createSendLink(eq(ENTITY_NAME), eq(ENTITY_NAME), eq(retryOptions))) .thenReturn(Mono.just(sendLink)); when(sendLink.getLinkSize()).thenReturn(linkMaxSize); StepVerifier.create(sender.send(messages)) .verifyErrorMatches(error -> error instanceof AmqpException && ((AmqpException) error).getErrorCondition() == AmqpErrorCondition.LINK_PAYLOAD_SIZE_EXCEEDED); <START> verify(sendLink, times(0)).send(anyList()); <END> }</code><technical_language>is never() => times(0)</technical_language>

Target:
void sendMessagesListExceedSize() { final int count = 4; final Mono<Integer> linkMaxSize = Mono.just(1); final List<ServiceBusMessage> messages = TestUtils.getServiceBusMessages(count, UUID.randomUUID().toString()); when(connection.createSendLink(eq(ENTITY_NAME), eq(ENTITY_NAME), eq(retryOptions))) .thenReturn(Mono.just(sendLink)); when(sendLink.getLinkSize()).thenReturn(linkMaxSize); StepVerifier.create(sender.send(messages)) .verifyErrorMatches(error -> error instanceof AmqpException && ((AmqpException) error).getErrorCondition() == AmqpErrorCondition.LINK_PAYLOAD_SIZE_EXCEEDED); verify(sendLink, never()).send(anyList()); }
Source:
<code>public ApiException(String code, String info) { <START> super(info); <END> this.code = code; this.info = info; }</code><technical_language>pass info message param super, do need a copy in subclass</technical_language>

Target:
public ApiException(String code, String info) { super(); this.code = code; this.info = info; }
Source:
<code>public <T> CompletionStage<T> execute(final SphereRequest<T> sphereRequest) { final String id = "" + requestIdGenerator.incrementAndGet(); final long startTimestamp = System.currentTimeMillis(); final MetricSphereRequest<T> metricSphereRequest = new MetricSphereRequest<>(sphereRequest, id, metricObservable); final CompletionStage<T> completionStage = super.execute(metricSphereRequest); completionStage.whenComplete((nullableResult, nullableThrowable) -> { final long stopTimestamp = System.currentTimeMillis(); <START> if (nullableThrowable == null) { <END> final long duration = stopTimestamp - startTimestamp; metricObservable.notifyObservers(ObservedTotalDuration.of(duration, id, sphereRequest)); } }); return completionStage; }</code><technical_language>show duration if errors, it? final long stopTimestamp = System.currentTimeMillis(); in if block</technical_language>

Target:
public <T> CompletionStage<T> execute(final SphereRequest<T> sphereRequest) { final String id = "" + requestIdGenerator.incrementAndGet(); final long startTimestamp = System.currentTimeMillis(); final MetricSphereRequest<T> metricSphereRequest = new MetricSphereRequest<>(sphereRequest, id, metricObservable); final CompletionStage<T> completionStage = super.execute(metricSphereRequest); completionStage.whenComplete((nullableResult, nullableThrowable) -> { final long stopTimestamp = System.currentTimeMillis(); final long duration = stopTimestamp - startTimestamp; metricObservable.notifyObservers(ObservedTotalDuration.of(duration, id, sphereRequest, metricSphereRequest.getCorrelationId())); }); return completionStage; }
Source:
<code>public void applyTextEdit(TextEditActivity edit) { <START> content.delete(edit.getOffset(), edit.getReplacedText().length()); <END> content.insert(edit.getOffset(), edit.getText()); }</code><technical_language>Check actions needed? execute content.delete(....) if edit.getReplacedText().length() > 0, content.insert(....)</technical_language>

Target:
public void applyTextEdit(TextEditActivity edit) { if (edit.getReplacedText().length() > 0) { content.delete(edit.getOffset(), edit.getReplacedText().length()); } if (edit.getText().length() > 0) { content.insert(edit.getOffset(), edit.getText()); } }
Source:
<code>public Randomizer<?> getRandomizer(Field field) { EnhancedRandom enhancedRandom = EnhancedRandomBuilder.aNewEnhancedRandomBuilder() .seed(seed) <START> .dateRange(LocalDate.now().minusYears(Constants.DEFAULT_DATE_RANGE), LocalDate.now()) <END> .build(); return (() -> enhancedRandom.nextObject(field.getType())); }</code><technical_language>I this delegate enhancedRandom a field initialized in constructor. This avoids creating time call getRandomizer. this sense</technical_language>

Target:
public Randomizer<?> getRandomizer(Field field) { if (enhancedRandom == null) { enhancedRandom = EnhancedRandomBuilder.aNewEnhancedRandomBuilder() .seed(seed) .dateRange(LocalDate.now().minusYears(Constants.DEFAULT_DATE_RANGE), LocalDate.now()) .build(); } return () -> enhancedRandom.nextObject(field.getType()); }
Source:
<code>public List<Surveillance> getAllPendingSurveillances() { List<PendingSurveillanceEntity> pendingResults = survDao.getAllPendingSurveillance(); List<Surveillance> results = new ArrayList<Surveillance>(); if (pendingResults != null) { for (PendingSurveillanceEntity pr : pendingResults) { Surveillance surv = convertToDomain(pr); results.add(surv); } } <START> Iterator<Surveillance> iterator = results.iterator(); <END> while (iterator.hasNext()) { if (!permissions.hasAccess( Permissions.PENDING_SURVEILLANCE, PendingSurveillanceDomainPermissions.GET_ALL, iterator.next())) { iterator.remove(); } } return results; }</code><technical_language>I kind of figure out if this is new security framework. I feel if put this code end staying here. fixing in next sprint if much/frustrating for now, want get forgotten about</technical_language>

Target:
public List<Surveillance> getAllPendingSurveillances() { List<PendingSurveillanceEntity> pendingResults = survDao.getAllPendingSurveillance(); List<Surveillance> results = new ArrayList<Surveillance>(); if (pendingResults != null) { for (PendingSurveillanceEntity pr : pendingResults) { Surveillance surv = convertToDomain(pr); results.add(surv); } } return results; }
Source:
<code>public void copyTo(final TemplateOptions to) { super.copyTo(to); if (to instanceof AzureComputeTemplateOptions) { final AzureComputeTemplateOptions eTo = AzureComputeTemplateOptions.class.cast(to); eTo.addressSpaceAddressPrefix(addressSpaceAddressPrefix); eTo.subnetName(subnetName); <START> eTo.subnetName(networkSecurityGroupName); <END> eTo.subnetAddressPrefix(subnetAddressPrefix); eTo.storageAccountName(storageAccountName); eTo.storageAccountType(storageAccountType); eTo.reservedIPName(reservedIPName); } }</code><technical_language>eTo.networkSecurityGroupName</technical_language>

Target:
public void copyTo(final TemplateOptions to) { super.copyTo(to); if (to instanceof AzureComputeTemplateOptions) { final AzureComputeTemplateOptions eTo = AzureComputeTemplateOptions.class.cast(to); eTo.virtualNetworkName(virtualNetworkName); if (!subnetNames.isEmpty()) { eTo.subnetNames(subnetNames); } eTo.storageAccountName(storageAccountName); eTo.storageAccountType(storageAccountType); eTo.reservedIPName(reservedIPName); } }
Source:
<code>protected Control createDialogArea(Composite parent) { super.createDialogArea(parent); Composite composite = (Composite) super.createDialogArea(parent); IRemoteServicesManager manager = TerminalViewPlugin.getService(IRemoteServicesManager.class); @SuppressWarnings("unchecked") List<IRemoteConnectionType> connTypes = manager.getConnectionTypesSupporting( IRemoteCommandShellService.class, IRemoteProcessService.class); remoteConnWidget = new RemoteConnectionWidget(composite, SWT.NONE, null, 0, connTypes); if (initialConnection != null) { remoteConnWidget.setConnection(initialConnection); } else if (initialId != null && initialName != null) { remoteConnWidget.setConnection(initialId, initialName); } remoteConnWidget.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { validateDialog(); } }); <START> return composite; <END> }</code><technical_language>missing setting encoding previous terminal</technical_language>

Target:
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); composite.setLayout(new GridLayout(2, false)); IRemoteServicesManager manager = TerminalViewPlugin.getService(IRemoteServicesManager.class); @SuppressWarnings("unchecked") List<IRemoteConnectionType> connTypes = manager.getConnectionTypesSupporting( IRemoteCommandShellService.class, IRemoteProcessService.class); remoteConnWidget = new RemoteConnectionWidget(composite, SWT.NONE, null, 0, connTypes); if (initialConnection != null) { remoteConnWidget.setConnection(initialConnection); } else if (initialId != null && initialName != null) { remoteConnWidget.setConnection(initialId, initialName); } GridData gd = new GridData(); gd.horizontalSpan = 2; remoteConnWidget.setLayoutData(gd); remoteConnWidget.addSelectionListener(new ValidationSelectionListener()); Label encodingLabel = new Label(composite, SWT.NONE); encodingLabel.setLayoutData(new GridData()); encodingLabel.setText(ConsoleMessages.ENCODING); encodingCombo = new Combo(composite, SWT.READ_ONLY); encodingCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); int i = 0; String hostEncoding = Charset.defaultCharset().name(); for (String encoding : getEncodings()) { encodingCombo.add(encoding); if (encoding.equals(hostEncoding)) { selectedEncoding = encoding; encodingCombo.select(i); } i++; } encodingCombo.addSelectionListener(new ValidationSelectionListener()); return composite; }
Source:
<code>public void testCollisionInformation() throws IOException, InterruptedException { final String expectedMetadata = "1.0;94.0;5.0;143.0;25.0;119.0;35.0;150.0;73.0;138.0;92.0;150.0;100.0;118.0;" + "110.0;143.0;124.0;141.0;120.0;88.0;106.0;105.0;21.0;101.0;105.0;98.0;105.0;39.0;82.0;0.0;68.0;" + "29.0;52.0;0.0;38.0;17.0;7.0;19.0;27.0;31.0;22.0;95.0"; Project project = new Project(InstrumentationRegistry.getTargetContext(), "testProject"); final String filePath = project.getDefaultScene().getDirectory() + "/" + IMAGE_DIRECTORY_NAME + "/collision_donut.png"; Sprite sprite = new SingleSprite("testSprite"); project.getDefaultScene().addSprite(sprite); ProjectManager.getInstance().setProject(project); ProjectManager.getInstance().setCurrentSprite(sprite); XstreamSerializer.getInstance().saveProject(project); File imageFile = ResourceImporter.createImageFileFromResourcesInDirectory( InstrumentationRegistry.getContext().getResources(), <START> org.catrobat.catroid.test.R.drawable.catroid_banzai, <END> new File(project.getDefaultScene().getDirectory(), IMAGE_DIRECTORY_NAME), "collision_donut.png", 1); LookData lookData = new LookData("test", imageFile); sprite.getLookList().add(lookData); lookData.getCollisionInformation().loadOrCreateCollisionPolygon(); String metadata = ImageEditing.readMetaDataStringFromPNG(filePath, Constants.COLLISION_PNG_META_TAG_KEY); assertEquals(expectedMetadata, metadata); }</code><technical_language>this is loading collision_donut resource, loading catroid_banzai image renaming destination file collision_donut</technical_language>

Target:
public void testCollisionInformation() throws IOException, InterruptedException { lookData.getCollisionInformation().loadOrCreateCollisionPolygon(); String metadata = ImageEditing.readMetaDataStringFromPNG(filePath, Constants.COLLISION_PNG_META_TAG_KEY); assertEquals(expectedMetadata, metadata); }
Source:
<code>public List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level) { List<EventLog> events = new ArrayList<>(); <START> ConcurrentMap<Address, Throwable> throwables = CollectionFactory.makeConcurrentMap(); <END> try { cacheManager.executor().submitConsumer(m -> { Cache<Object, Object> cache = m.getCache(EVENT_LOG_CACHE); QueryFactory<Query> queryFactory = Search.getQueryFactory(cache); QueryBuilder query = queryFactory.from(ServerEventImpl.class).orderBy("when", SortOrder.DESC).maxResults(count); FilterConditionContext filter = query.having("when").lte(start); FilterConditionContext categoryFilter = category.map(c -> filter.and(queryFactory.having("category").eq(c))).orElse(filter); FilterConditionContext levelFilter = level.map(l -> categoryFilter.and(queryFactory.having("level").eq(l))).orElse(categoryFilter); List<EventLog> nodeEvents = levelFilter.toBuilder().build().list(); return nodeEvents; }, (address, nodeEvents, t) -> { if (t == null) { events.addAll(nodeEvents); } else { throwables.put(address, t); } }).get(10, TimeUnit.SECONDS); if (throwables.size() > 0) { throw new CacheException(throwables.values().iterator().next()); } } catch (Exception e) { log.debug("Could not retrieve events", e); throw new CacheException(e); } Collections.sort(events); return events.subList(0, Math.min(events.size(), count)); }</code><technical_language>a ConcurrentLinkedQueue instead? keys</technical_language>

Target:
public List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level) { List<EventLog> events = new ArrayList<>(); AtomicReference<Throwable> throwable = new AtomicReference<>(); try { cacheManager.executor().submitConsumer(m -> { Cache<Object, Object> cache = m.getCache(EVENT_LOG_CACHE); QueryFactory<Query> queryFactory = Search.getQueryFactory(cache); QueryBuilder query = queryFactory.from(ServerEventImpl.class).orderBy("when", SortOrder.DESC).maxResults(count); FilterConditionContext filter = query.having("when").lte(start); category.map(c -> filter.and(queryFactory.having("category").eq(c))); level.map(l -> filter.and(queryFactory.having("level").eq(l))); List<EventLog> nodeEvents = filter.toBuilder().build().list(); return nodeEvents; }, (address, nodeEvents, t) -> { if (t == null) { events.addAll(nodeEvents); } else { throwable.set(t); } }).get(1, TimeUnit.MINUTES); if (throwable.get() != null) { throw new CacheException(throwable.get()); } } catch (Exception e) { log.debug("Could not retrieve events", e); throw new CacheException(e); } Collections.sort(events); return events.subList(0, Math.min(events.size(), count)); }
Source:
<code>protected void finalize() throws Throwable { close(); <START> Files.deleteIfExists(tmpFile); <END> }</code><technical_language>Finally block ensure temp file is deleted</technical_language>

Target:
protected void finalize() throws Throwable { closeAndDeleteTempFile(); }
Source:
<code>public RecipeViewHolder(@NonNull Context context, @NonNull View itemView) { <START> super(context, itemView); <END> mRecipeTextView = (TextView) itemView.findViewById(R.id.recipe_textview); mArrowExpandImageView = (ImageView) itemView.findViewById(R.id.arrow_expand_imageview); }</code><technical_language>this view is context. if context itemView.getContext() instead of passing a new parameter</technical_language>

Target:
public RecipeViewHolder(@NonNull Context context, @NonNull View itemView) { super(itemView); mRecipeTextView = (TextView) itemView.findViewById(R.id.recipe_textview); mArrowExpandImageView = (ImageView) itemView.findViewById(R.id.arrow_expand_imageview); }
Source:
<code>public void obtainsAuthor() throws Exception { final Alias alias = new MkBase().randomAlias(); final Inbox inbox = alias.inbox(); <START> final Bout bout = inbox.bout(inbox.start()); <END> final Attachments attachments = bout.attachments(); final String name = "name"; attachments.create(name); final Attachment attachment = attachments.get(name); MatcherAssert.assertThat( attachment.author(), Matchers.equalTo(alias.name()) ); }</code><technical_language>@CarlosGines inline bout</technical_language>

Target:
public void obtainsAuthor() throws Exception { final Alias alias = new MkBase().randomAlias(); final Inbox inbox = alias.inbox(); final Attachments attachments = inbox.bout(inbox.start()) .attachments(); final String name = "name"; attachments.create(name); final Attachment attachment = attachments.get(name); MatcherAssert.assertThat( attachment.author(), Matchers.equalTo(alias.name()) ); }
Source:
<code>public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { boolean retry = false; try { byte[] data = closeClientButKeepContentStream(response); <START> String message = data != null ? new String(data) : null; <END> switch (response.getStatusCode()) { case 500: case 503: retry = super.shouldRetryRequest(command, response); break; default: break; } } finally { releasePayload(response); } return retry; }</code><technical_language>Message unused. Remove this line</technical_language>

Target:
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { boolean retry = false; try { byte[] data = closeClientButKeepContentStream(response); switch (response.getStatusCode()) { case 500: case 503: retry = super.shouldRetryRequest(command, response); break; default: break; } } finally { releasePayload(response); } return retry; }
Source:
<code>public static String decode(String s, boolean tolerant) throws URLEncodedFormatException { if (s.length() == 0) return ""; int len = s.length(); ByteArrayOutputStream decodedBytes = new ByteArrayOutputStream(); boolean hasDecodedSomething = false; for (int i = 0; i < len; i++) { char c = s.charAt(i); if (c == '%') { if (i >= len - 2) { throw new URLEncodedFormatException(s); } char[] hexChars = new char[2]; hexChars[0] = s.charAt(++i); hexChars[1] = s.charAt(++i); String hexval = new String(hexChars); try { long read = Fields.hexToLong(hexval); if (read == 0) throw new URLEncodedFormatException("Can't encode" + " 00"); decodedBytes.write((int) read); hasDecodedSomething = true; } catch (NumberFormatException nfe) { if(tolerant && !hasDecodedSomething) { try { byte[] buf = ('%'+hexval).getBytes("UTF-8"); decodedBytes.write(buf, 0, buf.length); continue; } catch (UnsupportedEncodingException e) { throw new Error("Impossible: JVM doesn't support UTF-8: " + e, e); } } throw new URLEncodedFormatException("Not a two character hex % escape: "+hexval+" in "+s); } } else { try { <START> byte[] encoded = (String.valueOf(c)).getBytes("UTF-8"); <END> decodedBytes.write(encoded, 0, encoded.length); } catch (UnsupportedEncodingException e) { throw new Error("Impossible: JVM doesn't support UTF-8: " + e, e); } } } try { decodedBytes.close(); return new String(decodedBytes.toByteArray(), "utf-8"); } catch (IOException ioe1) { } throw new URLEncodedFormatException(s); }</code><technical_language>Is a reason for extra parenthesis valueOf() result</technical_language>

Target:
public static String decode(String s, boolean tolerant) throws URLEncodedFormatException { if (s.length() == 0) return ""; int len = s.length(); ByteArrayOutputStream decodedBytes = new ByteArrayOutputStream(); boolean hasDecodedSomething = false; for (int i = 0; i < len; i++) { char c = s.charAt(i); if (c == '%') { if (i >= len - 2) { throw new URLEncodedFormatException(s); } char[] hexChars = new char[2]; hexChars[0] = s.charAt(++i); hexChars[1] = s.charAt(++i); String hexval = new String(hexChars); try { long read = Fields.hexToLong(hexval); if (read == 0) throw new URLEncodedFormatException("Can't encode" + " 00"); decodedBytes.write((int) read); hasDecodedSomething = true; } catch (NumberFormatException nfe) { if(tolerant && !hasDecodedSomething) { try { byte[] buf = ('%'+hexval).getBytes("UTF-8"); decodedBytes.write(buf, 0, buf.length); continue; } catch (UnsupportedEncodingException e) { throw new Error("Impossible: JVM doesn't support UTF-8: " + e, e); } } throw new URLEncodedFormatException("Not a two character hex % escape: "+hexval+" in "+s); } } else { try { byte[] encoded = String.valueOf(c).getBytes("UTF-8"); decodedBytes.write(encoded, 0, encoded.length); } catch (UnsupportedEncodingException e) { throw new Error("Impossible: JVM doesn't support UTF-8: " + e, e); } } } try { decodedBytes.close(); return new String(decodedBytes.toByteArray(), "utf-8"); } catch (IOException ioe1) { } throw new URLEncodedFormatException(s); }
Source:
<code>public static synchronized void install() { if (hasBeenInstalled) { return; } try { AgentLoader.loadAgentClass(Http2Agent.class.getName(), ""); hasBeenInstalled = true; } catch (Exception e) { <START> logger.error("Unable to dynamically install jetty-alpn-agent via ea-agent-loader, proceeding anyway...", e); <END> } }</code><technical_language>warn</technical_language>

Target:
public static synchronized void install() { if (hasBeenInstalled) { return; } try { AgentLoader.loadAgentClass(Http2Agent.class.getName(), ""); hasBeenInstalled = true; } catch (Exception e) { log.warn("Unable to dynamically install jetty-alpn-agent via ea-agent-loader, proceeding anyway...", e); } }
Source:
<code><START> private void setDefaultLibraryCategoryIcons(List<ShortcutCategoryDTO> categories) { <END> Platform.runLater(() -> { try { StringBuilder cssBuilder = new StringBuilder(); for (ShortcutCategoryDTO category : categories) { cssBuilder.append("#" + LibrarySidebarToggleGroupSkin.getToggleButtonId(category.getId()) + "{\n"); URI categoryIcon = category.getIcon(); if (categoryIcon == null) { cssBuilder .append("-fx-background-image: url('/org/phoenicis/javafx/views/common/phoenicis.png');\n"); } else { cssBuilder.append("-fx-background-image: url('" + categoryIcon + "');\n"); } cssBuilder.append("}\n"); } String css = cssBuilder.toString(); Path temp = Files.createTempFile("defaultLibraryCategoryIcons", ".css").toAbsolutePath(); File tempFile = temp.toFile(); tempFile.deleteOnExit(); Files.write(temp, css.getBytes()); String defaultLibraryCategoryIconsCss = temp.toUri().toString(); this.themeManager.setDefaultLibraryCategoryIconsCss(defaultLibraryCategoryIconsCss); } catch (IOException e) { LOGGER.warn("Could not set default category icons.", e); } }); }</code><technical_language>This method similar setDefaultCategoryIcons above. merge methods single method</technical_language>

Target:
private void setDefaultLibraryCategoryIcons(List<ShortcutCategoryDTO> categories) { Platform.runLater(() -> { try { StringBuilder cssBuilder = new StringBuilder(); for (ShortcutCategoryDTO category : categories) { cssBuilder.append("#" + LibrarySidebarToggleGroupSkin.getToggleButtonId(category.getId()) + "{\n"); final String categoryIconPath = Optional.ofNullable(category.getIcon()) .map(categoryIcon -> categoryIcon.toString()) .orElse("/org/phoenicis/javafx/views/common/phoenicis.png"); cssBuilder.append(String.format("-fx-background-image: url('%s');\n", categoryIconPath)); cssBuilder.append("}\n"); } String css = cssBuilder.toString(); Path temp = Files.createTempFile("defaultLibraryCategoryIcons", ".css").toAbsolutePath(); File tempFile = temp.toFile(); tempFile.deleteOnExit(); Files.write(temp, css.getBytes()); String defaultLibraryCategoryIconsCss = temp.toUri().toString(); this.themeManager.setDefaultLibraryCategoryIconsCss(defaultLibraryCategoryIconsCss); } catch (IOException e) { LOGGER.warn("Could not set default category icons.", e); } }); }
Source:
<code>private void processPayoutNotification(StripeNotification notification) { logger.info("Processing payout created notification with id for connect account [{}]", PAYMENT_GATEWAY_NAME, notification.getId(), notification.getAccount()); try { StripePayout stripePayout = toPayout(notification.getObject()); StripeNotificationType stripeNotificationType = byType(notification.getType()); if (PAYOUT_CREATED.equals(stripeNotificationType)) { Payout payout = new Payout(stripePayout.getId(), notification.getAccount(), stripePayout.getCreated()); sendToPayoutReconcileQueue(notification.getAccount(), payout); } <START> payoutEmitterService.emitPayoutEvent(stripeNotificationType.getEventClass(), <END> notification.getAccount(), stripePayout); } catch (StripeParseException e) { logger.error("{} payout notification parsing failed for connect account [{}]: {}", PAYMENT_GATEWAY_NAME, notification.getAccount(), e); } }</code><technical_language>current code path get PAYOUT_CREATED events here, protect EventClass returned for notification type notification types one</technical_language>

Target:
private void processPayoutNotification(StripeNotification notification) { logger.info("Processing payout created notification with id for connect account [{}]", PAYMENT_GATEWAY_NAME, notification.getId(), notification.getAccount()); try { StripePayout stripePayout = toPayout(notification.getObject()); StripeNotificationType stripeNotificationType = byType(notification.getType()); if (PAYOUT_CREATED.equals(stripeNotificationType)) { Payout payout = new Payout(stripePayout.getId(), notification.getAccount(), stripePayout.getCreated()); sendToPayoutReconcileQueue(notification.getAccount(), payout); } Optional<Class<? extends PayoutEvent>> mayBeEventClass = stripeNotificationType.getEventClass(); if (mayBeEventClass.isEmpty()) { logger.warn("Event class is not assigned for Stripe payout type - payout [{}]", notification.getType(), stripePayout.getId()); } else { payoutEmitterService.emitPayoutEvent(mayBeEventClass.get(), notification.getAccount(), stripePayout); } } catch (StripeParseException e) { logger.error("{} payout notification parsing failed for connect account [{}]: {}", PAYMENT_GATEWAY_NAME, notification.getAccount(), e); } }
Source:
<code>void prepareValues() { if (constraintValue() == BaseSingleFieldConstraint.TYPE_PREDICATE) { editingCol().setOperator(null); } <START> if (!(tableFormat() == GuidedDecisionTable52.TableFormat.LIMITED_ENTRY || constraintValue() == BaseSingleFieldConstraint.TYPE_LITERAL)) { <END> editingCol().setBinding(null); } }</code><technical_language>@karreiro , question, this condition is complex in sync valueOptionsPage.canSetupBinding(). I canSetupBinding() this if sligtly different, however, do , this if if (valueOptionsPage.canSetupBinding())</technical_language>

Target:
void prepareValues() { if (constraintValue() == BaseSingleFieldConstraint.TYPE_PREDICATE) { editingCol().setOperator(null); } if (!isBindable()) { editingCol().setBinding(null); } }