auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void requestNetwork(NetworkRequest networkRequest, @RequestNetworkType int type, <START> Message onCompleteMsg, <END> LocalLog log) { final int apnType = ApnContext.getApnTypeFromNetworkRequest(networkRequest); final ApnContext apnContext = mApnContextsByType.get(apnType); log.log("DcTracker.requestNetwork for " + networkRequest + " found " + apnContext + ", type=" + requestTypeToString(type)); if (apnContext != null) { if (type == DcTracker.REQUEST_TYPE_HANDOVER && onCompleteMsg != null) { synchronized (mHandoverCompletionMsgs) { List<Message> msgs = mHandoverCompletionMsgs.get(apnType); if (msgs == null) { msgs = new ArrayList<>(); } msgs.add(onCompleteMsg); mHandoverCompletionMsgs.put(apnType, msgs); } } apnContext.requestNetwork(networkRequest, type, log); } }</code><technical_language>for now, passing onCompleteMsg type is HANDOVER, I guess handle rest of request type in patch, please add a @NonNull for onCompleteMsg</technical_language>

Target:
public void requestNetwork(NetworkRequest networkRequest, @RequestNetworkType int type, Message onCompleteMsg, LocalLog log) { final int apnType = ApnContext.getApnTypeFromNetworkRequest(networkRequest); final ApnContext apnContext = mApnContextsByType.get(apnType); log.log("DcTracker.requestNetwork for " + networkRequest + " found " + apnContext + ", type=" + requestTypeToString(type)); if (apnContext != null) { apnContext.requestNetwork(networkRequest, type, onCompleteMsg, log); } }
Source:
<code>public Configuration getConfiguration(GraphContext context) { <START> AbstractIterationOperation<FileLocationModel> addTypeRefToList = new AbstractIterationOperation<FileLocationModel>() <END> { @Override public void perform(GraphRewrite event, EvaluationContext context, FileLocationModel payload) { xmlFiles.add(payload); } }; return ConfigurationBuilder .begin() .addRule() .when(XmlFile.matchesXpath("/abc:ejb-jar").inFile(EXAMPLE_EJB_JAR_2_XML) .namespace("abc", "<LINK_0>")) .perform(Iteration .over() .perform(addTypeRefToList).endIteration() ); }</code><technical_language>Rename this variable. is longer accurate</technical_language>

Target:
public Configuration getConfiguration(GraphContext context) { AbstractIterationOperation<FileLocationModel> addMatchedFile = new AbstractIterationOperation<FileLocationModel>() { @Override public void perform(GraphRewrite event, EvaluationContext context, FileLocationModel payload) { xmlFiles.add(payload); } }; return ConfigurationBuilder .begin() .addRule() .when(XmlFile.matchesXpath("/abc:ejb-jar").inFile(EXAMPLE_EJB_JAR_2_XML) .namespace("abc", "<LINK_0>")) .perform(addMatchedFile); }
Source:
<code>public DuraStoreChunkSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes, long maxFileSize, boolean syncUpdates, boolean renameUpdates, boolean jumpStart, String updateSuffix, String prefix) { super(contentStore, username, spaceId, syncDeletes, syncUpdates, renameUpdates, jumpStart, updateSuffix, prefix); if (maxFileSize % 1000 != 0) { throw new RuntimeException("Max file size must be factor of 1000"); } <START> this.maxFileSize = maxFileSize; <END> this.jumpStart = jumpStart; stitcher = new FileStitcherImpl(new DuraStoreDataSource(contentStore)); }</code><technical_language>a problem creating FileChunkerOptions object threads, data change</technical_language>

Target:
public DuraStoreChunkSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes, long maxFileSize, boolean syncUpdates, boolean renameUpdates, boolean jumpStart, String updateSuffix, String prefix) { super(contentStore, username, spaceId, syncDeletes, syncUpdates, renameUpdates, jumpStart, updateSuffix, prefix); if (maxFileSize % 1000 != 0) { throw new RuntimeException("Max file size must be factor of 1000"); } this.jumpStart = jumpStart; this.chunkerOptions = new FileChunkerOptions(maxFileSize); stitcher = new FileStitcherImpl(new DuraStoreDataSource(contentStore)); }
Source:
<code>public void submit() throws GitAPIException, IOException, RestApiException { PushOneCommit.Result r = createChange(); RevisionApi rApi = gApi.changes() .id("p~master~" + r.getChangeId()) .revision(r.getCommit().name()); rApi.review(approve()); <START> rApi.submit(new SubmitInput()); <END> }</code><technical_language>/submit is another API commonly called input</technical_language>

Target:
public void submit() throws GitAPIException, IOException, RestApiException { PushOneCommit.Result r = createChange(); RevisionApi rApi = gApi.changes() .id("p~master~" + r.getChangeId()) .revision(r.getCommit().name()); rApi.review(approve()); rApi.submit(new SubmitInput(true)); }
Source:
<code>public void onMatch(RelOptRuleCall call) { final Filter filter = call.rel(0); final Project project = call.rel(1); if (RexOver.containsOver(project.getProjects(), null)) { return; } if (RexUtil.containsCorrelation(filter.getCondition())) { return; } RexNode newCondition = RelOptUtil.pushPastProject(filter.getCondition(), project); final RelBuilder relBuilder = call.builder(); RelNode newFilterRel; if (copyFilter) { RexSimplify simplifier = <START> new RexSimplify(relBuilder.getRexBuilder(), RelOptPredicateList.EMPTY, false, <END> Util.first(call.getPlanner().getExecutor(), RexUtil.EXECUTOR)); newCondition = simplifier.simplify(newCondition); newFilterRel = filter.copy(filter.getTraitSet(), project.getInput(), RexUtil.removeNullabilityCast(relBuilder.getTypeFactory(), newCondition)); } else { newFilterRel = relBuilder.push(project.getInput()).filter(newCondition).build(); } RelNode newProjRel = copyProject ? project.copy(project.getTraitSet(), newFilterRel, project.getProjects(), project.getRowType()) : relBuilder.push(newFilterRel) .project(project.getProjects(), project.getRowType().getFieldNames()) .build(); call.transformTo(newProjRel); }</code><technical_language>Please unknownAsFalse=true 1>null is null is false</technical_language>

Target:
public void onMatch(RelOptRuleCall call) { final Filter filter = call.rel(0); final Project project = call.rel(1); if (RexOver.containsOver(project.getProjects(), null)) { return; } RexNode newCondition = RelOptUtil.pushPastProject(filter.getCondition(), project); final RelBuilder relBuilder = call.builder(); RelNode newFilterRel; if (copyFilter) { newFilterRel = filter.copy(filter.getTraitSet(), project.getInput(), simplifyFilterCondition(newCondition, call)); } else { newFilterRel = relBuilder.push(project.getInput()).filter(newCondition).build(); } RelNode newProjRel = copyProject ? project.copy(project.getTraitSet(), newFilterRel, project.getProjects(), project.getRowType()) : relBuilder.push(newFilterRel) .project(project.getProjects(), project.getRowType().getFieldNames()) .build(); call.transformTo(newProjRel); }
Source:
<code>public @NonNull String getPresetFilterName(String presetFilterId) { String presetFilterName = <START> null; <END> if (fPresetFilterName != null) { presetFilterName = fPresetFilterName.get(presetFilterId); } if (presetFilterName == null && fPresetFilter != null) { presetFilterName = fPresetFilter.get(fPresetFilter.indexOf(presetFilterId)); } return presetFilterName == null ? "" : presetFilterName; }</code><technical_language>"" remove ternary</technical_language>

Target:
public @NonNull String getPresetFilterName(String presetFilterId) { String presetFilterName = presetFilterId; if (fPresetFilterName != null) { presetFilterName = fPresetFilterName.get(presetFilterId); } return presetFilterName == null ? "" : presetFilterName; }
Source:
<code>public String getImageUrl() { <START> return getData(KEY_IMAGE_URL).toString(); <END> }</code><technical_language>NPE if key exist</technical_language>

Target:
public String getImageUrl() { return (getCreativeData(KEY_IMAGE_URL) != null) ? creativeData.get(KEY_IMAGE_URL).toString() : null; }
Source:
<code>public void run() { mThreadName = Thread.currentThread().getName(); long blockToBeRemoved; while (true) { blockToBeRemoved = INVALID_BLOCK_ID; try { blockToBeRemoved = mBlocksToRemove.take(); mBlockWorker.removeBlock(Sessions.MASTER_COMMAND_SESSION_ID, blockToBeRemoved); LOG.debug("Block is removed in thread {}.", blockToBeRemoved, mThreadName); } catch (InterruptedException e) { if (!mShutdown) { <START> Thread.currentThread().interrupt(); <END> LOG.warn("{} got interrupted while it was cleaning block {}.", mThreadName, blockToBeRemoved); } } catch (IOException e) { LOG.warn("IOException occurred while was cleaning block {}, exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (BlockDoesNotExistException e) { LOG.warn("{}: block may be deleted already. exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (InvalidWorkerStateException e) { LOG.warn("{}: invalid block state for block {}, exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (Exception e) { LOG.warn("Unexpected exception: {}.", e.getMessage()); } finally { if (blockToBeRemoved != INVALID_BLOCK_ID) { mRemovingBlocks.remove(blockToBeRemoved); } } } }</code><technical_language>is this supposed in if statement too</technical_language>

Target:
public void run() { mThreadName = Thread.currentThread().getName(); long blockToBeRemoved; while (true) { blockToBeRemoved = INVALID_BLOCK_ID; try { blockToBeRemoved = mBlocksToRemove.take(); mBlockWorker.removeBlock(Sessions.MASTER_COMMAND_SESSION_ID, blockToBeRemoved); LOG.debug("Block is removed in thread {}.", blockToBeRemoved, mThreadName); } catch (InterruptedException e) { Thread.currentThread().interrupt(); if (!mShutdown) { LOG.warn("{} got interrupted while it was cleaning block {}.", mThreadName, blockToBeRemoved); } break; } catch (IOException e) { LOG.warn("IOException occurred while was cleaning block {}, exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (BlockDoesNotExistException e) { LOG.warn("{}: block may be deleted already. exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (InvalidWorkerStateException e) { LOG.warn("{}: invalid block state for block {}, exception is {}.", mThreadName, blockToBeRemoved, e.getMessage()); } catch (Exception e) { LOG.warn("Unexpected exception: {}.", e.getMessage()); } finally { if (blockToBeRemoved != INVALID_BLOCK_ID) { mRemovingBlocks.remove(blockToBeRemoved); } } } }
Source:
<code>public long findZephyrTypeId() { long status = ISSUE_TYPE_ID; final String url = String.format(URL_GET_ISSUETYPES, getUrl()); final Header[] headers = new Header[2]; headers[0] = new BasicHeader("Content-Type", "application/json"); headers[1] = new BasicHeader("Accept-Encoding", "gzip, deflate, sdch"); try (final CloseableHttpResponse response = get(url, headers)) { int statusCode = response.getStatusLine().getStatusCode(); if (statusCode >= 200 && statusCode < 300) { HttpEntity entity = response.getEntity(); String string = null; try { string = EntityUtils.toString(entity, "utf-8"); final JsonArray jArr = new JsonParser().parse(string).getAsJsonArray(); jArr.add(string); for (int i = 0; i < jArr.size(); i++) { final JsonObject jObj = jArr.get(i).getAsJsonObject(); if (jObj.get("name").getAsString().trim().equals(TEST_ISSSUETYPE_NAME)) { return jObj.get("id").getAsLong(); } } } catch (IOException e) { ZephyrPlugin.log(String.format("Bad response entity upon receipt of zephyr type id <%s>", url), e); } } else if (statusCode == 401 || statusCode == 404) { return status; } else { ZephyrPlugin.log(String.format("Unexpected response status <%s> upon receipt of zephyr type id <%s>", statusCode, url)); } } catch (IOException e) { <START> ZephyrPlugin.log(e); <END> } return status; }</code><technical_language>Do suppress fatal errors</technical_language>

Target:
public long findZephyrTypeId() { long status = ISSUE_TYPE_ID; final String url = String.format(URL_GET_ISSUETYPES, getUrl()); final Header[] headers = new Header[2]; headers[0] = new BasicHeader("Content-Type", "application/json"); headers[1] = new BasicHeader("Accept-Encoding", "gzip, deflate, sdch"); try (final CloseableHttpResponse response = get(url, headers)) { int statusCode = response.getStatusLine().getStatusCode(); if (statusCode >= 200 && statusCode < 300) { HttpEntity entity = response.getEntity(); String string = null; try { string = EntityUtils.toString(entity, "utf-8"); final JsonArray jArr = new JsonParser().parse(string).getAsJsonArray(); jArr.add(string); for (int i = 0; i < jArr.size(); i++) { final JsonObject jObj = jArr.get(i).getAsJsonObject(); if (jObj.get("name").getAsString().trim().equals(TEST_ISSSUETYPE_NAME)) { return jObj.get("id").getAsLong(); } } } catch (IOException e) { ZephyrPlugin.log(String.format("Bad response entity upon receipt of zephyr type id <%s>", url), e); } } else if (statusCode == 401 || statusCode == 404) { return status; } else { ZephyrPlugin.log(String.format("Unexpected response status <%s> upon receipt of zephyr type id <%s>", statusCode, url)); } } catch (IOException e) { throw new IllegalStateException("Failed to get " + url, e); } return status; }
Source:
<code>private void testGetInvalidityInfo_PersonName() { <START> invalidityInfoFor_validName_shouldBeEmptyString(); <END> invalidityInfoFor_emptyName_shouldReturnErrorString(); }</code><technical_language>this "shouldReturnEmptyString" instead? If so, a more occurrences of "shouldBeEmptyString" need edited</technical_language>

Target:
private void testGetInvalidityInfo_PersonName() { invalidityInfoFor_validName_shouldReturnEmptyString(); invalidityInfoFor_emptyName_shouldReturnErrorString(); }
Source:
<code>public void testTrace() { assumeTrue(testTrace.exists()); Performance perf = Performance.getDefault(); PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID); perf.tagAsSummary(pm, "LTTng Kernel Analysis", Dimension.CPU_TIME); perf.tagAsGlobalSummary(pm, "LTTng Kernel Analysis", Dimension.CPU_TIME); for (int i = 0; i < LOOP_COUNT; i++) { try (IAnalysisModule module = new LttngKernelAnalysisModule(); LttngKernelTrace trace = new LttngKernelTrace()) { module.setId("test"); trace.initTrace(null, testTrace.getPath(), CtfTmfEvent.class); module.setTrace(trace); pm.start(); TmfTestHelper.executeAnalysis(module); pm.stop(); File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace)); for (File file : suppDir.listFiles()) { file.delete(); } } catch (TmfAnalysisException | TmfTraceException e) { fail(e.getMessage()); } <START> pm.commit(); <END> } }</code><technical_language>Indeed, this for</technical_language>

Target:
public void testTrace() { assumeTrue(testTrace.exists()); Performance perf = Performance.getDefault(); PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID); perf.tagAsSummary(pm, "LTTng Kernel Analysis", Dimension.CPU_TIME); perf.tagAsGlobalSummary(pm, "LTTng Kernel Analysis", Dimension.CPU_TIME); for (int i = 0; i < LOOP_COUNT; i++) { try (IAnalysisModule module = new LttngKernelAnalysisModule(); LttngKernelTrace trace = new LttngKernelTrace()) { module.setId("test"); trace.initTrace(null, testTrace.getPath(), CtfTmfEvent.class); module.setTrace(trace); pm.start(); TmfTestHelper.executeAnalysis(module); pm.stop(); File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace)); for (File file : suppDir.listFiles()) { file.delete(); } } catch (TmfAnalysisException | TmfTraceException e) { fail(e.getMessage()); } } pm.commit(); }
Source:
<code>private void createTypeAlias(Node n, Node parent) { JSDocInfo bestJSDocInfo = NodeUtil.getBestJSDocInfo(n); if (bestJSDocInfo != null && bestJSDocInfo.hasTypedefType()) { String name; <START> if (n.getToken() == Token.NAME) { <END> name = n.getString(); } else if (n.getToken() == Token.GETPROP) { name = n.getSecondChild().getString(); } else { name = n.getFirstChild().getString(); } Node typeDef = Node.newString(Token.TYPE_ALIAS, name); types.put(name, typeDef); typeDef.setJSDocInfo(bestJSDocInfo); replaceExpressionOrAssignment(n, parent, typeDef); } }</code><technical_language>a switch</technical_language>

Target:
private void createTypeAlias(Node n, Node parent) { JSDocInfo bestJSDocInfo = NodeUtil.getBestJSDocInfo(n); if (bestJSDocInfo != null && bestJSDocInfo.hasTypedefType()) { String name; switch (n.getToken()) { case NAME: name = n.getString(); break; case GETPROP: name = n.getSecondChild().getString(); break; default: name = n.getFirstChild().getString(); break; } Node typeDef = Node.newString(Token.TYPE_ALIAS, name); types.put(name, typeDef); typeDef.setJSDocInfo(bestJSDocInfo); replaceExpressionOrAssignment(n, parent, typeDef); } }
Source:
<code>public List<JdbcColumnHandle> getColumns(ConnectorSession session, JdbcTableHandle tableHandle) { try (Connection connection = connectionFactory.openConnection(JdbcIdentity.from(session))) { try (ResultSet resultSet = getColumns(tableHandle, connection.getMetaData())) { List<JdbcColumnHandle> columns = new ArrayList<>(); while (resultSet.next()) { JdbcTypeHandle typeHandle = new JdbcTypeHandle( resultSet.getInt("DATA_TYPE"), <START> resultSet.getString("TYPE_NAME").contains("UNSIGNED"), <END> resultSet.getInt("COLUMN_SIZE"), resultSet.getInt("DECIMAL_DIGITS")); Optional<ReadMapping> columnMapping = toPrestoType(session, typeHandle); if (columnMapping.isPresent()) { String columnName = resultSet.getString("COLUMN_NAME"); boolean nullable = columnNullable == resultSet.getInt("NULLABLE"); columns.add(new JdbcColumnHandle(connectorId, columnName, typeHandle, columnMapping.get().getType(), nullable)); } } if (columns.isEmpty()) { throw new TableNotFoundException(tableHandle.getSchemaTableName()); } return ImmutableList.copyOf(columns); } } catch (SQLException e) { throw new PrestoException(JDBC_ERROR, e); } }</code><technical_language>yeah. converting upper case sounds better. do that</technical_language>

Target:
public List<JdbcColumnHandle> getColumns(ConnectorSession session, JdbcTableHandle tableHandle) { try (Connection connection = connectionFactory.openConnection(JdbcIdentity.from(session))) { try (ResultSet resultSet = getColumns(tableHandle, connection.getMetaData())) { List<JdbcColumnHandle> columns = new ArrayList<>(); while (resultSet.next()) { JdbcTypeHandle typeHandle = new JdbcTypeHandle( resultSet.getInt("DATA_TYPE"), resultSet.getString("TYPE_NAME").toUpperCase().contains("UNSIGNED"), resultSet.getInt("COLUMN_SIZE"), resultSet.getInt("DECIMAL_DIGITS")); Optional<ReadMapping> columnMapping = toPrestoType(session, typeHandle); if (columnMapping.isPresent()) { String columnName = resultSet.getString("COLUMN_NAME"); boolean nullable = columnNullable == resultSet.getInt("NULLABLE"); columns.add(new JdbcColumnHandle(connectorId, columnName, typeHandle, columnMapping.get().getType(), nullable)); } } if (columns.isEmpty()) { throw new TableNotFoundException(tableHandle.getSchemaTableName()); } return ImmutableList.copyOf(columns); } } catch (SQLException e) { throw new PrestoException(JDBC_ERROR, e); } }
Source:
<code>public HaxeModel resolve(FullyQualifiedInfo info) { if (info.className == null) return this; <START> <END> HaxeClassModel classModel = getClassModel(info.className); if (classModel != null) { if (info.memberName != null) { return classModel.getMember(info.memberName); } return classModel; } return null; }</code><technical_language>a test ensure info package file names reference this file try resolve class member? this reference class name in a file</technical_language>

Target:
public HaxeModel resolve(FullyQualifiedInfo info) { if (isReferencingCurrentFile(info)) { if (info.className == null) return this; HaxeClassModel classModel = getClassModel(info.className); if (classModel != null) { if (info.memberName != null) { return classModel.getMember(info.memberName); } return classModel; } } return null; }
Source:
<code>public void setup() { MockitoAnnotations.initMocks(this); <START> Mockito.doReturn(false).when(ff4j).check(FeatureList.EFFECTIVE_RULE_DATE); <END> }</code><technical_language>This ERD+1Week, is ERD. Is purpose</technical_language>

Target:
public void setup() { MockitoAnnotations.initMocks(this); }
Source:
<code>private void loadNBlocksToOutputStream( Transaction tx, T streamId, long firstBlock, long numBlocks, OutputStream os) { long position = 0; for (long i = 0; i < numBlocks; i += 4) { loadBlocksToOutputStream(tx, streamId, firstBlock + i, 4, os); <START> position += i; <END> } loadBlocksToOutputStream(tx, streamId, firstBlock + position, numBlocks % 4, os); }</code><technical_language>suggestion position = i; want left off. If 9 blocks, this end 12, want 8</technical_language>

Target:
private void loadNBlocksToOutputStream( Transaction tx, T streamId, long firstBlock, long numBlocks, OutputStream os) { long position = 0; for (; position + BLOCK_BATCH <= numBlocks; position += BLOCK_BATCH) { loadBlocksToOutputStream(tx, streamId, firstBlock + position, BLOCK_BATCH, os); } loadBlocksToOutputStream(tx, streamId, firstBlock + position, numBlocks % BLOCK_BATCH, os); }
Source:
<code>public void stop() throws Exception { LOG.info("Stopping the services worker daemon"); Map<String, WorkerPool> workerPools = appContext.getBeansOfType(WorkerPool.class); for (WorkerPool workerPool : workerPools.values()) { workerPool.end(true); <START> appContext.stop(); <END> } }</code><technical_language>Move this line loop</technical_language>

Target:
public void stop() throws Exception { LOG.info("Stopping the services worker daemon"); Map<String, WorkerPool> workerPools = appContext.getBeansOfType(WorkerPool.class); for (WorkerPool workerPool : workerPools.values()) { workerPool.end(true); } appContext.stop(); }
Source:
<code>protected boolean canDoAction() { boolean retValue=true; job = getJobDao().get(getParameters().getParentId()); if (job != null) { if (!job.isExternal()) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_NOT_EXTERNAL); } } else { parentStep = getStepDao().get(getParameters().getParentId()); } if (job == null && parentStep == null) { retValue=false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_NO_PARENT); } <START> if (StringUtils.isEmpty(getParameters().getDescription().trim())) { <END> retValue=false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_EMPTY_DESCRIPTION); } if (!retValue) { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__EXTERNAL_JOB); } return retValue; }</code><technical_language>isBlank well? description whitespace</technical_language>

Target:
protected boolean canDoAction() { boolean retValue=true; job = getJobDao().get(getParameters().getParentId()); if (job != null) { if (!job.isExternal()) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_NOT_EXTERNAL); } } else { parentStep = getStepDao().get(getParameters().getParentId()); } if (job == null && parentStep == null) { retValue=false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_NO_PARENT); } if (StringUtils.isBlank(getParameters().getDescription())) { retValue=false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_EMPTY_DESCRIPTION); } if (!retValue) { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__EXTERNAL_JOB); } return retValue; }
Source:
<code>public static HandshakeMessage fromByteArray(byte[] byteArray, InetSocketAddress peerAddress) throws HandshakeException { <START> if(byteArray == null) { <END> throw new NullPointerException("byte array cannot be null"); } DatagramReader reader = new DatagramReader(byteArray); int curveType = reader.read(CURVE_TYPE_BITS); switch (curveType) { case NAMED_CURVE: int curveId = reader.read(NAMED_CURVE_BITS); int length = reader.read(PUBLIC_LENGTH_BITS); byte[] pointEncoded = reader.readBytes(length); return new EcdhPskServerKeyExchange(curveId, pointEncoded, peerAddress); default: throw new HandshakeException( String.format("Curve type [%s] received in ServerKeyExchange message from peer [%s] is unsupported", curveType, peerAddress), new AlertMessage(AlertLevel.FATAL, AlertDescription.HANDSHAKE_FAILURE, peerAddress)); } }</code><technical_language>whitespace</technical_language>

Target:
public static HandshakeMessage fromByteArray(byte[] byteArray, InetSocketAddress peerAddress) throws HandshakeException { if (byteArray == null) { throw new NullPointerException("byte array cannot be null"); } if (peerAddress == null) { throw new NullPointerException("peer address cannot be null"); } DatagramReader reader = new DatagramReader(byteArray); int hintLength = reader.read(IDENTITY_HINT_LENGTH_BITS); byte[] hintEncoded = reader.readBytes(hintLength); int curveType = reader.read(CURVE_TYPE_BITS); switch (curveType) { case NAMED_CURVE: int curveId = reader.read(NAMED_CURVE_BITS); int length = reader.read(PUBLIC_LENGTH_BITS); byte[] pointEncoded = reader.readBytes(length); return new EcdhPskServerKeyExchange(hintEncoded, curveId, pointEncoded, peerAddress); default: throw new HandshakeException( String.format("Curve type [%s] received in ServerKeyExchange message from peer [%s] is unsupported", curveType, peerAddress), new AlertMessage(AlertLevel.FATAL, AlertDescription.HANDSHAKE_FAILURE, peerAddress)); } }
Source:
<code>public static MultiMap<Type, TypedClassOperation> readSideEffectFreeMethods() { MultiMap<Type, TypedClassOperation> sideEffectFreeJDKMethods; MultiMap<Type, TypedClassOperation> sideEffectFreeUserMethods; try { String sefDefaultsFileName = "/JDK-sef-methods.txt"; InputStream inputStream = GenTests.class.getResourceAsStream(sefDefaultsFileName); sideEffectFreeJDKMethods = OperationModel.readOperations(inputStream, sefDefaultsFileName); sideEffectFreeUserMethods = OperationModel.readOperations(GenInputsAbstract.side_effect_free_methods); } catch (OperationParseException e) { <START> System.out.printf("Incorrectly formatted side-effect-free method: %s%n", e); <END> System.exit(1); throw new Error("dead code"); } MultiMap<Type, TypedClassOperation> result = new MultiMap<>(); result.addAll(sideEffectFreeJDKMethods); result.addAll(sideEffectFreeUserMethods); return result; }</code><technical_language>Please separate try block separate blocks -- for file read. This benefits. 1. error message give file name improperly-formatted method read from. 2. error in "/JDK-sef-methods.txt" a RandoopBug, error in user-supplied file a RandoopUsageError. I is need call System.exit()</technical_language>

Target:
public static MultiMap<Type, TypedClassOperation> readSideEffectFreeMethods() { MultiMap<Type, TypedClassOperation> sideEffectFreeJDKMethods; String sefDefaultsFileName = "/JDK-sef-methods.txt"; try { InputStream inputStream = GenTests.class.getResourceAsStream(sefDefaultsFileName); sideEffectFreeJDKMethods = OperationModel.readOperations(inputStream, sefDefaultsFileName); } catch (RandoopUsageError e) { throw new RandoopBug( String.format("Incorrectly formatted method in file %s: %s%n", sefDefaultsFileName, e)); } MultiMap<Type, TypedClassOperation> sideEffectFreeUserMethods; try { sideEffectFreeUserMethods = OperationModel.readOperations(GenInputsAbstract.side_effect_free_methods); } catch (OperationParseException e) { throw new RandoopUsageError( String.format( "Incorrectly formatted method in file %s: %s%n", GenInputsAbstract.side_effect_free_methods, e)); } MultiMap<Type, TypedClassOperation> result = new MultiMap<>(); result.addAll(sideEffectFreeJDKMethods); result.addAll(sideEffectFreeUserMethods); return result; }
Source:
<code>protected void setupCloudClient() { try { String projectId = getProperty(PROJECT_ID_PROPERTY); GoogleCredentials credentials = GoogleCredentials.fromStream( new ByteArrayInputStream(getProperty(GOOGLE_APPLICATION_CREDENTIALS).getBytes())) .createScoped(GOOGLE_PLATFORM_SCOPE, GOOGLE_STORAGE_SCOPE); credentials.refreshIfExpired(); storage = StorageOptions.newBuilder() .setCredentials(GoogleCredentials.create(credentials.refreshAccessToken())) .setProjectId(projectId) .build() .getService(); bucketName = getProperty(BUCKET_NAME_PROPERTY); <START> bucket = this.getOrCreateBucket(bucketName); <END> } catch (IOException | StorageException e) { throw new NuxeoException(e); } }</code><technical_language>need of this</technical_language>

Target:
protected void setupCloudClient() { try { String projectId = getProperty(PROJECT_ID_PROPERTY); GoogleCredentials credentials = GoogleCredentials.fromStream( new ByteArrayInputStream(getProperty(GOOGLE_APPLICATION_CREDENTIALS).getBytes())) .createScoped(GOOGLE_PLATFORM_SCOPE, GOOGLE_STORAGE_SCOPE); credentials.refreshIfExpired(); storage = StorageOptions.newBuilder() .setCredentials(GoogleCredentials.create(credentials.refreshAccessToken())) .setProjectId(projectId) .build() .getService(); bucketName = getProperty(BUCKET_NAME_PROPERTY); bucketPrefix = getProperty(BUCKET_PREFIX_PROPERTY, EMPTY); bucket = getOrCreateBucket(bucketName); if (!isBlank(bucketPrefix) && !bucketPrefix.endsWith(DELIMITER)) { log.warn(String.format("%s %s Google bucket prefix should end with '/' : added automatically.", BUCKET_PREFIX_PROPERTY, bucketPrefix)); bucketPrefix += DELIMITER; } if (isNotBlank(namespace)) { bucketPrefix += namespace; if (!bucketPrefix.endsWith(DELIMITER)) { bucketPrefix += DELIMITER; } } } catch (IOException e) { throw new NuxeoException(e); } }
Source:
<code>public boolean checkForDuplicates(long mid, long did, String[] fields) { <START> return findNote(mid, fields) != null; <END> }</code><technical_language>fine do IMO. behavior lead annoying bugs filtered decks used</technical_language>

Target:
public boolean checkForDuplicates(long mid, long did, String[] fields) { return findExistingNoteId(mid, fields) != null; }
Source:
<code>public boolean cast(final MagicSpell spell) { if (!ctx.game.tab(Game.Tab.MAGIC)) { return false; } final Component c = component(spell); <START> return c.visible() && (c.click("Cast") || c.click("Reanimate")); <END> }</code><technical_language>c.click(spell.book() == Book.ARCEUUS ? "Reanimate" : "Cast"), otherwise, try click component first, for "Cast", find it, try "Reanimate". need for that</technical_language>

Target:
public boolean cast(final MagicSpell spell) { if (!ctx.game.tab(Game.Tab.MAGIC)) { return false; } final Component c = component(spell); return c.visible() && c.click(spell.book() == Book.ARCEUUS ? "Reanimate" : "Cast"); }
Source:
<code>public DataSet data() { SimpleDataSet result = new SimpleDataSet(metadata()); Config config = DatabaseDescriptor.getRawConfig(); for (Field f : FIELDS) { try { <START> Object value = f.get(config); <END> if (value != null && value.getClass().isArray()) { value = Arrays.toString((Object[]) value); } result.row(f.getName()); if (value != null) result.column(VALUE, value.toString()); } catch (IllegalAccessException | IllegalArgumentException e) { throw new ServerError(e); } } return result; }</code><technical_language>factor out this block a method usable data() implementations. String fieldValue(Field field, Config config)</technical_language>

Target:
public DataSet data() { SimpleDataSet result = new SimpleDataSet(metadata()); for (Field setting : FIELDS.values()) { addValue(result, setting); } return result; }
Source:
<code>public static String removeQueryPrefix(final String luceneQuery){ final String cleanedUpQuery; if(luceneQuery.startsWith("query_")){ <START> cleanedUpQuery = luceneQuery.replace( "query_", "" ); <END> } else { cleanedUpQuery = luceneQuery; } return cleanedUpQuery; }</code><technical_language>replace "" StringPool.BLANK</technical_language>

Target:
public static String removeQueryPrefix(final String luceneQuery){ final String cleanedUpQuery; if(luceneQuery.startsWith("query_")){ cleanedUpQuery = luceneQuery.replace( "query_", StringPool.BLANK); } else { cleanedUpQuery = luceneQuery; } return cleanedUpQuery; }
Source:
<code>private void testSearch() { ______TS("search for nothing"); String searchContent = ""; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isPageTitleCorrect()); assertTrue(isSearchPanelPresent()); assertTrue(isEmptyKeyErrorMessageShown()); ______TS("search for student1"); searchPage.clearSearchBox(); searchContent = "student1"; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isSearchPanelPresent()); assertTrue(isSearchDataDisplayCorrect()); StudentAttributes student = testData.students.get("student1InCourse1"); <START> InstructorAttributes instructor = testData.instructors.get("instructor1OfCourse1"); <END> assertTrue(isStudentDisplayed(student, instructor)); ______TS("search for student name with special characters"); searchPage.clearSearchBox(); searchContent = "student(1)"; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isSearchPanelPresent()); assertTrue(isSearchDataDisplayCorrect()); }</code><technical_language>This test data incorrect. check if is case? instructor 'Manager' role is permissions for a 'Co-owner'. reason this test fails master</technical_language>

Target:
private void testSearch() { ______TS("search for nothing"); String searchContent = ""; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isPageTitleCorrect()); assertTrue(isSearchPanelPresent()); assertTrue(isEmptyKeyErrorMessageShown()); ______TS("search for student1"); searchPage.clearSearchBox(); searchContent = "student1"; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isSearchPanelPresent()); assertTrue(isSearchDataDisplayCorrect()); StudentAttributes student = testData.students.get("student1InCourse1"); InstructorAttributes instructor = testData.instructors.get("instructor1OfCourse1"); assertTrue(isStudentRowDisplayed(student, instructor)); ______TS("search for student name with special characters"); searchPage.clearSearchBox(); searchContent = "student(1)"; searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); assertTrue(isSearchPanelPresent()); assertTrue(isSearchDataDisplayCorrect()); }
Source:
<code>private void reportSchedulingError(@Nonnull Run<?, ?> run, @Nonnull Job<?, ?> jobToTrigger, @Nonnull BuildListener listener) { listener.error("Skipping " + jobToTrigger.getFullName() + "..."); if (LOGGER.isLoggable(Level.CONFIG)) { String message = String.format("Cannot schedule project %s. Job type is not parameterized, " <START> + "or there is no Item/Build permission for the current authentication %s. " <END> + "Skipping...", jobToTrigger, Jenkins.getAuthentication().getName()); LOGGER.log(Level.CONFIG, String.format("%s: %s", run, message), new UnsupportedOperationException("Cannot schedule job " + jobToTrigger.getFullName())); } }</code><technical_language>I mentioned previously, Item/Build is nonexistent. Java constant is Item.BUILD. permission displayed in UI is Job/Build</technical_language>

Target:
private void reportSchedulingError(@Nonnull Run<?, ?> run, @Nonnull Job<?, ?> jobToTrigger, @Nonnull BuildListener listener) { listener.error("Skipping " + jobToTrigger.getFullName() + "..."); if (LOGGER.isLoggable(Level.CONFIG)) { String message = String.format("Cannot schedule project %s. Job type is not parameterized, " + "or there is no Job/Build permission for the current authentication %s. " + "Skipping...", jobToTrigger, Jenkins.getAuthentication().getName()); LOGGER.log(Level.CONFIG, String.format("%s: %s", run, message), new UnsupportedOperationException("Cannot schedule job " + jobToTrigger.getFullName())); } }
Source:
<code>private EvaluationContext(EvaluationContext base, DataInstance instance, TreeReference contextNode, Hashtable<String, DataInstance> formInstances) { this.functionHandlers = base.functionHandlers; this.formInstances = formInstances; this.variables = new Hashtable<>(); this.shallowVariablesCopy(base.variables); this.contextNode = contextNode; this.instance = instance; this.isConstraint = base.isConstraint; this.candidateValue = base.candidateValue; this.outputTextForm = base.outputTextForm; this.original = base.original; this.currentContextPosition = base.currentContextPosition; if (base.mAccumulateExprs) { this.mAccumulateExprs = true; this.mDebugCore = base.mDebugCore; } <START> this.queryContext = base.queryContext; <END> queryContext.setTraceRoot(this); }</code><technical_language>replace 2 lines a call setQueryContext(base.queryContext)</technical_language>

Target:
private EvaluationContext(EvaluationContext base, DataInstance instance, TreeReference contextNode, Hashtable<String, DataInstance> formInstances) { this.functionHandlers = base.functionHandlers; this.formInstances = formInstances; this.variables = new Hashtable<>(); this.shallowVariablesCopy(base.variables); this.contextNode = contextNode; this.instance = instance; this.isConstraint = base.isConstraint; this.candidateValue = base.candidateValue; this.outputTextForm = base.outputTextForm; this.original = base.original; this.currentContextPosition = base.currentContextPosition; if (base.mAccumulateExprs) { this.mAccumulateExprs = true; this.mDebugCore = base.mDebugCore; } setQueryContext(base.queryContext); }
Source:
<code>public Ordering<Row> getRowOrdering(final boolean granular) { final boolean sortByDimsFirst = getContextSortByDimsFirst(); final Comparator naturalNullsFirst = Ordering.natural().nullsFirst(); return Ordering.from( new Comparator<Row>() { @Override public int compare(Row lhs, Row rhs) { final int timeCompare; if (granular) { timeCompare = Longs.compare( granularity.truncate(lhs.getTimestampFromEpoch()), granularity.truncate(rhs.getTimestampFromEpoch()) ); } else { timeCompare = Longs.compare( lhs.getTimestampFromEpoch(), rhs.getTimestampFromEpoch() ); } if (!sortByDimsFirst && timeCompare != 0) { return timeCompare; } for (DimensionSpec dimension : dimensions) { final int dimCompare = naturalNullsFirst.compare( lhs.getRaw(dimension.getOutputName()), rhs.getRaw(dimension.getOutputName()) ); if (dimCompare != 0) { return dimCompare; } } <START> if (sortByDimsFirst && timeCompare != 0) { <END> return timeCompare; } return 0; } } ); }</code><technical_language>This line next 5 lines replaced return timeCompare;</technical_language>

Target:
public Ordering<Row> getRowOrdering(final boolean granular) { final boolean sortByDimsFirst = getContextSortByDimsFirst(); final Comparator<Row> timeComparator = getTimeComparator(granular); if (sortByDimsFirst) { return Ordering.from( new Comparator<Row>() { @Override public int compare(Row lhs, Row rhs) { final int cmp = compareDims(dimensions, lhs, rhs); if (cmp != 0) { return cmp; } return timeComparator.compare(lhs, rhs); } } ); } else { return Ordering.from( new Comparator<Row>() { @Override public int compare(Row lhs, Row rhs) { final int timeCompare = timeComparator.compare(lhs, rhs); if (timeCompare != 0) { return timeCompare; } return compareDims(dimensions, lhs, rhs); } } ); } }
Source:
<code>StringBuilder buildQueryString(List<Object> variables, CodecRegistry codecRegistry) { StringBuilder builder = new StringBuilder(); builder.append("SELECT "); if (isJson) builder.append("JSON "); if (isDistinct) builder.append("DISTINCT "); if (columnNames == null) { builder.append('*'); } else { Utils.joinAndAppendNames(builder, codecRegistry, columnNames); } builder.append(" FROM "); if (keyspace != null) Utils.appendName(keyspace, builder).append('.'); Utils.appendName(table, builder); if (!where.clauses.isEmpty()) { builder.append(" WHERE "); Utils.joinAndAppend(builder, codecRegistry, " AND ", where.clauses, variables); } <START> if (orderings != null && !orderings.isEmpty()) { <END> builder.append(" ORDER BY "); Utils.joinAndAppend(builder, codecRegistry, ",", orderings, variables); } if (perPartitionLimit != null) { builder.append(" PER PARTITION LIMIT ").append(perPartitionLimit); } if (limit != null) { builder.append(" LIMIT ").append(limit); } if (allowFiltering) { builder.append(" ALLOW FILTERING"); } return builder; }</code><technical_language>I silently ignore if user calls QueryBuilder methods valid create a CQL query. If argument in orderBy method is correct for a CQL query throw exception. is done for other query builder methods, limit() if argument is valid for Cassandra (limit < 0), ignore creating query</technical_language>

Target:
StringBuilder buildQueryString(List<Object> variables, CodecRegistry codecRegistry) { StringBuilder builder = new StringBuilder(); builder.append("SELECT "); if (isJson) builder.append("JSON "); if (isDistinct) builder.append("DISTINCT "); if (columnNames == null) { builder.append('*'); } else { Utils.joinAndAppendNames(builder, codecRegistry, columnNames); } builder.append(" FROM "); if (keyspace != null) Utils.appendName(keyspace, builder).append('.'); Utils.appendName(table, builder); if (!where.clauses.isEmpty()) { builder.append(" WHERE "); Utils.joinAndAppend(builder, codecRegistry, " AND ", where.clauses, variables); } if (groupByColumnNames != null) { builder.append(" GROUP BY "); Utils.joinAndAppendNames(builder, codecRegistry, groupByColumnNames); } if (orderings != null) { builder.append(" ORDER BY "); Utils.joinAndAppend(builder, codecRegistry, ",", orderings, variables); } if (perPartitionLimit != null) { builder.append(" PER PARTITION LIMIT ").append(perPartitionLimit); } if (limit != null) { builder.append(" LIMIT ").append(limit); } if (allowFiltering) { builder.append(" ALLOW FILTERING"); } return builder; }
Source:
<code>protected void doStart() throws Exception { ObjectHelper.notNull(executorService, "executorService", this); ObjectHelper.notNull(scheduledExecutorService, "scheduledExecutorService", this); ObjectHelper.notNull(endpoint, "endpoint", this); log.trace("Using timeout checker interval with millis", endpoint.getRequestTimeoutCheckerInterval()); <START> TimeoutMap<String, ReplyHandler> timeoutMap = new DefaultTimeoutMap<>(scheduledExecutorService, endpoint.getRequestTimeoutCheckerInterval()); <END> correlation = new CorrelationTimeoutMap(timeoutMap, executorService); ServiceHelper.startService(correlation); listenerContainer = createListenerContainer(); listenerContainer.afterPropertiesSet(); log.debug("Starting reply listener container on endpoint: {}", endpoint); endpoint.onListenerContainerStarting(listenerContainer); listenerContainer.start(); }</code><technical_language>a bit map in map in map ;). if avoid delegate/wrapping, extend DefaultTimeoutMap</technical_language>

Target:
protected void doStart() throws Exception { ObjectHelper.notNull(executorService, "executorService", this); ObjectHelper.notNull(scheduledExecutorService, "scheduledExecutorService", this); ObjectHelper.notNull(endpoint, "endpoint", this); log.trace("Using timeout checker interval with millis", endpoint.getRequestTimeoutCheckerInterval()); correlation = new CorrelationTimeoutMap(scheduledExecutorService, endpoint.getRequestTimeoutCheckerInterval(), executorService); ServiceHelper.startService(correlation); listenerContainer = createListenerContainer(); listenerContainer.afterPropertiesSet(); log.debug("Starting reply listener container on endpoint: {}", endpoint); endpoint.onListenerContainerStarting(listenerContainer); listenerContainer.start(); }
Source:
<code>public Predicate<String> create(final String resourceGroup, final boolean shouldBePresent) { checkNotNull(resourceGroup, "resourceGroup cannot be null"); return retry(new Predicate<String>() { @Override public boolean apply(final String name) { checkNotNull(name, "name cannot be null"); boolean present = false; <START> checkNotNull(name, "name cannot be null"); <END> List<Vault.DeletedVault> vaults = api.getVaultApi(resourceGroup).listDeletedVaults(); for (Vault.DeletedVault dv : vaults) { if (dv.name().equals(name)) { present = true; break; } } return present == shouldBePresent; } }, operationTimeout, initialPeriod, maxPeriod); }</code><technical_language>Duplicate check</technical_language>

Target:
public Predicate<String> create(final String resourceGroup, final boolean shouldBePresent) { checkNotNull(resourceGroup, "resourceGroup cannot be null"); return retry(new Predicate<String>() { @Override public boolean apply(final String name) { checkNotNull(name, "name cannot be null"); boolean present = false; List<Vault.DeletedVault> vaults = api.getVaultApi(resourceGroup).listDeletedVaults(); return shouldBePresent == Iterables.any(vaults, new Predicate<Vault.DeletedVault>() { @Override public boolean apply(Vault.DeletedVault input) { return input.name().equals(name); } }); } }, operationTimeout, initialPeriod, maxPeriod); }
Source:
<code>public void testDecode() throws Exception { GpsmtaProtocolDecoder decoder = new GpsmtaProtocolDecoder(new GpsmtaProtocol()); verifyPosition(decoder, text( "3085a94ef459 1446536867 49.81621 24.054207 1 0 22 0 10 12 24 0 0")); verifyPosition(decoder, text( "864528021249771 1446116686 49.85073 24.004438 0 217 6 338 00 59 27 0 0")); verifyPosition(decoder, text( "359144048138856 1442932957 49.85064 24.003979 1 0 40 0 10 110 26 0 0")); verifyPosition(decoder, text( "359144048138856 1442932957 -49.85064 24.003979 1 0 40 0 10 110 26 0 0")); <START> verifyPosition(decoder, text( <END> "359144048138856 1442932957 49.85064 -24.003979 1 0 40 0 10 110 26 0 0")); verifyPosition(decoder, text( "359144048138856 1442932957 -49.85064 -24.003979 1 0 40 0 10 110 26 0 0")); }</code><technical_language>I need tests for combinations. enough</technical_language>

Target:
public void testDecode() throws Exception { GpsmtaProtocolDecoder decoder = new GpsmtaProtocolDecoder(new GpsmtaProtocol()); verifyPosition(decoder, text( "3085a94ef459 1446536867 49.81621 24.054207 1 0 22 0 10 12 24 0 0")); verifyPosition(decoder, text( "864528021249771 1446116686 49.85073 24.004438 0 217 6 338 00 59 27 0 0")); verifyPosition(decoder, text( "359144048138856 1442932957 -49.85064 -24.003979 1 0 40 0 10 110 26 0 0")); }
Source:
<code>public static Matcher<Object> visible() { return new BaseMatcher<Object>() { @Override public boolean matches(Object item) { <START> if (item != null && item instanceof DialogFixture) <END> return ((DialogFixture) item).target().isVisible(); if (item != null && item instanceof JDialog) return ((JDialog) item).isVisible(); if (item != null && item instanceof JFileChooserFixture) return ((JFileChooserFixture) item).target().isVisible(); throw new RuntimeException("Invalid matcher for " + item); } @Override public void describeTo(Description description) { description.appendText("visible"); } }; }</code><technical_language>remove null checks</technical_language>

Target:
public static Matcher<Object> visible() { return new BaseMatcher<Object>() { @Override public boolean matches(Object item) { if (item instanceof DialogFixture) return ((DialogFixture) item).target().isVisible(); if (item instanceof JDialog) return ((JDialog) item).isVisible(); if (item instanceof JFileChooserFixture) return ((JFileChooserFixture) item).target().isVisible(); throw new RuntimeException("Invalid matcher for " + item); } @Override public void describeTo(Description description) { description.appendText("visible"); } }; }
Source:
<code>public boolean createChannelIfAbsent(String originator, TaskId taskid, String name, boolean isPersistent) throws IOException { if (inMemoryChannels.containsKey(name) || persistedChannels.containsKey(name)) { return false; } else { <START> createChannel(originator, taskid, name, isPersistent); <END> return true; } }</code><technical_language>return return of createChannel here</technical_language>

Target:
public boolean createChannelIfAbsent(String originator, TaskId taskid, String name, boolean isPersistent) throws IOException { if (inMemoryChannels.containsKey(name) || persistedChannels.containsKey(name)) { return false; } else { return createChannel(originator, taskid, name, isPersistent); } }
Source:
<code>public void setTextColor(Integer textColor) { <START> this.mTextColor = textColor; <END> }</code><technical_language>need this, sice m prefix for fields :)</technical_language>

Target:
public void setTextColor(Integer textColor) { mTextColor = textColor; }
Source:
<code>protected Function<Trigger, Pipeline> buildTrigger(Pipeline pipeline, TriggerEvent event) { DockerEvent dockerEvent = (DockerEvent) event; DockerEvent.Content content = dockerEvent.getContent(); String name = content.getRegistry() + "/" + content.getRepository(); <START> String reference = name + ":" + content.getTag(); <END> List<Artifact> artifacts = Collections.singletonList(Artifact.builder() .type("docker/image") .name(name) .version(content.getTag()) .location(reference) .reference(reference) .build()); return trigger -> pipeline.withTrigger(trigger.atTag(content.getTag())) .withReceivedArtifacts(artifacts); }</code><technical_language>registry, repository tag present a DockerEvent</technical_language>

Target:
protected Function<Trigger, Pipeline> buildTrigger(Pipeline pipeline, TriggerEvent event) { DockerEvent dockerEvent = (DockerEvent) event; return trigger -> pipeline.withTrigger(trigger.atTag(dockerEvent.getContent().getTag())) .withReceivedArtifacts(getArtifacts(dockerEvent)); }