auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void failWithNotConcurrentModificationException() { final String container = randomKey(); final String key = randomKey(); final CustomObjectBigIntegerNumberGeneratorConfig config = CustomObjectBigIntegerNumberGeneratorConfigBuilder.of(getSphereClient(getBadRequestHttpClient()), key) .container(container) .build(); final BigIntegerNumberGenerator generator = CustomObjectBigIntegerNumberGenerator.of(config); try { <START> generator.getNextNumber().toCompletableFuture().join(); <END> } catch (Exception e) { assertThat(e.getCause() instanceof NotFoundException).isTrue(); } }</code><technical_language>If this throw exception test green. a <LINK_0> catchThrowable</technical_language>

Target:
public void failWithNotConcurrentModificationException() { final String container = randomKey(); final String key = randomKey(); final ErrorResponseHttpClient notFoundRequestClient = new ErrorResponseHttpClient(NOT_FOUND_404); final CustomObjectBigIntegerNumberGeneratorConfig config = CustomObjectBigIntegerNumberGeneratorConfigBuilder.of(getSphereClient(notFoundRequestClient), key) .container(container) .build(); final BigIntegerNumberGenerator generator = CustomObjectBigIntegerNumberGenerator.of(config); Throwable thrown = catchThrowable(() -> { generator.getNextNumber().toCompletableFuture().join(); }); assertThat(thrown).isNotNull(); assertThat(notFoundRequestClient.getGetRequestsCount()).isEqualTo(1); final ErrorResponseHttpClient concurrentRequestClient = new ErrorResponseHttpClient(CONFLICT_409); final CustomObjectBigIntegerNumberGeneratorConfig config2 = CustomObjectBigIntegerNumberGeneratorConfigBuilder.of(getSphereClient(concurrentRequestClient), key) .container(container) .build(); final BigIntegerNumberGenerator generator2 = CustomObjectBigIntegerNumberGenerator.of(config2); catchThrowable(() -> { generator2.getNextNumber().toCompletableFuture().join(); }); assertThat(concurrentRequestClient.getGetRequestsCount()).isEqualTo(config2.getMaxRetryAttempts()); }
Source:
<code>public int hashCode() { final int prime = 31; int result = 1; result = prime * result + remoteCommit.hashCode(); <START> result = prime * result + baseCommit.hashCode(); <END> result = prime * result + getLocation().hashCode(); return result; }</code><technical_language>NPE occur here. In GitModelCommit's constructors, is a code path 'baseCommit' field is set 'null'</technical_language>

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + getLocation().hashCode(); result = prime * result + remoteCommit.hashCode(); if (baseCommit != null) result = prime * result + baseCommit.hashCode(); return result; }
Source:
<code>private SuiteRunner createSuiteRunner(XmlSuite xmlSuite) { SuiteRunner result = new SuiteRunner(getConfiguration(), xmlSuite, m_outputDir, m_testRunnerFactory, m_useDefaultListeners, m_methodInterceptors, m_invokedMethodListeners.values(), m_testListeners.values(), m_classListeners.values()); for (ISuiteListener isl : m_suiteListeners.values()) { result.addListener(isl); } for (IReporter r : result.getReporters()) { <START> if (!m_reporters.containsKey(r.getClass())) { <END> addListener(r); } } for (IConfigurationListener cl : m_configuration.getConfigurationListeners()) { result.addConfigurationListener(cl); } return result; }</code><technical_language>consider replace line maybeAddListener(m_reporters, r.getClass(), r);</technical_language>

Target:
private SuiteRunner createSuiteRunner(XmlSuite xmlSuite) { SuiteRunner result = new SuiteRunner(getConfiguration(), xmlSuite, m_outputDir, m_testRunnerFactory, m_useDefaultListeners, m_methodInterceptors, m_invokedMethodListeners.values(), m_testListeners.values(), m_classListeners.values()); for (ISuiteListener isl : m_suiteListeners.values()) { result.addListener(isl); } for (IReporter r : result.getReporters()) { maybeAddListener(m_reporters, r.getClass(), r, true); } for (IConfigurationListener cl : m_configuration.getConfigurationListeners()) { result.addConfigurationListener(cl); } return result; }
Source:
<code>public void init() throws KalturaManagerException { <START> KalturaEventsManager.registerEventConsumer(this, KalturaEventType.STREAM_PUBLISHED, KalturaEventType.STREAM_UNPUBLISHED, KalturaMediaEventType.APPLICATION_INSTANCE_STARTED); <END> liveManager = KalturaServer.getManager(ILiveManager.class); setInitialized(); }</code><technical_language>forgot call super.init()</technical_language>

Target:
public void init() throws KalturaManagerException { super.init(); KalturaEventsManager.registerEventConsumer(this, KalturaEventType.STREAM_PUBLISHED, KalturaEventType.STREAM_UNPUBLISHED, KalturaMediaEventType.APPLICATION_INSTANCE_STARTED); liveManager = KalturaServer.getManager(ILiveManager.class); setInitialized(); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PartitionResponseInfo["); sb.append("PartitionId=").append(partitionId); sb.append(" ServerErrorCode=").append(errorCode); sb.append(" MessageInfoAndMetadataListSize=").append(messageInfoAndMetadataListSize); <START> if (errorCode == ServerErrorCode.No_Error) { <END> sb.append(" MessageInfoList=").append(messageInfoAndMetadataListSerde.getMessageInfoList()); } sb.append("]"); return sb.toString(); }</code><technical_language>get rid of this in replica metadata request too. logs large</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PartitionResponseInfo["); sb.append("PartitionId=").append(partitionId); sb.append(" ServerErrorCode=").append(errorCode); sb.append(" MessageInfoAndMetadataListSize=").append(messageInfoAndMetadataListSize); sb.append("]"); return sb.toString(); }
Source:
<code>private boolean doDrag(DragDropEventBase<?> event, boolean isDrop) { String dragDropEventData = PolicyUnitPanel.getDragDropEventData(event, isDrop); String[] split = dragDropEventData.split(" "); <START> if (split != null && split.length == 3) { <END> if (!type.equals(split[0])) { return false; } else if (Boolean.valueOf(split[2]).equals(used)) { return false; } } PolicyUnit policyUnit = model.getPolicyUnitsMap().get(Guid.createGuidFromString(split[1])); if (PolicyUnitPanel.FILTER.equals(split[0])) { if (used) { model.addFilter(policyUnit, false, 0); } else { model.removeFilter(policyUnit); } } else if (FunctionPolicyUnitPanel.FUNCTION.equals(split[0])) { if (used) { model.addFunction(policyUnit); } else { model.removeFunction(policyUnit); } } return true; }</code><technical_language>please extract 3 a constant</technical_language>

Target:
private boolean doDrag(DragDropEventBase<?> event, boolean isDrop) { String dragDropEventData = PolicyUnitPanel.getDragDropEventData(event, isDrop); String[] split = dragDropEventData.split(" "); if (split != null && split.length == EVENT_DATA_COUNT) { if (!type.equals(split[0])) { return false; } else if (Boolean.valueOf(split[2]).equals(used)) { return false; } } PolicyUnit policyUnit = model.getPolicyUnitsMap().get(Guid.createGuidFromString(split[1])); if (PolicyUnitPanel.FILTER.equals(split[0])) { if (used) { model.addFilter(policyUnit, false, 0); } else { model.removeFilter(policyUnit); } } else if (FunctionPolicyUnitPanel.FUNCTION.equals(split[0])) { if (used) { model.addFunction(policyUnit); } else { model.removeFunction(policyUnit); } } return true; }
Source:
<code><START> public boolean equals(final Object o) { <END> if (this == o) { return true; } if (o == null || this.getClass() != o.getClass()) { return false; } final SearchRequest that = (SearchRequest) o; if (this.requestId != that.requestId) { return false; } if (this.parameters != null ? !this.parameters.equals(that.parameters) : that.parameters != null) { return false; } return true; }</code><technical_language>I prefer pojomatics instead of adding this code manually</technical_language>

Target:
public boolean equals(final Object o) { return Pojomatic.equals(this, o); }
Source:
<code>public void editNoFilenameTest() { String label = "a brand-new title too!"; service.editLabel(agent, pid, label); <START> verify(repoObjFactory).createExclusiveRelationship(eq(binaryObj), eq(Ebucore.filename), any(Resource.class)); <END> verify(premisLogger).buildEvent(eq(Premis.FilenameChange)); verify(eventBuilder).addEventDetail(labelCaptor.capture()); assertEquals(labelCaptor.getValue(), "Object renamed from no ebucore:filename to " + label); verify(eventBuilder).writeAndClose(); verify(messageSender).sendUpdateDescriptionOperation(anyString(), pidCaptor.capture()); assertEquals(pid, pidCaptor.getValue().get(0)); }</code><technical_language>setting object of relationship expected filename in tests</technical_language>

Target:
public void editNoFilenameTest() { String label = "a brand-new title too!"; service.editLabel(agent, pid, label); verify(repoObjFactory).createExclusiveRelationship(eq(binaryObj), eq(Ebucore.filename), eq(label)); verify(premisLogger).buildEvent(eq(Premis.FilenameChange)); verify(eventBuilder).addEventDetail(labelCaptor.capture()); assertEquals(labelCaptor.getValue(), "Object renamed from no ebucore:filename to " + label); verify(eventBuilder).writeAndClose(); verify(messageSender).sendUpdateDescriptionOperation(anyString(), pidCaptor.capture()); assertEquals(pid, pidCaptor.getValue().get(0)); }
Source:
<code>public void testDeadlock() { boolean <START> interrupted = <END> Thread.interrupted(); if (interrupted) { fail("Thread was interrupted at start of test"); } final ILock lock = Job.getJobManager().newLock(); final boolean[] blocked = new boolean[] {false}; final boolean[] lockAcquired= new boolean[] {false}; Thread locking = new Thread("SyncExecWhileUIThreadWaitsForLock") { @Override public void run() { try { lock.acquire(); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { blocked[0] = true; lock.acquire(); lock.release(); blocked[0] = false; } }); while (!blocked[0]) { try { Thread.sleep(100); } catch (InterruptedException e) { } } Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { if (lock.acquire(60000)) { lockAcquired[0] = true; lock.release(); } } catch (InterruptedException e) { } } }); } finally { lock.release(); } } }; locking.start(); long waitStart = System.currentTimeMillis(); Display display = Display.getDefault(); while (!lockAcquired[0]) { if (!display.readAndDispatch()) { display.sleep(); } if (System.currentTimeMillis()-waitStart > 60000) { assertTrue("Deadlock occurred", false); } } interrupted = Thread.interrupted(); if (interrupted) { } }</code><technical_language>inline this variable</technical_language>

Target:
public void testDeadlock() { if (Thread.interrupted()) { fail("Thread was interrupted at start of test"); } final ILock lock = Job.getJobManager().newLock(); final boolean[] blocked = new boolean[] {false}; final boolean[] lockAcquired= new boolean[] {false}; Thread locking = new Thread("SyncExecWhileUIThreadWaitsForLock") { @Override public void run() { try { lock.acquire(); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { blocked[0] = true; lock.acquire(); lock.release(); blocked[0] = false; } }); while (!blocked[0]) { try { Thread.sleep(100); } catch (InterruptedException e) { } } Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { if (lock.acquire(60000)) { lockAcquired[0] = true; lock.release(); } } catch (InterruptedException e) { } } }); } finally { lock.release(); } } }; locking.start(); long waitStart = System.currentTimeMillis(); Display display = Display.getDefault(); while (!lockAcquired[0]) { if (!display.readAndDispatch()) { display.sleep(); } if (System.currentTimeMillis()-waitStart > 60000) { assertTrue("Deadlock occurred", false); } } assertEquals("Unexpected error count reported: " + reportedErrors, 1, reportedErrors.size()); MultiStatus status = (MultiStatus) reportedErrors.get(0); assertEquals("Unexpected child status count reported: " + Arrays.toString(status.getChildren()), 2, status.getChildren().length); if (Thread.interrupted()) { } }
Source:
<code>public void testClose_drainsBytesOnClose() throws IOException { <START> MockInputStream mockInputStream = new MockInputStream("abc123".getBytes()); <END> InputStream consumingInputStream = new ConsumingInputStream(mockInputStream); assertEquals(6, mockInputStream.getBytesToRead()); consumingInputStream.read(); assertEquals(5, mockInputStream.getBytesToRead()); consumingInputStream.close(); assertEquals(0, mockInputStream.getBytesToRead()); }</code><technical_language>antipattern: getBytes character encoding</technical_language>

Target:
public void testClose_drainsBytesOnClose() throws IOException { MockInputStream mockInputStream = new MockInputStream("abc123".getBytes(StandardCharsets.UTF_8)); InputStream consumingInputStream = new ConsumingInputStream(mockInputStream); assertEquals(6, mockInputStream.getBytesToRead()); consumingInputStream.read(); assertEquals(5, mockInputStream.getBytesToRead()); consumingInputStream.close(); assertEquals(0, mockInputStream.getBytesToRead()); }
Source:
<code>public String getKeyForInstructor(String courseId, String email) throws EntityDoesNotExistException { <START> verifyIsInstructorEmailOfCourse(email, courseId); <END> InstructorAttributes instructor = getInstructorForEmail(courseId, email); return instructor.key; }</code><technical_language>Rename verifyInstructorOfCourse(...)? verifyEmailOfInstructorOfCourse</technical_language>

Target:
public String getKeyForInstructor(String courseId, String email) throws EntityDoesNotExistException { verifyIsEmailOfInstructorOfCourse(email, courseId); InstructorAttributes instructor = getInstructorForEmail(courseId, email); return instructor.key; }
Source:
<code>public void initEvictor() { <START> MapEvictionPolicy mapEvictionPolicy = mapConfig.getMapEvictionPolicy(); <END> if (mapEvictionPolicy == null) { evictor = NULL_EVICTOR; } else { MemoryInfoAccessor memoryInfoAccessor = getMemoryInfoAccessor(); EvictionChecker evictionChecker = new EvictionChecker(memoryInfoAccessor, mapServiceContext); IPartitionService partitionService = mapServiceContext.getNodeEngine().getPartitionService(); evictor = new EvictorImpl(mapEvictionPolicy, evictionChecker, partitionService); } }</code><technical_language>switch nodeEngine.getProperties().getBoolean(LOAD_ALL_PUBLISHES_ADD_EVENT) in group properties</technical_language>

Target:
public void initEvictor() { MapEvictionPolicy mapEvictionPolicy = mapConfig.getMapEvictionPolicy(); if (mapEvictionPolicy == null) { evictor = NULL_EVICTOR; } else { MemoryInfoAccessor memoryInfoAccessor = getMemoryInfoAccessor(); EvictionChecker evictionChecker = new EvictionChecker(memoryInfoAccessor, mapServiceContext); NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); IPartitionService partitionService = nodeEngine.getPartitionService(); int batchSize = nodeEngine.getProperties().getInteger(MAP_EVICTION_BATCH_SIZE); evictor = new EvictorImpl(mapEvictionPolicy, evictionChecker, partitionService, batchSize); } }
Source:
<code>public static Set<Evidence> getEvidencesByUUIDs(Set<String> uuids) { synEvidences(); Set<Evidence> mappedEvis = new HashSet<>(); if (uuids != null) { for (Map.Entry<Integer, Set<Evidence>> map : evidences.entrySet()) { for (Evidence evidence : map.getValue()) { <START> if (uuids.contains(evidence.getUuid())) { <END> mappedEvis.add(evidence); } } } } return mappedEvis; }</code><technical_language>do a null check evidence</technical_language>

Target:
public static Set<Evidence> getEvidencesByUUIDs(Set<String> uuids) { synEvidences(); Set<Evidence> mappedEvis = new HashSet<>(); if (uuids != null) { for (Map.Entry<Integer, Set<Evidence>> map : evidences.entrySet()) { for (Evidence evidence : map.getValue()) { if (evidence != null && uuids.contains(evidence.getUuid())) { mappedEvis.add(evidence); } } } } return mappedEvis; }
Source:
<code>private void createBigDir(final String path) throws IOException { final String verylongprefix = "123123123123123123123123123123123113123111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11231312312312312312313121111111111111111111111111111111111111111111111111"; for (int i = 1; i <= 400; i++) { <START> final File tmpDir = new File(path + "/" + verylongprefix + "dir" + i); <END> tmpDir.mkdir(); for (int j = 1; j <= 100; j++) { final File tmp = new File(tmpDir.getAbsolutePath() + "/" + j); tmp.createNewFile(); } } }</code><technical_language>new Path, FIles API easier File API</technical_language>

Target:
private void createBigDir(final String path) throws IOException { final String verylongprefix = "123123123123123123123123123123123113123111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11231312312312312312313121111111111111111111111111111111111111111111111111"; for (int i = 1; i <= 400; i++) { final Path tmpDirPath = Paths.get(path, verylongprefix + "dir" + i); Files.createDirectory(tmpDirPath); for (int j = 1; j <= 100; j++) { final Path tmp = Paths.get(tmpDirPath.toAbsolutePath().toString(), String.valueOf(j)); Files.createFile(tmp); } } }
Source:
<code>void initHighlighting(File file) { InputFile inputFile = fileSystem.inputFile(fileSystem.predicates().is(file)); if (inputFile == null) { <START> throw new IllegalArgumentException("Cannot get " + Highlightable.class.getCanonicalName() + " for a null file"); <END> } Highlightable highlightable = resourcePerspectives.as(Highlightable.class, inputFile); if (highlightable == null) { throw new IllegalStateException("Could not get " + Highlightable.class.getCanonicalName() + " for " + inputFile); } this.highlighting = highlightable.newHighlighting(); this.offsets = new SourceFileOffsets(file, fileSystem.encoding()); }</code><technical_language>@vilchik-elena (cc @pynicolas ) I wondering: want fail analysis in this case line 121? displaying error log</technical_language>

Target:
private HighlightingBuilder initHighlighting(File file) { InputFile inputFile = fileSystem.inputFile(fileSystem.predicates().is(file)); if (inputFile == null) { throw new IllegalArgumentException("Cannot get " + Highlightable.class.getCanonicalName() + " for a null file"); } Highlightable highlightable = resourcePerspectives.as(Highlightable.class, inputFile); if (highlightable == null) { LOG.warn("Could not get " + Highlightable.class.getCanonicalName() + " for " + inputFile.file()); return null; } else { highlighting = highlightable.newHighlighting(); offsets = new SourceFileOffsets(file, fileSystem.encoding()); return this.highlighting; } }
Source:
<code>protected ICommand getAfterMoveCommand(final MoveRequest request) { ICommand moveCommand = super.getAfterMoveCommand(request); Set<View> viewsToDestroy = new HashSet<View>(); Object parameter = request.getParameter(DefaultCreationEditPolicy.TYPE_MOVING); <START> if ((null == parameter) || (!DefaultCreationEditPolicy.TYPE_MOVING_DIAGRAM.equals(parameter))) { <END> @SuppressWarnings("unchecked") Iterator<EObject> it = request.getElementsToMove().keySet().iterator(); while (it.hasNext()) { EObject eObject = it.next(); viewsToDestroy.addAll(getMemberViewsToDestroy(eObject)); } Iterator<View> viewToDestroyIterator = viewsToDestroy.iterator(); while (viewToDestroyIterator.hasNext()) { View view = viewToDestroyIterator.next(); DeleteCommand destroyViewsCommand = new DeleteCommand(request.getEditingDomain(), view); moveCommand = CompositeCommand.compose(moveCommand, destroyViewsCommand); } } return moveCommand; }</code><technical_language>create a dependency editpolicies parameter constant added in org.eclipse.papyrus.uml.service.types.utils.RequestParameterUtils;</technical_language>

Target:
protected ICommand getAfterMoveCommand(final MoveRequest request) { ICommand moveCommand = super.getAfterMoveCommand(request); Set<View> viewsToDestroy = new HashSet<View>(); Object parameter = request.getParameter(RequestParameterConstants.TYPE_MOVING); if ((null == parameter) || (!RequestParameterConstants.TYPE_MOVING_DIAGRAM.equals(parameter))) { @SuppressWarnings("unchecked") Iterator<EObject> it = request.getElementsToMove().keySet().iterator(); while (it.hasNext()) { EObject eObject = it.next(); viewsToDestroy.addAll(getMemberViewsToDestroy(eObject)); } Iterator<View> viewToDestroyIterator = viewsToDestroy.iterator(); while (viewToDestroyIterator.hasNext()) { View view = viewToDestroyIterator.next(); DeleteCommand destroyViewsCommand = new DeleteCommand(request.getEditingDomain(), view); moveCommand = CompositeCommand.compose(moveCommand, destroyViewsCommand); } } return moveCommand; }
Source:
<code>private Map<String, LookupExtractorFactoryContainer> tryGetLookupListFromCoordinator(String tier) throws Exception { final FullResponseHolder response = fetchLookupsForTier(tier); if (!response.getStatus().equals(HttpResponseStatus.OK)) { <START> LOG.error( <END> "Error while fetching lookup code from Coordinator with status[%s] and content[%s]", response.getStatus(), response.getContent() ); throw new Exception(); } if (response.getContent().startsWith("[")) { LOG.info( "Failed to retrieve lookup information from coordinator. " + "Attempting to load lookups using snapshot instead" ); return null; } else { return jsonMapper.readValue(response.getContent(), LOOKUPS_ALL_REFERENCE); } }</code><technical_language>If this retry is error. Suggest throwing a letting retry wrapper handle logging</technical_language>

Target:
private Map<String, LookupExtractorFactoryContainer> tryGetLookupListFromCoordinator(String tier) throws Exception { final FullResponseHolder response = fetchLookupsForTier(tier); if (response.getStatus().equals(HttpResponseStatus.NOT_FOUND)) { LOG.warn("No lookups found for tier [%s], response [%s]", tier, response); return null; } else if (!response.getStatus().equals(HttpResponseStatus.OK)) { throw new IOE( "Error while fetching lookup code from Coordinator with status[%s] and content[%s]", response.getStatus(), response.getContent() ); } if (response.getContent().startsWith("[")) { LOG.info( "Failed to retrieve lookup information from coordinator, " + "because coordinator appears to be running on older Druid version. " + "Attempting to load lookups using snapshot instead" ); return null; } else { return jsonMapper.readValue(response.getContent(), LOOKUPS_ALL_REFERENCE); } }
Source:
<code>void runTest(WindupProcessor processor, GraphContext graphContext, String inputPath, boolean sourceMode) throws Exception { Assert.assertNotNull(processor); Assert.assertNotNull(processor.toString()); WindupConfigurationModel windupCfg = graphContext.getFramed().addVertex(null, WindupConfigurationModel.class); windupCfg.setInputPath(inputPath); windupCfg.setSourceMode(sourceMode); Path outputPath = Paths.get(FileUtils.getTempDirectory().toString(), "windupreport"); FileUtils.deleteDirectory(outputPath.toFile()); Files.createDirectories(outputPath); windupCfg.setOutputPath(outputPath.toAbsolutePath().toString()); windupCfg.setSourceMode(false); try { processor.execute(); } finally { <START> for (Vertex v : graphContext.getGraph().getVertices()) <END> { v.remove(); } for (Edge e : graphContext.getGraph().getEdges()) { e.remove(); } } }</code><technical_language>do iterate remove vertex edges graph vs. destroying graph? This kind of inefficient. See: com.thinkaurelius.titan.core.util.TitanCleanup delete graph location</technical_language>

Target:
void runTest(WindupProcessor processor, GraphContext graphContext, String inputPath, boolean sourceMode) throws Exception { Assert.assertNotNull(processor); Assert.assertNotNull(processor.toString()); WindupConfigurationModel windupCfg = graphContext.getFramed().addVertex(null, WindupConfigurationModel.class); windupCfg.setInputPath(inputPath); windupCfg.setSourceMode(sourceMode); Path outputPath = Paths.get(FileUtils.getTempDirectory().toString(), "windupreport"); FileUtils.deleteDirectory(outputPath.toFile()); Files.createDirectories(outputPath); windupCfg.setOutputPath(outputPath.toAbsolutePath().toString()); windupCfg.setSourceMode(false); processor.execute(); }
Source:
<code>private void fillReadAheadCache(long orginalLedgerId, long firstEntryId, long firstEntryLocation) { try { long firstEntryLogId = (firstEntryLocation >> 32); long currentEntryLogId = firstEntryLogId; long currentEntryLocation = firstEntryLocation; int count = 0; long size = 0; while (count < readAheadCacheBatchSize && currentEntryLogId == firstEntryLogId) { ByteBuf entry = entryLogger.internalReadEntry(orginalLedgerId, -1, currentEntryLocation); long currentEntryLedgerId = entry.getLong(0); long currentEntryId = entry.getLong(8); if (currentEntryLedgerId != orginalLedgerId) { entry.release(); return; } readCache.put(orginalLedgerId, currentEntryId, entry); count++; size += entry.readableBytes(); currentEntryLocation += 4 + entry.readableBytes(); currentEntryLogId = currentEntryLocation >> 32; <START> entry.release(); <END> } readAheadBatchCountStats.registerSuccessfulValue(count); readAheadBatchSizeStats.registerSuccessfulValue(size); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Exception during read ahead for ledger: {}: e", orginalLedgerId, e); } } }</code><technical_language>This in a finally block</technical_language>

Target:
private void fillReadAheadCache(long orginalLedgerId, long firstEntryId, long firstEntryLocation) { try { long firstEntryLogId = (firstEntryLocation >> 32); long currentEntryLogId = firstEntryLogId; long currentEntryLocation = firstEntryLocation; int count = 0; long size = 0; while (count < readAheadCacheBatchSize && currentEntryLogId == firstEntryLogId) { ByteBuf entry = entryLogger.internalReadEntry(orginalLedgerId, -1, currentEntryLocation); try { long currentEntryLedgerId = entry.getLong(0); long currentEntryId = entry.getLong(8); if (currentEntryLedgerId != orginalLedgerId) { entry.release(); return; } readCache.put(orginalLedgerId, currentEntryId, entry); count++; size += entry.readableBytes(); currentEntryLocation += 4 + entry.readableBytes(); currentEntryLogId = currentEntryLocation >> 32; } finally { entry.release(); } } readAheadBatchCountStats.registerSuccessfulValue(count); readAheadBatchSizeStats.registerSuccessfulValue(size); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Exception during read ahead for ledger: {}: e", orginalLedgerId, e); } } }
Source:
<code>public MutableList<String> split( String self, String sep, Object maxSplitO, Location loc, Environment env) throws EvalException { if (sep.isEmpty()) { throw new EvalException(loc, "Empty separator"); } int maxSplit = Integer.MAX_VALUE; if (maxSplitO != Runtime.NONE) { maxSplit = (Integer) maxSplitO; } List<String> res = new ArrayList<>(); int start = 0; while (true) { int end = self.indexOf(sep, start); if (end < 0 || maxSplit-- == 0) { res.add(self.substring(start)); break; } res.add(self.substring(start, end)); start = end + sep.length(); } <START> return MutableList.copyOf(env, res); <END> }</code><technical_language>avoid this copy declaring res a MutableList</technical_language>

Target:
public MutableList<String> split( String self, String sep, Object maxSplitO, Location loc, Environment env) throws EvalException { if (sep.isEmpty()) { throw new EvalException(loc, "Empty separator"); } int maxSplit = Integer.MAX_VALUE; if (maxSplitO != Runtime.NONE) { maxSplit = (Integer) maxSplitO; } ArrayList<String> res = new ArrayList<>(); int start = 0; while (true) { int end = self.indexOf(sep, start); if (end < 0 || maxSplit-- == 0) { res.add(self.substring(start)); break; } res.add(self.substring(start, end)); start = end + sep.length(); } return MutableList.wrapUnsafe(env, res); }
Source:
<code>protected void verifyOutput(PermissionBlueprintInfo source, PermissionBlueprintDTO dest, boolean childrenGenerated) { if (source != null) { assertNull(dest.getId()); assertEquals(source.getTypeName(), dest.getType()); assertEquals(source.getAccessLevel(), dest.getAccess()); if (childrenGenerated) { <START> OwnerDTO ownerDTO = new OwnerDTO(); ownerDTO.setId(dest.getOwner().getId()); ownerDTO.setKey(dest.getOwner().getKey()); ownerDTO.setDisplayName(dest.getOwner().getDisplayName()); this.ownerTranslatorTest.verifyOutput(source.getOwner(), ownerDTO, true); <END> } else { assertNull(dest.getOwner()); } } else { assertNull(dest); } }</code><technical_language>shouldn'e creating DTOs (or entities) in a translation verification test. In fact, moved a manual translation of NestedOWner in PermissionBlueprintInfoTranslator, verification happen of if (childrenGenerated) block, a series of assertEquals calls (one for field), ownerTranslatorTest field removed (as is longer needed)</technical_language>

Target:
protected void verifyOutput(PermissionBlueprintInfo source, PermissionBlueprintDTO dest, boolean childrenGenerated) { if (source != null) { assertNull(dest.getId()); assertEquals(source.getTypeName(), dest.getType()); assertEquals(source.getAccessLevel(), dest.getAccess()); if (source.getOwner() != null && dest.getOwner() != null) { assertEquals(source.getOwner().getKey(), dest.getOwner().getKey()); } } else { assertNull(dest); } }
Source:
<code>public void testView() throws Exception { try { methodWatcher.executeUpdate("create view v1 as (select a1 from showcreatetableit.t1)"); <START> methodWatcher.execute("call syscs_util.SHOW_CREATE_TABLE('SYS','SYSTABLES')"); <END> Assert.fail("Expected to fail"); } catch (SQLException e) { String sqlState = e.getSQLState(); Assert.assertEquals("42X62",sqlState); } }</code><technical_language>call this view instead of system table</technical_language>

Target:
public void testView() throws Exception { try { methodWatcher.executeUpdate("create view showcreatetableit.v1 as (select a1 from showcreatetableit.t1)"); methodWatcher.execute("call syscs_util.SHOW_CREATE_TABLE('SHOWCREATETABLEIT','V1')"); Assert.fail("Expected to fail"); } catch (SQLException e) { String sqlState = e.getSQLState(); Assert.assertEquals("42Y62",sqlState); } }
Source:
<code>public void postProcess(ServerResponse response) { if (current.get(MetaData.class).hasKey("async") && Boolean.TRUE.equals((Boolean) current.get(MetaData.class).get("async"))) { <START> SessionUtils.getCurrentHttpServletRequest().setAttribute("ovirt_aaa_restapi_async", true); <END> } sessionHelper.clean(); }</code><technical_language>constant</technical_language>

Target:
public void postProcess(ServerResponse response) { if (Boolean.TRUE.equals((Boolean) current.get(MetaData.class).get("async"))) { request.setAttribute(SessionConstants.REQUEST_ASYNC_KEY, true); } sessionHelper.clean(); }
Source:
<code>public void bindTo(MeterRegistry registry) { successResponseCounter = Counter.builder("che.server.api.response.success") .description("Che Server Tomcat success responses (2xx responses)") <START> .tags("code=200", "area=http") <END> .register(registry); redirectResponseCounter = Counter.builder("che.server.api.response.redirect") .description("Che Server Tomcat redirect responses (3xx responses)") .tags("code=300", "area=http") .register(registry); clientErrorResponseCounter = Counter.builder("che.server.api.response.client.error") .description("Che Server Tomcat client errors (4xx responses)") .tags("code=400", "area=http") .register(registry); serverErrorResponseCounter = Counter.builder("che.server.api.response.server.error") .description("Che Server Tomcat server errors (5xx responses)") .tags("code=500", "area=http") .register(registry); }</code><technical_language>2xx</technical_language>

Target:
public void bindTo(MeterRegistry registry) { informationalResponseCounter = Counter.builder("che.server.api.response") .description("Che Server Tomcat informational responses (1xx responses)") .tag("code", "1xx") .tag("area", "http") .register(registry); successResponseCounter = Counter.builder("che.server.api.response") .description("Che Server Tomcat success responses (2xx responses)") .tag("code", "2xx") .tag("area", "http") .register(registry); redirectResponseCounter = Counter.builder("che.server.api.response") .description("Che Server Tomcat redirect responses (3xx responses)") .tag("code", "3xx") .tag("area", "http") .register(registry); clientErrorResponseCounter = Counter.builder("che.server.api.response") .description("Che Server Tomcat client errors (4xx responses)") .tag("code", "4xx") .tag("area", "http") .register(registry); serverErrorResponseCounter = Counter.builder("che.server.api.response") .description("Che Server Tomcat server errors (5xx responses)") .tag("code", "5xx") .tag("area", "http") .register(registry); }
Source:
<code>public void testArchiveWithLongFilename() throws Exception { StringBuilder filename = <START> new StringBuilder(""); <END> List<String> l = new ArrayList<String>(); for (int i = 0; i < 20; i++) { filename.append("1234567890/"); l.add(filename.toString()); } filename.append("1234567890"); l.add(filename.toString()); writeTrashFile(filename.toString(), "file with long path"); git.add().addFilepattern("1234567890").call(); git.commit().setMessage("file with long name").call(); byte[] result = CLIGitCommand.executeRaw( "git archive --format=zip HEAD", db).outBytes(); assertArrayEquals(l.toArray(new String[l.size()]), listZipEntries(result)); }</code><technical_language>nit: simplify default constructor</technical_language>

Target:
public void testArchiveWithLongFilename() throws Exception { StringBuilder filename = new StringBuilder(); List<String> l = new ArrayList<String>(); for (int i = 0; i < 20; i++) { filename.append("1234567890/"); l.add(filename.toString()); } filename.append("1234567890"); l.add(filename.toString()); writeTrashFile(filename.toString(), "file with long path"); git.add().addFilepattern("1234567890").call(); git.commit().setMessage("file with long name").call(); byte[] result = CLIGitCommand.executeRaw( "git archive --format=zip HEAD", db).outBytes(); assertArrayEquals(l.toArray(new String[l.size()]), listZipEntries(result)); }
Source:
<code>public List<IDockerImageListener> getImageListeners() { final IDockerImageListener[] listeners = new IDockerImageListener[this.imageListeners .size()]; for (int i = 0; i < imageListeners.getListeners().length; i++) { listeners[i] = (IDockerImageListener) imageListeners <START> .getListeners()[i]; <END> } return Arrays.asList(listeners); }</code><technical_language>put imageListeners.getListeners() in a local variable</technical_language>

Target:
public List<IDockerImageListener> getImageListeners() { final IDockerImageListener[] result = new IDockerImageListener[this.imageListeners .size()]; final Object[] listeners = imageListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { result[i] = (IDockerImageListener) listeners[i]; } return Arrays.asList(result); }
Source:
<code>public static String stripReferer ( HttpServletRequest request, String referer ) throws IllegalArgumentException { if(referer==null) return referer; String ref = referer; if(Config.getBooleanProperty("DISABLE_EXTERNAL_REFERERS", false) && ref.contains("://")) { try { User systemUser = APILocator.getUserAPI().getSystemUser(); URL url = new URL( referer ); String refererHost = url.getHost(); <START> String serverName = request.getServerName(); <END> } catch ( Exception e ) { throw new IllegalArgumentException( "Error validating URL " + referer, e ); } } ref = Xss.strip(ref); if(ref.contains("%0d") || ref.contains("%0a")) ref = "/"; return ref; }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Remove this useless assignment local variable "serverName". [![rule](<LINK_3>](<LINK_4> ![MINOR](<LINK_1> 'Severity: MINOR') Remove this unused "serverName" local variable. [![rule](<LINK_3>](<LINK_2></technical_language>

Target:
public static String stripReferer ( HttpServletRequest request, String referer ) throws IllegalArgumentException { if(referer==null) return referer; String ref = referer; ref = Xss.strip(ref); if(ref.contains("%0d") || ref.contains("%0a")) ref = "/"; return ref; }
Source:
<code>private Object mapFollowUpResourceToField(Resource resource, ValueMap valueMap, Field field, String propertyName) { final Class<?> fieldType = field.getType(); Object value = valueMap.get(propertyName); if (value == null) { if (LOG.isDebugEnabled()) { LOG.debug( "the property [{}/{}] is undefined, assigning null value for [{}#{}]", new Object[] { resource.getPath(), propertyName, fieldType.getCanonicalName(), field.getName() }); } return null; } if (!(value instanceof String)) { if (LOG.isDebugEnabled()) { <START> LOG.debug( <END> "the property [{}/{}] annotated is not of String type as required by " + "@JcrProperty(..., follow = true) in the model, assigning null " + "value for [{}#{}]", new Object[] { resource.getPath(), propertyName, fieldType.getCanonicalName(), field.getName() }); } return null; } String nestedResourcePath = (String) value; Resource followUpResource = resource.getResourceResolver().getResource(nestedResourcePath); if (followUpResource == null) { if (LOG.isDebugEnabled()) { LOG.debug( "the nested resource [{}/{}] expected under path doesn't exist, " + "assigning null value for [{}#{}]", new Object[] { resource.getPath(), propertyName, nestedResourcePath, fieldType.getCanonicalName(), field.getName() }); } return null; } return modelProvider.get(fieldType, followUpResource); }</code><technical_language>increase log level (warn), this is error in content difficult trace application code is expecting String here</technical_language>

Target:
private Object mapFollowUpResourceToField(Resource resource, ValueMap valueMap, Field field, String propertyName) { final Class<?> fieldType = field.getType(); Resource followUpResource = FollowUpProcessorUtil.getFollowUpResource(resource, valueMap, field, propertyName); return modelProvider.get(fieldType, followUpResource); }
Source:
<code>protected static String[] handleNodeLabeling(String[] argArray) { Configuration conf = new Configuration(); boolean nodeLabelingYarn = conf.getBoolean(YARN_CONF_NODE_LABELING_ENABLED, false); String nodeLabelingProp = System.getenv(HadoopSparkJob.SPARK_NODE_LABELING_ENV_VAR); boolean nodeLabelingPolicy = nodeLabelingProp != null && nodeLabelingProp.equals(Boolean.TRUE.toString()); String autoNodeLabelProp = System.getenv(HadoopSparkJob.SPARK_AUTO_NODE_LABELING_ENV_VAR); boolean autoNodeLabeling = autoNodeLabelProp != null && autoNodeLabelProp.equals(Boolean.TRUE.toString()); String desiredNodeLabel = System.getenv(HadoopSparkJob.SPARK_DESIRED_NODE_LABEL_ENV_VAR); SparkConf sparkConf = getSparkProperties(); if (nodeLabelingYarn && nodeLabelingPolicy) { ignoreUserSpecifiedNodeLabelParameter(argArray, autoNodeLabeling); int queueParameterIndex = getUserSpecifiedQueueParameterIndex(argArray); <START> if (queueParameterIndex != -1) { <END> logger.info( "Azbakan enforces node labeling. Ignore user param: " + argArray[queueParameterIndex] + " " + argArray[ queueParameterIndex + 1]); argArray[queueParameterIndex] = null; argArray[queueParameterIndex + 1] = null; } if (autoNodeLabeling) { if (isLargeContainerRequired(argArray, conf, sparkConf)) { LinkedList<String> argList = new LinkedList<String>(Arrays.asList(argArray)); argList.addFirst(SPARK_EXECUTOR_NODE_LABEL_EXP + "=" + desiredNodeLabel); argList.addFirst(SparkJobArg.SPARK_CONF_PREFIX.sparkParamName); argArray = argList.toArray(new String[argList.size()]); } } } return argArray; }</code><technical_language>remove this logic. Enforcing node labels is original queue enforcement mechanism. dynamic-allocation aware queue enforcement, logic for handling queue enforcement, handleNodeLabeling method deals auto node labeling</technical_language>

Target:
protected static String[] handleNodeLabeling(String[] argArray) { Configuration conf = new Configuration(); boolean nodeLabelingYarn = conf.getBoolean(YARN_CONF_NODE_LABELING_ENABLED, false); String nodeLabelingProp = System.getenv(HadoopSparkJob.SPARK_NODE_LABELING_ENV_VAR); boolean nodeLabelingPolicy = nodeLabelingProp != null && nodeLabelingProp.equals(Boolean.TRUE.toString()); String autoNodeLabelProp = System.getenv(HadoopSparkJob.SPARK_AUTO_NODE_LABELING_ENV_VAR); boolean autoNodeLabeling = autoNodeLabelProp != null && autoNodeLabelProp.equals(Boolean.TRUE.toString()); String desiredNodeLabel = System.getenv(HadoopSparkJob.SPARK_DESIRED_NODE_LABEL_ENV_VAR); SparkConf sparkConf = getSparkProperties(); if (nodeLabelingYarn && nodeLabelingPolicy) { ignoreUserSpecifiedNodeLabelParameter(argArray, autoNodeLabeling); if (autoNodeLabeling) { if (isLargeContainerRequired(argArray, conf, sparkConf)) { LinkedList<String> argList = new LinkedList<String>(Arrays.asList(argArray)); argList.addFirst(SPARK_EXECUTOR_NODE_LABEL_EXP + "=" + desiredNodeLabel); argList.addFirst(SparkJobArg.SPARK_CONF_PREFIX.sparkParamName); argArray = argList.toArray(new String[argList.size()]); } } } return argArray; }
Source:
<code>public void export_dir_button_opens_a_file_dialog() { <START> component = ConfigurationPanelPageObject.setUpDefaultPanel(robot(), empty().build(), true); <END> component.show(); component.clickChooseExportDirButton(); assertThat(component.fileDialog(2000), is(GenericUIMatchers.visible())); component.cancelFileDialog(); }</code><technical_language>I lost track of changes :D. Adjust needed depending setUpDefaultPanel lose arg not</technical_language>

Target:
public void export_dir_button_opens_a_file_dialog() { component = ConfigurationPanelPageObject.setUpDefaultPanel(robot(), empty().build(), true, true); component.show(); component.clickChooseExportDirButton(); assertThat(component.fileDialog(2000), is(GenericUIMatchers.visible())); component.cancelFileDialog(); }
Source:
<code>private void startTrackingService(boolean checkPermission, boolean permission) { if (checkPermission) { Set<String> missingPermissions = new HashSet<>(); if (!hasPermission(Manifest.permission.ACCESS_FINE_LOCATION)) { missingPermissions.add(Manifest.permission.ACCESS_FINE_LOCATION); } if (!hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION)) { missingPermissions.add(Manifest.permission.ACCESS_COARSE_LOCATION); } if (missingPermissions.isEmpty()) { permission = true; } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(missingPermissions.toArray(new String[missingPermissions.size()]), PERMISSIONS_REQUEST_LOCATION); } return; } } if (permission) { setPreferencesEnabled(false); startService(new Intent(this, TrackingService.class)); alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, 15000, 15000, alarmIntent); String locationProviders = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); <START> if (locationProviders == null || locationProviders.equals("")) { <END> displayPromptForEnablingGPS(this); } } else { sharedPreferences.edit().putBoolean(KEY_STATUS, false).commit(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { TwoStatePreference preference = (TwoStatePreference) findPreference(KEY_STATUS); preference.setChecked(false); } else { CheckBoxPreference preference = (CheckBoxPreference) findPreference(KEY_STATUS); preference.setChecked(false); } } }</code><technical_language>TextUtils.isEmpty(...) instead</technical_language>

Target:
private void startTrackingService(boolean checkPermission, boolean permission) { if (checkPermission) { Set<String> missingPermissions = new HashSet<>(); if (!hasPermission(Manifest.permission.ACCESS_FINE_LOCATION)) { missingPermissions.add(Manifest.permission.ACCESS_FINE_LOCATION); } if (!hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION)) { missingPermissions.add(Manifest.permission.ACCESS_COARSE_LOCATION); } if (missingPermissions.isEmpty()) { permission = true; } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(missingPermissions.toArray(new String[missingPermissions.size()]), PERMISSIONS_REQUEST_LOCATION); } return; } } if (permission) { setPreferencesEnabled(false); startService(new Intent(this, TrackingService.class)); alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, 15000, 15000, alarmIntent); if (TextUtils.isEmpty(Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED))) { promptForEnablingLocationService(this); } } else { sharedPreferences.edit().putBoolean(KEY_STATUS, false).commit(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { TwoStatePreference preference = (TwoStatePreference) findPreference(KEY_STATUS); preference.setChecked(false); } else { CheckBoxPreference preference = (CheckBoxPreference) findPreference(KEY_STATUS); preference.setChecked(false); } } }
Source:
<code>public Response copy(Action action) { validateParameters(action, "storageDomain.id|name"); Guid storageDomainId = getStorageDomainId(action); Disk disk = get(); Guid imageId = asGuid(disk.getImageId()); Guid sourceStorageDomainId = getSourceStorageDomainId(disk); MoveOrCopyImageGroupParameters params = new MoveOrCopyImageGroupParameters(imageId, sourceStorageDomainId, storageDomainId, ImageOperation.Copy); params.setImageGroupID(asGuid(disk.getId())); if (action.isSetName() && !StringUtils.isEmpty(action.getName())) { params.setNewAlias(action.getName()); <START> } <END> return doAction(VdcActionType.MoveOrCopyDisk, params, action); }</code><technical_language>If decide support "name" "alias" do this: Disk actionDisk = action.getDisk(); if (disk != null) { String name = disk.getName(); String alias = disk.getName(); if (name != null && !String.isEmpty(name)) { params.setNewAlias(name); } else if (alias != null && !String.isEmpty(alias)) { params.setNewAlias(alias); } }</technical_language>

Target:
public Response copy(Action action) { validateParameters(action, "storageDomain.id|name"); Guid storageDomainId = getStorageDomainId(action); Disk disk = get(); Guid imageId = asGuid(disk.getImageId()); Guid sourceStorageDomainId = getSourceStorageDomainId(disk); MoveOrCopyImageGroupParameters params = new MoveOrCopyImageGroupParameters(imageId, sourceStorageDomainId, storageDomainId, ImageOperation.Copy); params.setImageGroupID(asGuid(disk.getId())); Disk actionDisk = action.getDisk(); if (actionDisk != null) { String name = actionDisk.getName(); String alias = actionDisk.getAlias(); if (name != null && !StringUtils.isEmpty(name)) { params.setNewAlias(name); } else if (alias != null && !StringUtils.isEmpty(alias)) { params.setNewAlias(alias); } } return doAction(VdcActionType.MoveOrCopyDisk, params, action); }
Source:
<code>public void deleteWorkbookDefinition() throws Exception { respondWith(204); <START> HttpResponse resp = service.delete("my_wb"); <END> assertEquals(resp.getStatus(), 204); }</code><technical_language>ActionResponse instead of HttpResponse</technical_language>

Target:
public void deleteWorkbookDefinition() throws Exception { respondWith(204); ActionResponse resp = service.delete("my_wb"); assertEquals(resp.getCode(), 200); }
Source:
<code>private void handleVersionUpgrades(Connection conn, Long schemaID, int version) throws SQLException, InvalidSchemaError { <START> boolean shouldResave = false; <END> if ( version < 1 ) { if ( this.schema != null && this.schema.findDatabase("mysql") == null ) { LOGGER.info("Could not find mysql db, adding it to schema"); SchemaCapturer sc = new SchemaCapturer(conn, sensitivity, "mysql"); Database db = sc.capture().findDatabase("mysql"); this.schema.addDatabase(db); this.shouldSnapshotNextSchema = true; } fixUnsignedColumns(conn); } }</code><technical_language>used</technical_language>

Target:
private void handleVersionUpgrades(Connection conn, Long schemaID, int version) throws SQLException, InvalidSchemaError { if ( version < 1 ) { if ( this.schema != null && this.schema.findDatabase("mysql") == null ) { LOGGER.info("Could not find mysql db, adding it to schema"); SchemaCapturer sc = new SchemaCapturer(conn, sensitivity, "mysql"); Database db = sc.capture().findDatabase("mysql"); this.schema.addDatabase(db); this.shouldSnapshotNextSchema = true; } fixUnsignedColumns(conn); } }