auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void test() { final Context context = new Context(); <START> assertTrue(KastParser.parse("output.txt", ".Bag", context).getBody().equals(Bag.EMPTY)); <END> assertTrue(KastParser.parse("output.txt", "0", context).getBody() .equals(KastParser.parse("output.txt", "`0::Int`", context).getBody())); assertTrue(KastParser.parse("output.txt", "0", context).getBody() .equals(KastParser.parse("output.txt", "`0`", context).getBody())); assertTrue(KastParser.parse("output.txt", "`\"0\"`", context).getBody() .equals(KastParser.parse("output.txt", "\"0\"", context).getBody())); assertTrue(KastParser.parse("output.txt", "true", context).getBody() .equals(KastParser.parse("output.txt", "`true::Bool`", context).getBody())); assertTrue(KastParser.parse("output.txt", "false", context).getBody() .equals(KastParser.parse("output.txt", "`false::Bool`", context).getBody())); Cell testCell = new Cell("abc",Bag.EMPTY); assertTrue(KastParser.parse("output.txt", "<abc> .Bag </abc>", context) .getBody().equals(testCell)); List<Term> testKList = new ArrayList<Term>(); testKList.add(IntBuiltin.of(0)); testKList.add(IntBuiltin.of(0)); assertTrue(KastParser.parse("output.txt", "`abc`(0,0)", context) .getBody().equals(new KApp(KLabelConstant.of("abc"), (Term)(new KList(testKList))))); }</code><technical_language>assertEquals</technical_language>

Target:
public void test() { final Context context = new Context(); assertEquals(KastParser.parse("output.txt", ".Bag", context).getBody(),Bag.EMPTY); assertEquals(KastParser.parse("output.txt", "0", context).getBody(),IntBuiltin.of(0)); assertEquals(KastParser.parse("output.txt", "0", context).getBody(), KastParser.parse("output.txt", "`0::Int`", context).getBody()); assertEquals(KastParser.parse("output.txt", "0", context).getBody(), KastParser.parse("output.txt", "`0`", context).getBody()); assertEquals(KastParser.parse("output.txt", "`\"0\"`", context).getBody(), StringBuiltin.of("0")); assertEquals(KastParser.parse("output.txt", "`\"0\"`", context).getBody(), KastParser.parse("output.txt", "\"0\"", context).getBody()); assertFalse(KastParser.parse("output.txt", "`\"\"0\"\"`", context).getBody() .equals(KastParser.parse("output.txt", "\"0\"", context).getBody())); assertEquals(KastParser.parse("output.txt", "true", context).getBody(), BoolBuiltin.of("true")); assertEquals(KastParser.parse("output.txt", "true", context).getBody(), KastParser.parse("output.txt", "`true::Bool`", context).getBody()); assertEquals(KastParser.parse("output.txt", "false", context).getBody(), BoolBuiltin.of("false")); assertEquals(KastParser.parse("output.txt", "false", context).getBody(), KastParser.parse("output.txt", "`false::Bool`", context).getBody()); Cell testCell = new Cell("abc",Bag.EMPTY); assertEquals(KastParser.parse("output.txt", "<abc> .Bag </abc>", context), testCell); assertEquals(KastParser.parse("output.txt", "`abc`(0,0)", context).getBody(), KApp.of("abc", IntBuiltin.of(0), IntBuiltin.of(0))); }
Source:
<code>private void setHeaderProfileInfo(boolean force) { if (force || loginStatus != Preferences.readBoolean(this, Preferences.User.LOG_IN_STATUS) || (loginStatus && TextUtils.isEmpty(tvProfileUsername.getText())) || (!loginStatus && !TextUtils.isEmpty(tvProfileUsername.getText()))) { final ParseUser currentUser = ParseUser.getCurrentUser(); if (currentUser != null) { try { ParseFile parseFile = currentUser.getParseFile("profileThumb"); byte[] data = parseFile.getData(); Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); ivProfile.setImageBitmap(bitmap); } catch (Exception e) { e.printStackTrace(); } tvProfileUsername.setText(currentUser.getUsername()); tvProfileEmail.setText(currentUser.getEmail()); } else { <START> ivProfile.setImageResource(R.drawable.background_profile); <END> tvProfileUsername.setText(""); tvProfileEmail.setText(""); } } }</code><technical_language>This line is right, ivProfile.setImageResource(R.drawable.profile_placeholder);</technical_language>

Target:
private void setHeaderProfileInfo(boolean force) { if (force || mLoginStatus != Preferences.readBoolean(this, Preferences.User.LOG_IN_STATUS) || (mLoginStatus && TextUtils.isEmpty(tvProfileUsername.getText())) || (!mLoginStatus && !TextUtils.isEmpty(tvProfileUsername.getText()))) { final ParseUser currentUser = ParseUser.getCurrentUser(); if (currentUser != null) { try { ParseFile parseFile = currentUser.getParseFile("profileThumb"); byte[] data = parseFile.getData(); Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); ivProfile.setImageBitmap(bitmap); } catch (Exception e) { e.printStackTrace(); } tvProfileUsername.setText(currentUser.getUsername()); tvProfileEmail.setText(currentUser.getEmail()); } else { ivProfile.setImageResource(R.drawable.profile_placeholder); tvProfileUsername.setText(""); tvProfileEmail.setText(""); } } }
Source:
<code>public byte[] get(final String deviceId) { final Map<String, AttributeValue> attributes = new HashMap<String, AttributeValue>(); <START> attributes.put("public_key", new AttributeValue().withS("")); <END> final HashMap<String, AttributeValue> key = new HashMap<String, AttributeValue>(); key.put("device_id", new AttributeValue().withS(deviceId)); final GetItemRequest getItemRequest = new GetItemRequest() .withTableName(keyStoreTableName) .withKey(key); final GetItemResult getItemResult = dynamoDBClient.getItem(getItemRequest); final String base64EncodedPublicKey = getItemResult.getItem().get("public_key").getS(); return base64EncodedPublicKey.getBytes(); }</code><technical_language>Change "public_key" "device_id" String constants</technical_language>

Target:
public Optional<byte[]> get(final String deviceId) { final HashMap<String, AttributeValue> key = new HashMap<String, AttributeValue>(); key.put(DEVICE_ID_ATTRIBUTE_NAME, new AttributeValue().withS(deviceId)); final GetItemRequest getItemRequest = new GetItemRequest() .withTableName(keyStoreTableName) .withKey(key); final GetItemResult getItemResult = dynamoDBClient.getItem(getItemRequest); final String base64EncodedPublicKey = getItemResult.getItem().get(PUBLIC_KEY_ATTRIBUTE_NAME).getS(); return Optional.of(base64EncodedPublicKey.getBytes()); }
Source:
<code>public void activate() { sqlTypes.put("COLORITEM", "VARCHAR(70)"); sqlTypes.put("CONTACTITEM", "VARCHAR(6)"); sqlTypes.put("DATETIMEITEM", "DATETIME"); sqlTypes.put("DIMMERITEM", "TINYINT"); <START> sqlTypes.put("GROUPITEM", "VARCHAR(200)"); <END> sqlTypes.put("NUMBERITEM", "DOUBLE"); sqlTypes.put("ROLERSHUTTERITEM", "TINYINT"); sqlTypes.put("STRINGITEM", "VARCHAR(20000)"); sqlTypes.put("SWITCHITEM", "CHAR(3)"); }</code><technical_language>Is this change supposed part of this pull request</technical_language>

Target:
public void activate() { sqlTypes.put("COLORITEM", "VARCHAR(70)"); sqlTypes.put("CONTACTITEM", "VARCHAR(6)"); sqlTypes.put("DATETIMEITEM", "DATETIME"); sqlTypes.put("DIMMERITEM", "TINYINT"); sqlTypes.put("GROUPITEM", "DOUBLE"); sqlTypes.put("NUMBERITEM", "DOUBLE"); sqlTypes.put("ROLERSHUTTERITEM", "TINYINT"); sqlTypes.put("STRINGITEM", "VARCHAR(20000)"); sqlTypes.put("SWITCHITEM", "CHAR(3)"); }
Source:
<code>void throwIfNoHandlerPresent() { <START> @SuppressWarnings("unchecked") ProjectionRepository<String, ?, ?> repository = <END> (ProjectionRepository<String, ?, ?>) DefaultRepository.of(SavingProjection.class); BoundedContext context = BoundedContextBuilder .assumingTests() .build(); final BoundedContext.InternalAccess contextAccess = context.internalAccess(); contextAccess.register(repository); DiagnosticMonitor monitor = new DiagnosticMonitor(); contextAccess.registerEventDispatcher(monitor); Event event = GivenEvent.arbitrary(); EventEnvelope envelope = EventEnvelope.of(event); ProjectionEndpoint<String, ?> endpoint = ProjectionEndpoint.of(repository, envelope); endpoint.dispatchTo(projection.id()); List<HandlerFailedUnexpectedly> systemEvents = monitor.handlerFailureEvents(); assertThat(systemEvents).hasSize(1); HandlerFailedUnexpectedly systemEvent = systemEvents.get(0); assertThat(systemEvent.getHandledSignal() .asEventId()) .isEqualTo(event.id()); assertThat(systemEvent.getEntity() .getId()) .isEqualTo(Identifier.pack(projection.id())); assertThat(systemEvent.getError().getType()) .isEqualTo(IllegalStateException.class.getCanonicalName()); }</code><technical_language>Please fix alignment</technical_language>

Target:
void throwIfNoHandlerPresent() { @SuppressWarnings({"unchecked", "RedundantSuppression"}) ProjectionRepository<String, SavingProjection, SavedString> repository = (ProjectionRepository<String, SavingProjection, SavedString>) DefaultRepository.of(SavingProjection.class); BoundedContext context = BoundedContextBuilder .assumingTests() .build(); final BoundedContext.InternalAccess contextAccess = context.internalAccess(); contextAccess.register(repository); DiagnosticMonitor monitor = new DiagnosticMonitor(); contextAccess.registerEventDispatcher(monitor); Event event = GivenEvent.arbitrary(); EventEnvelope envelope = EventEnvelope.of(event); ProjectionEndpoint<String, SavingProjection, SavedString> endpoint = ProjectionEndpoint.of(repository, envelope); endpoint.dispatchTo(projection.id()); List<HandlerFailedUnexpectedly> systemEvents = monitor.handlerFailureEvents(); assertThat(systemEvents).hasSize(1); HandlerFailedUnexpectedly systemEvent = systemEvents.get(0); assertThat(systemEvent.getHandledSignal() .asEventId()) .isEqualTo(event.id()); assertThat(systemEvent.getEntity() .getId()) .isEqualTo(Identifier.pack(projection.id())); assertThat(systemEvent.getError().getType()) .isEqualTo(IllegalStateException.class.getCanonicalName()); }
Source:
<code>public boolean contains(Comment comment) { if(!comment.getRange().isPresent()){ return false; } Range commentRange = comment.getRange().get(); if (commentRange == null) { return false; } for (Comment c : getComments()) { if(!c.getRange().isPresent()){ return false; } Range cRange = c.getRange().get(); <START> if(cRange!=null) { <END> if (cRange.begin.line == commentRange.begin.line && cRange.begin.column == commentRange.begin.column && cRange.end.line == commentRange.end.line && Math.abs(cRange.end.column - commentRange.end.column) < 2) { return true; } } } return false; }</code><technical_language>a space if</technical_language>

Target:
public boolean contains(Comment comment) { if (!comment.getRange().isPresent()) { return false; } Range commentRange = comment.getRange().get(); if (commentRange == null) { return false; } for (Comment c : getComments()) { if (!c.getRange().isPresent()) { return false; } Range cRange = c.getRange().get(); if (cRange != null) { if (cRange.begin.equals(commentRange.begin) && cRange.end.line == commentRange.end.line && Math.abs(cRange.end.column - commentRange.end.column) < 2) { return true; } } } return false; }
Source:
<code>public ScriptManager(RuleTriggerManager triggerManager, ItemRegistry itemRegistry) { this.triggerManager = triggerManager; instance = this; logger.info("Available engines:"); <START> { <END> for (ScriptEngineFactory f : new ScriptEngineManager().getEngineFactories()) { logger.info(f.getEngineName()); } } this.setItemRegistry(itemRegistry); File folder = getFolder("jsr_scripts"); if (folder.exists() && folder.isDirectory()) { loadScripts(folder); scriptUpdateWatcher = new Thread(new ScriptUpdateWatcher(this, folder)); scriptUpdateWatcher.start(); } else { logger.warn("Script directory: jsr_scripts missing, no scripts will be added!"); } }</code><technical_language>remove '{'</technical_language>

Target:
public ScriptManager(RuleTriggerManager triggerManager, ItemRegistry itemRegistry) { this.triggerManager = triggerManager; instance = this; logger.info("Available engines:"); for (ScriptEngineFactory f : new ScriptEngineManager().getEngineFactories()) { logger.info(f.getEngineName()); } this.setItemRegistry(itemRegistry); File folder = getFolder("scripts"); if (folder.exists() && folder.isDirectory()) { loadScripts(folder); scriptUpdateWatcher = new Thread(new ScriptUpdateWatcher(this, folder)); scriptUpdateWatcher.start(); } else { logger.warn("Script directory: jsr_scripts missing, no scripts will be added!"); } }
Source:
<code>private static File explode() throws Exception { File d = new File(".").getAbsoluteFile(); for( ; d!=null; d=d.getParentFile()) { if(new File(d,".jenkins").exists()) { File dir = new File(d,"war/target/jenkins"); if(dir.exists()) { System.out.println("Using jenkins.war resources from "+dir); return dir; } } } URL winstone = WarExploder.class.getResource("/winstone.jar"); if(winstone==null) throw new AssertionError("jenkins.war is not in the classpath. If you are running this from the core workspace, run 'mvn install' to create the war image in war/target/jenkins"); File war = Which.jarFile(Class.forName("executable.Executable")); File explodeDir = new File("./target/jenkins-for-test").getAbsoluteFile(); while (new File(explodeDir + ".exploding").isFile()) { explodeDir = new File(explodeDir + "x"); } File timestamp = new File(explodeDir,".timestamp"); if(!timestamp.exists() || (timestamp.lastModified()!=war.lastModified())) { System.out.println("Exploding " + war + " into " + explodeDir); if (new File(explodeDir + ".exploding").exists()){ <START> new FilePath(explodeDir).deleteRecursive(); <END> } if (!explodeDir.exists()) { explodeDir.mkdirs(); } new FilePath(war).unzip(new FilePath(explodeDir)); if(!explodeDir.exists()) throw new IOException("Failed to explode "+war); new FileOutputStream(timestamp).close(); timestamp.setLastModified(war.lastModified()); new File(explodeDir + ".exploding").delete(); } else { System.out.println("Picking up existing exploded jenkins.war at "+explodeDir.getAbsolutePath()); } return explodeDir; }</code><technical_language>avoid a race condition. Do delete this line</technical_language>

Target:
private static File explode() throws Exception { File d = new File(".").getAbsoluteFile(); for( ; d!=null; d=d.getParentFile()) { if(new File(d,".jenkins").exists()) { File dir = new File(d,"war/target/jenkins"); if(dir.exists()) { System.out.println("Using jenkins.war resources from "+dir); return dir; } } } URL winstone = WarExploder.class.getResource("/winstone.jar"); if(winstone==null) throw new AssertionError("jenkins.war is not in the classpath. If you are running this from the core workspace, run 'mvn install' to create the war image in war/target/jenkins"); File war = Which.jarFile(Class.forName("executable.Executable")); File explodeDir = new File("./target/jenkins-for-test").getAbsoluteFile(); explodeDir.getParentFile().mkdirs(); while (new File(explodeDir + ".exploding").isFile()) { explodeDir = new File(explodeDir + "x"); } File timestamp = new File(explodeDir,".timestamp"); if(!timestamp.exists() || (timestamp.lastModified()!=war.lastModified())) { System.out.println("Exploding " + war + " into " + explodeDir); new FileOutputStream(explodeDir + ".exploding").close(); new FilePath(explodeDir).deleteRecursive(); new FilePath(war).unzip(new FilePath(explodeDir)); if(!explodeDir.exists()) throw new IOException("Failed to explode "+war); new FileOutputStream(timestamp).close(); timestamp.setLastModified(war.lastModified()); new File(explodeDir + ".exploding").delete(); } else { System.out.println("Picking up existing exploded jenkins.war at "+explodeDir.getAbsolutePath()); } return explodeDir; }
Source:
<code>public String md5() { <START> if(isEmpty()) return ""; <END> try { MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.reset(); for(SAMSequenceRecord ssr : mSequences) { if(ssr.getSequenceIndex()>0) md5.update((byte)' '); md5.update(ssr.getSequenceName().getBytes()); md5.update(String.valueOf(ssr.getSequenceLength()).getBytes()); } String hash = new BigInteger(1, md5.digest()).toString(16); if (hash.length() != 32) { final String zeros = "00000000000000000000000000000000"; hash = zeros.substring(0, 32 - hash.length()) + hash; } return hash; } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>@lindenb coding style needs consistent htsjdk. easier for folks maintain read code. In this case, if( -> if (. Thanks for updating code in this pull requests future too, I appreciate contributions making. I recommend intelliJ's favorite IDE's code re-format function</technical_language>

Target:
public String md5() { if (isEmpty()) return ""; try { final MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.reset(); for (final SAMSequenceRecord samSequenceRecord : mSequences) { if (samSequenceRecord.getSequenceIndex() > 0) md5.update((byte) ' '); final String md5_tag = samSequenceRecord.getAttribute(SAMSequenceRecord.MD5_TAG); if (md5_tag != null) { md5.update(md5_tag.getBytes()); } else { md5.update(samSequenceRecord.getSequenceName().getBytes()); md5.update(String.valueOf(samSequenceRecord.getSequenceLength()).getBytes()); } } String hash = new BigInteger(1, md5.digest()).toString(16); if (hash.length() != 32) { final String zeros = "00000000000000000000000000000000"; hash = zeros.substring(0, 32 - hash.length()) + hash; } return hash; } catch (Exception e) { throw new RuntimeException(e); } }
Source:
<code>public Git call() throws JGitInternalException { try { RepositoryBuilder builder = new RepositoryBuilder(); if (bare) builder.setBare(); builder.readEnvironment(); if (directory != null) { File d = new File(directory); if (!bare) d = new File(d, Constants.DOT_GIT); builder.setGitDir(d); } else if (builder.getGitDir() == null) { File d = new File("."); if (!bare) d = new File(d, Constants.DOT_GIT); builder.setGitDir(d); } <START> builder.findGitDir(); <END> Repository repository = builder.build(); repository.create(bare); return new Git(repository); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }</code><technical_language>running findGitDir()? explicitly set above</technical_language>

Target:
public Git call() throws JGitInternalException { try { RepositoryBuilder builder = new RepositoryBuilder(); if (bare) builder.setBare(); builder.readEnvironment(); if (directory != null) { File d = directory; if (!bare) d = new File(d, Constants.DOT_GIT); builder.setGitDir(d); } else if (builder.getGitDir() == null) { File d = new File("."); if (!bare) d = new File(d, Constants.DOT_GIT); builder.setGitDir(d); } Repository repository = builder.build(); repository.create(bare); return new Git(repository); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }
Source:
<code>private void evaluateMaintenanceHostCommandProgress(List<Guid> childCmdIds, CommandBase<?> rootCommand) { UpgradeHostParameters parameters = (UpgradeHostParameters) rootCommand.getParameters(); VdsDynamic host = DbFacade.getInstance().getVdsDynamicDao().get(parameters.getVdsId()); switch (host.getStatus()) { case PreparingForMaintenance: break; case Maintenance: log.error("Host '{}' is on maintenance mode. Proceeding with Upgrade process.", getHostName(parameters.getVdsId())); invokeHostUpgrade(rootCommand, parameters); break; default: if (isMaintenanceCommandExecuted(childCmdIds)) { <START> log.error("Host '{}' failed to move to maintenance mode. Upgrade process is terminated.", <END> getHostName(parameters.getVdsId())); rootCommand.setCommandStatus(CommandStatus.FAILED); } break; } }</code><technical_language>This is I wanted change error, thanks</technical_language>

Target:
private void evaluateMaintenanceHostCommandProgress(List<Guid> childCmdIds, CommandBase<?> rootCommand) { UpgradeHostParameters parameters = (UpgradeHostParameters) rootCommand.getParameters(); VdsDynamic host = DbFacade.getInstance().getVdsDynamicDao().get(parameters.getVdsId()); switch (host.getStatus()) { case PreparingForMaintenance: break; case Maintenance: log.info("Host '{}' is on maintenance mode. Proceeding with Upgrade process.", getHostName(parameters.getVdsId())); invokeHostUpgrade(rootCommand, parameters); break; default: if (isMaintenanceCommandExecuted(childCmdIds)) { log.error("Host '{}' failed to move to maintenance mode. Upgrade process is terminated.", getHostName(parameters.getVdsId())); rootCommand.setCommandStatus(CommandStatus.FAILED); } break; } }
Source:
<code>public String getGitSshUrl() { if (sshdListenAddressString == null) { return ""; } if (downloadSchemes.length != 0) { <START> if (!Arrays.asList(downloadSchemes).contains("ssh")) { <END> return ""; } } String[] urlParts = sshdListenAddressString.split(":"); if (urlParts.length < 2) { log.error("Invalid SSHD listenUrl: " + sshdListenAddressString); return ""; } try { String hostname = getHost(urlParts[0]); int port = getPort(urlParts[1]); return "ssh://" + GITBLIT_USER + "@" + hostname + (port == SSH_DEF_PORT ? "" : ":" + port) + "/" + GITBLIT_REPO + ""; } catch (UnknownHostException e) { log.error("Cannot detect localhostname"); return ""; } }</code><technical_language>.. this becomes: if (!downloadSchemes.isEmpty() && !downloadSchemes.contains("ssh"))</technical_language>

Target:
public String getGitSshUrl() { if (sshdListenAddressString == null) { return ""; } if (!downloadSchemes.isEmpty() && !downloadSchemes.contains("ssh")) { return ""; } String[] urlParts = sshdListenAddressString.split(":"); if (urlParts.length < 2) { log.error("Invalid SSHD listenUrl: " + sshdListenAddressString); return ""; } try { String hostname = getHost(urlParts[0]); int port = getPort(urlParts[1]); return "ssh://" + GITBLIT_USER + "@" + hostname + (port == SSH_DEF_PORT ? "" : ":" + port) + "/" + GITBLIT_REPO + ""; } catch (UnknownHostException e) { log.error("Cannot detect localhostname"); return ""; } }
Source:
<code>public static <T> Vector<T> ofAll(Iterable<? extends T> iterable) { Objects.requireNonNull(iterable, "iterable is null"); if (iterable instanceof Vector) { return (Vector<T>) iterable; } else if (iterable instanceof Collection<?>) { final Object[] array = ((Collection<? extends T>) iterable).toArray(); return ofAll(BitMappedTrie.ofAll(array)); } else { final Seq<? extends T> result = (iterable instanceof Seq) ? (Seq<T>) iterable : List.ofAll(iterable); <START> final Object[] array = asArray(result.iterator(), result.size()); <END> return ofAll(BitMappedTrie.ofAll(array)); } }</code><technical_language>create a Seq get size. a waste (of mem cpu/gc) new objects created. Instead I create times iterator(), for counting, for elements: java int size = 0; for (Iterator<?> iter = iterable.iterator(); iter.hasNext(); iter.next()) { size += 1; } final Object[] array = asArray(iterable.iterator(), size); Additionally do extra check for Traversable: java } else if (iterable instanceof Traversable<?>) { final Traverable<T> traversable = (Traversable<T>) iterable; final Object[] array = asArray(traversable.iterator(), traversable.size()); return ofAll(BitMappedTrie.ofAll(array)); } ..</technical_language>

Target:
public static <T> Vector<T> ofAll(Iterable<? extends T> iterable) { Objects.requireNonNull(iterable, "iterable is null"); if (iterable instanceof Vector) { return (Vector<T>) iterable; } else { final BitMappedTrie<T> trie = BitMappedTrie.ofAll(asArray(iterable)); return ofAll(trie); } }
Source:
<code>public void testNullRecordsMismatchedHeader() throws Exception { final SAMRecordSetBuilder samRecordSetBuilder = getRecordSetBuilder(true, SAMFileHeader.SortOrder.queryname); for (final SAMRecord rec : samRecordSetBuilder.getRecords()) { rec.setHeader(null); } final SAMFileHeader fakeHeader = new SAMFileHeader(); fakeHeader.setSortOrder(SAMFileHeader.SortOrder.queryname); final File bamFile = File.createTempFile("test.", BamFileIoUtils.BAM_FILE_EXTENSION); bamFile.deleteOnExit(); final SAMFileWriter bamWriter = new SAMFileWriterFactory().makeSAMOrBAMWriter(fakeHeader, false, bamFile); for (SAMRecord rec : samRecordSetBuilder.getRecords()) { bamWriter.addAlignment(rec); } bamWriter.close(); final SamReader bamReader = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT).open(bamFile); final SamReader samReader = samRecordSetBuilder.getSamReader(); samReader.getFileHeader().setSortOrder(bamReader.getFileHeader().getSortOrder()); final CloseableIterator<SAMRecord> it = samReader.iterator(); final CloseableIterator<SAMRecord> bamIt = bamReader.iterator(); while (it.hasNext()) { Assert.assertTrue(bamIt.hasNext()); final SAMRecord samRecord = it.next(); final SAMRecord bamRecord = bamIt.next(); <START> Assert.assertEquals(bamRecord.getReferenceName(), samRecord.getReferenceName()); <END> } Assert.assertFalse(bamIt.hasNext()); CloserUtil.close(samReader); }</code><technical_language>Check equality of alignment starts</technical_language>

Target:
public void testNullRecordsMismatchedHeader() throws Exception { final SAMRecordSetBuilder samRecordSetBuilder = getRecordSetBuilder(true, SAMFileHeader.SortOrder.queryname); for (final SAMRecord rec : samRecordSetBuilder.getRecords()) { rec.setHeader(null); } final SAMFileHeader fakeHeader = new SAMFileHeader(); fakeHeader.setSortOrder(SAMFileHeader.SortOrder.queryname); final File bamFile = File.createTempFile("test.", BamFileIoUtils.BAM_FILE_EXTENSION); bamFile.deleteOnExit(); final SAMFileWriter bamWriter = new SAMFileWriterFactory().makeSAMOrBAMWriter(fakeHeader, false, bamFile); for (SAMRecord rec : samRecordSetBuilder.getRecords()) { bamWriter.addAlignment(rec); } bamWriter.close(); final SamReader bamReader = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT).open(bamFile); final SamReader samReader = samRecordSetBuilder.getSamReader(); samReader.getFileHeader().setSortOrder(bamReader.getFileHeader().getSortOrder()); final CloseableIterator<SAMRecord> it = samReader.iterator(); final CloseableIterator<SAMRecord> bamIt = bamReader.iterator(); while (it.hasNext()) { Assert.assertTrue(bamIt.hasNext()); final SAMRecord samRecord = it.next(); final SAMRecord bamRecord = bamIt.next(); Assert.assertEquals(bamRecord.getReferenceName(), samRecord.getReferenceName()); Assert.assertEquals(bamRecord.getAlignmentStart(), samRecord.getAlignmentStart()); } Assert.assertFalse(bamIt.hasNext()); CloserUtil.close(samReader); }
Source:
<code>private void initParams(List args) { if (fixedMean) { if (args.size() > 0) { throw new IllegalArgumentException( "MultivarGaussian CPD with fixed mean expects no " + "arguments."); } } else { if (args.size() < 1) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed mean; " + "requires mean as an argument."); } setMean(args.get(0)); if (fixedCovariance) { if (args.size() > 1) { throw new IllegalArgumentException( "MultivarGaussian CPD with fixed covariance matrix " + "expects only one argument."); } } else { if (args.size() == 2) { <START> setCovariance(args.get(1)); <END> } else if (args.size() < 2) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed " + "covariance matrix; requires covariance matrix " + "as argument."); } else { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed " + "covariance matrix has more than two arguments " + "provided"); } } } }</code><technical_language>A design be, setting some tags in constructor. real handling of params in initParams. refer Multinomial this is implemented</technical_language>

Target:
private void initParams(List args) { if (d == 0) { Object ob = args.get(0); int dims = 0; if (ob instanceof MatrixSpec) { dims = ((MatrixLib) ((MatrixSpec) ob).getValueIfNonRandom()).numRows(); } else { dims = ((MatrixLib) ob).numRows(); } setDimension(dims); } int argidx = 0; if (expectMeanAsArg) { if ((argidx + 1) > args.size()) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed mean; requires mean as an argument"); } setMean(args.get(argidx)); argidx++; } if (expectCovarianceAsArg) { if ((argidx + 1) > args.size()) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed covariance matrix; requires covariance matrix as argument."); } setCovariance(args.get(argidx)); argidx++; } if (args.size() > argidx) { throw new IllegalArgumentException( "MultivariateGaussian CPD is provided additional unnecessary random arguments"); } }
Source:
<code>public static DefaultDriverContext defaultDriverContext( Optional<DriverExecutionProfile> profileOption) { final DriverExecutionProfile profile = profileOption.orElse(mock(DriverExecutionProfile.class)); final DriverConfig driverConfig = mock(DriverConfig.class); final DriverConfigLoader configLoader = mock(DriverConfigLoader.class); when(configLoader.getInitialConfig()).thenReturn(driverConfig); when(driverConfig.getDefaultProfile()).thenReturn(profile); final NodeStateListener nodeStateListener = mock(NodeStateListener.class); final SchemaChangeListener schemaChangeListener = mock(SchemaChangeListener.class); final RequestTracker requestTracker = mock(RequestTracker.class); final ClassLoader classLoader = mock(ClassLoader.class); ProgrammaticArguments args = ProgrammaticArguments.builder() .addTypeCodecs(new TypeCodec[0]) .withNodeStateListener(nodeStateListener) .withSchemaChangeListener(schemaChangeListener) .withRequestTracker(requestTracker) .withLocalDatacenters(Maps.newHashMap()) .withNodeFilters(Maps.newHashMap()) .withClassLoader(classLoader) .build(); <START> return new DefaultDriverContext(configLoader, args); <END> }</code><technical_language>Yes, tests deprecated constructor, a good idea do it. a separate commit though, simpler open a separate PR</technical_language>

Target:
public static DefaultDriverContext defaultDriverContext( Optional<DriverExecutionProfile> profileOption) { final DriverExecutionProfile profile = profileOption.orElseGet( () -> { DriverExecutionProfile blankProfile = mock(DriverExecutionProfile.class); when(blankProfile.getString(DefaultDriverOption.PROTOCOL_COMPRESSION, "none")) .thenReturn("none"); return blankProfile; }); final DriverConfig driverConfig = mock(DriverConfig.class); final DriverConfigLoader configLoader = mock(DriverConfigLoader.class); when(configLoader.getInitialConfig()).thenReturn(driverConfig); when(driverConfig.getDefaultProfile()).thenReturn(profile); ProgrammaticArguments args = ProgrammaticArguments.builder() .withNodeStateListener(mock(NodeStateListener.class)) .withSchemaChangeListener(mock(SchemaChangeListener.class)) .withRequestTracker(mock(RequestTracker.class)) .withLocalDatacenters(Maps.newHashMap()) .withNodeFilters(Maps.newHashMap()) .withClassLoader(mock(ClassLoader.class)) .build(); return new DefaultDriverContext(configLoader, args); }
Source:
<code>public void setHttpSampleNumberingMode(int httpSampleNumberingMode) { if (httpSampleNumberingMode == HttpSamplerNumberingMode.PREFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.PREFIX.getStringMode(); } <START> if (httpSampleNumberingMode == HttpSamplerNumberingMode.SUFFIX.getIntValue()) { <END> sNumberingMode = HttpSamplerNumberingMode.SUFFIX.getStringMode(); } if (httpSampleNumberingMode == HttpSamplerNumberingMode.NO_NUMBER.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.NO_NUMBER.getStringMode(); } }</code><technical_language>else if</technical_language>

Target:
public void setHttpSampleNumberingMode(int httpSampleNumberingMode) { if (httpSampleNumberingMode == HttpSamplerNumberingMode.PREFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.PREFIX.getStringMode(); JMeterUtils.setProperty("proxy.number.mode", "prefix"); JMeterUtils.setProperty("proxy.number.requests", "true"); } else if (httpSampleNumberingMode == HttpSamplerNumberingMode.SUFFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.SUFFIX.getStringMode(); JMeterUtils.setProperty("proxy.number.mode", "suffix"); JMeterUtils.setProperty("proxy.number.requests", "true"); } else if (httpSampleNumberingMode == HttpSamplerNumberingMode.NO_NUMBER.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.NO_NUMBER.getStringMode(); JMeterUtils.setProperty("proxy.number.requests", "false"); } }
Source:
<code>protected void run() throws UnloggedFailure { if (!loader.isRemoteInstallEnabled()) { <START> throw die("remote installation is disabled"); <END> } if (names != null && !names.isEmpty()) { try { loader.enablePlugins(Sets.newHashSet(names)); } catch (PluginInstallException e) { e.printStackTrace(stderr); throw die("plugin failed to enable"); } } }</code><technical_language>"remote installation .." a good error message enable a plugin? If message is in places "remote plugin administration is disabled" a choice</technical_language>

Target:
protected void run() throws UnloggedFailure { if (!loader.isRemoteInstallEnabled()) { throw die("remote plugin administration is disabled"); } if (names != null && !names.isEmpty()) { try { loader.enablePlugins(Sets.newHashSet(names)); } catch (PluginInstallException e) { e.printStackTrace(stderr); throw die("plugin failed to enable"); } } }
Source:
<code>public BeanMetaData<T> getRootBeanMetaData() { <START> if ( rootBeanClass != null && rootBeanMetaData == null ) { <END> rootBeanMetaData = beanMetaDataManager.getBeanMetaData( rootBeanClass ); } return rootBeanMetaData; }</code><technical_language>reasoning for initializing lazily instead of in constructor making field final? Btw. rootBeanClass() null</technical_language>

Target:
public BeanMetaData<T> getRootBeanMetaData() { return rootBeanMetaData; }
Source:
<code>public DirectDebitPaymentLinksBuilder withMandate(URI mandate) { <START> this.mandate = new Link(mandate.toString(), GET);; <END> return this; }</code><technical_language>extra ; end of line</technical_language>

Target:
public DirectDebitPaymentLinksBuilder withMandate(URI mandate) { this.mandate = new Link(mandate.toString(), GET); return this; }
Source:
<code>public String convert(Date source) { <START> DateFormat df = new SimpleDateFormat(dateFormatString); <END> return df.format(source); }</code><technical_language>IMO, reuse [DateFormatterProvider](<LINK_0> here</technical_language>

Target:
public String convert(Date source) { return source.toInstant().toString(); }
Source:
<code>public PoolDefinition(long size, MemoryUnit unit, String serverResource) { if (unit == null) { throw new NullPointerException("Unit cannot be null"); } if (serverResource == null) { throw new NullPointerException("Source resource cannot be null"); } <START> if (size <= 0) { <END> throw new IllegalArgumentException("Pool must have a positive size"); } this.size = size; this.unit = unit; this.serverResource = serverResource; }</code><technical_language>Equivalent logic required in other constructor</technical_language>

Target:
public PoolDefinition(long size, MemoryUnit unit, String serverResource) { if (unit == null) { throw new NullPointerException("Unit cannot be null"); } if (size <= 0) { throw new IllegalArgumentException("Pool must have a positive size"); } if (serverResource == null) { throw new NullPointerException("Source resource cannot be null"); } this.size = size; this.unit = unit; this.serverResource = serverResource; }
Source:
<code>public void skipAndMoveCorruptedOrUnreadableFilesWithoutCreatingDir() { final String KEY = "key"; final String VALUE = "value"; try { File.createTempFile("temp", ".obj", objectStoreFolder.getRoot()); File corruptedFolder = openDirectory(workingDirectory.getAbsolutePath() + File.separator + PersistentObjectStorePartition.CORRUPTED_FOLDER); deleteDirectory(corruptedFolder); partition.store(KEY, VALUE); <START> assertEquals(2, objectStoreFolder.getRoot().listFiles().length); <END> assertEquals(1, corruptedFolder.list().length); } catch (Exception e) { fail("Supposed to have skipped corrupted or unreadable files"); } }</code><technical_language>hamcrest</technical_language>

Target:
public void skipAndMoveCorruptedOrUnreadableFilesWithoutCreatingDir() throws Exception { final String KEY = "key"; final String VALUE = "value"; File.createTempFile("temp", ".obj", objectStoreFolder.getRoot()); File corruptedFolder = openDirectory(workingDirectory.getAbsolutePath() + File.separator + PersistentObjectStorePartition.CORRUPTED_FOLDER); deleteDirectory(corruptedFolder); partition.store(KEY, VALUE); assertThat(objectStoreFolder.getRoot().listFiles().length, is(2)); assertThat(corruptedFolder.list().length, is(1)); }
Source:
<code>private static void serializeRefIdMap(Gson gson, String recordingPath) { try { JsonWriter writer = new JsonWriter(new FileWriter(recordingPath + REF_ID_MAP)); gson.toJson(EntityRefIdMap.getCurrentMap(), HashMap.class, writer); writer.close(); logger.info("RefIdMap Serialization completed!"); } catch (Exception e) { <START> logger.error(e.getMessage()); <END> } }</code><technical_language>error("error while serializing",e); This log entire stacktrace instead of message only</technical_language>

Target:
private void serializeRefIdMap(Gson gson, String recordingPath) { try { JsonWriter writer = new JsonWriter(new FileWriter(recordingPath + REF_ID_MAP)); gson.toJson(entityIdMap.getCurrentMap(), HashBiMap.class, writer); writer.close(); logger.info("RefIdMap Serialization completed!"); } catch (Exception e) { logger.error("Error while serializing Entity ID Map:", e); } }
Source:
<code>public ConfigurationEnvironmentStrategy() { conf = new HashMap<>(); Map<String, String> env = System.getenv(); ConfigurationKey[] keys = ConfigurationKey.values(); for (ConfigurationKey key : keys) { String value = env.get(key.name()); <START> if (value == null) { <END> valid = Boolean.FALSE; break; } else { conf.put(key, value); } } }</code><technical_language>easy get configuration incorrectly (basically if key is missing in config configuration is invalid). If I understand right, this is "silently" next ConfigurationStrategy is tried. This people e.g. System properties-based configuration is account. log, config.strategy failed (AND reason failed)? Reading Config parameters Environment failed, missing key BLABLA</technical_language>

Target:
public ConfigurationEnvironmentStrategy() { conf = new HashMap<>(); Map<String, String> env = System.getenv(); ConfigurationKey[] keys = ConfigurationKey.values(); for (ConfigurationKey key : keys) { String value = env.get(key.name()); if (value == null) { logger.info("Key not present in the Environment, skip to the next ConfigurationStrategy. \n", key.name()); valid = Boolean.FALSE; break; } else { conf.put(key, value); } } }
Source:
<code>private List<String> findBaselineNodesInfo() { String outStr = testOut.toString(); int i = outStr.indexOf("Baseline nodes:"); <START> assertTrue(i != -1); <END> int j = outStr.indexOf("\n", i) + 1; int beginOfNodeDescription = -1; List<String> nodesInfo = new ArrayList<>(); while ((beginOfNodeDescription = outStr.indexOf("ConsistentId=", j) ) != -1) { j = outStr.indexOf("\n", beginOfNodeDescription); nodesInfo.add(outStr.substring(beginOfNodeDescription, j).trim()); } return nodesInfo; }</code><technical_language>you, add some assert-related-message here</technical_language>

Target:
private List<String> findBaselineNodesInfo() { String outStr = testOut.toString(); int i = outStr.indexOf("Baseline nodes:"); assertTrue("Baseline nodes information is not found", i != -1); int j = outStr.indexOf("\n", i) + 1; int beginOfNodeDesc = -1; List<String> nodesInfo = new ArrayList<>(); while ((beginOfNodeDesc = outStr.indexOf("ConsistentId=", j) ) != -1) { j = outStr.indexOf("\n", beginOfNodeDesc); nodesInfo.add(outStr.substring(beginOfNodeDesc, j).trim()); } return nodesInfo; }
Source:
<code>private void loadKiteConf(Services services) throws IOException { <START> String[] paths = conf.getStrings(KITE_CONFIGURATION); <END> if (paths != null && paths.length != 0) { kiteConf = new Configuration(); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = new Path(path); HadoopAccessorService has = services.get(HadoopAccessorService.class); try { FileSystem fs = has.createFileSystem( System.getProperty("user.name"), p.toUri(), has.createJobConf(p.toUri().getAuthority())); if (fs.exists(p)) { FSDataInputStream is = null; try { is = fs.open(p); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } catch (HadoopAccessorException hae) { throw new IOException(hae); } } else { File f = new File(path); if (f.exists()) { InputStream is = null; try { is = new FileInputStream(f); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } } } else { LOG.info("Kite Configuration not specified"); } }</code><technical_language>ConfigurationService.getStrings(KITE_CONFIGURATION);</technical_language>

Target:
private void loadKiteConf(Services services) throws IOException { String[] paths = services.getConf().getStrings(KITE_CONFIGURATION); if (paths != null && paths.length != 0) { kiteConf = new Configuration(false); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = new Path(path); HadoopAccessorService has = services.get(HadoopAccessorService.class); try { FileSystem fs = has.createFileSystem( System.getProperty("user.name"), p.toUri(), has.createJobConf(p.toUri().getAuthority())); if (fs.exists(p)) { FSDataInputStream is = null; try { is = fs.open(p); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } catch (HadoopAccessorException hae) { throw new IOException(hae); } } else { File f = new File(path); if (f.exists()) { InputStream is = null; try { is = new FileInputStream(f); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } } } else { LOG.info("Kite Configuration not specified"); } }
Source:
<code><START> public void notifyTxnCommitInterests(long handle) { <END> for (TransactionCommitInterest interest : m_txnCommitInterests) { interest.transactionCommitted(handle); } }</code><technical_language>This public protected default protection level</technical_language>

Target:
void notifyTxnCommitInterests(long handle) { for (TransactionCommitInterest txnCommitInterest : m_txnCommitInterests) { txnCommitInterest.transactionCommitted(handle); } }
Source:
<code>public IUser getAddedBy() { if (addedBy != null && addedBy.eIsProxy()) { InternalEObject oldAddedBy = (InternalEObject) addedBy; addedBy = (IUser) eResolveProxy(oldAddedBy); if (addedBy != oldAddedBy) { <START> if (eNotificationRequired()) { <END> eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__ADDED_BY, oldAddedBy, addedBy)); } } } return addedBy; }</code><technical_language>issue here. auto-generated code, want change is here. I personally hate lack of braces in this case, need stick is produced combination of a) generating code, b) running source format it</technical_language>

Target:
public IUser getAddedBy() { if (addedBy != null && addedBy.eIsProxy()) { InternalEObject oldAddedBy = (InternalEObject) addedBy; addedBy = (IUser) eResolveProxy(oldAddedBy); if (addedBy != oldAddedBy) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__ADDED_BY, oldAddedBy, addedBy)); } } return addedBy; }
Source:
<code>public Void presentationHtml(String htmlToShow) { <START> return messageSender.runAndWait(message -> setupWindow.showPresentationStep(message, htmlToShow)); <END> }</code><technical_language>is difference message htmlToShow</technical_language>

Target:
public Void presentationHtml(String htmlToShow) { return messageSender.runAndWait(message -> setupWindow.showHtmlPresentationStep(message, htmlToShow)); }
Source:
<code>private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) { ClientResponse response = null; String regionsParamValue = null; try { WebResource webResource = jerseyClient.resource(serviceUrl).path(urlPath); if (regions != null && regions.length > 0) { regionsParamValue = StringUtil.join(regions); webResource = webResource.queryParam("regions", regionsParamValue); } Builder requestBuilder = webResource.getRequestBuilder(); addExtraHeaders(requestBuilder); response = requestBuilder.accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class); Applications applications = null; if (response.getStatus() == Status.OK.getStatusCode() && response.hasEntity()) { applications = response.getEntity(Applications.class); } return anEurekaHttpResponse(response.getStatus(), Applications.class) .headers(headersOf(response)) .entity(applications) .build(); } catch (Exception e) { logger.info("Error invoking Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus(), <START> e <END> ); throw e; } finally { if (logger.isDebugEnabled()) { logger.debug("Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus() ); } if (response != null) { response.close(); } } }</code><technical_language>please log error do rethrow, log error is rethrown</technical_language>

Target:
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) { ClientResponse response = null; String regionsParamValue = null; try { WebResource webResource = jerseyClient.resource(serviceUrl).path(urlPath); if (regions != null && regions.length > 0) { regionsParamValue = StringUtil.join(regions); webResource = webResource.queryParam("regions", regionsParamValue); } Builder requestBuilder = webResource.getRequestBuilder(); addExtraHeaders(requestBuilder); response = requestBuilder.accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class); Applications applications = null; if (response.getStatus() == Status.OK.getStatusCode() && response.hasEntity()) { applications = response.getEntity(Applications.class); } return anEurekaHttpResponse(response.getStatus(), Applications.class) .headers(headersOf(response)) .entity(applications) .build(); } finally { if (logger.isDebugEnabled()) { logger.debug("Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus() ); } if (response != null) { response.close(); } } }
Source:
<code>public Observable<Object> asRxObservable() { throwExceptionIfRxJavaIsNotAvailable("asRxObservable()"); final Set<String> observesTables = rawQuery.observesTables(); final Set<?> observesTags = rawQuery.observesTags(); final Observable<Object> observable; if (!observesTables.isEmpty() || !observesTags.isEmpty()) { <START> observable = ChangesFilter.applyForTablesAndTags(storIOSQLite.observeChanges(), observesTables, observesTags) <END> .map(MapSomethingToExecuteAsBlocking.newInstance(this)) .startWith(Observable.create(OnSubscribeExecuteAsBlocking.newInstance(this))) .onBackpressureLatest(); } else { observable = Observable.create(OnSubscribeExecuteAsBlocking.newInstance(this)); } return RxJavaUtils.subscribeOn(storIOSQLite, observable); }</code><technical_language>Please correct if wrong, design decision, executeSql is basically a side effect return data database, do for Put Delete, subscribe db changes</technical_language>

Target:
public Observable<Object> asRxObservable() { return RxJavaUtils.createObservable(storIOSQLite, this); }