auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; System.out.println("CORSFilter HTTP Request: " + request.getMethod()); ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Origin", "*"); ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Methods", "GET, OPTIONS, HEAD, PUT, POST"); HttpServletResponse resp = (HttpServletResponse) servletResponse; if (request.getMethod().equals("OPTIONS")) { resp.setStatus(HttpServletResponse.SC_ACCEPTED); return; } filterChain.doFilter(request, servletResponse); }

Target:
public void doFilter( ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; logger.debug("CORSFilter HTTP Request: ",request.getMethod()); ((HttpServletResponse) servletResponse).addHeader("Access-Control-Allow-Origin", "*"); ((HttpServletResponse) servletResponse) .addHeader("Access-Control-Allow-Methods", "GET, OPTIONS, HEAD, PUT, POST"); HttpServletResponse resp = (HttpServletResponse) servletResponse; if (request.getMethod().equals("OPTIONS")) { resp.setStatus(HttpServletResponse.SC_ACCEPTED); return; } filterChain.doFilter(request, servletResponse); }
Source:
private static ClientSession doGetSession(MongoDbFactory dbFactory, SessionSynchronization sessionSynchronization) { MongoResourceHolder resourceHolder = (MongoResourceHolder) TransactionSynchronizationManager.getResource(dbFactory); if (resourceHolder != null && (resourceHolder.hasSession() || resourceHolder.isSynchronizedWithTransaction())) { resourceHolder.requested(); if (!resourceHolder.hasSession()) { resourceHolder.setSession(createClientSession(dbFactory)); } return resourceHolder.getSession(); } if (SessionSynchronization.NATIVE.equals(sessionSynchronization)) { return null; } resourceHolder = new MongoResourceHolder(createClientSession(dbFactory), dbFactory); resourceHolder.requested(); resourceHolder.getSession().startTransaction(); TransactionSynchronizationManager .registerSynchronization(new MongoSessionSynchronization(resourceHolder, dbFactory)); resourceHolder.setSynchronizedWithTransaction(true); TransactionSynchronizationManager.bindResource(dbFactory, resourceHolder); return resourceHolder.getSession(); }

Target:
private static ClientSession doGetSession(MongoDbFactory dbFactory, SessionSynchronization sessionSynchronization) { MongoResourceHolder resourceHolder = (MongoResourceHolder) TransactionSynchronizationManager.getResource(dbFactory); if (resourceHolder != null && (resourceHolder.hasSession() || resourceHolder.isSynchronizedWithTransaction())) { if (!resourceHolder.hasSession()) { resourceHolder.setSession(createClientSession(dbFactory)); } return resourceHolder.getSession(); } if (SessionSynchronization.ON_ACTUAL_TRANSACTION.equals(sessionSynchronization)) { return null; } resourceHolder = new MongoResourceHolder(createClientSession(dbFactory), dbFactory); resourceHolder.getSession().startTransaction(); TransactionSynchronizationManager .registerSynchronization(new MongoSessionSynchronization(resourceHolder, dbFactory)); resourceHolder.setSynchronizedWithTransaction(true); TransactionSynchronizationManager.bindResource(dbFactory, resourceHolder); return resourceHolder.getSession(); }
Source:
protected String getSearchPattern() { String user_defined_pattern = QueryHelper.getConstraint(getUriInfo(), "", modelType); return user_defined_pattern.equals("Users : ") ? user_defined_pattern + USERS_SEARCH_PATTERN : user_defined_pattern + AND_SEARCH_PATTERN + USERS_SEARCH_PATTERN; }

Target:
private String getSearchPattern() { String user_defined_pattern = QueryHelper.getConstraint(getUriInfo(), "", modelType); return user_defined_pattern.equals("Users : ") ? user_defined_pattern + USERS_SEARCH_PATTERN : user_defined_pattern + AND_SEARCH_PATTERN + USERS_SEARCH_PATTERN; }
Source:
public String getBuildStartedMessage(Run build) { return null; }

Target:
public String getBuildStartedMessage(Run build) { if (build instanceof AbstractBuild && thisOverrides("getBuildStartedMessage", AbstractBuild.class)) { return getBuildStartedMessage((AbstractBuild)build); } return null; }
Source:
protected void appendAsColumnName(Path<?> path, boolean precededByDot) { if (path.getAnnotatedElement().isAnnotationPresent(Column.class)) { SQLTemplates templates = getTemplates(); Column column = path.getAnnotatedElement().getAnnotation(Column.class); if (!column.name().isEmpty()) { append(templates.quoteIdentifier(column.name(), precededByDot)); } else { super.appendAsColumnName(path, precededByDot); } } else { super.appendAsColumnName(path, precededByDot); } }

Target:
protected void appendAsColumnName(Path<?> path, boolean precededByDot) { if (path.getAnnotatedElement().isAnnotationPresent(Column.class)) { Column column = path.getAnnotatedElement().getAnnotation(Column.class); if (!column.name().isEmpty()) { append(getTemplates().quoteIdentifier(column.name(), precededByDot)); } else { super.appendAsColumnName(path, precededByDot); } } else { super.appendAsColumnName(path, precededByDot); } }
Source:
public void shouldParseTheManifestsItCreates() throws IOException { File actual = ManifestUtils.createClasspathJarFile("/some/path/foo.jar" + File.pathSeparator +"/some/path/"); assertThat(ManifestUtils.readClasspathManifest(actual)) .containsExactly(new File("/some/path/foo.jar"), new File("/some/path/")); }

Target:
public void shouldParseTheManifestsItCreates() throws IOException { File actual = ManifestUtils.createClasspathJarFile("some/path/foo.jar" + File.pathSeparator + "some/path/"); assertThat(ManifestUtils.readClasspathManifest(actual)) .containsExactly( new File("some/path/foo.jar").getAbsoluteFile(), new File("some/path/").getAbsoluteFile()); }
Source:
public COREEnvelopeRealTimeResponse realTimeRequest(COREEnvelopeRealTimeRequest msg, AssertionType assertion, NhinTargetSystemType targetSystem, NhincConstants.GATEWAY_API_LEVEL apiLevel) { COREEnvelopeRealTimeResponse response; try { String url = proxyHelper.getUrlFromTargetSystemByGatewayAPILevel(targetSystem, NhincConstants.NHIN_CORE_X12DS_REALTIME_SECURED_SERVICE_NAME, apiLevel); ServicePortDescriptor<AdapterCORETransactionPortType> portDescriptor = new NhinCORE_X12DSRealTimeServicePortDescriptor(); CONNECTClient<AdapterCORETransactionPortType> client = getCONNECTClientSecured(portDescriptor, assertion, url, targetSystem.getHomeCommunity().getHomeCommunityId(), NhincConstants.NHIN_CORE_X12DS_REALTIME_SECURED_SERVICE_NAME); client.enableMtom(); response = (COREEnvelopeRealTimeResponse) client.invokePort(AdapterCORETransactionPortType.class, "realTimeRequest", msg); } catch (Exception ex) { LOG.error("Error calling realTimeRequest: " + ex.getMessage(), ex); response = new COREEnvelopeRealTimeResponse(); response.setErrorMessage(NhincConstants.CORE_X12DS_ACK_ERROR_MSG); response.setErrorCode(NhincConstants.CORE_X12DS_ACK_ERROR_CODE); } return response; }

Target:
public COREEnvelopeRealTimeResponse realTimeRequest(COREEnvelopeRealTimeRequest msg, AssertionType assertion, NhinTargetSystemType targetSystem, NhincConstants.GATEWAY_API_LEVEL apiLevel) { COREEnvelopeRealTimeResponse response; try { String url = proxyHelper.getUrlFromTargetSystemByGatewayAPILevel(targetSystem, NhincConstants.NHIN_CORE_X12DS_REALTIME_SECURED_SERVICE_NAME, apiLevel); ServicePortDescriptor<AdapterCORETransactionPortType> portDescriptor = new NhinCORE_X12DSRealTimeServicePortDescriptor(); CONNECTClient<AdapterCORETransactionPortType> client = getCONNECTClientSecured(portDescriptor, assertion, url, targetSystem.getHomeCommunity().getHomeCommunityId(), NhincConstants.NHIN_CORE_X12DS_REALTIME_SECURED_SERVICE_NAME); response = (COREEnvelopeRealTimeResponse) client.invokePort(AdapterCORETransactionPortType.class, "realTimeRequest", msg); } catch (Exception ex) { LOG.error("Error calling realTimeRequest: " + ex.getMessage(), ex); response = new COREEnvelopeRealTimeResponse(); response.setErrorMessage(NhincConstants.CORE_X12DS_ACK_ERROR_MSG); response.setErrorCode(NhincConstants.CORE_X12DS_ACK_ERROR_CODE); } return response; }
Source:
public void clear() { if(layoutContent != null) { FormsElementWrapperWidgetUtil.clear(this); layoutContent = null; } formContent.clear(); layoutGenerator.clear(); }

Target:
public void clear() { if (layoutContent != null) { wrapperWidgetUtil.clear(this); layoutContent = null; } formContent.clear(); layoutGenerator.clear(); }
Source:
public PreparedAttachment(Attachment attachment, String attachmentsDir, long length, AttachmentStreamFactory attachmentStreamFactory) throws AttachmentException { this.attachment = attachment; this.tempFile = new File(attachmentsDir, "temp" + UUID.randomUUID()); InputStream attachmentInStream = null; OutputStream tempFileOutStream = null; MessageDigest calculateSha1 = null; int totalRead = 0; try { attachmentInStream = attachment.getInputStream(); tempFileOutStream = attachmentStreamFactory.getOutputStream(this.tempFile, Attachment.Encoding.Plain); calculateSha1 = MessageDigest.getInstance("SHA-1"); int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; int bytesRead; while ((bytesRead = attachmentInStream.read(buffer)) != -1) { calculateSha1.update(buffer, 0, bytesRead); tempFileOutStream.write(buffer, 0, bytesRead); totalRead += bytesRead; } } catch (IOException e) { logger.log(Level.WARNING, "Problem reading from input or writing to output stream ", e); throw new AttachmentNotSavedException(e); } catch (NoSuchAlgorithmException e) { logger.log(Level.WARNING, "Problem calculating SHA1 for attachment stream ", e); throw new AttachmentNotSavedException(e); } finally { IOUtils.closeQuietly(attachmentInStream); IOUtils.closeQuietly(tempFileOutStream); } if (this.attachment.encoding == Attachment.Encoding.Plain) { this.length = totalRead; this.encodedLength = 0; } else { this.length = length; this.encodedLength = totalRead; } this.sha1 = calculateSha1.digest(); }

Target:
public PreparedAttachment(Attachment attachment, String attachmentsDir, long length, AttachmentStreamFactory attachmentStreamFactory) throws AttachmentException { this.attachment = attachment; this.tempFile = new File(attachmentsDir, "temp" + UUID.randomUUID()); InputStream attachmentInStream = null; OutputStream tempFileOutStream = null; MessageDigest calculateSha1 = null; int totalRead = 0; try { attachmentInStream = attachment.getInputStream(); tempFileOutStream = attachmentStreamFactory.getOutputStream(this.tempFile, Attachment.Encoding.Plain); calculateSha1 = MessageDigest.getInstance("SHA-1"); int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; int bytesRead; while ((bytesRead = attachmentInStream.read(buffer)) != -1) { calculateSha1.update(buffer, 0, bytesRead); tempFileOutStream.write(buffer, 0, bytesRead); totalRead += bytesRead; } } catch (IOException e) { logger.log(Level.WARNING, "Problem reading from input or writing to output stream ", e); throw new AttachmentNotSavedException(e); } catch (NoSuchAlgorithmException e) { logger.log(Level.WARNING, "Problem calculating SHA1 for attachment stream ", e); throw new AttachmentNotSavedException(e); } finally { IOUtils.closeQuietly(attachmentInStream); IOUtils.closeQuietly(tempFileOutStream); } if (this.attachment.encoding == Attachment.Encoding.Plain) { this.length = totalRead; this.encodedLength = NO_ENCODED_LENGTH; } else { this.length = length; this.encodedLength = totalRead; } this.sha1 = calculateSha1.digest(); }
Source:
private void applyRefactoring(CheWorkspaceEdit workspaceEdit) { view.close(); WorkspaceEdit edit = new WorkspaceEdit(); edit.setChanges(workspaceEdit.getChanges()); edit.setResourceChanges(new LinkedList<>()); for (ResourceChange resourceChange : workspaceEdit.getResourceChanges()) { edit.getResourceChanges().add(Either.forLeft(resourceChange)); } applyWorkspaceEditAction.applyWorkspaceEdit(edit); setEditorFocus(); }

Target:
private void applyRefactoring(CheWorkspaceEdit workspaceEdit) { view.close(); applyWorkspaceEditAction.applyWorkspaceEdit(workspaceEdit); setEditorFocus(); }
Source:
public void testGetModulesByClass() { Map<String, IAnalysisModule> modules = fTrace.getAnalysisModules(); assertTrue(modules.isEmpty()); fTrace.openTrace(); modules = fTrace.getAnalysisModules(); assertFalse(modules.isEmpty()); Map<String, TestAnalysis> testModules = fTrace.getAnalysisModules(TestAnalysis.class); assertFalse(testModules.isEmpty()); for (Entry<String, IAnalysisModule> module : modules.entrySet()) { if (module.getValue() instanceof TestAnalysis) { assertTrue(testModules.containsKey(module.getKey())); } } }

Target:
public void testGetModulesByClass() { TmfTraceStub trace = (TmfTraceStub) TmfTestTrace.E_TEST_10K.getTrace(); Map<String, IAnalysisModule> modules = trace.getAnalysisModules(); boolean modulesEmpty = modules.isEmpty(); trace.openTrace(); modules = trace.getAnalysisModules(); Map<String, TestAnalysis> testModules = trace.getAnalysisModules(TestAnalysis.class); TmfTestTrace.A_TEST_10K.dispose(); assertTrue(modulesEmpty); assertFalse(modules.isEmpty()); assertFalse(testModules.isEmpty()); for (Entry<String, IAnalysisModule> module : modules.entrySet()) { if (module.getValue() instanceof TestAnalysis) { assertTrue(testModules.containsKey(module.getKey())); } } }
Source:
public static CompressedLongsIndexedSupplier fromByteBuffer(ByteBuffer buffer, ByteOrder order) { ByteBuffer bufferToUse = buffer.asReadOnlyBuffer(); byte versionFromBuffer = bufferToUse.get(); if (versionFromBuffer == LZF_VERSION || versionFromBuffer == version) { final int totalSize = bufferToUse.getInt(); final int sizePer = bufferToUse.getInt(); CompressedObjectStrategy.CompressionStrategy compression = CompressedObjectStrategy.CompressionStrategy.LZF; CompressionFactory.LongEncodingFormat encoding = CompressionFactory.DEFAULT_LONG_ENCODING; if (versionFromBuffer == version) { byte compressionId = bufferToUse.get(); if (compressionId >= (byte) 0xFE) { compression = CompressedObjectStrategy.CompressionStrategy.forId(compressionId); } else { compression = CompressedObjectStrategy.CompressionStrategy.forId((byte) (compressionId + 126)); encoding = CompressionFactory.LongEncodingFormat.forId(bufferToUse.get()); } } Supplier<IndexedLongs> supplier = CompressionFactory.getLongSupplier( totalSize, sizePer, bufferToUse, order, encoding, compression ); return new CompressedLongsIndexedSupplier( totalSize, buffer, supplier ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }

Target:
public static CompressedLongsIndexedSupplier fromByteBuffer(ByteBuffer buffer, ByteOrder order) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == LZF_VERSION || versionFromBuffer == version) { final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); CompressedObjectStrategy.CompressionStrategy compression = CompressedObjectStrategy.CompressionStrategy.LZF; CompressionFactory.LongEncodingFormat encoding = CompressionFactory.LEGACY_LONG_ENCODING_FORMAT; if (versionFromBuffer == version) { byte compressionId = buffer.get(); if (CompressionFactory.hasEncodingFlag(compressionId)) { encoding = CompressionFactory.LongEncodingFormat.forId(buffer.get()); compressionId = CompressionFactory.clearEncodingFlag(compressionId); } compression = CompressedObjectStrategy.CompressionStrategy.forId(compressionId); } Supplier<IndexedLongs> supplier = CompressionFactory.getLongSupplier( totalSize, sizePer, buffer.asReadOnlyBuffer(), order, encoding, compression ); return new CompressedLongsIndexedSupplier( totalSize, sizePer, buffer, supplier, compression, encoding ); } throw new IAE("Unknown version[%s]", versionFromBuffer); }
Source:
public void partOpened(IWorkbenchPartReference partRef) { IWorkbenchPart part = partRef.getPart(false); if (isCEditor(part)) { CEditor editor = (CEditor) part; if (reconciler == null) { reconciler = new CodanCReconciler(); } if (postSaveListener == null) { postSaveListener = new IPostSaveListener() { @Override public void saved(ITranslationUnit translationUnit, IProgressMonitor monitor) { processResource(translationUnit.getResource(), CheckerLaunchMode.RUN_ON_FILE_SAVE); } }; } reconciler.install(editor); editor.addPostSaveListener(postSaveListener); IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class); processResource(resource, CheckerLaunchMode.RUN_ON_FILE_OPEN); } }

Target:
public void partOpened(IWorkbenchPartReference partRef) { IWorkbenchPart part = partRef.getPart(false); if (isCEditor(part)) { CEditor editor = (CEditor) part; if (reconciler == null) { reconciler = new CodanCReconciler(); } reconciler.install(editor); if (postSaveListener == null) { postSaveListener = new IPostSaveListener() { @Override public void saved(ITranslationUnit translationUnit, IProgressMonitor monitor) { processResource(translationUnit.getResource(), CheckerLaunchMode.RUN_ON_FILE_SAVE); } }; } editor.addPostSaveListener(postSaveListener); IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class); processResource(resource, CheckerLaunchMode.RUN_ON_FILE_OPEN); } }
Source:
public void testAutoFlushIsAppliedDuringQueryExecution() throws Exception { Query query = session.createQuery( "from Hypothesis" ); assertQuery( session, 8, query ); Hypothesis hypothesis = new Hypothesis(); hypothesis.setId( "29" ); hypothesis.setDescription( "In the morning it's darker than outside" ); hypothesis.setPosition( 29 ); session.persist( hypothesis ); if ( EnumSet.of( GridModule.MONGODB, GridModule.NEO4J ).contains( TestHelper.getCurrentModule() ) ) { assertQuery( session, query, 9, "Auto-flush should be performed prior to query execution" ); } else { assertQuery( session, query, 8, "Auto-flush should not be reflected by queries executed via Hibernate Search" ); } session.delete( hypothesis ); }

Target:
public void testAutoFlushIsAppliedDuringQueryExecution() throws Exception { Query query = session.createQuery( "from Hypothesis" ); assertQuery( session, 8, query ); Hypothesis hypothesis = new Hypothesis(); hypothesis.setId( "29" ); hypothesis.setDescription( "In the morning it's darker than outside" ); hypothesis.setPosition( 29 ); session.persist( hypothesis ); if ( EnumSet.of( MONGODB, NEO4J ).contains( TestHelper.getCurrentDialectType() ) ) { assertQuery( session, query, 9, "Auto-flush should be performed prior to query execution" ); } else { assertQuery( session, query, 8, "Auto-flush should not be reflected by queries executed via Hibernate Search" ); } session.delete( hypothesis ); }
Source:
public EventData(ByteBuffer body, Context context) { Objects.requireNonNull(body, "'body' cannot be null."); this.body = body; this.properties = new HashMap<>(); this.systemProperties = new SystemProperties(Collections.emptyMap()); this.context = context; }

Target:
public EventData(ByteBuffer body, Context context) { Objects.requireNonNull(body, "'body' cannot be null."); Objects.requireNonNull(body, "'context' cannot be null."); this.body = body; this.properties = new HashMap<>(); this.systemProperties = new SystemProperties(Collections.emptyMap()); this.context = context; }
Source:
public void testToHeader() throws ParseException { final ImmutableList<Request> allRequests = ImmutableList.of( RequestConverter.toRequest(Ds3ModelFixtures.createBucketRequest(), new Ds3DocSpecImpl( ImmutableMap.of(), ImmutableMap.of())), RequestConverter.toRequest(Ds3ModelFixtures.deleteBucketRequest(), new Ds3DocSpecImpl( ImmutableMap.of(), ImmutableMap.of())), RequestConverter.toRequest(Ds3ModelFixtures.getBucketsRequest(), new Ds3DocSpecImpl( ImmutableMap.of(), ImmutableMap.of()))); final ImmutableList<Enum> allEnums = ImmutableList.of( new Enum("TestEnum", ImmutableList.of( "TestEnumValue1", "TestEnumValue2")), new Enum("TestEnum2", ImmutableList.of( "TestEnumValue3", "TestEnumValue4"))); final ImmutableList<Struct> allStructs = ImmutableList.of( new Struct("testStruct1", ImmutableList.of( new StructMember(new PrimitiveType("int", false), "structMember1"), new StructMember(new PrimitiveType("ds3_str", true), "structMember2"))), new Struct("testStruct2", "marshallStruct2", ImmutableList.of( new StructMember(new PrimitiveType("int", false), "structMember3")), false, true, false, false)); final Header testHeader = HeaderConverter.toHeader(allEnums, allStructs, allRequests); assertEquals(testHeader.getEnums(), allEnums); assertEquals(testHeader.getRequests(), allRequests); assertEquals(testHeader.getStructs(), allStructs); }

Target:
public void testToHeader() throws ParseException { final Ds3DocSpec testDocSpec = new Ds3DocSpecEmptyImpl(); final ImmutableList<Request> allRequests = ImmutableList.of( RequestConverter.toRequest(Ds3ModelFixtures.createBucketRequest(), testDocSpec), RequestConverter.toRequest(Ds3ModelFixtures.deleteBucketRequest(), testDocSpec), RequestConverter.toRequest(Ds3ModelFixtures.getBucketsRequest(), testDocSpec)); final ImmutableList<Enum> allEnums = ImmutableList.of( new Enum("TestEnum", ImmutableList.of( "TestEnumValue1", "TestEnumValue2")), new Enum("TestEnum2", ImmutableList.of( "TestEnumValue3", "TestEnumValue4"))); final ImmutableList<Struct> allStructs = ImmutableList.of( new Struct("testStruct1", ImmutableList.of( new StructMember(new PrimitiveType("int", false), "structMember1"), new StructMember(new PrimitiveType("ds3_str", true), "structMember2"))), new Struct("testStruct2", "marshallStruct2", ImmutableList.of( new StructMember(new PrimitiveType("int", false), "structMember3")), false, true, false, false)); final Header testHeader = HeaderConverter.toHeader(allEnums, allStructs, allRequests); assertEquals(testHeader.getEnums(), allEnums); assertEquals(testHeader.getRequests(), allRequests); assertEquals(testHeader.getStructs(), allStructs); }
Source:
private void setupUI() { setContentView(R.layout.screen_form_entry); ImageButton nextButton = (ImageButton)this.findViewById(R.id.nav_btn_next); ImageButton prevButton = (ImageButton)this.findViewById(R.id.nav_btn_prev); nextButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!NAV_STATE_DONE.equals(v.getTag())) { GoogleAnalyticsUtils.reportFormNavForward( GoogleAnalyticsFields.LABEL_ARROW, GoogleAnalyticsFields.VALUE_FORM_NOT_DONE); FormEntryActivity.this.showNextView(); } else { GoogleAnalyticsUtils.reportFormNavForward( GoogleAnalyticsFields.LABEL_ARROW, GoogleAnalyticsFields.VALUE_FORM_DONE); triggerUserFormComplete(); } } }); prevButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!NAV_STATE_QUIT.equals(v.getTag())) { GoogleAnalyticsUtils.reportFormNavBackward(GoogleAnalyticsFields.LABEL_ARROW); FormEntryActivity.this.showPreviousView(true); } else { FormEntryActivity.this.triggerUserQuitInput(); } } }); mViewPane = (ViewGroup)findViewById(R.id.form_entry_pane); requestMajorLayoutUpdates(); if (mCurrentView != null) { mCurrentView.teardownView(); } isAnimatingSwipe = false; isDialogShowing = false; mCurrentView = null; mInAnimation = null; mOutAnimation = null; mGestureDetector = new GestureDetector(this); }

Target:
private void setupUI() { setContentView(R.layout.screen_form_entry); ImageButton nextButton = (ImageButton)this.findViewById(R.id.nav_btn_next); ImageButton prevButton = (ImageButton)this.findViewById(R.id.nav_btn_prev); nextButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!NAV_STATE_DONE.equals(v.getTag())) { GoogleAnalyticsUtils.reportFormNavForward( GoogleAnalyticsFields.LABEL_ARROW, GoogleAnalyticsFields.VALUE_FORM_NOT_DONE); FormEntryActivity.this.showNextView(); } else { GoogleAnalyticsUtils.reportFormNavForward( GoogleAnalyticsFields.LABEL_ARROW, GoogleAnalyticsFields.VALUE_FORM_DONE); triggerUserFormComplete(); } } }); prevButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!NAV_STATE_QUIT.equals(v.getTag())) { GoogleAnalyticsUtils.reportFormNavBackward(GoogleAnalyticsFields.LABEL_ARROW); FormEntryActivity.this.showPreviousView(true); } else { GoogleAnalyticsUtils.reportFormQuitAttempt(GoogleAnalyticsFields.LABEL_PROGRESS_BAR_ARROW); FormEntryActivity.this.triggerUserQuitInput(); } } }); mViewPane = (ViewGroup)findViewById(R.id.form_entry_pane); requestMajorLayoutUpdates(); if (mCurrentView != null) { mCurrentView.teardownView(); } isAnimatingSwipe = false; isDialogShowing = false; mCurrentView = null; mInAnimation = null; mOutAnimation = null; mGestureDetector = new GestureDetector(this); }
Source:
protected long getImmutableTimestampInternal(long ts) { Long minLocked = lockService.getMinLockedInVersionId(immutableTsLockClient.getClientId()); return minLocked == null ? ts : minLocked; }

Target:
private long getImmutableTimestampInternal(long ts) { Long minLocked = lockService.getMinLockedInVersionId(immutableTsLockClient.getClientId()); return minLocked == null ? ts : minLocked; }
Source:
protected void executeVmCommand() { getParameters().setEntityInfo(new EntityInfo(VdcObjectType.VM, getVm().getId())); if (getVm().getStatus() == VMStatus.Suspended || StringUtils.isNotEmpty(getVm().getHibernationVolHandle())) { suspendedVm = true; setSucceeded(stopSuspendedVm()); if (getSucceeded() && getTaskIdList().isEmpty()) { endVmCommand(); setCommandShouldBeLogged(true); } } else { super.executeVmCommand(); } }

Target:
protected void executeVmCommand() { getParameters().setEntityInfo(new EntityInfo(VdcObjectType.VM, getVm().getId())); if (getVm().getStatus() == VMStatus.Suspended || StringUtils.isNotEmpty(getVm().getHibernationVolHandle())) { suspendedVm = true; boolean syncPartSucceeded = stopSuspendedVm(); if (!syncPartSucceeded) { return; } if (getTaskIdList().isEmpty()) { endVmCommand(); setCommandShouldBeLogged(true); } else { setSucceeded(true); } } else { super.executeVmCommand(); } }
Source:
BaseRealm(SharedRealm sharedRealm) { this.threadId = Thread.currentThread().getId(); this.configuration = sharedRealm.getConfiguration(); this.realmCache = null; this.sharedRealm = sharedRealm; this.shouldCloseSharedRealm = false; this.schema = new RealmSchema(this); }

Target:
BaseRealm(SharedRealm sharedRealm) { this.threadId = Thread.currentThread().getId(); this.configuration = sharedRealm.getConfiguration(); this.realmCache = null; this.sharedRealm = sharedRealm; this.shouldCloseSharedRealm = false; }
Source:
public void spongeImpl$readFromSpongeCompound(CompoundNBT compound) { super.spongeImpl$readFromSpongeCompound(compound); if (compound.contains("ignorePhysics")) { this.impl$ignorePhysics = compound.getBoolean("ignorePhysics"); } }

Target:
public void impl$readFromSpongeCompound(CompoundNBT compound) { super.impl$readFromSpongeCompound(compound); if (compound.contains("ignorePhysics")) { this.impl$ignorePhysics = compound.getBoolean("ignorePhysics"); } }
Source:
private static void cleanDirectory(File dir) { try { FileUtils.deleteDirectory(dir); } catch (IOException e) { e.printStackTrace(); } }

Target:
private static void cleanDirectory(File dir) { try { FileUtils.deleteDirectory(dir); } catch (IOException e) { Activator.getDefault().logError("Unable to delete: " + dir.toString(), e); } }
Source:
public Option<Angle> calculateParallacticAngle(final ISPObservation obs) { return ImOption.fromScalaOpt(ObsTargetCalculatorService.targetCalculation(obs)) .flatMap(targetCalculator -> ImOption.fromScalaOpt(targetCalculator.weightedMeanParallacticAngle())) .map(angleObj -> (double) angleObj) .map(angle -> (new edu.gemini.skycalc.Angle(angle, edu.gemini.skycalc.Angle.Unit.DEGREES)).toPositive()); }

Target:
public Option<Angle> calculateParallacticAngle(final ISPObservation obs) { return ImOption.fromScalaOpt(ObsTargetCalculatorService.targetCalculation(obs)) .flatMap(targetCalculator -> ImOption.fromScalaOpt(targetCalculator.weightedMeanParallacticAngle())) .map(angleObj -> Angle$.MODULE$.fromDegrees((double)angleObj)); }
Source:
protected boolean validateSingle(MaintenanceDocument maintDoc, CustomerLoadBatchErrors batchErrors, String customerName) { boolean result = true; CuCustomerRule rule = new CuCustomerRule(); result &= rule.processRouteDocument(maintDoc); extractGlobalVariableErrors(batchErrors, customerName); return result; }

Target:
protected boolean validateSingle(MaintenanceDocument maintDoc, CustomerLoadBatchErrors batchErrors, String customerName) { boolean result = true; CustomerRule rule = new CuCustomerRule(); result &= rule.processRouteDocument(maintDoc); extractGlobalVariableErrors(batchErrors, customerName); return result; }
Source:
public int numberOfUpdates() { final Integer cachedValue = numberOfUpdatesCache; if (cachedValue != null) { return cachedValue; } int numberOfUpdates = 0; for (T object : results.keySet()) { final PutResult putResult = results.get(object); if (putResult != null && putResult.wasUpdated() && putResult.numberOfRowsUpdated() != null) { numberOfUpdates += putResult.numberOfRowsUpdated(); } } numberOfUpdatesCache = numberOfUpdates; return numberOfUpdates; }

Target:
public int numberOfUpdates() { final Integer cachedValue = numberOfUpdatesCache; if (cachedValue != null) { return cachedValue; } int numberOfUpdates = 0; for (T object : results.keySet()) { final PutResult putResult = results.get(object); assert putResult != null; if (putResult.wasUpdated()) { assert putResult.numberOfRowsUpdated() != null; numberOfUpdates += putResult.numberOfRowsUpdated(); } } numberOfUpdatesCache = numberOfUpdates; return numberOfUpdates; }
Source:
public static DrlxParseResult normalizeConstraint(DrlxParseResult drlxParseResult) { if (!ENABLE_NORMALIZE) { return drlxParseResult; } if (drlxParseResult instanceof SingleDrlxParseSuccess) { SingleDrlxParseSuccess s = new SingleDrlxParseSuccess((SingleDrlxParseSuccess) drlxParseResult); Expression expr = s.getExpr(); if (expr == null) { return drlxParseResult; } if (expr instanceof MethodCallExpr) { processTopLevelExpression(s, (MethodCallExpr) expr); } else if (expr instanceof EnclosedExpr) { Expression inner = stripEnclosedExpr((EnclosedExpr) expr); if (inner instanceof MethodCallExpr) { processTopLevelExpression(s, (MethodCallExpr) inner); } else { processExpression(expr); } } else { processExpression(expr); } return s; } return drlxParseResult; }

Target:
public static DrlxParseResult normalizeConstraint(DrlxParseResult drlxParseResult) { if (!ENABLE_NORMALIZE) { return drlxParseResult; } if (drlxParseResult instanceof SingleDrlxParseSuccess) { SingleDrlxParseSuccess drlx = new SingleDrlxParseSuccess((SingleDrlxParseSuccess) drlxParseResult); Expression expr = drlx.getExpr(); if (expr == null) { return drlxParseResult; } if (expr instanceof MethodCallExpr) { processTopLevelExpression(drlx, (MethodCallExpr) expr); } else if (expr instanceof EnclosedExpr) { Expression inner = stripEnclosedExpr((EnclosedExpr) expr); if (inner instanceof MethodCallExpr) { processTopLevelExpression(drlx, (MethodCallExpr) inner); } else { processExpression(expr); } } else { processExpression(expr); } return drlx; } return drlxParseResult; }
Source:
public static PaymentDetailsEnteredEvent from(ChargeEntity charge) { ZonedDateTime lastEventDate = charge.getEvents().stream() .map(ChargeEventEntity::getUpdated) .max(ZonedDateTime::compareTo) .orElse(null); return new PaymentDetailsEnteredEvent( charge.getExternalId(), PaymentDetailsEnteredEventDetails.from(charge), lastEventDate); }

Target:
public static PaymentDetailsEnteredEvent from(ChargeEntity charge) { ZonedDateTime lastEventDate = charge.getEvents().stream() .filter(e -> e.getStatus() == ChargeStatus.fromString(charge.getStatus())) .map(ChargeEventEntity::getUpdated) .max(ZonedDateTime::compareTo) .orElseThrow(() -> new ChargeEventNotFoundRuntimeException(charge.getExternalId())); return new PaymentDetailsEnteredEvent( charge.getExternalId(), PaymentDetailsEnteredEventDetails.from(charge), lastEventDate); }
Source:
public JsonObject aggregateDocuments(String query, String aggregation) throws DataException { SearchRestClient restClient = initiateRestClient(); String response = restClient.aggregateDocuments(overrideNullQuery(query), aggregation); if (!response.equals("")) { JsonReader jsonReader = Json.createReader(new StringReader(response)); JsonObject result = jsonReader.readObject(); return result.getJsonObject("aggregations"); } else { return Json.createObjectBuilder().build(); } }

Target:
public JsonObject aggregateDocuments(String query, String aggregation) throws DataException { SearchRestClient restClient = initiateRestClient(); String response = restClient.aggregateDocuments(overrideNullQuery(query), aggregation); if (!response.equals("")) { try (JsonReader jsonReader = Json.createReader(new StringReader(response))) { JsonObject result = jsonReader.readObject(); return result.getJsonObject("aggregations"); } } else { return Json.createObjectBuilder().build(); } }
Source:
private void attachToProcess(final ICommandControlDMContext context, final String pid, RequestMonitor rm) { BundleContext c = GdbUIPlugin.getDefault().getBundle().getBundleContext(); DsfServicesTracker tracker = new DsfServicesTracker(c, context.getSessionId()); try { final IGDBProcesses procService = tracker.getService(IGDBProcesses.class); final IGDBBackend backend = tracker.getService(IGDBBackend.class); if (procService != null && backend != null) { IProcessDMContext procDmc = procService.createProcessContext(context, pid); procService.attachDebuggerToProcess(procDmc, new DataRequestMonitor<IDMContext>( DsfSession.getSession(context.getSessionId()).getExecutor(), rm) { @Override protected void handleErrorOrWarning() { IStatus status = getStatus(); if (status != null && !status.isOK()) { IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status); if (statusHandler != null) { try { statusHandler.handleStatus(status, null); } catch (CoreException ex) { GdbUIPlugin.getDefault().getLog().log(ex.getStatus()); } } else { GdbUIPlugin.getDefault().getLog().log(status); } } handleSuccess(); } }); } else { rm.done(); GdbUIPlugin.logErrorMessage("Could not retreive process service for context" + context); } } finally { tracker.dispose(); } }

Target:
private void attachToProcess(final ICommandControlDMContext context, final String pid, RequestMonitor rm) { BundleContext c = GdbUIPlugin.getDefault().getBundle().getBundleContext(); DsfServicesTracker tracker = new DsfServicesTracker(c, context.getSessionId()); try { IGDBProcesses procService = tracker.getService(IGDBProcesses.class); if (procService != null) { IProcessDMContext procDmc = procService.createProcessContext(context, pid); procService.attachDebuggerToProcess(procDmc, new DataRequestMonitor<IDMContext>( DsfSession.getSession(context.getSessionId()).getExecutor(), rm) { @Override protected void handleErrorOrWarning() { IStatus status = getStatus(); if (status != null && !status.isOK()) { IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status); if (statusHandler != null) { try { statusHandler.handleStatus(status, null); } catch (CoreException ex) { GdbUIPlugin.getDefault().getLog().log(ex.getStatus()); } } else { GdbUIPlugin.getDefault().getLog().log(status); } } handleSuccess(); } }); } else { rm.done(); GdbUIPlugin.log(new Throwable("Could not retreive process service for context" + context)); } } finally { tracker.dispose(); } }
Source:
private InitializationManager(Project project) { File baseFolder = new File(PluginManager.getPlugin(PluginId.findId("nl.tudelft.watchdog.intellij")).getPath().getPath()); File toTransferDatabaseFile = new File(baseFolder, WatchDogUtils.getProjectName() + "watchdog.mapdb"); File statisticsDatabaseFile = new File(baseFolder, WatchDogUtils.getProjectName() + "watchdogStatistics.mapdb"); toTransferPersister = new Persister( toTransferDatabaseFile); statisticsPersister = new Persister( statisticsDatabaseFile); intervalManager = new IntervalManager(toTransferPersister, statisticsPersister); debugEventManager = new DebugEventManager(toTransferPersister, statisticsPersister); debugEventManager.setSessionSeed(intervalManager.getSessionSeed()); watchDogEventManager = new WatchDogEventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, watchDogEventManager); transferManager = new TransferManagerBase(toTransferPersister, WatchDogUtils.getProjectName()); intelliJListener = new IntelliJListener(watchDogEventManager, debugEventManager, project); intelliJListener.attachListeners(); }

Target:
private InitializationManager(Project project) { File baseFolder = new File(PluginManager.getPlugin(PluginId.findId("nl.tudelft.watchdog")).getPath().getPath()); File toTransferDatabaseFile = new File(baseFolder, WatchDogUtils.getProjectName() + "watchdog.mapdb"); File statisticsDatabaseFile = new File(baseFolder, WatchDogUtils.getProjectName() + "watchdogStatistics.mapdb"); toTransferPersister = new Persister( toTransferDatabaseFile); statisticsPersister = new Persister( statisticsDatabaseFile); intervalManager = new IntervalManager(toTransferPersister, statisticsPersister); debugEventManager = new DebugEventManager(toTransferPersister, statisticsPersister); debugEventManager.setSessionSeed(intervalManager.getSessionSeed()); watchDogEventManager = new WatchDogEventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, watchDogEventManager); transferManager = new TransferManagerBase(toTransferPersister, WatchDogUtils.getProjectName()); intelliJListener = new IntelliJListener(watchDogEventManager, debugEventManager, project); intelliJListener.attachListeners(); }
Source:
public Optional<Stream<String>> getChanges(@Nullable User user, String ownerId, String dataSetId, String fileId) { Optional<DataSet> maybeDataSet = dataSetRepository.getDataSet(user, ownerId, dataSetId); if (maybeDataSet.isPresent()) { DataSet dataSet = maybeDataSet.get(); DataSetMetaData dataSetMetaData = dataSet.getMetadata(); UpdatedPerPatchStore updatedPerPatchStore = dataSet.getUpdatedPerPatchStore(); ChangeListBuilder changeListBuilder = new ChangeListBuilder( updatedPerPatchStore, dataSet.getTruePatchStore(), dataSetMetaData.getBaseUri() ); Integer version = getVersionFromFileId(fileId); Supplier<List<String>> subjectsSupplier = () -> { try (Stream<String> subjects = updatedPerPatchStore.ofVersion(version)) { return subjects.collect(Collectors.toList()); } }; return Optional.of(changeListBuilder.retrieveChanges(version, subjectsSupplier).stream()); } return Optional.empty(); }

Target:
public Optional<Stream<String>> getChanges(@Nullable User user, String ownerId, String dataSetId, String fileId) { Optional<DataSet> maybeDataSet = dataSetRepository.getDataSet(user, ownerId, dataSetId); if (maybeDataSet.isPresent()) { DataSet dataSet = maybeDataSet.get(); DataSetMetaData dataSetMetaData = dataSet.getMetadata(); ChangeListBuilder changeListBuilder = new ChangeListBuilder(dataSetMetaData.getBaseUri()); ChangesRetriever changesRetriever = dataSet.getChangesRetriever(); Integer version = getVersionFromFileId(fileId); Supplier<List<String>> subjectsSupplier = changesRetriever.getSubjects(version); return Optional.of(changeListBuilder.retrieveChanges(dataSet.getChangesRetriever(), version, subjectsSupplier) .stream()); } return Optional.empty(); }
Source:
public abstract void killAll(Map<String, String> modelEnvVars) throws InterruptedException; private static List<String> classPath; private final int softkillWaitSeconds = 2 * 60; public static void init(ServletContextEvent event) { ServletContext servletContext = event.getServletContext(); final Set<String> resourcePaths = servletContext.getResourcePaths("/WEB-INF/lib/"); classPath = new ArrayList<String>(); for (final String resourcePath : resourcePaths) { if (resourcePath.contains("jenkins-core") && resourcePath.endsWith(".jar")) { String jarPath = servletContext.getRealPath(resourcePath); classPath.add(jarPath); } } }

Target:
public abstract void killAll(Map<String, String> modelEnvVars) throws InterruptedException; private final long softKillWaitSeconds = Integer.getInteger("SoftKillWaitSeconds", 2 * 60); public void killAll(Process proc, Map<String, String> modelEnvVars) throws InterruptedException { LOGGER.fine("killAll: process="+proc+" and envs="+modelEnvVars); OSProcess p = get(proc); if(p!=null) p.killRecursively(); if(modelEnvVars!=null) killAll(modelEnvVars); }
Source:
public IterableQueryResult queryAndFetch(String query, String queryType, boolean distinctDocuments, Object... params) { Span span = Tracing.getTracer().getCurrentSpan(); Map<String, AttributeValue> attributes = new HashMap<>(); attributes.put("nxql", AttributeValue.stringAttributeValue(query)); span.addAnnotation("queryAndFetch", attributes); try { SecurityService securityService = getSecurityService(); NuxeoPrincipal principal = getPrincipal(); String[] principals = getPrincipalsToCheck(); String[] permissions = securityService.getPermissionsToCheck(BROWSE); Collection<Transformer> transformers = getPoliciesQueryTransformers(queryType); QueryFilter queryFilter = new QueryFilter(principal, principals, permissions, null, transformers, 0, 0); IterableQueryResult result = getSession().queryAndFetch(query, queryType, queryFilter, distinctDocuments, params); attributes.clear(); attributes.put("match", AttributeValue.longAttributeValue(result.size())); span.addAnnotation("queryAndFetch.done", attributes); return result; } catch (QueryParseException e) { e.addInfo("Failed to execute query: " + queryType + ": " + query); throw e; } }

Target:
public IterableQueryResult queryAndFetch(String query, String queryType, boolean distinctDocuments, Object... params) { Span span = Tracing.getTracer().getCurrentSpan(); Map<String, AttributeValue> map = new HashMap<>(); map.put("nxql", AttributeValue.stringAttributeValue(query)); map.put("distinct", AttributeValue.booleanAttributeValue(distinctDocuments)); span.addAnnotation("AbstractSession#queryAndFetch", map); try { SecurityService securityService = getSecurityService(); NuxeoPrincipal principal = getPrincipal(); String[] principals = getPrincipalsToCheck(); String[] permissions = securityService.getPermissionsToCheck(BROWSE); Collection<Transformer> transformers = getPoliciesQueryTransformers(queryType); QueryFilter queryFilter = new QueryFilter(principal, principals, permissions, null, transformers, 0, 0); IterableQueryResult result = getSession().queryAndFetch(query, queryType, queryFilter, distinctDocuments, params); map.clear(); map.put("totalSize", AttributeValue.longAttributeValue(result.size())); span.addAnnotation("AbstractSession#queryAndFetch.done", map); return result; } catch (QueryParseException e) { e.addInfo("Failed to execute query: " + queryType + ": " + query); throw e; } }
Source:
public static boolean recoverOnChunkedUploadFailed(Throwable t) { if (t instanceof ChannelOutputShutdownException) { try { for (StackTraceElement element : t.getStackTrace()) { String className = element.getClassName(); String methodName = element.getMethodName(); if (className.contains("ChunkedWriteHandler") && (methodName.equals("flush") || methodName.equals("write"))) return true; } } catch (Throwable ignore) { } } return t.getCause() != null && recoverOnChunkedUploadFailed(t.getCause()); }

Target:
public static boolean recoverOnChunkedUploadFailed(Throwable t) { return t instanceof ChannelOutputShutdownException && exceptionInMethod(t, "io.netty.handler.stream.ChunkedWriteHandler", "flush"); }
Source:
public static ByteBuf encode( ByteBufAllocator allocator, int streamId, int extendedType, @Nullable ByteBuf metadata, ByteBuf data) { int flags = FrameHeaderFlyweight.FLAGS_I; if (metadata != null && metadata != Unpooled.EMPTY_BUFFER) { flags |= FrameHeaderFlyweight.FLAGS_M; } ByteBuf header = FrameHeaderFlyweight.encode(allocator, streamId, FrameType.EXT, flags); header.writeInt(extendedType); if ((data == null || data == Unpooled.EMPTY_BUFFER) && (metadata == null || metadata == Unpooled.EMPTY_BUFFER)) { return header; } else if (metadata != null && metadata != Unpooled.EMPTY_BUFFER) { return DataAndMetadataFlyweight.encode(allocator, header, metadata, data); } else { return DataAndMetadataFlyweight.encodeOnlyData(allocator, header, data); } }

Target:
public static ByteBuf encode( ByteBufAllocator allocator, int streamId, int extendedType, @Nullable ByteBuf metadata, ByteBuf data) { int flags = FrameHeaderFlyweight.FLAGS_I; if (metadata != null) { flags |= FrameHeaderFlyweight.FLAGS_M; } ByteBuf header = FrameHeaderFlyweight.encode(allocator, streamId, FrameType.EXT, flags); header.writeInt(extendedType); if (data == null && metadata == null) { return header; } else if (metadata != null) { return DataAndMetadataFlyweight.encode(allocator, header, metadata, data); } else { return DataAndMetadataFlyweight.encodeOnlyData(allocator, header, data); } }
Source:
@Override public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { final SqlNode left = callBinding.operand(0); final SqlNode right = callBinding.operand(1); if (!ARRAY_OR_MAP.checkSingleOperandType(callBinding, left, 0, throwOnFailure)) { return false; } final RelDataType operandType = callBinding.getOperandType(0); final SqlSingleOperandTypeChecker checker = getChecker(operandType); if (checker == null) { SqlNode node = callBinding.getCall() .getOperandList() .get(0); throw callBinding.getValidator() .newValidationError(node, RESOURCE.illegalTypeForItemOperator(node.toString(), operandType.getSqlTypeName() .getName()) ); } return checker.checkSingleOperandType(callBinding, right, 0, throwOnFailure); }

Target:
@Override public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { final SqlNode left = callBinding.operand(0); final SqlNode right = callBinding.operand(1); if (!ARRAY_OR_MAP.checkSingleOperandType(callBinding, left, 0, throwOnFailure)) { return false; } final SqlSingleOperandTypeChecker checker = getChecker(callBinding); return checker.checkSingleOperandType(callBinding, right, 0, throwOnFailure); }
Source:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DatastreamProducerRecord record = (DatastreamProducerRecord) o; return Objects.equals(_partition, record._partition) && Objects.equals(_events, record._events) && Objects.equals( _checkpoint, record._checkpoint); }

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DatastreamProducerRecord record = (DatastreamProducerRecord) o; return Objects.equals(_partition, record._partition) && Objects.equals(_partitionKey, record._partitionKey) && Objects.equals(_events, record._events) && Objects.equals(_checkpoint, record._checkpoint); }
Source:
public JobSubjectEntity() { super(); }

Target:
public JobSubjectEntity() { }
Source:
public void add(Entry entry) { if (queue.size() >= maxSize) { queue.poll(); } queue.add(entry); }

Target:
public void add(Entry entry) { while (queue.size() >= maxSize) { queue.poll(); } queue.add(entry); }