auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected boolean processCurrentFileAndExtractPdpFeedFromSAEFile(String saeFileName) { boolean success = true; LOG.debug("processCurrentFileAndExtractPdpFeedFromSAEFile, current File: " + saeFileName); ConcurStandardAccountingExtractFile concurStandardAccoutingExtractFile = getConcurStandardAccountingExtractService() .parseStandardAccoutingExtractFile(saeFileName); if (getConcurStandardAccountingExtractValidationService().validateConcurStandardAccountExtractFile(concurStandardAccoutingExtractFile)) { String outputFileName = getConcurStandardAccountingExtractService().extractPdpFeedFromStandardAccounitngExtract(concurStandardAccoutingExtractFile); if (StringUtils.isEmpty(outputFileName)) { success = false; LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, could not produce a PDP XML file for " + saeFileName); } if (success) { success &= getConcurStandardAccountingExtractService() .extractCollectorFeedFromStandardAccountingExtract(concurStandardAccoutingExtractFile); } if (success) { try { getConcurStandardAccountingExtractService().createDoneFileForPdpFile(outputFileName); } catch (IOException e) { LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, unable to create .done file: ", e); success = false; } <START> } <END> } else { success = false; LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, the SAE file failed high level validation."); } return success; }</code><technical_language>If PDP is successful Collector is not, cleanup of PDP file need performed in else-clause matching collector file</technical_language>

Target:
protected boolean processCurrentFileAndExtractPdpFeedFromSAEFile(String saeFileName) { boolean success = true; LOG.debug("processCurrentFileAndExtractPdpFeedFromSAEFile, current File: " + saeFileName); ConcurStandardAccountingExtractFile concurStandardAccoutingExtractFile = getConcurStandardAccountingExtractService() .parseStandardAccoutingExtractFile(saeFileName); if (getConcurStandardAccountingExtractValidationService().validateConcurStandardAccountExtractFile(concurStandardAccoutingExtractFile)) { String outputFileName = getConcurStandardAccountingExtractService().extractPdpFeedFromStandardAccountingExtract(concurStandardAccoutingExtractFile); if (StringUtils.isEmpty(outputFileName)) { success = false; LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, could not produce a PDP XML file for " + saeFileName); } if (success) { success &= getConcurStandardAccountingExtractService() .extractCollectorFeedFromStandardAccountingExtract(concurStandardAccoutingExtractFile); } if (success) { try { getConcurStandardAccountingExtractService().createDoneFileForPdpFile(outputFileName); } catch (IOException e) { LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, unable to create .done file: ", e); success = false; } } } else { success = false; LOG.error("processCurrentFileAndExtractPdpFeedFromSAEFile, the SAE file failed high level validation."); } return success; }
Source:
<code>public static Type canonicalize(Type type) { if (type instanceof Class) { Class<?> c = (Class<?>) type; return c.isArray() ? new GenericArrayTypeImpl(canonicalize(c.getComponentType())) : c; } else if (type instanceof ParameterizedType) { if (type instanceof ParameterizedTypeImpl) return type; ParameterizedType p = (ParameterizedType) type; return new ParameterizedTypeImpl(p.getOwnerType(), p.getRawType(), p.getActualTypeArguments()); } else if (type instanceof GenericArrayType) { if (type instanceof GenericArrayTypeImpl) return type; GenericArrayType g = (GenericArrayType) type; return new GenericArrayTypeImpl(g.getGenericComponentType()); } else if (type instanceof WildcardType) { <START> Type[] upperBounds = ((WildcardType) type).getUpperBounds(); <END> Type[] lowerBounds = ((WildcardType) type).getLowerBounds(); if (lowerBounds.length == 0) { if (upperBounds.length != 1) throw new IllegalArgumentException(); return canonicalize(upperBounds[0]); } else { if (type instanceof WildcardTypeImpl) return type; return new WildcardTypeImpl(upperBounds, lowerBounds); } } else { return type; } }</code><technical_language>leave this method as-is create a new method strip wildcards</technical_language>

Target:
public static Type canonicalize(Type type) { if (type instanceof Class) { Class<?> c = (Class<?>) type; return c.isArray() ? new GenericArrayTypeImpl(canonicalize(c.getComponentType())) : c; } else if (type instanceof ParameterizedType) { if (type instanceof ParameterizedTypeImpl) return type; ParameterizedType p = (ParameterizedType) type; return new ParameterizedTypeImpl(p.getOwnerType(), p.getRawType(), p.getActualTypeArguments()); } else if (type instanceof GenericArrayType) { if (type instanceof GenericArrayTypeImpl) return type; GenericArrayType g = (GenericArrayType) type; return new GenericArrayTypeImpl(g.getGenericComponentType()); } else if (type instanceof WildcardType) { if (type instanceof WildcardTypeImpl) return type; WildcardType w = (WildcardType) type; return new WildcardTypeImpl(w.getUpperBounds(), w.getLowerBounds()); } else { return type; } }
Source:
<code>public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final Image image = (Image) o; if (!uri.equals(image.uri)) { return false; } <START> if (title != null ? !title.equals(image.title) : image.title != null) { <END> return false; } return !(description != null ? !description.equals(image.description) : image.description != null); }</code><technical_language>StringUtils.equals() for comparisons. give like: java return StringUtils.equals(uri, image.uri) && StringUtils.equals(title, image.title) && StringUtils.equals(description, image.description);</technical_language>

Target:
public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final Image image = (Image) o; return uri.equals(image.uri) && StringUtils.equals(title, image.title) && StringUtils.equals(description, image.description); }
Source:
<code><START> private boolean isPhysicalPlacementRequest(final Ds3Request ds3Request) { <END> return ds3Request.getOperation() != null && ( ds3Request.getOperation() == Operation.GET_PHYSICAL_PLACEMENT || ds3Request.getOperation() == Operation.VERIFY_PHYSICAL_PLACEMENT); }</code><technical_language>This static</technical_language>

Target:
private static boolean isPhysicalPlacementRequest(final Ds3Request ds3Request) { return ds3Request.getOperation() != null && ( ds3Request.getOperation() == Operation.GET_PHYSICAL_PLACEMENT || ds3Request.getOperation() == Operation.VERIFY_PHYSICAL_PLACEMENT); }
Source:
<code>public boolean shouldWarn(SolGame game) { hero = game.getHero(); if (!hero.isPresent()) { return false; } Vector2 pos = hero.orElseThrow(SolNullOptionalException::new).getPosition(); Vector2 spd = hero.orElseThrow(SolNullOptionalException::new).getSpd(); <START> float acc = hero.orElseThrow(SolNullOptionalException::new).getAcc(); <END> float spdLen = spd.len(); float spdAngle = SolMath.angle(spd); if (acc <= 0 || spdLen < 2 * acc) { return false; } float breakWay = spdLen * spdLen / acc / 2; breakWay += 2 * spdLen; Vector2 finalPos = SolMath.getVec(0, 0); SolMath.fromAl(finalPos, spdAngle, breakWay); finalPos.add(pos); warnCallback.show = false; game.getObjectManager().getWorld().rayCast(warnCallback, pos, finalPos); SolMath.free(finalPos); return warnCallback.show; }</code><technical_language>orElseThrow clause is needed. above</technical_language>

Target:
public boolean shouldWarn(SolGame game) { hero = game.getHero(); return hero.map(y -> { Vector2 spd = y.getSpd(); float acc = y.getAcc(); float spdLen = spd.len(); if (acc <= 0 || spdLen < 2 * acc) { return false; } float spdAngle = SolMath.angle(spd); Vector2 pos = y.getPosition(); float breakWay = spdLen * spdLen / acc / 2; breakWay += 2 * spdLen; Vector2 finalPos = SolMath.getBoundVector2(0, 0); SolMath.fromAl(finalPos, spdAngle, breakWay); finalPos.add(pos); warnCallback.show = false; game.getObjectManager().getWorld().rayCast(warnCallback, pos, finalPos); SolMath.free(finalPos); return warnCallback.show; }).orElse(false); }
Source:
<code>private JavaResolveResult[] multiResolve(boolean incompleteCode, boolean resolveToParents) { <START> boolean skipCaching = true; <END> List<? extends PsiElement> cachedNames = skipCaching ? (HaxeResolver.INSTANCE).resolve(this, incompleteCode) : ResolveCache.getInstance(getProject()).resolveWithCaching(this, HaxeResolver.INSTANCE, true, incompleteCode); JavaResolveResult result = toCandidateInfoArray(resolveToParents ? resolveNamesToParents(cachedNames) : cachedNames); return result; }</code><technical_language>Yes, please do. false debugging, I checked in set true time time</technical_language>

Target:
private JavaResolveResult[] multiResolve(boolean incompleteCode, boolean resolveToParents) { boolean skipCaching = false; List<? extends PsiElement> cachedNames = skipCaching ? (HaxeResolver.INSTANCE).resolve(this, incompleteCode) : ResolveCache.getInstance(getProject()).resolveWithCaching(this, HaxeResolver.INSTANCE, true, incompleteCode); JavaResolveResult result = toCandidateInfoArray(resolveToParents ? resolveNamesToParents(cachedNames) : cachedNames); return result; }
Source:
<code>private ICompletionProposal[] computeProposals(int offset) { ICompletionProposal[] proposals = null; boolean succeeded = false; try { if (fContentAssistSubjectControl != null) { proposals = fContentAssistant.computeCompletionProposals(fContentAssistSubjectControl, offset); } else { proposals = fContentAssistant.computeCompletionProposals(fViewer, offset); } <START> succeeded = true; <END> } finally { if (!succeeded) { hide(); } } return proposals; }</code><technical_language>suggestion Throwable incorrect, version in patch set #2 simpler this one</technical_language>

Target:
private ICompletionProposal[] computeProposals(int offset) { if (fContentAssistSubjectControl != null) return fContentAssistant.computeCompletionProposals(fContentAssistSubjectControl, offset); return fContentAssistant.computeCompletionProposals(fViewer, offset); }
Source:
<code>public synchronized void setToBeKeptToArrayList(ArrayList<Sequence> sequences) { for (Sequence s : sequences) { <START> sequencesStorage.get(s.getId()).setStatus("uploadedAndKeep"); <END> } }</code><technical_language>"uploadedAndKeep" a public static String STATUS_UPLOADED_AND_KEEP in StatusModel</technical_language>

Target:
public synchronized void setToBeKeptToArrayList(ArrayList<Sequence> sequences) { for (Sequence s : sequences) { sequencesStorage.get(s.getId()).setStatus(Sequence.STATUS_UPLOADED_AND_KEEP); } }
Source:
<code><START> protected ODatabaseDocumentTx getDB() { <END> return db; }</code><technical_language>this package protected test get it, buy a subclass necessarily</technical_language>

Target:
ODatabaseDocumentTx getDB() { return db; }
Source:
<code>public void completeBootstrap(RowMap completeBootstrapRow, AbstractProducer producer, MaxwellReplicator replicator) throws Exception { String databaseName = ( String ) completeBootstrapRow.getData("database_name"); String tableName = ( String ) completeBootstrapRow.getData("table_name"); Database database = findDatabase(replicator.getSchema(), databaseName); ensureTable(tableName, database); Table table = findTable(tableName, database); OpenReplicator openReplicator = replicator.getOpenReplicator(); <START> BinlogPosition position = new BinlogPosition(openReplicator.getBinlogPosition(), openReplicator.getBinlogFileName()); <END> producer.push(completeBootstrapRow); producer.push(bootstrapCompleteRowMap(table, position)); LOGGER.info(String.format("bootstrapping ended for %s.%s", databaseName, tableName)); }</code><technical_language>oh, this correct. open-replicator's binlog position of maxwell's, runs in asynchronous thread. want do is attach a BinlogPosition object RowMap</technical_language>

Target:
public void completeBootstrap(RowMap completeBootstrapRow, AbstractProducer producer, MaxwellReplicator replicator) throws Exception { String databaseName = ( String ) completeBootstrapRow.getData("database_name"); String tableName = ( String ) completeBootstrapRow.getData("table_name"); Database database = findDatabase(replicator.getSchema(), databaseName); ensureTable(tableName, database); Table table = findTable(tableName, database); BinlogPosition position = completeBootstrapRow.getPosition(); producer.push(completeBootstrapRow); producer.push(bootstrapCompleteRowMap(table, position)); LOGGER.info(String.format("bootstrapping ended for %s.%s", databaseName, tableName)); }
Source:
<code>public void testUpdateGlusterServerHookStatus() { <START> dao.updateGlusterServerHookStatus(FixturesTool.HOOK_ID, SERVER_ID, GlusterHookStatus.ENABLED); <END> GlusterServerHook serverhook = dao.getGlusterServerHook(FixturesTool.HOOK_ID, SERVER_ID); assertNotNull(serverhook); assertEquals(GlusterHookStatus.ENABLED, serverhook.getStatus()); }</code><technical_language>status of pre-defined hook in fixtures.xml is ENABLED. update DISABLED verify same. I do tests easier read is, fetch current status verify (assert) it, update a value, fetch verify new value</technical_language>

Target:
public void testUpdateGlusterServerHookStatus() { GlusterServerHook serverhookExisting = dao.getGlusterServerHook(FixturesTool.HOOK_ID, SERVER_ID); assertEquals(GlusterHookStatus.ENABLED, serverhookExisting.getStatus()); dao.updateGlusterServerHookStatus(FixturesTool.HOOK_ID, SERVER_ID, GlusterHookStatus.DISABLED); GlusterServerHook serverhookUpdated = dao.getGlusterServerHook(FixturesTool.HOOK_ID, SERVER_ID); assertNotNull(serverhookUpdated); assertEquals(GlusterHookStatus.DISABLED, serverhookUpdated.getStatus()); }
Source:
<code>public CompositeSend(List<Send> compositeSendList) { this.compositeSendList = compositeSendList; this.currentIndexInProgress = 0; for (Send messageFormatSend : compositeSendList) { totalSizeToWrite += messageFormatSend.sizeInBytes(); } if (compositeSendList.isEmpty()) { compositeSendContent = Unpooled.EMPTY_BUFFER; } else { if (compositeSendList.size() == 1) { compositeSendContent = compositeSendList.get(0).content(); } else { int numComponents = 0; boolean allContentPresent = true; List<ByteBuf> byteBufs = new ArrayList<>(compositeSendList.size()); for (Send send : compositeSendList) { ByteBuf content = send.content(); if (content == null) { allContentPresent = false; break; } if (content instanceof CompositeByteBuf) { numComponents += ((CompositeByteBuf) content).numComponents(); } else { numComponents++; } byteBufs.add(content); } if (allContentPresent) { compositeSendContent = byteBufs.get(0).alloc().compositeHeapBuffer(numComponents); for (ByteBuf content : byteBufs) { if (content instanceof CompositeByteBuf) { Iterator<ByteBuf> iterator = ((CompositeByteBuf) content).iterator(); while (iterator.hasNext()) { ((CompositeByteBuf) compositeSendContent).addComponent(true, iterator.next().retain()); } content.release(); } else { <START> ((CompositeByteBuf) compositeSendContent).addComponent(true, content); <END> } } } else { compositeSendContent = null; } } } }</code><technical_language>do CompositeByteBufs treated differently opposed calling addComponent(true, content)? Is a reason nest CompositeByteBufs</technical_language>

Target:
public CompositeSend(List<Send> compositeSendList) { this.compositeSendList = compositeSendList; this.currentIndexInProgress = 0; for (Send messageFormatSend : compositeSendList) { totalSizeToWrite += messageFormatSend.sizeInBytes(); } if (compositeSendList.isEmpty()) { compositeSendContent = Unpooled.EMPTY_BUFFER; } else { if (compositeSendList.size() == 1) { compositeSendContent = compositeSendList.get(0).content(); } else { boolean allContentPresent = true; List<ByteBuf> byteBufs = new ArrayList<>(compositeSendList.size()); for (Send send : compositeSendList) { ByteBuf content = send.content(); if (content == null) { allContentPresent = false; break; } byteBufs.add(content); } if (allContentPresent) { compositeSendContent = byteBufs.get(0).alloc().compositeDirectBuffer(compositeSendList.size()); for (ByteBuf content : byteBufs) { ((CompositeByteBuf) compositeSendContent).addComponent(true, content); } } else { compositeSendContent = null; } } } }
Source:
<code>void onMouseEnterUsername() { if (playerInfoBean.getChatOnly()) { return; } else { PlayerCardTooltipController playerCardTooltipController = applicationContext.getBean(PlayerCardTooltipController.class); playerCardTooltipController.setPlayer(playerInfoBean); Tooltip statusTooltip = new Tooltip(); statusTooltip.setGraphic(playerCardTooltipController.getRoot()); Tooltip.install(usernameLabel, statusTooltip); <START> } <END> }</code><technical_language>This installs a tooltip mouse-over, if installed. Also, is a tooltip installed. configureTooltip()</technical_language>

Target:
void onMouseEnterUsername() { if (playerInfoBean.getChatOnly()) { return; } if (playerCardTooltipController != null) { return; } playerCardTooltipController = applicationContext.getBean(PlayerCardTooltipController.class); playerCardTooltipController.setPlayer(playerInfoBean); Tooltip statusTooltip = new Tooltip(); statusTooltip.setGraphic(playerCardTooltipController.getRoot()); Tooltip.install(usernameLabel, statusTooltip); }
Source:
<code>public static ImmutableList<Path> listObjectsForDirectory(final Path directory) throws IOException { <START> final List<Path> objects = new ArrayList<>(); <END> Files.walkFileTree(directory, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { objects.add(file); return FileVisitResult.CONTINUE; } }); return ImmutableList.copyOf(objects); }</code><technical_language>This ImmutableList.Builder<Path> examples of this here: <LINK_0></technical_language>

Target:
public static ImmutableList<Path> listObjectsForDirectory(final Path directory) throws IOException { final ImmutableList.Builder<Path> objectsBuilder = ImmutableList.builder(); Files.walkFileTree(directory, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { objectsBuilder.add(file); return FileVisitResult.CONTINUE; } }); return objectsBuilder.build(); }
Source:
<code><START> public HelixClusterAgentsFactory(ClusterMapConfig clusterMapConfig, MetricRegistry metricRegistry) { <END> this.clusterMapConfig = clusterMapConfig; this.instanceName = ClusterMapUtils.getInstanceName(clusterMapConfig.clusterMapHostName, clusterMapConfig.clusterMapPort); helixFactory = new HelixFactory(); this.metricRegistry = metricRegistry; }</code><technical_language>public constructors</technical_language>

Target:
HelixClusterAgentsFactory(ClusterMapConfig clusterMapConfig, MetricRegistry metricRegistry) { this.clusterMapConfig = clusterMapConfig; this.instanceName = ClusterMapUtils.getInstanceName(clusterMapConfig.clusterMapHostName, clusterMapConfig.clusterMapPort); helixFactory = new HelixFactory(); this.metricRegistry = metricRegistry; }
Source:
<code>public void paintControl(PaintEvent e) { if (fIsHighlight && e != null) { e.gc.setBackground(Display.getDefault().getSystemColor( SWT.COLOR_RED)); <START> e.gc.setAlpha(128); <END> e.gc.fillOval(fHighlightX - 5, fHighlightY - 5, 10, 10); } }</code><technical_language>magic number</technical_language>

Target:
public void paintControl(PaintEvent e) { if (fIsHighlight && e != null) { e.gc.setBackground(Display.getDefault().getSystemColor( SWT.COLOR_RED)); e.gc.setAlpha(ALPHA); e.gc.fillOval(fHighlightX - HIGHLIGHT_RADIUS, fHighlightY - HIGHLIGHT_RADIUS, 2 * HIGHLIGHT_RADIUS, 2 * HIGHLIGHT_RADIUS); } }
Source:
<code><START> public void close() { <END> try { httpClient.close(); } catch (IOException e) { log.debug("close() threw IOException"); } }</code><technical_language>This thread safe if sender is instantiated. want sender httpclient</technical_language>

Target:
public void close() { try { if (httpClient != null) { httpClient.close(); httpClient = null; log.debug("closed httpClient"); } } catch (IOException e) { log.debug("close() threw IOException"); } }
Source:
<code>public synchronized void stop() throws ConnectorException { try { if (controller != null) { <START> this.controller.stop(2000, TimeUnit.MILLISECONDS); <END> this.controller = null; } } catch (InterruptedException e) { log.error("KafkaConnector interrupted while stopping"); } if (kafkaProducer != null) { this.kafkaProducer.close(); this.kafkaProducer = null; } }</code><technical_language>Minor nit: a lot of redundant this references lying around</technical_language>

Target:
public synchronized void stop() throws ConnectorException { try { if (controller != null) { controller.stop(2000, TimeUnit.MILLISECONDS); controller = null; } } catch (InterruptedException e) { log.error("KafkaConnector interrupted while stopping"); } if (kafkaProducer != null) { kafkaProducer.close(); kafkaProducer = null; } }
Source:
<code>private void protocolViolation(ChannelHandlerContext ctx, ByteBuf in, CorruptedWebSocketFrameException ex) { state = State.CORRUPT; int readableBytes = in.readableBytes(); if (readableBytes > 0) { <START> in.skipBytes(readableBytes); <END> } if (ctx.channel().isActive() && config.closeOnProtocolViolation()) { Object closeMessage; if (receivedClosingHandshake) { closeMessage = Unpooled.EMPTY_BUFFER; } else { WebSocketCloseStatus closeStatus = ex.getCloseStatus(); String reasonText = ex.getMessage(); if (reasonText == null) { reasonText = closeStatus.reasonText(); } closeMessage = new CloseWebSocketFrame(closeStatus, reasonText); } ctx.writeAndFlush(closeMessage).addListener(ChannelFutureListener.CLOSE); } throw ex; }</code><technical_language>I this buys us... Is recover</technical_language>

Target:
private void protocolViolation(ChannelHandlerContext ctx, ByteBuf in, CorruptedWebSocketFrameException ex) { state = State.CORRUPT; int readableBytes = in.readableBytes(); if (readableBytes > 0) { in.skipBytes(readableBytes); } if (ctx.channel().isActive() && config.closeOnProtocolViolation()) { Object closeMessage; if (receivedClosingHandshake) { closeMessage = Unpooled.EMPTY_BUFFER; } else { WebSocketCloseStatus closeStatus = ex.closeStatus(); String reasonText = ex.getMessage(); if (reasonText == null) { reasonText = closeStatus.reasonText(); } closeMessage = new CloseWebSocketFrame(closeStatus, reasonText); } ctx.writeAndFlush(closeMessage).addListener(ChannelFutureListener.CLOSE); } throw ex; }
Source:
<code>void openStreamAndCancel(CommonHttpMethod3 method) throws Exception { StubProgressMonitor monitor = new StubProgressMonitor(); HttpClient client = new HttpClient(); String url = "<LINK_0>"; WebLocation location = new WebLocation(url); HostConfiguration hostConfiguration = WebUtil.createHostConfiguration(client, location, monitor); InputStream in; try { WebUtil.execute(client, hostConfiguration, method, monitor); in = method.getResponseBodyAsStream(monitor); } finally { monitor.setCanceled(true); method.releaseConnection(monitor); } <START> assertNotNull(in); <END> Thread.sleep(500); assertEquals(0, ((ThreadPoolExecutor) CommonsNetPlugin.getExecutorService()).getActiveCount()); }</code><technical_language>this assert stream is closed</technical_language>

Target:
void openStreamAndCancel(CommonHttpMethod3 method) throws Exception { StubProgressMonitor monitor = new StubProgressMonitor(); HttpClient client = new HttpClient(); String url = "<LINK_1>"; WebLocation location = new WebLocation(url); HostConfiguration hostConfiguration = WebUtil.createHostConfiguration(client, location, monitor); InputStream in; try { WebUtil.execute(client, hostConfiguration, method, monitor); in = method.getResponseBodyAsStream(monitor); } finally { monitor.setCanceled(true); method.releaseConnection(monitor); } assertNotNull(in); Thread.sleep(500); assertEquals(0, ((ThreadPoolExecutor) CommonsNetPlugin.getExecutorService()).getActiveCount()); try { in.read(); fail("Expected channel to be closed"); } catch (IOException e) { } }
Source:
<code>public AnswerBox(double nXStart, double nYStart, int nCharacterLimit, boolean nRetry, String nCorrectAnswers, int nMarks, boolean nIsNumerical, Group nGroup) { answerField = new TextField(); this.marks = nMarks; this.correctAnswers = nCorrectAnswers; this.characterLimit = nCharacterLimit; this.xStart = nXStart; this.yStart = nYStart; this.group = nGroup; this.retry = nRetry; this.isNumerical = nIsNumerical; box = new HBox(); checkAnswerButton = new Button("Check answer"); checkAnswerButton.setId("check answer"); checkAnswerButton.setOnAction(new ButtonEventHandler()); feedbackLabel = new Label(); createAnswerBox(characterLimit, nRetry); <START> answerField.setOnKeyPressed(new EventHandler<KeyEvent>() { <END> public void handle(KeyEvent key) { if (key.getCode().equals(KeyCode.ENTER) && answerField.isEditable() == true) { answerIsCorrect = checkAnswer(marks); displayFeedback(); } } }); box.relocate(xStart, yStart); box.getChildren().addAll(answerField, checkAnswerButton, feedbackLabel); group.getChildren().add(box); }</code><technical_language>Key event handler a class end of file button event handler. This more readable anonymous class method here</technical_language>

Target:
public AnswerBox(double nXStart, double nYStart, int nCharacterLimit, boolean nRetry, String nCorrectAnswers, int nMarks, boolean nIsNumerical, Group nGroup) { this.marks = nMarks; this.correctAnswers = nCorrectAnswers; this.characterLimit = nCharacterLimit; this.xStart = nXStart; this.yStart = nYStart; this.group = nGroup; this.retry = nRetry; this.isNumerical = nIsNumerical; answerField = new TextField(); checkAnswerButton = new Button("Check answer"); checkAnswerButton.setId("check answer"); checkAnswerButton.setOnAction(new ButtonEventHandler()); feedbackLabel = new Label(); box = new HBox(); createAnswerBox(characterLimit, nRetry); answerField.setOnKeyPressed(new KeyEventHandler()); box.relocate(xStart, yStart); box.getChildren().addAll(answerField, checkAnswerButton, feedbackLabel); group.getChildren().add(box); }
Source:
<code><START> public String forIngestFromFile(String tableNameWithType, String batchConfigMapStr) <END> throws UnsupportedEncodingException { return String.format("%s?tableName=%s&batchConfigMapStr=%s", StringUtil.join("/", _baseUrl, "ingestFromFile"), tableNameWithType, URLEncoder.encode(batchConfigMapStr, StandardCharsets.UTF_8.toString())); }</code><technical_language>add API of public String forIngestFromFile(String tableNameWithType, Map<String, String> batchConfig) public String forIngestFromURI(String tableNameWithType, Map<String, String> batchConfig, String sourceURIStr)</technical_language>

Target:
public String forIngestFromFile(String tableNameWithType, String batchConfigMapStr) throws UnsupportedEncodingException { return String.format("%s?tableNameWithType=%s&batchConfigMapStr=%s", StringUtil.join("/", _baseUrl, "ingestFromFile"), tableNameWithType, URLEncoder.encode(batchConfigMapStr, StandardCharsets.UTF_8.toString())); }
Source:
<code><START> public void setDisableAcl(boolean disableAcl) <END> { this.disableAcl = disableAcl; }</code><technical_language>This (and setS3Bucket()) strictly need public, package-private (remove modifier). currently tests, annotating @VisibleForTesting a good practice</technical_language>

Target:
void setDisableAcl(boolean disableAcl) { this.disableAcl = disableAcl; }
Source:
<code>private void validateThenCreateAccount() { clearErrors(); ValidateResult result = validateInput(getText(usernameInput), getText(passwordInput), getText(passwordRepeatInput), getText(emailInput)); switch (result) { case INVALID_USERNAME: usernameInput.requestFocus(); usernameInput.setError(getString(R.string.create_account_username_error)); return; case INVALID_PASSWORD: passwordInput.requestFocus(); passwordInput.setError(getString(R.string.create_account_password_error)); return; case PASSWORD_MISMATCH: passwordRepeatInput.requestFocus(); passwordRepeatInput.setError(getString(R.string.create_account_passwords_mismatch_error)); return; case INVALID_EMAIL: emailInput.requestFocus(); emailInput.setError(getString(R.string.create_account_email_error)); return; case NO_EMAIL: new AlertDialog.Builder(this) .setCancelable(false) .setTitle(R.string.email_recommendation_dialog_title) .setMessage(StringUtil.fromHtml(getResources().getString(R.string.email_recommendation_dialog_message))) .setPositiveButton(R.string.email_recommendation_dialog_create_without_email_action, (dialogInterface, i) -> { dialogInterface.dismiss(); createAccount(); }) .setNegativeButton(R.string.email_recommendation_dialog_create_with_email_action, (dialogInterface, i) -> { dialogInterface.dismiss(); emailInput.requestFocus(); }) <START> .setOnDismissListener(DialogInterface::dismiss) <END> .show(); break; case SUCCESS: createAccount(); default: break; } }</code><technical_language>reason of setting a dismiss listener for this dialog</technical_language>

Target:
private void validateThenCreateAccount() { clearErrors(); ValidateResult result = validateInput(getText(usernameInput), getText(passwordInput), getText(passwordRepeatInput), getText(emailInput)); switch (result) { case INVALID_USERNAME: usernameInput.requestFocus(); usernameInput.setError(getString(R.string.create_account_username_error)); return; case INVALID_PASSWORD: passwordInput.requestFocus(); passwordInput.setError(getString(R.string.create_account_password_error)); return; case PASSWORD_MISMATCH: passwordRepeatInput.requestFocus(); passwordRepeatInput.setError(getString(R.string.create_account_passwords_mismatch_error)); return; case INVALID_EMAIL: emailInput.requestFocus(); emailInput.setError(getString(R.string.create_account_email_error)); return; case NO_EMAIL: new AlertDialog.Builder(this) .setCancelable(false) .setTitle(R.string.email_recommendation_dialog_title) .setMessage(StringUtil.fromHtml(getResources().getString(R.string.email_recommendation_dialog_message))) .setPositiveButton(R.string.email_recommendation_dialog_create_without_email_action, (dialogInterface, i) -> { dialogInterface.dismiss(); createAccount(); }) .setNegativeButton(R.string.email_recommendation_dialog_create_with_email_action, (dialogInterface, i) -> { dialogInterface.dismiss(); emailInput.requestFocus(); }) .show(); break; case SUCCESS: createAccount(); default: break; } }
Source:
<code>public boolean performAction() { saveDialogSettings(); String key = keyText.getText(); if (key != null && key.trim().length() > 0) { key = key.trim(); <START> boolean openSuccessful = TasksUiInternal.openTaskWithIdOrKey(repository, key, null); <END> if (!openSuccessful) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.TaskSearchPage_Task_Search, Messages.TaskSearchPage_No_task_found_matching_key_ + key); } return openSuccessful; } else { ITaskSearchPage page = (ITaskSearchPage) queryPages[currentPageIndex].getData(PAGE_KEY); return page.performSearch(); } }</code><technical_language>openTaskByIdOrKey</technical_language>

Target:
public boolean performAction() { saveDialogSettings(); String key = keyText.getText(); if (key != null && key.trim().length() > 0) { key = key.trim(); boolean openSuccessful = TasksUiInternal.openTaskByIdOrKey(repository, key, null); if (!openSuccessful) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.TaskSearchPage_Task_Search, Messages.TaskSearchPage_No_task_found_matching_key_ + key); } return openSuccessful; } else { ITaskSearchPage page = (ITaskSearchPage) queryPages[currentPageIndex].getData(PAGE_KEY); return page.performSearch(); } }
Source:
<code><START> private PaginatedArrayList<Host> convertToHostPaginatedArrayList(PaginatedArrayList<Contentlet> list) { <END> List<Host> temp = new ArrayList<Host>(); for(Contentlet c : list) { temp.add(new Host(c)); } PaginatedArrayList<Host> hosts = new PaginatedArrayList<Host>(); hosts.addAll(temp); hosts.setQuery(list.getQuery()); hosts.setTotalResults(list.getTotalResults()); return hosts; }</code><technical_language>this temp collection is necessary, want stream().map ( contentlet -> new Host(contentlet)) instead</technical_language>

Target:
private PaginatedArrayList<Host> convertToHostPaginatedArrayList(PaginatedArrayList<Contentlet> list) { PaginatedArrayList<Host> hosts = new PaginatedArrayList<Host>(); hosts.addAll(list.stream().map( content -> new Host(content)).collect(Collectors.toList())); hosts.setQuery(list.getQuery()); hosts.setTotalResults(list.getTotalResults()); return hosts; }
Source:
<code>public void extractTraces(File root) throws IOException { if (root == null || root.getParentFile() == null) { <START> throw new OseeArgumentException(String.format("The path [%s] is invalid.", root)); <END> } checkDirectory(root); if (root.isFile()) { for (String path : Lib.readListFromFile(root, true)) { traceFile(new File(path)); } } else if (root.isDirectory()) { traceFile(root); } else { throw new OseeArgumentException(String.format("Invalid directory path [%s]", root.getCanonicalPath())); } fileToTraceMarks = Multimaps.invertFrom(traceMarkToFiles, HashMultimap.<String, String> create()); }</code><technical_language>in OseeArgumentException constructors, need String.format, for you</technical_language>

Target:
public void extractTraces(File root) throws IOException { if (root == null || root.getParentFile() == null) { throw new OseeArgumentException("The path [%s] is invalid.", root); } checkDirectory(root); if (root.isFile()) { for (String path : Lib.readListFromFile(root, true)) { traceFile(new File(path)); } } else if (root.isDirectory()) { traceFile(root); } else { throw new OseeArgumentException("Invalid directory path [%s]", root.getCanonicalPath()); } fileToTraceMarks = Multimaps.invertFrom(traceMarkToFiles, HashMultimap.<String, String> create()); }
Source:
<code>private boolean readCache(Queue<CircularElement<E>> cache) throws IOException { CircularElement<E> element; while (isRunning()) { try { <START> element = this.dispatcher.take(SortStage.SPILL); <END> } catch (InterruptedException e) { throw wrapWithIOException(e); } if (element == SPILLING_MARKER) { return false; } else if (element == EOF_MARKER) { return true; } cache.add(element); } return false; }</code><technical_language>changing a bit behaviour of exception handling compared is currently in master. change reasonable, I want point out for future reference (if needed) verify this a conscious change</technical_language>

Target:
private boolean readCache(Queue<CircularElement<E>> cache) throws InterruptedException { while (isRunning()) { final CircularElement<E> element = this.dispatcher.take(SortStage.SPILL); if (element == SPILLING_MARKER) { return false; } else if (element == EOF_MARKER) { return true; } cache.add(element); } return false; }
Source:
<code>private void addNetworkInterfaceCard() { List<IpConfiguration> ipConfigurations = new ArrayList<IpConfiguration>(); String ipConfigurationName = name + "ipconfig"; variables.put("ipConfigurationName", ipConfigurationName); IpConfiguration ipConfig = IpConfiguration.create(ipConfigurationName, null, null, null, IpConfigurationProperties.builder() .privateIPAllocationMethod("Dynamic") .publicIPAddress(IdReference.create("[variables('publicIPAddressReference')]")) .subnet(IdReference.create("[variables('subnetReference')]")) .build()); ipConfigurations.add(ipConfig); NetworkInterfaceCardProperties networkInterfaceCardProperties = NetworkInterfaceCardProperties.builder() .ipConfigurations(ipConfigurations) .build(); String networkInterfaceCardName = name + "nic"; variables.put("networkInterfaceCardName", networkInterfaceCardName); variables.put("networkInterfaceCardReference", "[resourceId('Microsoft.Network/networkInterfaces',variables('networkInterfaceCardName'))]"); ResourceDefinition networkInterfaceCard = ResourceDefinition.builder() .name("[variables('networkInterfaceCardName')]") .type("Microsoft.Network/networkInterfaces") .location(location) <START> .apiVersion("2015-06-15") <END> .dependsOn(Arrays.asList("[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]")) .properties(networkInterfaceCardProperties) .build(); resources.add(networkInterfaceCard); }</code><technical_language>Add a constant</technical_language>

Target:
private void addNetworkInterfaceCard() { List<IpConfiguration> ipConfigurations = new ArrayList<IpConfiguration>(); String ipConfigurationName = name + "ipconfig"; variables.put("ipConfigurationName", ipConfigurationName); IpConfiguration ipConfig = IpConfiguration.create(ipConfigurationName, null, null, null, IpConfigurationProperties.builder() .privateIPAllocationMethod("Dynamic") .publicIPAddress(IdReference.create("[variables('publicIPAddressReference')]")) .subnet(IdReference.create("[variables('subnetReference')]")) .build()); ipConfigurations.add(ipConfig); NetworkInterfaceCardProperties networkInterfaceCardProperties = NetworkInterfaceCardProperties.builder() .ipConfigurations(ipConfigurations) .build(); String networkInterfaceCardName = name + "nic"; variables.put("networkInterfaceCardName", networkInterfaceCardName); variables.put("networkInterfaceCardReference", "[resourceId('Microsoft.Network/networkInterfaces',variables('networkInterfaceCardName'))]"); ResourceDefinition networkInterfaceCard = ResourceDefinition.builder() .name("[variables('networkInterfaceCardName')]") .type("Microsoft.Network/networkInterfaces") .location(location) .apiVersion(STORAGE_API_VERSION) .dependsOn(Arrays.asList("[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]")) .properties(networkInterfaceCardProperties) .build(); resources.add(networkInterfaceCard); }
Source:
<code>protected void stopBackgroundDiscovery() { if (usbSerialDiscovery != null) { usbSerialDiscovery.stopBackgroundScanning(); } else { <START> logger.info("Could not stop background discovery, as there is no usb serial discovery service configured."); <END> } }</code><technical_language>**USB**</technical_language>

Target:
protected void stopBackgroundDiscovery() { if (usbSerialDiscovery != null) { usbSerialDiscovery.stopBackgroundScanning(); } else { logger.info("Could not stop background discovery, as there is no USB-Serial discovery service configured."); } }
Source:
<code>private boolean architecturesMatch() { return <START> getCluster().getArchitecture() != ArchitectureType.undefined && getCluster().getArchitecture() == getMaxServerCpu().getArchitecture(); <END> }</code><technical_language>Previously, this condition was: getCluster().getArchitecture() == ArchitectureType.undefined || getCluster().getArchitecture() == getMaxServerCpu().getArchitecture()</technical_language>

Target:
private boolean architecturesMatch() { return getCluster().getArchitecture() == ArchitectureType.undefined || getCluster().getArchitecture() == getMaxServerCpu().getArchitecture(); }
Source:
<code><START> public static String toSafePathName(final String name) { <END> int nameLength = name.length(); char[] newPath = new char[nameLength]; for (int i = 0; i < nameLength; i++) { char oldChar = name.charAt(i); boolean isDigit = oldChar >= '0' && oldChar <= '9'; boolean isCharacter = (oldChar >= 'a' && oldChar <= 'z') || (oldChar >= 'A' && oldChar <= 'Z'); boolean isWhitespace = Character.isWhitespace(oldChar); if (isDigit || isCharacter) { newPath[i] = oldChar; } else if (isWhitespace) { newPath[i] = '_'; } else { newPath[i] = '-'; } } return new String(newPath); }</code><technical_language>name.replaceAll(...) a regular expression</technical_language>

Target:
public static String toSafePathName(final String name) { Pattern whitespace = Pattern.compile("\\s"); String nameWithoutWhitespace = whitespace.matcher(name).replaceAll("_"); Pattern allButAllowedCharacters = Pattern.compile("[^a-zA-Z0-9_]"); return allButAllowedCharacters.matcher(nameWithoutWhitespace).replaceAll("-"); }
Source:
<code>public static BasicInventoryPacketState fromWindowPacket(CPacketClickWindow windowPacket) { final int mode = 0x01 << 9 << windowPacket.getClickType().ordinal(); final int packed = windowPacket.getUsedButton(); final int unpacked = mode == MODE_DRAG ? (0x01 << 6 << (packed >> 2 & 3)) | (0x01 << 3 << (packed & 3)) : (0x01 << (packed & 3)); final int state = clickType(windowPacket.getSlotId()) | mode | unpacked; for (InventoryClickPacketState inventory : Inventory.CLICK_STATES) { if (inventory.matches(state)) { return inventory; } } <START> SpongeImpl.getLogger().warn(String.format("Unable to find InventoryPacketState handler for click window packet: %s", windowPacket)); <END> return Inventory.UNKNOWN_CLICK; }</code><technical_language>Logger supports replacements, format is un-necessary</technical_language>

Target:
public static BasicInventoryPacketState fromWindowPacket(CPacketClickWindow windowPacket) { final int mode = 0x01 << 9 << windowPacket.getClickType().ordinal(); final int packed = windowPacket.getUsedButton(); final int unpacked = mode == MODE_DRAG ? (0x01 << 6 << (packed >> 2 & 3)) | (0x01 << 3 << (packed & 3)) : (0x01 << (packed & 3)); final int state = clickType(windowPacket.getSlotId()) | mode | unpacked; for (InventoryClickPacketState inventory : Inventory.CLICK_STATES) { if (inventory.matches(state)) { return inventory; } } SpongeImpl.getLogger().warn("Unable to find InventoryPacketState handler for click window packet: {}", windowPacket); return Inventory.UNKNOWN_CLICK; }
Source:
<code>public Object get(String scriptIdentifier, String type) { Object obj = staticTypes.get(type); if (obj != null) { return obj; } HashMap<String, Object> objects = objectCache.get(scriptIdentifier); if (objects == null) { objects = new HashMap<>(); objectCache.put(scriptIdentifier, objects); } obj = objects.get(type); if (obj != null) { return obj; } <START> if (type.equals("AutomationManager") || type.equals("RuleRegistry")) { <END> RuleSupportRuleRegistryDelegate ruleRegistryDelegate = new RuleSupportRuleRegistryDelegate(ruleRegistry, ruleProvider); ScriptedAutomationManager automationManager = new ScriptedAutomationManager(ruleRegistryDelegate); objects.put("AutomationManager", automationManager); objects.put("RuleRegistry", ruleRegistryDelegate); obj = objects.get(type); } return obj; }</code><technical_language>define strings constants? This prevent typos simplify refactorings</technical_language>

Target:
public Object get(String scriptIdentifier, String type) { Object obj = staticTypes.get(type); if (obj != null) { return obj; } HashMap<String, Object> objects = objectCache.get(scriptIdentifier); if (objects == null) { objects = new HashMap<>(); objectCache.put(scriptIdentifier, objects); } obj = objects.get(type); if (obj != null) { return obj; } if (type.equals(AUTOMATION_MANAGER) || type.equals(RULE_REGISTRY)) { RuleSupportRuleRegistryDelegate ruleRegistryDelegate = new RuleSupportRuleRegistryDelegate(ruleRegistry, ruleProvider); ScriptedAutomationManager automationManager = new ScriptedAutomationManager(ruleRegistryDelegate, scriptedCustomModuleHandlerFactory, scriptedCustomModuleTypeProvider, scriptedPrivateModuleHandlerFactory); objects.put(AUTOMATION_MANAGER, automationManager); objects.put(RULE_REGISTRY, ruleRegistryDelegate); obj = objects.get(type); } return obj; }
Source:
<code>public void onViewAttachedToWindow(@NonNull ViewHolder holder) { <START> super.onViewAttachedToWindow(holder); <END> mController.onViewAttachedToWindow(holder); }</code><technical_language>Like, super.onFailedToRecycleView, this do anything. call super other? Ditto for below</technical_language>

Target:
public void onViewAttachedToWindow(@NonNull ViewHolder holder) { mController.onViewAttachedToWindow(holder); }
Source:
<code>public MixRecipeManager removeOxidizer(IIngredient oxidizer) { if (oxidizer != null && removedAdditives.get(MixAdditive.OXIDIZER) != null) { <START> removedAdditives.get(MixAdditive.OXIDIZER).add(new RecipeMatchIIngredient(oxidizer)); <END> } else { removedAdditives.put(MixAdditive.OXIDIZER, null); } return this; }</code><technical_language>need RecipeMatch for removals passed recipe, IIngredient for match</technical_language>

Target:
public MixRecipeManager removeOxidizer(IIngredient oxidizer) { if (oxidizer != null && removedAdditives.get(MixAdditive.OXIDIZER) != null) { removedAdditives.get(MixAdditive.OXIDIZER).add(oxidizer); } else { removedAdditives.put(MixAdditive.OXIDIZER, null); } return this; }
Source:
<code>public int getMaximumNumberOfSubtasks() { if (!(this.format instanceof FileOutputFormat<?>)) { return -1; } final String pathName = this.config.getStubParameter(FileOutputFormat.FILE_PARAMETER_KEY, null); final Path path; if (pathName == null) { return 0; } try { path = new Path(pathName); } catch (Throwable t) { return 0; } try { final FileSystem fs = path.getFileSystem(); <START> if(fs.getUri().getScheme().toLowerCase().equals("hdfs") || fs.getUri().getScheme().toLowerCase().equals("s3")) { <END> try { final FileStatus f = fs.getFileStatus(path); if (f == null) { return 1; } if (f.isDir()) { return -1; } else { fs.delete(path, false); int dop = getTaskConfiguration().getInteger(DEGREE_OF_PARALLELISM_KEY, -1); if (dop == 1) { return 1; } else { fs.mkdirs(path); return -1; } } } catch (FileNotFoundException fnfex) { int dop = getTaskConfiguration().getInteger(DEGREE_OF_PARALLELISM_KEY, -1); if (dop == 1) { return 1; } fs.mkdirs(path); return -1; } } else { return -1; } } catch (IOException e) { LOG.error("Could not access the file system to detemine the status of the output.", e); throw new RuntimeException("I/O Error while accessing file", e); } }</code><technical_language>if this is correct place for this. I thought file systems pluggable. This hardcoded rules for specific file systems. is a move this code DistributedFileSystem (and S3) implementation? FileOutputFormat contains specific file:/// scheme code. In/Outputformats independent of filesystems (e.g. file systems provide a data stream IF/OF converts internal representation?)</technical_language>

Target:
public int getMaximumNumberOfSubtasks() { if (!(this.format instanceof FileOutputFormat<?>)) { return -1; } final String pathName = this.config.getStubParameter(FileOutputFormat.FILE_PARAMETER_KEY, null); final WriteMode writeMode = ((FileOutputFormat<?>)this.format).getWriteMode(); final Path path; if (pathName == null) { return 0; } try { path = new Path(pathName); } catch (Throwable t) { return 0; } try { int dop = getTaskConfiguration().getInteger(DEGREE_OF_PARALLELISM_KEY, -1); final FileSystem fs = path.getFileSystem(); if(dop == 1) { if(fs.isDistributedFS()) { if(!fs.initOutPathDistFS(path, writeMode, false)) { throw new IOException("Output path could not be initialized."); } } return 1; } else { if(fs.isDistributedFS()) { if(!fs.initOutPathDistFS(path, writeMode, true)) { throw new IOException("Output directory could not be created."); } } return -1; } } catch (IOException e) { LOG.error("Could not access the file system to detemine the status of the output.", e); throw new RuntimeException("I/O Error while accessing file", e); } }
Source:
<code>private StringListPanel renderStringListPanel(LabeledWidgetsGrid g, ConfigParameterInfo param) { StringListPanel p = new StringListPanel(null, Arrays.asList(getDisplayName(param)), saveProject, <START> true); <END> List<List<String>> values = new ArrayList<>(); for (String v : Natives.asList(param.values())) { values.add(Arrays.asList(v)); } p.display(values); if (!param.editable()) { p.setEnabled(false); } addWidget(g, p, param); return p; }</code><technical_language>is auto sorted? If yes, i prefer preserve original order of config parameters</technical_language>

Target:
private StringListPanel renderStringListPanel(LabeledWidgetsGrid g, ConfigParameterInfo param) { StringListPanel p = new StringListPanel(null, Arrays.asList(getDisplayName(param)), saveProject, false); List<List<String>> values = new ArrayList<>(); for (String v : Natives.asList(param.values())) { values.add(Arrays.asList(v)); } p.display(values); if (!param.editable()) { p.setEnabled(false); } addWidget(g, p, param); return p; }
Source:
<code><START> public boolean isEmpty() { <END> return getPrimary() == null && getDisplay() == null && getType() == null && getValue() == null; }</code><technical_language>please move isEmpty methods scimSchema</technical_language>

Target:
public boolean isEmpty() { return getPrimary() == null && Strings.isNullOrEmpty(getDisplay()) && Strings.isNullOrEmpty(getType()) && Strings.isNullOrEmpty(getValue()); }