auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void doInitialize() { EEFCorePlugin.getPlugin().debug("EEFViewImpl#initialize()"); for (final EEFPageDescription eefPageDescription : this.getDescription().getPages()) { String semanticCandidatesExpression = Util.firstNonBlank(eefPageDescription.getSemanticCandidateExpression(), org.eclipse.eef.core.api.EEFExpressionUtils.VAR_SELF); new Eval(this.interpreter, this.variableManager).call(semanticCandidatesExpression, new ISuccessfulResultConsumer<Object>() { @Override public void apply(Object value) { long start = System.currentTimeMillis(); Iterable<EObject> iterable = Util.asIterable(value, EObject.class); Iterable<EObject> eObjects = Iterables.filter(iterable, new DomainClassTester(eefPageDescription.getDomainClass())); long end = System.currentTimeMillis(); System.out.println((end - start) / 1000 + "s"); for (Object object : eObjects) { EEFPageImpl ePage = createPage(eefPageDescription, object); ePage.initialize(); EEFViewImpl.this.eefPages.add(ePage); } } }); } }

Target:
private void doInitialize() { EEFCorePlugin.getPlugin().debug("EEFViewImpl#initialize()"); for (final EEFPageDescription eefPageDescription : this.getDescription().getPages()) { String semanticCandidatesExpression = Util.firstNonBlank(eefPageDescription.getSemanticCandidateExpression(), org.eclipse.eef.core.api.EEFExpressionUtils.VAR_SELF); new Eval(this.interpreter, this.variableManager).call(semanticCandidatesExpression, new ISuccessfulResultConsumer<Object>() { @Override public void apply(Object value) { Iterable<EObject> iterable = Util.asIterable(value, EObject.class); Iterable<EObject> eObjects = Iterables.filter(iterable, new DomainClassTester(eefPageDescription.getDomainClass())); for (Object object : eObjects) { EEFPageImpl ePage = createPage(eefPageDescription, object); ePage.initialize(); EEFViewImpl.this.eefPages.add(ePage); } } }); } }
Source:
private void initLMAlgoFactoryDecorator() { if (lmFactoryDecorator.hasWeightings()) return; for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) { Weighting weighting = createWeighting(new HintsMap(lmWeightingStr), encoder, null, new NoTurnCostProvider()); lmFactoryDecorator.addWeighting(weighting); } } }

Target:
private void initLMAlgoFactoryDecorator() { if (lmFactoryDecorator.hasWeightings()) return; for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) { Weighting weighting = createWeighting(new HintsMap(lmWeightingStr), encoder, null, NO_TURN_COST_PROVIDER); lmFactoryDecorator.addWeighting(weighting); } } }
Source:
public void registerCallback(ISender sender, ParameterResolutionContext prc) { }

Target:
public void registerCallback(ISender sender, ParameterResolutionContext prc) { throw new UnsupportedOperationException("Rhino callback functionality not implemented"); }
Source:
public void testDeleteRecordV1() throws IOException, MessageFormatException { ByteBuffer deleteRecord = ByteBuffer.allocate(MessageFormatRecord.Delete_Format_V1.getDeleteRecordSize()); MessageFormatRecord.Delete_Format_V1.serializeDeleteRecord(deleteRecord, true); deleteRecord.flip(); DeleteRecord deserializeDeleteRecord = MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); Assert.assertEquals("Delete record version mismatch ", deserializeDeleteRecord.getVersion(), MessageFormatRecord.Delete_Version_V1); Assert.assertEquals(deserializeDeleteRecord.isDeleted(), true); deleteRecord.flip(); deleteRecord.put(10, (byte) 4); try { MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); Assert.assertEquals(true, false); } catch (MessageFormatException e) { Assert.assertEquals(e.getErrorCode(), MessageFormatErrorCodes.Data_Corrupt); } }

Target:
public void testDeleteRecordV1() throws IOException, MessageFormatException { short accountId = Utils.getRandomShort(TestUtils.RANDOM); short containerId = Utils.getRandomShort(TestUtils.RANDOM); long deletionTimeMs = SystemTime.getInstance().milliseconds() + TestUtils.RANDOM.nextInt(); ByteBuffer deleteRecord = ByteBuffer.allocate(MessageFormatRecord.Delete_Format_V1.getDeleteRecordSize()); MessageFormatRecord.Delete_Format_V1.serializeDeleteRecord(deleteRecord, new DeleteRecord(accountId, containerId, deletionTimeMs)); deleteRecord.flip(); DeleteRecord deserializeDeleteRecord = MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); Assert.assertEquals("AccountId mismatch ", UNKNOWN_ACCOUNT_ID, deserializeDeleteRecord.getAccountId()); Assert.assertEquals("ContainerId mismatch ", UNKNOWN_CONTAINER_ID, deserializeDeleteRecord.getContainerId()); Assert.assertEquals("DeletionTime mismatch ", Utils.Infinite_Time, deserializeDeleteRecord.getDeletionTimeInMs()); deleteRecord.flip(); byte toCorrupt = deleteRecord.get(10); deleteRecord.put(10, (byte) (toCorrupt + 1)); try { MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); fail("Deserialization of a corrupt delete record V1 should have failed "); } catch (MessageFormatException e) { Assert.assertEquals(e.getErrorCode(), MessageFormatErrorCodes.Data_Corrupt); } }
Source:
public String toString() { return "VertexInfo{" + "id=" + id + ", type=" + type + ", sysObjectId='" + sysObjectId + '\'' + ", label='" + label + '\'' + ", location=" + location + '}'; }

Target:
public String toString() { return "NodeTopologyEntity{" + "id=" + id + ", type=" + type + ", sysObjectId='" + sysObjectId + '\'' + ", label='" + label + '\'' + ", location=" + location + '}'; }
Source:
public void testProcessNonJavaFiles() throws Exception { final String charsetName = "ISO-8859-1"; final TreeWalker treeWalker = new TreeWalker(); treeWalker.setTabWidth(1); treeWalker.configure(new DefaultConfiguration("default config")); final File file = new File("src/main/resources/checkstyle_packages.xml"); final FileText fileText = new FileText(file, charsetName); treeWalker.processFiltered(file, fileText); }

Target:
public void testProcessNonJavaFiles() throws Exception { final TreeWalker treeWalker = new TreeWalker(); final PackageObjectFactory factory = new PackageObjectFactory( new HashSet<>(), Thread.currentThread().getContextClassLoader()); treeWalker.setModuleFactory(factory); treeWalker.configure(new DefaultConfiguration("default config")); final DefaultConfiguration childConfig = createCheckConfig(JavadocParagraphCheck.class); treeWalker.setupChild(childConfig); final File file = new File("input.java"); final List<String> lines = new ArrayList<>(Arrays.asList("package com.puppycrawl.tools.checkstyle;", "", "error public class InputTreeWalkerFileWithViolation {}")); final FileText fileText = new FileText(file, lines); try { treeWalker.processFiltered(file, fileText); fail("Exception expected"); } catch (CheckstyleException ex) { assertEquals("Invalid exception message", "MismatchedTokenException occurred during the analysis of file input.java.", ex.getMessage()); } }
Source:
public RelNode convert(Sort sort, boolean convertInputTraits) { final RelTraitSet traitSet = sort.getTraitSet().replace(out); RelTraitSet inputTraitSet = traitSet.replace(RelCollations.EMPTY); final RelNode input; if (convertInputTraits) { input = convert(sort.getInput(), inputTraitSet); } else { input = sort.getInput(); } return new JdbcSort(sort.getCluster(), traitSet, input, sort.getCollation(), sort.offset, sort.fetch); }

Target:
public RelNode convert(Sort sort, boolean convertInputTraits) { final RelTraitSet traitSet = sort.getTraitSet().replace(out); final RelNode input; if (convertInputTraits) { final RelTraitSet inputTraitSet = sort.getInput().getTraitSet().replace(out); input = convert(sort.getInput(), inputTraitSet); } else { input = sort.getInput(); } return new JdbcSort(sort.getCluster(), traitSet, input, sort.getCollation(), sort.offset, sort.fetch); }
Source:
private void findAndCreateKnownSpatialIndexes() { Pattern pattern = Pattern.compile( "(\\d+)-(\\d+)" ); File rootDirectory = this.directoryStructure().rootDirectory(); if ( rootDirectory == null ) { return; } File[] files = rootDirectory.listFiles(); if ( files != null ) { for ( File file : files ) { if ( file.isDirectory() ) { Integer indexId = Integer.parseInt( file.getName() ); File[] subdirs = this.directoryStructure().directoryForIndex( indexId ).listFiles(); if ( subdirs != null ) { for ( File subdir : subdirs ) { Matcher m = pattern.matcher( subdir.getName() ); if ( m.matches() ) { int tableId = Integer.parseInt( m.group( 1 ) ); int code = Integer.parseInt( m.group( 2 ) ); CoordinateReferenceSystem crs = CoordinateReferenceSystem.get( tableId, code ); SpatialKnownIndex index = selectAndCreate( indexesFor( indexId ), indexId, crs ); if ( !index.indexExists() ) { indexesFor( indexId ).remove( crs ); } } } } } } } }

Target:
private void findAndCreateKnownSpatialIndexes() { Pattern pattern = Pattern.compile( "(\\d+)-(\\d+)" ); File rootDirectory = this.directoryStructure().rootDirectory(); if ( rootDirectory == null ) { return; } File[] files = rootDirectory.listFiles(); if ( files != null ) { for ( File file : files ) { if ( file.isDirectory() ) { Integer indexId = Integer.parseInt( file.getName() ); File[] subdirs = this.directoryStructure().directoryForIndex( indexId ).listFiles(); if ( subdirs != null ) { for ( File subdir : subdirs ) { Matcher m = pattern.matcher( subdir.getName() ); if ( m.matches() ) { int tableId = Integer.parseInt( m.group( 1 ) ); int code = Integer.parseInt( m.group( 2 ) ); CoordinateReferenceSystem crs = CoordinateReferenceSystem.get( tableId, code ); SpatialKnownIndex index = selectAndCreate( indexesFor( indexId ), indexId, crs ); if ( !index.indexExists() ) { index.markAsFailed( "Index file was not found" ); } } } } } } } }
Source:
public void logout(final IProgressMonitor monitor) throws XmlRpcException { try { (new BugzillaXmlRpcOperation<Integer>(this) { @Override public Integer execute() throws XmlRpcException { call(monitor, XML_USER_LOGOUT); return -1; } }).execute(); } catch (XmlRpcException e) { e.printStackTrace(); throw e; } finally { userID = -1; token = null; } return; }

Target:
public void logout(final IProgressMonitor monitor) throws XmlRpcException { try { (new BugzillaXmlRpcOperation<Integer>(this) { @Override public Integer execute() throws XmlRpcException { call(monitor, XML_USER_LOGOUT); return -1; } }).execute(); } finally { userID = -1; token = null; } return; }
Source:
public void setUp() { downloadBatches = new HashMap<>(); downloadBatches.put(DOWNLOAD_BATCH_ID, downloadBatch); downloadBatches.put(ADDITIONAL_DOWNLOAD_BATCH_ID, additionalDownloadBatch); downloadBatchCallbacks.add(downloadBatchCallback); downloadManager = new DownloadManager( lock, executorService, downloadBatches, downloadBatchCallbacks, fileOperations, downloadsBatchPersistence, downloadManagerDownloader ); final ArgumentCaptor<DownloadsBatchPersistence.LoadBatchesCallback> loadBatchesCallbackCaptor = ArgumentCaptor.forClass(DownloadsBatchPersistence.LoadBatchesCallback.class); willAnswer(new Answer<Void>() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { loadBatchesCallbackCaptor.getValue().onLoaded(Arrays.asList(downloadBatch, additionalDownloadBatch)); return null; } }).given(downloadsBatchPersistence).loadAsync(any(FileOperations.class), loadBatchesCallbackCaptor.capture()); final ArgumentCaptor<List> argumentCaptor = ArgumentCaptor.forClass(List.class); willAnswer(new Answer<Void>() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { downloadBatchStatuses = argumentCaptor.getValue(); return null; } }).given(allBatchStatusesCallback).onReceived(argumentCaptor.capture()); given(downloadBatch.status()).willReturn(BATCH_STATUS); given(additionalDownloadBatch.status()).willReturn(ADDITIONAL_BATCH_STATUS); }

Target:
public void setUp() { downloadBatches = new HashMap<>(); downloadBatches.put(DOWNLOAD_BATCH_ID, downloadBatch); downloadBatches.put(ADDITIONAL_DOWNLOAD_BATCH_ID, additionalDownloadBatch); downloadBatchCallbacks.add(downloadBatchCallback); downloadManager = new DownloadManager( lock, executorService, downloadBatches, downloadBatchCallbacks, fileOperations, downloadsBatchPersistence, downloadManagerDownloader ); setupDownloadBatchesResponse(); setupDownloadBatchStatusesResponse(); given(downloadBatch.status()).willReturn(BATCH_STATUS); given(additionalDownloadBatch.status()).willReturn(ADDITIONAL_BATCH_STATUS); }
Source:
public void setup() { ATTRIBUTE_DESCRIPTOR_LIST.clear(); metacardList.clear(); buildMetacardDataMap(); buildMetacardList(); }

Target:
public void setup() { ATTRIBUTE_DESCRIPTOR_LIST.clear(); buildMetacardDataMap(); buildMetacardList(); }
Source:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); FeedbackSessionAttributes feedbackSession = logic.getFeedbackSession(feedbackSessionName, courseId); Intent intent = Intent.valueOf(getNonNullRequestParamValue(Const.ParamsNames.INTENT)); FeedbackSession response = new FeedbackSession(feedbackSession); switch (intent) { case STUDENT_SUBMISSION: case INSTRUCTOR_SUBMISSION: response.setGracePeriod(null); response.setSessionVisibleSetting(null); response.setCustomSessionVisibleTimestamp(null); response.setResponseVisibleSetting(null); response.setCustomResponseVisibleTimestamp(null); response.setPublishStatus(null); response.setClosingEmailEnabled(null); response.setPublishedEmailEnabled(null); break; case FULL_DETAIL: break; default: throw new InvalidHttpParameterException("Unknown intent " + intent); } return new JsonResult(response); }

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); FeedbackSessionAttributes feedbackSession = logic.getFeedbackSession(feedbackSessionName, courseId); Intent intent = Intent.valueOf(getNonNullRequestParamValue(Const.ParamsNames.INTENT)); FeedbackSessionData response = new FeedbackSessionData(feedbackSession); switch (intent) { case STUDENT_SUBMISSION: case INSTRUCTOR_SUBMISSION: response.setGracePeriod(null); response.setSessionVisibleSetting(null); response.setCustomSessionVisibleTimestamp(null); response.setResponseVisibleSetting(null); response.setCustomResponseVisibleTimestamp(null); response.setPublishStatus(null); response.setClosingEmailEnabled(null); response.setPublishedEmailEnabled(null); break; case FULL_DETAIL: break; default: throw new InvalidHttpParameterException("Unknown intent " + intent); } return new JsonResult(response); }
Source:
public void createControl(Composite parent) { final ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL); scrolledComposite.setFont(parent.getFont()); scrolledComposite.setExpandHorizontal(true); scrolledComposite.setExpandVertical(true); initializeDialogUnits(parent); final Composite composite = new Composite(scrolledComposite, SWT.NULL); composite.setFont(parent.getFont()); scrolledComposite.setContent(composite); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); createToggleTestProject(composite); createTestProjectGroup(composite); createLocationGroup(composite); createTestTargetGroup(composite); createTargetGroup(composite); createPropertiesGroup(composite); enableLocationWidgets(); scrolledComposite.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { Rectangle r = scrolledComposite.getClientArea(); scrolledComposite.setMinSize(composite.computeSize(r.width, SWT.DEFAULT)); } }); setErrorMessage(null); setMessage(null); setControl(scrolledComposite); Control workingSetControl = mWorkingSetGroup.createControl(composite);; workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); validatePageComplete(); }

Target:
public void createControl(Composite parent) { final ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL); scrolledComposite.setFont(parent.getFont()); scrolledComposite.setExpandHorizontal(true); scrolledComposite.setExpandVertical(true); initializeDialogUnits(parent); final Composite composite = new Composite(scrolledComposite, SWT.NULL); composite.setFont(parent.getFont()); scrolledComposite.setContent(composite); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); createToggleTestProject(composite); createTestProjectGroup(composite); createLocationGroup(composite); createTestTargetGroup(composite); createTargetGroup(composite); createPropertiesGroup(composite); enableLocationWidgets(); scrolledComposite.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { Rectangle r = scrolledComposite.getClientArea(); scrolledComposite.setMinSize(composite.computeSize(r.width, SWT.DEFAULT)); } }); setErrorMessage(null); setMessage(null); setControl(scrolledComposite); Control workingSetControl = mWorkingSetGroup.createControl(composite); workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); validatePageComplete(); }
Source:
private Object convertObject(String fieldName, Map<String, Object> object) { String className = (String)object.get(fieldName); if (className == null) return null; JSON.Convertible convertible = toConvertible(className); if (convertible != null) { convertible.fromJSON(object); return convertible; } JSON.Convertor convertor = factory.convertors.get(className); if (convertor != null) return convertor.fromJSON(object); return null; }

Target:
private Object convertObject(String fieldName, Map<String, Object> object) { String className = (String)object.get(fieldName); if (className == null) return null; Convertible convertible = toConvertible(className); if (convertible != null) { convertible.fromJSON(object); return convertible; } Convertor convertor = factory.getConvertor(className); if (convertor != null) return convertor.fromJSON(object); return null; }
Source:
public BlockPos getNearestStructurePos(World worldIn, String structureName, BlockPos position, boolean p_180513_4_) { if (this.baseGenerator instanceof SpongeGenerationPopulator) { return ((SpongeGenerationPopulator) this.baseGenerator).getHandle(this.world).getNearestStructurePos(worldIn, structureName, position, p_180513_4_); } Class<? extends MapGenStructure> target = null; if("Stronghold".equals(structureName)) { target = MapGenStronghold.class; } else if("Mansion".equals(structureName)) { target = WoodlandMansion.class; } else if("Monument".equals(structureName)) { target = StructureOceanMonument.class; } else if("Village".equals(structureName)) { target = MapGenVillage.class; } else if("Mineshaft".equals(structureName)) { target = MapGenMineshaft.class; } else if("Temple".equals(structureName)) { target = MapGenScatteredFeature.class; } else if ("Fortress".equals(structureName)) { target = MapGenNetherBridge.class; } else if ("EndCity".equals(structureName)) { target = MapGenEndCity.class; } if (target == null) { return null; } for (GenerationPopulator gen : this.genpop) { if (target.isInstance(gen)) { return ((MapGenStructure) gen).getNearestStructurePos(worldIn, position, p_180513_4_); } } return null; }

Target:
public BlockPos getNearestStructurePos(World worldIn, String structureName, BlockPos position, boolean p_180513_4_) { Class<? extends MapGenStructure> target = null; if("Stronghold".equals(structureName)) { target = MapGenStronghold.class; } else if("Mansion".equals(structureName)) { target = WoodlandMansion.class; } else if("Monument".equals(structureName)) { target = StructureOceanMonument.class; } else if("Village".equals(structureName)) { target = MapGenVillage.class; } else if("Mineshaft".equals(structureName)) { target = MapGenMineshaft.class; } else if("Temple".equals(structureName)) { target = MapGenScatteredFeature.class; } else if ("Fortress".equals(structureName)) { target = MapGenNetherBridge.class; } else if ("EndCity".equals(structureName)) { target = MapGenEndCity.class; } if (target != null) { for (GenerationPopulator gen : this.genpop) { if (target.isInstance(gen)) { return ((MapGenStructure) gen).getNearestStructurePos(worldIn, position, p_180513_4_); } } } if (this.baseGenerator instanceof SpongeGenerationPopulator) { return ((SpongeGenerationPopulator) this.baseGenerator).getHandle(this.world).getNearestStructurePos(worldIn, structureName, position, p_180513_4_); } return null; }
Source:
private String namespace() { return Stream.of(config().namespace(), config().timelock().flatMap(TimeLockClientConfig::client), config().keyValueService().namespace()) .filter(Optional::isPresent) .map(Optional::get) .findFirst() .orElse("UNKNOWN"); }

Target:
String namespace() { return Stream.of(config().namespace(), config().timelock().flatMap(TimeLockClientConfig::client), config().keyValueService().namespace()) .filter(Optional::isPresent) .map(Optional::get) .findFirst() .orElse("UNKNOWN"); }
Source:
public void setSchedulingPolicy(SchedulingPolicy policy) { synchronized (root) { if (policy == schedulingPolicy) { return; } if (parent.isPresent() && parent.get().schedulingPolicy == QUERY_PRIORITY) { checkArgument(policy == QUERY_PRIORITY, "Parent of %s uses query priority scheduling, so %s must also", id, id); } schedulingPolicy = policy; if (policy == QUERY_PRIORITY) { for (InternalResourceGroup group : subGroups.values()) { group.setSchedulingPolicy(QUERY_PRIORITY); } } getAndRepopulateSubGroups(); getAndRepopulateQueuedQueries(); } }

Target:
public void setSchedulingPolicy(SchedulingPolicy policy) { synchronized (root) { if (policy == schedulingPolicy) { return; } if (parent.isPresent() && parent.get().schedulingPolicy == QUERY_PRIORITY) { checkArgument(policy == QUERY_PRIORITY, "Parent of %s uses query priority scheduling, so %s must also", id, id); } UpdateablePriorityQueue<InternalResourceGroup> queue; UpdateablePriorityQueue<QueryExecution> queryQueue; switch (policy) { case FAIR: queue = new FifoQueue<>(); queryQueue = new FifoQueue<>(); break; case WEIGHTED: queue = new StochasticPriorityQueue<>(); queryQueue = new StochasticPriorityQueue<>(); break; case QUERY_PRIORITY: for (InternalResourceGroup group : subGroups.values()) { group.setSchedulingPolicy(QUERY_PRIORITY); } queue = new IndexedPriorityQueue<>(); queryQueue = new IndexedPriorityQueue<>(); break; default: throw new UnsupportedOperationException("Unsupported scheduling policy: " + policy); } while (!eligibleSubGroups.isEmpty()) { InternalResourceGroup group = eligibleSubGroups.poll(); queue.addOrUpdate(group, getSubGroupSchedulingPriority(policy, group)); } eligibleSubGroups = queue; while (!queuedQueries.isEmpty()) { QueryExecution query = queuedQueries.poll(); queryQueue.addOrUpdate(query, getQueryPriority(query.getSession())); } queuedQueries = queryQueue; schedulingPolicy = policy; } }
Source:
public DefaultSurfaceMetadataBuilder xValueType(ValueType xValueType) { ArgChecker.notNull(xValueType, "xValueType"); this.xValueType = xValueType; return this; }

Target:
public DefaultSurfaceMetadataBuilder xValueType(ValueType xValueType) { this.xValueType = ArgChecker.notNull(xValueType, "xValueType"); return this; }
Source:
@NonNull List<PageTitle> langLinks() { ArrayList<PageTitle> result = new ArrayList<>(); if (pages == null) { return result; } Iterator<Map.Entry<String, MwApiResponsePage>> i = pages.entrySet().iterator(); MwApiResponsePage page = i.next().getValue(); if (page.langLinks() == null) { return result; } for (MwApiResponsePage.LangLink langLink : page.langLinks()) { result.add(new PageTitle(langLink.localizedTitle(), WikiSite.forLanguageCode(langLink.lang()))); } return result; }

Target:
@NonNull List<PageTitle> langLinks() { List<PageTitle> result = new ArrayList<>(); if (pages == null) { return result; } Iterator<Map.Entry<String, MwApiResponsePage>> i = pages.entrySet().iterator(); MwApiResponsePage page = i.next().getValue(); if (page.langLinks() == null) { return result; } for (MwApiResponsePage.LangLink langLink : page.langLinks()) { result.add(new PageTitle(langLink.localizedTitle(), WikiSite.forLanguageCode(langLink.lang()))); } return result; }
Source:
private FunctionCheckedException<Cassandra.Client, Object, RuntimeException> noOp() { return new FunctionCheckedException<Cassandra.Client, Object, RuntimeException>() { @Override public Object apply(Cassandra.Client input) throws RuntimeException { return null; } @Override public String toString() { return "no-op"; } }; }

Target:
private FunctionCheckedException<Cassandra.Client, Void, RuntimeException> noOp() { return new FunctionCheckedException<Cassandra.Client, Void, RuntimeException>() { @Override public Void apply(Cassandra.Client input) throws RuntimeException { return null; } @Override public String toString() { return "no-op"; } }; }
Source:
void empty_tag_predicate_matches_pickle_with_any_tags() { Pickle pickle = createPickleWithTags("@FOO"); TagPredicate predicate = new TagPredicate(TagExpressionParser.parse("")); assertTrue(predicate.test(pickle)); }

Target:
void empty_tag_predicate_matches_pickle_with_any_tags() { Pickle pickle = createPickleWithTags("@FOO"); TagPredicate predicate = createPredicate(""); assertTrue(predicate.test(pickle)); }
Source:
private void addMethod( JavaClassSource javaClassSource, org.kie.workbench.common.services.datamodeller.core.Method method, ClassTypeResolver classTypeResolver ) throws ClassNotFoundException { MethodSource<JavaClassSource> methodSource = javaClassSource.addMethod(); methodSource.setName( method.getName() ); methodSource.setReturnType( buildMethodReturnTypeString( method.getReturnType(), classTypeResolver ) ); methodSource.setParameters( buildMethodParameterString( method.getParameters(), classTypeResolver ) ); methodSource.setBody( method.getBody() ); methodSource.setVisibility( org.jboss.forge.roaster.model.Visibility.PUBLIC ); for ( Annotation annotation : method.getAnnotations() ) { addAnnotation( methodSource, annotation ); } }

Target:
private void addMethod( JavaClassSource javaClassSource, org.kie.workbench.common.services.datamodeller.core.Method method, ClassTypeResolver classTypeResolver ) throws ClassNotFoundException { MethodSource<JavaClassSource> methodSource = javaClassSource.addMethod(); methodSource.setName( method.getName() ); methodSource.setReturnType( buildMethodReturnTypeString( method.getReturnType(), classTypeResolver ) ); methodSource.setParameters( buildMethodParameterString( method.getParameters(), classTypeResolver ) ); methodSource.setBody( method.getBody() ); methodSource.setVisibility( buildVisibility( method.getVisibilty() ) ); for ( Annotation annotation : method.getAnnotations() ) { addAnnotation( methodSource, annotation ); } }
Source:
protected CommandStatus executeTransfer(final String destination) { transferStatus = command.execute(); boolean check = false; try { check = exists(destination); } catch (IOException e) { e.printStackTrace(); } if (check) return CommandStatus.SUCCESS; else return CommandStatus.FAILED; }

Target:
protected CommandStatus executeTransfer(final String destination) throws IOException { transferStatus = command.get().execute(); if (!exists(destination)) return CommandStatus.FAILED; logger.info("File transfer successful!"); return CommandStatus.SUCCESS; }
Source:
public static boolean isNonCoveringIndex(Optimizable innerTable) { try { AccessPath path = innerTable.getCurrentAccessPath(); if (path != null) { ConglomerateDescriptor cd = path.getConglomerateDescriptor(); if (cd != null && cd.isIndex() && !innerTable.isCoveringIndex(cd)) { return true; } } } catch (Exception e) { throw new IllegalStateException("could not determine if index is covering", e); } return false; }

Target:
public static boolean isNonCoveringIndex(Optimizable innerTable) { try { AccessPath path = innerTable.getCurrentAccessPath(); if (path != null) { ConglomerateDescriptor cd = path.getConglomerateDescriptor(); return (cd != null && cd.isIndex() && !innerTable.isCoveringIndex(cd)); } } catch (Exception e) { throw new IllegalStateException("could not determine if index is covering", e); } return false; }
Source:
public Map<String, Integer> maxLengths() throws IOException { return DbUtils.getColumnSizes(interfaceTemplate, "Pool"); }

Target:
public Map<String, Integer> maxLengths() throws IOException { return requestManager.getPoolColumnSizes(); }
Source:
public static Set<String> getReductionKeys(final OnmsApplication application) { Objects.requireNonNull(application); Set<String> reductionKeys = new HashSet<>(); for(OnmsMonitoredService monitoredService : application.getMonitoredServices()) { reductionKeys.add(getNodeLostServiceReductionKey(monitoredService)); reductionKeys.add(getInterfaceDownReductionKey(monitoredService)); reductionKeys.add(getNodeDownReductionKey(monitoredService)); } return reductionKeys; }

Target:
public static Set<String> getReductionKeys(final OnmsApplication application) { Objects.requireNonNull(application); Set<String> reductionKeys = new HashSet<>(); for (OnmsMonitoredService monitoredService : application.getMonitoredServices()) { reductionKeys.addAll(getReductionKeys(monitoredService)); } return reductionKeys; }
Source:
public void receiveHeader(PacketLineIn pckIn, boolean stateless) throws IOException { try { String version = parseNextLine(pckIn, VERSION); if (!version.equals("0.1")) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "version not supported")); } pusher = parseNextLine(pckIn, PUSHER); pushee = parseNextLine(pckIn, PUSHEE); receivedNonce = parseNextLine(pckIn, NONCE); if (pckIn.readString() != "") { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "expected empty line after header")); } } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate Header")); } nonceStatus = nonceGenerator.verify(receivedNonce, sentNonce, seed, db, stateless, nonceSlopLimit); }

Target:
public void receiveHeader(PacketLineIn pckIn, boolean stateless) throws IOException { try { String version = parseNextLine(pckIn, VERSION); if (!version.equals("0.1")) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "version not supported")); } pusher = parseNextLine(pckIn, PUSHER); pushee = parseNextLine(pckIn, PUSHEE); receivedNonce = parseNextLine(pckIn, NONCE); if (pckIn.readString() != "") { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "expected empty line after header")); } } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate header")); } nonceStatus = nonceGenerator.verify(receivedNonce, sentNonce, db, stateless, nonceSlopLimit); }
Source:
void read(Tokeniser t, CharacterReader r) { char c = r.consume(); switch (c) { case '\t': case '\n': case '\r': case '\f': case ' ': break; case '/': t.transition(SelfClosingStartTag); break; case '<': r.unconsume(); t.error(this); case '>': t.emitTagPending(); t.transition(Data); break; case nullChar: t.error(this); t.tagPending.newAttribute(); r.unconsume(); t.transition(AttributeName); break; case eof: t.eofError(this); t.transition(Data); break; case '"': case '\'': case '=': t.error(this); t.tagPending.newAttribute(); t.tagPending.appendAttributeName(c); t.transition(AttributeName); break; default: t.tagPending.newAttribute(); r.unconsume(); t.transition(AttributeName); } }

Target:
void read(Tokeniser t, CharacterReader r) { switch (r.current()) { case '&': t.advanceTransition(CharacterReferenceInData); break; case '<': t.advanceTransition(TagOpen); break; case nullChar: t.error(this); t.emit(r.consume()); break; case eof: t.emit(new Token.EOF()); break; default: String data = r.consumeData(); t.emit(data); break; } }
Source:
public void transitionsWithNoTrigger(Transition trans) { if (trans.getSource() instanceof Entry || trans.getSource() instanceof Choice || trans.getSource() instanceof Synchronization || (trans.getTarget() instanceof Synchronization && (trans.getTarget().getIncomingTransitions().size() > 1))) { return; } if (trans.getSource() instanceof org.yakindu.sct.model.sgraph.State) { org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) trans.getSource(); if (!state.isComposite()) { return; } for (Region r : state.getRegions()) { for (Vertex v : r.getVertices()) { if (v instanceof Exit) { return; } } } } if (!STextValidationModelUtils.getExitPointSpecs(trans.getProperties()).isEmpty()) { return; } if (trans.getTrigger() == null) { warning(ISSUE_TRANSITION_WITHOUT_TRIGGER, trans, null, -1); } }

Target:
public void transitionsWithNoTrigger(Transition trans) { if (trans.getSource() instanceof Entry || trans.getSource() instanceof Choice || trans.getSource() instanceof Synchronization || (trans.getTarget() instanceof Synchronization && (trans.getTarget().getIncomingTransitions().size() > 1))) { return; } if (trans.getSource() instanceof org.yakindu.sct.model.sgraph.State) { org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) trans.getSource(); if (state.isComposite()) { for (Region r : state.getRegions()) { for (Vertex v : r.getVertices()) { if (v instanceof Exit) { return; } } } } } if (!STextValidationModelUtils.getExitPointSpecs(trans.getProperties()).isEmpty()) { return; } if (trans.getTrigger() == null) { warning(ISSUE_TRANSITION_WITHOUT_TRIGGER, trans, null, -1); } }
Source:
private static void insertConcurrent(CqlSession session) throws InterruptedException, ExecutionException { PreparedStatement pst = session.prepare( insertInto("examples", "tbl_sample_kv") .value("id", bindMarker("id")) .value("value", bindMarker("value")) .build()); List<CompletableFuture<?>> pending = new ArrayList<>(); for (int i = 0; i < TOTAL_NUMBER_OF_INSERTS; i++) { pending.add( session .executeAsync( pst.bind() .set("id", UUID.randomUUID(), UUID.class) .set("value", String.format("Value for: %s", i), String.class)) .toCompletableFuture()); } CompletableFuture.allOf(pending.toArray(new CompletableFuture[0])).get(); System.out.println( String.format( "Finished executing %s queries with a concurrency level of 32.", pending.size())); }

Target:
private static void insertConcurrent(CqlSession session) throws InterruptedException, ExecutionException { PreparedStatement pst = session.prepare( insertInto("examples", "tbl_sample_kv") .value("id", bindMarker("id")) .value("value", bindMarker("value")) .build()); List<CompletableFuture<?>> pending = new ArrayList<>(); for (int i = 0; i < TOTAL_NUMBER_OF_INSERTS; i++) { pending.add( session .executeAsync(pst.bind().setUuid("id", UUID.randomUUID()).setInt("value", i)) .toCompletableFuture()); } CompletableFuture.allOf(pending.toArray(new CompletableFuture[0])).get(); System.out.println( String.format( "Finished executing %s queries with a concurrency level of %s.", pending.size(), session .getContext() .getConfig() .getDefaultProfile() .getInt(DefaultDriverOption.REQUEST_THROTTLER_MAX_CONCURRENT_REQUESTS))); }
Source:
public LinkDomainToLdapResponse linkDomainToLdap(Long domainId, String type, String name, short accountType) { Validate.notNull(type, "type cannot be null. It should either be GROUP or OU"); Validate.notNull(domainId, "domainId cannot be null."); Validate.notEmpty(name, "GROUP or OU name cannot be empty"); Validate.isTrue(accountType>=0 && accountType<=5, "accountype should be a number from 0-5"); LinkType linkType = LdapManager.LinkType.valueOf(type.toUpperCase()); LdapTrustMapVO vo = _ldapTrustMapDao.persist(new LdapTrustMapVO(domainId, linkType, name, accountType)); LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(vo.getDomainId(), vo.getType().toString(), vo.getName(), vo.getAccountType()); return response; }

Target:
public LinkDomainToLdapResponse linkDomainToLdap(Long domainId, String type, String name, short accountType) { Validate.notNull(type, "type cannot be null. It should either be GROUP or OU"); Validate.notNull(domainId, "domainId cannot be null."); Validate.notEmpty(name, "GROUP or OU name cannot be empty"); Validate.isTrue(accountType==0 || accountType==2, "accountype should be either 0(normal user) or 2(domain admin)"); LinkType linkType = LdapManager.LinkType.valueOf(type.toUpperCase()); LdapTrustMapVO vo = _ldapTrustMapDao.persist(new LdapTrustMapVO(domainId, linkType, name, accountType)); LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(vo.getDomainId(), vo.getType().toString(), vo.getName(), vo.getAccountType()); return response; }
Source:
DataBuffer readChunk() throws IOException; DataBuffer readChunkNoWait() throws IOException; long pos(); interface Factory extends Closeable { DataReader create(long offset, long len) throws IOException; boolean isShortCircuit(); }

Target:
DataBuffer readChunk() throws IOException; @Nullable DataBuffer readChunkIfReady() throws IOException; long pos(); interface Factory extends Closeable { DataReader create(long offset, long len) throws IOException; boolean isShortCircuit(); }
Source:
private static void runListener(Runnable listener) { requireNonNull(listener, "listener is null"); try { listener.run(); } catch (RuntimeException e) { log.error("Exception while running the listener: " + e.getMessage()); } }

Target:
private static void runListener(Runnable listener) { requireNonNull(listener, "listener is null"); try { listener.run(); } catch (RuntimeException e) { throw new PrestoException(GENERIC_INTERNAL_ERROR, "Exception while running the listener", e); } }
Source:
public void report(IssueType type, String code, String... args) { String message; try { message = this.resources.getString(code); message = message == null ? code : message; message = MessageFormat.format(message, args); } catch (MissingResourceException ex) { logger.error("Can't find resource for " + code + " defaulting to code"); message = code; } if (type == IssueType.ERROR || type == IssueType.VALIDATION) logger.error(message); if (type == IssueType.PROBLEM) logger.warn(message); if (type == IssueType.COLLISION) logger.info(message); if (type == IssueType.NOTE || type == IssueType.COUNT) logger.debug(message); Document doc = new Document(); doc.add(new StringField("type", ALATerm.TaxonomicIssue.qualifiedName(), Field.Store.YES)); doc.add(new StringField("id", UUID.randomUUID().toString(), Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.type), type.name(), Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.subject), code, Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.description), message, Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.date), ISO8601.format(new Date()), Field.Store.YES)); try { synchronized (this) { this.indexWriter.addDocument(doc); this.indexWriter.commit(); this.searcherManager.maybeRefresh(); } } catch (IOException ex) { logger.error("Unable to write report to index", ex); } }

Target:
public void report(IssueType type, String code, String... args) { String message; try { message = this.resources.getString(code); message = message == null ? code : message; message = MessageFormat.format(message, args); } catch (MissingResourceException ex) { logger.error("Can't find resource for " + code + " defaulting to code"); message = code; } switch (type) { case ERROR: case VALIDATION: logger.error(message); break; case PROBLEM: logger.warn(message); break; case COLLISION: logger.info(message); break; case NOTE: case COUNT: logger.debug(message); break; default: logger.warn("Unknown message type " + type + ": " + message); } Document doc = new Document(); doc.add(new StringField("type", ALATerm.TaxonomicIssue.qualifiedName(), Field.Store.YES)); doc.add(new StringField("id", UUID.randomUUID().toString(), Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.type), type.name(), Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.subject), code, Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.description), message, Field.Store.YES)); doc.add(new StringField(this.fieldName(DcTerm.date), ISO8601.format(OffsetDateTime.now()), Field.Store.YES)); try { synchronized (this) { this.indexWriter.addDocument(doc); this.indexWriter.commit(); this.searcherManager.maybeRefresh(); } } catch (IOException ex) { logger.error("Unable to write report to index", ex); } }
Source:
public void cleanupTraces() { TmfTestTrace.A_TEST_10K.dispose(); CtfTmfTestTrace.KERNEL.dispose(); }

Target:
public void cleanupTraces() { TmfTestTrace.A_TEST_10K.dispose(); }
Source:
public static PermitType map(ActionGroup entity, PermitType template) { try { return PermitType.valueOf(entity); } catch (IllegalArgumentException e) { log.error("Missing mapping '{}' --> '{}': {}", entity, PermitType.class.getName(), e.getMessage()); log.debug("Exception", e); return null; } }

Target:
public static PermitType map(ActionGroup entity, PermitType template) { try { return PermitType.valueOf(entity); } catch (IllegalArgumentException e) { log.error("Missing mapping '{}' --> '{}': {}", entity, PermitType.class.getName(), e.getMessage()); log.error("Exception", e); return null; } }
Source:
private Set<WrappedByteArray> drainKeys() { Set<WrappedByteArray> trackedKeys = new HashSet<>(); for (int i = 0; i < keysPerSegment.length(); i++) { Set<WrappedByteArray> keys = keysPerSegment.get(i); if (keys != null) trackedKeys.addAll(keys); keysPerSegment.set(i, null); } return trackedKeys; }

Target:
private void drainKeys() { for (int i = 0; i < keysPerSegment.length(); i++) { Set<WrappedByteArray> keys = keysPerSegment.get(i); if (keys != null) keyOnlyTracker.addAll(keys); keysPerSegment.set(i, null); } }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { return null; } mStudyOptionsView = inflater.inflate(R.layout.studyoptions_fragment, container, false); assert mStudyOptionsView != null; mFragmented = getActivity().getClass() != StudyOptionsActivity.class; initAllContentViews(mStudyOptionsView); mToolbar = (Toolbar) mStudyOptionsView.findViewById(R.id.studyOptionsToolbar); mToolbar.inflateMenu(R.menu.study_options_fragment); if (mToolbar != null) { configureToolbar(); } refreshInterface(true); return mStudyOptionsView; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { return null; } View studyOptionsView = inflater.inflate(R.layout.studyoptions_fragment, container, false); mStudyOptionsView = studyOptionsView; mFragmented = getActivity().getClass() != StudyOptionsActivity.class; initAllContentViews(studyOptionsView); mToolbar = (Toolbar) studyOptionsView.findViewById(R.id.studyOptionsToolbar); mToolbar.inflateMenu(R.menu.study_options_fragment); if (mToolbar != null) { configureToolbar(); } refreshInterface(true); return studyOptionsView; }
Source:
private String assertLabelGroupsMatchingAndReplace(String labelTemplate, String[][] expectedGroups) throws Exception { assertLabelGroupsMatching(labelTemplate, expectedGroups); return PipelineLabel.replaceRevisionsInLabel(labelTemplate, MATERIAL_REVISIONS); }

Target:
private String assertLabelGroupsMatchingAndReplace(String labelTemplate, String[][] expectedGroups) throws Exception { assertLabelGroupsMatching(labelTemplate, expectedGroups); PipelineLabel label = new PipelineLabel(labelTemplate); label.updateLabel(MATERIAL_REVISIONS); return label.toString(); }
Source:
public <V> DataSet<V> readParquetFile(StructType tableSchema, int[] baseColumnMap, int[] partitionColumnMap, String location, OperationContext context, Qualifier[][] qualifiers, DataValueDescriptor probeValue, ExecRow execRow, boolean useSample, double sampleFraction) throws StandardException { try { Dataset<Row> table = null; ExternalTableUtils.preSortColumns(tableSchema.fields(), partitionColumnMap); try { table = SpliceSpark.getSession() .read() .schema(tableSchema) .parquet(location); } catch (Exception e) { return handleExceptionSparkRead(e, location, false); } ExternalTableUtils.sortColumns(table.schema().fields(), partitionColumnMap); table = processExternalDataset(execRow, table, baseColumnMap, qualifiers, probeValue); if (useSample) { return new NativeSparkDataSet(table .sample(false, sampleFraction), context); } else { return new NativeSparkDataSet(table, context); } } catch (Exception e) { throw StandardException.newException( SQLState.EXTERNAL_TABLES_READ_FAILURE, e, e.getMessage()); } }

Target:
public <V> DataSet<V> readParquetFile(StructType tableSchema, int[] baseColumnMap, int[] partitionColumnMap, String location, OperationContext context, Qualifier[][] qualifiers, DataValueDescriptor probeValue, ExecRow execRow, boolean useSample, double sampleFraction) throws StandardException { try { Dataset<Row> table = null; ExternalTableUtils.preSortColumns(tableSchema.fields(), partitionColumnMap); try { table = SpliceSpark.getSession() .read() .schema(tableSchema) .parquet(location); } catch (Exception e) { return handleExceptionSparkRead(e, location, false); } ExternalTableUtils.sortColumns(table.schema().fields(), partitionColumnMap); return externalTablesPostProcess(baseColumnMap, context, qualifiers, probeValue, execRow, useSample, sampleFraction, table); } catch (Exception e) { throw StandardException.newException( SQLState.EXTERNAL_TABLES_READ_FAILURE, e, e.getMessage()); } }
Source:
public List<CoopResult> getCoopLeaderboard(String missionId, int numberOfPlayers) { return getMany("/data/coopResult", 1000, ImmutableMap.of( "filter", rsql(qBuilder().intNum("playerCount").eq(numberOfPlayers)), "sort", "-duration" )); }

Target:
public List<CoopResult> getCoopLeaderboard(String missionId, int numberOfPlayers) { return getAll("/data/coopResult", ImmutableMap.of( "filter", rsql(qBuilder().intNum("playerCount").eq(numberOfPlayers)), "sort", "-duration" )); }
Source:
private KeyInformation(String originalKey, String prefix, Long objectId, String key, List<String> manipulations) { this.originalKey = originalKey; this.prefix = prefix; this.objectId = objectId; this.key = key; this.manipulations = manipulations; }

Target:
private KeyInformation(String originalKey, String prefix, Long objectId, String key, List<String> manipulations) { this(originalKey, prefix, null, null, objectId, key, manipulations); }
Source:
public Target onboard( @NonNull String vendorThingID, @NonNull String thingPassword, @Nullable OnboardWithVendorThingIDOptions options) throws ThingIFException { return thingIfApi.onboard(vendorThingID, thingPassword, options); }

Target:
public Target onboard( @NonNull String vendorThingID, @NonNull String thingPassword, @Nullable OnboardWithVendorThingIDOptions options) throws ThingIFException { return this.thingIfApi.onboard(vendorThingID, thingPassword, options); }
Source:
public void setup() { super.setup(); networkApi = api.getNetworkApi(); for (Datacenter dc : api.getDatacenterApi().listDatacenters()) { if (dc.getName().equals("dal13")) { datacenter = dc; } } assertNotNull(datacenter, "Datacenter must not be null"); }

Target:
public void setup() { super.setup(); networkApi = api.getNetworkApi(); datacenter = Iterables.get(api.getDatacenterApi().listDatacenters(), 0); assertNotNull(datacenter, "Datacenter must not be null"); }
Source:
void onChangeRevision(@SuppressWarnings("unused") ChangeEvent e) { int idx = diffBase.getSelectedIndex(); if (0 <= idx && fileTableMode == FileTable.Mode.REVIEW) { String n = diffBase.getValue(idx); loadConfigInfo(changeInfo, !n.isEmpty() ? n : null); } }

Target:
void onChangeRevision(@SuppressWarnings("unused") ChangeEvent e) { int idx = diffBase.getSelectedIndex(); if (0 <= idx) { String n = diffBase.getValue(idx); loadConfigInfo(changeInfo, !n.isEmpty() ? n : null); } }
Source:
static String getShortNameToLog(final List<RegionInfo> ris) { return ris.stream().map(ri -> ri.getShortNameToLog()).collect(Collectors.toList()).toString(); }

Target:
static String getShortNameToLog(final List<RegionInfo> ris) { return ris.stream().map(RegionInfo::getEncodedName).collect(Collectors.toList()).toString(); }