auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setUp() { MockitoAnnotations.initMocks(this); rdfSourceOperationFactory = new RdfSourceOperationFactoryImpl(); setField(createResourceService, "rdfSourceOperationFactory", rdfSourceOperationFactory); nonRdfSourceOperationFactory = new NonRdfSourceOperationFactoryImpl(); setField(createResourceService, "nonRdfSourceOperationFactory", nonRdfSourceOperationFactory); setField(createResourceService, "containmentIndex", containmentIndex); createResourceService.eventAccumulator = eventAccumulator; when(psManager.getSession(ArgumentMatchers.any())).thenReturn(psSession); when(extContent.getURL()).thenReturn(EXTERNAL_URL); when(extContent.getHandling()).thenReturn(ExternalContent.PROXY); when(extContent.getContentType()).thenReturn(EXTERNAL_CONTENT_TYPE); when(transaction.getId()).thenReturn(TX_ID); cleanupList.add(FedoraId.getRepositoryRootId()); }

Target:
public void setUp() { MockitoAnnotations.initMocks(this); rdfSourceOperationFactory = new RdfSourceOperationFactoryImpl(); setField(createResourceService, "rdfSourceOperationFactory", rdfSourceOperationFactory); nonRdfSourceOperationFactory = new NonRdfSourceOperationFactoryImpl(); setField(createResourceService, "nonRdfSourceOperationFactory", nonRdfSourceOperationFactory); setField(createResourceService, "containmentIndex", containmentIndex); setField(createResourceService, "eventAccumulator", eventAccumulator); when(psManager.getSession(ArgumentMatchers.any())).thenReturn(psSession); when(extContent.getURL()).thenReturn(EXTERNAL_URL); when(extContent.getHandling()).thenReturn(ExternalContent.PROXY); when(extContent.getContentType()).thenReturn(EXTERNAL_CONTENT_TYPE); when(transaction.getId()).thenReturn(TX_ID); cleanupList.add(FedoraId.getRepositoryRootId()); }
Source:
protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); synchronized (mutex) { outState.putBoolean("_isCurrentUser", isCurrentUser); } }

Target:
protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); synchronized (mutex) { outState.putBoolean(PARCEL_KEY_IS_CURRENT_USER, isCurrentUser); } }
Source:
public String stringify() { return StringUtils.format( "%s(%s)", name, Joiner.on(", ").join(args.stream().map(Expr::stringify).iterator()) ); }

Target:
public String stringify() { return StringUtils.format( "%s(%s)", name, Expr.ARG_JOINER.join(args.stream().map(Expr::stringify).iterator()) ); }
Source:
private void updateProjecterState(String deviceId) { long age = System.currentTimeMillis() - lastProjectorStateUpdateTime; boolean needsUpdate = age >= projectorStateUpdateInterval; if (needsUpdate) { logger.debug("Quering projector '{}' state", deviceId); OnOffType newState = (OnOffType) queryDataFromDevice(deviceId, EpsonProjectorCommandType.POWER, SwitchItem.class); updateProjecterStateVariable(newState); } }

Target:
private void updateProjecterState(String deviceId) { long age = System.currentTimeMillis() - lastProjectorStateUpdateTime; boolean needsUpdate = age >= projectorStateUpdateInterval; if (needsUpdate) { logger.debug("Querying projector '{}' state", deviceId); OnOffType newState = (OnOffType) queryDataFromDevice(deviceId, EpsonProjectorCommandType.POWER, SwitchItem.class); updateProjecterStateVariable(newState); } }
Source:
private void mergeLocalToBuilder() { if (id != null) { builder.setId(this.id.getProto()); } if (fragments != null) { for (FragmentProto fragment : fragments) { builder.addFragments(fragment); } } if (this.outputTable != null) { builder.setOutputTable(this.outputTable); } if (this.isUpdated) { builder.setClusteredOutput(this.clusteredOutput); } if (this.plan != null) { builder.setPlan(this.plan); } if (this.interQuery != null) { builder.setInterQuery(this.interQuery); } if (this.fetches != null) { for (FetchImpl fetche : fetches) { builder.addFetches(fetche.getProto()); } } if (this.queryMasterHostAndPort != null) { builder.setQueryMasterHostAndPort(this.queryMasterHostAndPort); } if (this.queryContext != null) { builder.setQueryContext(queryContext.getProto()); } if (this.dataChannel != null) { builder.setDataChannel(dataChannel.getProto()); } if (this.enforcer != null) { builder.setEnforcer(enforcer.getProto()); } }

Target:
private void mergeLocalToBuilder() { if (id != null) { builder.setId(this.id.getProto()); } if (fragments != null) { for (FragmentProto fragment : fragments) { builder.addFragments(fragment); } } if (this.outputTable != null) { builder.setOutputTable(this.outputTable); } if (this.isUpdated) { builder.setClusteredOutput(this.clusteredOutput); } if (this.plan != null) { builder.setPlan(this.plan); } if (this.interQuery != null) { builder.setInterQuery(this.interQuery); } if (this.fetches != null) { for (FetchProto fetch : fetches) { builder.addFetches(fetch); } } if (this.queryMasterHostAndPort != null) { builder.setQueryMasterHostAndPort(this.queryMasterHostAndPort); } if (this.queryContext != null) { builder.setQueryContext(queryContext.getProto()); } if (this.dataChannel != null) { builder.setDataChannel(dataChannel.getProto()); } if (this.enforcer != null) { builder.setEnforcer(enforcer.getProto()); } }
Source:
public Operation operationDispatched(Request request, Operation operation) { boolean isJsonLd = request.getKvp().get("f") != null && request.getKvp().get("f").equals(JSONLDGetFeatureResponse.MIME) ? true : false; if (request.getHttpRequest().getServletPath().equals("/ogc") && isJsonLd) { try { String strFilter = (String) request.getKvp().get("FILTER"); if (strFilter != null && strFilter.indexOf(".") != -1) { FeatureTypeInfo typeInfo = getFeatureType((String) operation.getParameters()[0]); RootBuilder root = configuration.getTemplate(typeInfo); if (root != null) { JsonLdPathVisitor visitor = new JsonLdPathVisitor(typeInfo.getFeatureType()); Filter f = (Filter) XCQL.toFilter(strFilter).accept(visitor, root); String newFilter = ECQL.toCQL(f).replaceAll("\"", "").replaceAll("/", "."); newFilter = ExpressionsUtils.workXpathAttributeSyntax(newFilter); for (int i = 0; i < operation.getParameters().length; i++) { Object p = operation.getParameters()[i]; if (p != null && ((String.valueOf(p)).trim().equals(strFilter.trim()))) { operation.getParameters()[i] = newFilter; break; } } } } } catch (Exception e) { throw new RuntimeException(e); } } return super.operationDispatched(request, operation); }

Target:
public Operation operationDispatched(Request request, Operation operation) { if ("FEATURES".equalsIgnoreCase(request.getService()) && isJsonLdMIME(request)) { try { String filterLang = (String) request.getKvp().get("FILTER-LANG"); if (filterLang != null && filterLang.equalsIgnoreCase("CQL-TEXT")) { String filter = (String) request.getKvp().get("FILTER"); replaceJsonLdPathWithFilter(filter, operation); } } catch (Exception e) { throw new RuntimeException(e); } } return super.operationDispatched(request, operation); }
Source:
public static String getAppVersion() { URL url = ApplicationUtils.class.getClassLoader().getResource(APP_VERSION_FILENAME); String version = "UNKNOWN"; InputStream is = null; try { is = url.openStream(); BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { String[] pairs = Pattern.compile("=").split(line); if (pairs[0].equals("version")) { version = pairs[1]; } } } } catch (IOException ex) { Exceptions.printStackTrace(ex); } finally { IOUtils.closeQuietly(is); } return version; }

Target:
public static String getAppVersion() { return APP_VERSION; }
Source:
public HTableDescriptor generateDefaultSIGovernedTable(String tableName){ HTableDescriptor desc=new HTableDescriptor(TableName.valueOf(namespace,tableName)); desc.setPriority(110); desc.addFamily(createDataFamily()); return desc; }

Target:
public HTableDescriptor generateDefaultSIGovernedTable(String tableName){ HTableDescriptor desc=new HTableDescriptor(TableName.valueOf(namespace,tableName)); desc.setPriority(TABLE_PRIORITY); desc.addFamily(createDataFamily()); return desc; }
Source:
public void onEvent(StatusUpdateEvent event, long sequence, boolean endOfBatch) throws Exception { TaskStatus status = event.getStatus(); this.schedulerState.updateTask(status); TaskID taskId = status.getTaskId(); NodeTask task = schedulerState.getTask(taskId); if (task == null) { LOGGER.warn("Task: not found, status: {}", taskId.getValue(), status.getState()); schedulerState.removeTask(taskId); return; } LOGGER.info("Status Update for task: | state: {}", taskId.getValue(), status.getState()); TaskState state = status.getState(); switch (state) { case TASK_STAGING: schedulerState.makeTaskStaging(taskId); break; case TASK_STARTING: schedulerState.makeTaskStaging(taskId); break; case TASK_RUNNING: schedulerState.makeTaskActive(taskId); break; case TASK_FINISHED: offerLifecycleManager.declineOutstandingOffers(task.getHostname()); schedulerState.removeTask(taskId); break; case TASK_FAILED: offerLifecycleManager.declineOutstandingOffers(task.getHostname()); if (taskIsKillable(taskId)) { schedulerState.removeTask(taskId); LOGGER.info("Removed killable, failed task with id {}", taskId); } else { schedulerState.makeTaskPending(taskId); } break; case TASK_KILLED: offerLifecycleManager.declineOutstandingOffers(task.getHostname()); schedulerState.removeTask(taskId); LOGGER.info("Removed killed task with id {}", taskId); break; case TASK_LOST: offerLifecycleManager.declineOutstandingOffers(task.getHostname()); if (taskIsKillable(taskId)) { schedulerState.removeTask(taskId); LOGGER.info("Removed killable, lost task with id {}", taskId); } else { schedulerState.makeTaskPending(taskId); LOGGER.info("Marked as pending lost task with id {}", taskId); } break; default: LOGGER.error("Invalid state: {}", state); break; } }

Target:
public void onEvent(StatusUpdateEvent event, long sequence, boolean endOfBatch) throws Exception { TaskStatus status = event.getStatus(); this.schedulerState.updateTask(status); TaskID taskId = status.getTaskId(); NodeTask task = schedulerState.getTask(taskId); if (task == null) { LOGGER.warn("Task: not found, status: {}", taskId.getValue(), status.getState()); schedulerState.removeTask(taskId); return; } LOGGER.info("Status Update for task: | state: {}", taskId.getValue(), status.getState()); TaskState state = status.getState(); switch (state) { case TASK_STAGING: schedulerState.makeTaskStaging(taskId); break; case TASK_STARTING: schedulerState.makeTaskStaging(taskId); break; case TASK_RUNNING: schedulerState.makeTaskActive(taskId); break; case TASK_FINISHED: cleanupTask(taskId, task, "finished"); break; case TASK_FAILED: cleanupFailedTask(taskId, task, "failed"); break; case TASK_KILLED: cleanupTask(taskId, task, "killed"); break; case TASK_LOST: cleanupFailedTask(taskId, task, "lost"); break; default: LOGGER.error("Invalid state: {}", state); break; } }
Source:
public PatchScript call() throws OrmException, NoSuchChangeException { validatePatchSetId(psa); validatePatchSetId(psb); control = changeControlFactory.validateFor(changeId); change = control.getChange(); ReviewDb db = schemaFactory.open(); patchSet = db.patchSets().get(patchSetId); if (patchSet == null) { throw new NoSuchChangeException(changeId); } projectKey = change.getProject(); aId = psa != null ? toObjectId(db, psa) : null; bId = toObjectId(db, psb); try { git = repoManager.openRepository(projectKey.get()); } catch (RepositoryNotFoundException e) { log.error("Repository " + projectKey + " not found", e); throw new NoSuchChangeException(changeId, e); } final String fileName = patchKey.getFileName(); try { final PatchList list = listFor(keyFor(settings.getWhitespace())); final PatchScriptBuilder b = newBuilder(list); final PatchListEntry contentWS = list.get(fileName); final CommentDetail comments = allComments(db); final PatchListEntry contentActual; if (settings.getWhitespace() == Whitespace.IGNORE_NONE) { contentActual = contentWS; } else { contentActual = listFor(keyFor(Whitespace.IGNORE_NONE)).get(fileName); } try { return b.toPatchScript(contentWS, comments, contentActual); } catch (IOException e) { log.error("File content unavailable", e); throw new NoSuchChangeException(changeId, e); } } finally { git.close(); db.close(); } }

Target:
public PatchScript call() throws OrmException, NoSuchChangeException { validatePatchSetId(psa); validatePatchSetId(psb); control = changeControlFactory.validateFor(changeId); change = control.getChange(); ReviewDb db = null; try { db = schemaFactory.open(); patchSet = db.patchSets().get(patchSetId); if (patchSet == null) { throw new NoSuchChangeException(changeId); } projectKey = change.getProject(); aId = psa != null ? toObjectId(db, psa) : null; bId = toObjectId(db, psb); try { git = repoManager.openRepository(projectKey.get()); } catch (RepositoryNotFoundException e) { log.error("Repository " + projectKey + " not found", e); throw new NoSuchChangeException(changeId, e); } final String fileName = patchKey.getFileName(); try { final PatchList list = listFor(keyFor(settings.getWhitespace())); final PatchScriptBuilder b = newBuilder(list); final PatchListEntry contentWS = list.get(fileName); final CommentDetail comments = allComments(db); final PatchListEntry contentActual; if (settings.getWhitespace() == Whitespace.IGNORE_NONE) { contentActual = contentWS; } else { contentActual = listFor(keyFor(Whitespace.IGNORE_NONE)).get(fileName); } try { return b.toPatchScript(contentWS, comments, contentActual); } catch (IOException e) { log.error("File content unavailable", e); throw new NoSuchChangeException(changeId, e); } } finally { git.close(); } } finally { if (db != null) { db.close(); } } }
Source:
public RowMapper<T> specialize(ResultSet rs, StatementContext ctx) throws SQLException { final List<String> columnNames = getColumnNames(rs); final List<ColumnNameMatcher> columnNameMatchers = ctx.getConfig(ReflectionMappers.class).getColumnNameMatchers(); final List<String> unmatchedColumns = new ArrayList<>(columnNames); RowMapper<T> mapper = specialize0(ctx, columnNames, columnNameMatchers, unmatchedColumns) .orElseThrow(() -> new IllegalArgumentException(String.format( UNMATCHED_CONSTRUCTOR_PARAMETERS, factory))); if (ctx.getConfig(ReflectionMappers.class).isStrictMatching() && anyColumnsStartWithPrefix(unmatchedColumns, prefix, columnNameMatchers)) { throw new IllegalArgumentException( String.format(UNMATCHED_COLUMNS_STRICT, factory.getDeclaringClass().getSimpleName(), unmatchedColumns)); } return mapper; }

Target:
public RowMapper<T> specialize(ResultSet rs, StatementContext ctx) throws SQLException { final List<String> columnNames = getColumnNames(rs); final List<ColumnNameMatcher> columnNameMatchers = ctx.getConfig(ReflectionMappers.class).getColumnNameMatchers(); final List<String> unmatchedColumns = new ArrayList<>(columnNames); RowMapper<T> mapper = specialize0(ctx, columnNames, columnNameMatchers, unmatchedColumns) .orElseThrow(() -> new IllegalArgumentException(String.format( UNMATCHED_CONSTRUCTOR_PARAMETERS, factory))); if (ctx.getConfig(ReflectionMappers.class).isStrictMatching() && anyColumnsStartWithPrefix(unmatchedColumns, prefix, columnNameMatchers)) { throw new IllegalArgumentException( String.format(UNMATCHED_COLUMNS_STRICT, factory, unmatchedColumns)); } return mapper; }
Source:
public static String getControlledVocabulariesDisplayValueLocalized(Item item, DCValue[] values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException{ String toReturn=""; DCInput myInputs = null; boolean myInputsFound=false; String formFileName = I18nUtil.getInputFormsFileName(locale); DCInputSet inputSet = null; DCInputsReader inputsReader = null; String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection==null) { col_handle = "db-id/" + item.getID(); } else { col_handle = collection.getHandle(); } if (inputsReader == null) { inputsReader = new DCInputsReader(formFileName); } inputSet = inputsReader.getInputs(col_handle); String currentField = schema+"."+element+(qualifier==null?"":"."+qualifier); if (inputSet!=null){ int pageNums= inputSet.getNumberPages(); for (int p=0;p<pageNums;p++){ DCInput[] inputs = inputSet.getPageRows(p, false, false); if (inputs!=null){ for (int i=0; i<inputs.length;i++){ String inputField=inputs[i].getSchema()+"."+inputs[i].getElement()+(inputs[i].getQualifier()==null?"":"."+inputs[i].getQualifier()); if (currentField.equals(inputField)){ myInputs = inputs[i]; myInputsFound=true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (int j = 0; j < values.length; j++){ String pairsName = myInputs.getPairsType(); String stored_value = values[j].value; String displayVal = myInputs.getDisplayString(pairsName,stored_value); if (displayVal!=null && !"".equals(displayVal)){ return displayVal; } } } return toReturn; }

Target:
public static List<String> getControlledVocabulariesDisplayValueLocalized( Item item, DCValue[] values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException { List<String> toReturn = new ArrayList<String>(); DCInput myInputs = null; boolean myInputsFound = false; String formFileName = I18nUtil.getInputFormsFileName(locale); String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection == null) { col_handle = ""; } else { col_handle = collection.getHandle(); } DCInputsReader inputsReader = new DCInputsReader(formFileName); DCInputSet inputSet = inputsReader.getInputs(col_handle); String currentField = schema + "." + element + (qualifier == null ? "" : "." + qualifier); if (inputSet != null) { int pageNums = inputSet.getNumberPages(); for (int p = 0; p < pageNums; p++) { DCInput[] inputs = inputSet.getPageRows(p, false, false); if (inputs != null) { for (int i = 0; i < inputs.length; i++) { String inputField = inputs[i].getSchema() + "." + inputs[i].getElement() + (inputs[i].getQualifier() == null ? "" : "." + inputs[i].getQualifier()); if (currentField.equals(inputField)) { myInputs = inputs[i]; myInputsFound = true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (int j = 0; j < values.length; j++) { String pairsName = myInputs.getPairsType(); String stored_value = values[j].value; String displayVal = myInputs.getDisplayString(pairsName, stored_value); if (displayVal != null && !"".equals(displayVal)) { toReturn.add(displayVal); } } } return toReturn; }
Source:
public HaxeComponentName getComponentName() { return null; }

Target:
public HaxeComponentName getComponentName() { final PsiIdentifier identifier = getNameIdentifier(); return identifier != null ? new HaxeComponentNameImpl(getNode()) : null; }
Source:
final IntPair newSnake(int k, int x) { return new IntPair(x, k+x); }

Target:
final long newSnake(int k, int x) { long ret=((long)x)<<32; return(ret | (k+x)); }
Source:
public void onAutomatedTransferStatusChecked(OnAutomatedTransferStatusChecked event) { if (isFinishing()) { return; } if (event.isError()) { handleAutomatedTransferFailed(event.error.message); } else { if (event.isCompleted) { mAutomatedTransferProgressDialog.setProgress(99); mDispatcher.dispatch(SiteActionBuilder.newFetchSiteAction(mSite)); } else { mAutomatedTransferProgressDialog.setProgress(event.currentStep * 100 / event.totalSteps); mHandler.postDelayed(new Runnable() { @Override public void run() { mDispatcher.dispatch(SiteActionBuilder.newCheckAutomatedTransferStatusAction(mSite)); } }, 1000); } } }

Target:
public void onAutomatedTransferStatusChecked(OnAutomatedTransferStatusChecked event) { if (isFinishing()) { return; } if (event.isError()) { handleAutomatedTransferFailed(event.error.message); } else { if (event.isCompleted) { mAutomatedTransferProgressDialog.setProgress(99); mDispatcher.dispatch(SiteActionBuilder.newFetchSiteAction(mSite)); } else { mAutomatedTransferProgressDialog.setProgress(event.currentStep * 100 / event.totalSteps); mHandler.postDelayed(new Runnable() { @Override public void run() { mDispatcher.dispatch(SiteActionBuilder.newCheckAutomatedTransferStatusAction(mSite)); } }, 3000); } } }
Source:
public void remove(Map<String, Object> input){ if(pathElement instanceof LiteralPathElement){ removeLiterals(input); }else{ removeComputed(input); } }

Target:
public void remove(Map<String, Object> input){ if(pathElement instanceof LiteralPathElement){ handleLiterals(input); }else{ handleComputed(input); } }
Source:
private void verifyClaims(DecodedJWT jwt, Map<String, Object> claims) throws TokenExpiredException, InvalidClaimException { for (Map.Entry<String, Object> entry : claims.entrySet()) { switch (entry.getKey()) { case PublicClaims.AUDIENCE: assertValidAudienceClaim(jwt.getAudience(), Arrays.asList((String[]) entry.getValue())); break; case PublicClaims.EXPIRES_AT: assertValidDateClaim(jwt.getExpiresAt(), (Long) entry.getValue(), true); break; case PublicClaims.ISSUED_AT: assertValidDateClaim(jwt.getIssuedAt(), (Long) entry.getValue(), false); break; case PublicClaims.NOT_BEFORE: assertValidDateClaim(jwt.getNotBefore(), (Long) entry.getValue(), false); break; case PublicClaims.ISSUER: assertValidIssuerClaim(jwt.getIssuer(), Arrays.asList((String[]) entry.getValue())); break; case PublicClaims.JWT_ID: assertValidStringClaim(entry.getKey(), jwt.getId(), (String) entry.getValue()); break; case PublicClaims.SUBJECT: assertValidStringClaim(entry.getKey(), jwt.getSubject(), (String) entry.getValue()); break; default: assertValidClaim(jwt.getClaim(entry.getKey()), entry.getKey(), entry.getValue()); break; } } }

Target:
private void verifyClaims(DecodedJWT jwt, Map<String, Object> claims) throws TokenExpiredException, InvalidClaimException { for (Map.Entry<String, Object> entry : claims.entrySet()) { switch (entry.getKey()) { case PublicClaims.AUDIENCE: assertValidAudienceClaim(jwt.getAudience(), (List<String>) entry.getValue()); break; case PublicClaims.EXPIRES_AT: assertValidDateClaim(jwt.getExpiresAt(), (Long) entry.getValue(), true); break; case PublicClaims.ISSUED_AT: assertValidDateClaim(jwt.getIssuedAt(), (Long) entry.getValue(), false); break; case PublicClaims.NOT_BEFORE: assertValidDateClaim(jwt.getNotBefore(), (Long) entry.getValue(), false); break; case PublicClaims.ISSUER: assertValidIssuerClaim(jwt.getIssuer(), (List<String>) entry.getValue()); break; case PublicClaims.JWT_ID: assertValidStringClaim(entry.getKey(), jwt.getId(), (String) entry.getValue()); break; case PublicClaims.SUBJECT: assertValidStringClaim(entry.getKey(), jwt.getSubject(), (String) entry.getValue()); break; default: assertValidClaim(jwt.getClaim(entry.getKey()), entry.getKey(), entry.getValue()); break; } } }
Source:
public Mono<Response<AppendBlobItem>> createWithResponse(BlobHttpHeaders headers, Map<String, String> metadata, BlobRequestConditions requestConditions) { try { return withContext(context -> createWithResponse(headers, metadata, requestConditions, context), STORAGE_TRACING_PROPERTIES); } catch (RuntimeException ex) { return monoError(logger, ex); } }

Target:
public Mono<Response<AppendBlobItem>> createWithResponse(BlobHttpHeaders headers, Map<String, String> metadata, BlobRequestConditions requestConditions) { try { return withContext(context -> createWithResponse(headers, metadata, requestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } }
Source:
private void recreateResponse(FeedbackResponseAttributes newResponse, FeedbackResponseAttributes oldResponse) throws InvalidParametersException, EntityAlreadyExistsException { try { newResponse.setId(null); FeedbackResponse createdResponseEntity = (FeedbackResponse) frDb.createEntity(newResponse); frDb.deleteEntity(oldResponse); frcLogic.updateFeedbackResponseCommentsForChangingResponseId (oldResponse.getId(), createdResponseEntity.getId()); } catch (EntityAlreadyExistsException e) { log.warning("Trying to update an existing response to one that already exists."); throw new EntityAlreadyExistsException(Const.StatusMessages.FEEDBACK_RESPONSE_RECIPIENT_ALREADY_EXISTS); } catch (EntityDoesNotExistException e) { log.warning("Trying to update a feedback response comment that does not exist"); } }

Target:
private void recreateResponse( FeedbackResponseAttributes newResponse, FeedbackResponseAttributes oldResponse) throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { try { newResponse.setId(null); FeedbackResponse createdResponseEntity = (FeedbackResponse) frDb.createEntity(newResponse); frDb.deleteEntity(oldResponse); frcLogic.updateFeedbackResponseCommentsForChangingResponseId (oldResponse.getId(), createdResponseEntity.getId()); } catch (EntityAlreadyExistsException e) { log.warning("Trying to update an existing response to one that already exists."); throw new EntityAlreadyExistsException(Const.StatusMessages.FEEDBACK_RESPONSE_RECIPIENT_ALREADY_EXISTS); } }
Source:
protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable { boolean runExperiment = useExperimental(); Object target = runExperiment ? experimentalService : fallbackService; try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (runExperiment) { log.info("Experiment failed; we will revert to the fallback service. We will allow attempting to" + " use the experimental service again in milliseconds.", SafeArg.of("retryDurationMillis", REFRESH_INTERVAL.toMillis()), e); markExperimentFailure(); } if (e.getTargetException() instanceof NotInitializedException) { log.warn("Resource is not initialized yet!"); } throw e.getTargetException(); } }

Target:
protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable { boolean runExperiment = useExperimental(); Object target = runExperiment ? experimentalService : fallbackService; try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (runExperiment) { markExperimentFailure(e); } if (e.getTargetException() instanceof NotInitializedException) { log.warn("Resource is not initialized yet!"); } throw e.getTargetException(); } }
Source:
public Edge addEdge(AddEdgeQuery uniQuery) { UniEdge edge = new UniEdge(uniQuery.getProperties(), uniQuery.getOutVertex(), uniQuery.getInVertex(), graph); try { index(this.edgeSchemas, edge, true); } catch (DocumentAlreadyExistsException ex) { throw Graph.Exceptions.edgeWithIdAlreadyExists(edge.id()); } catch (IOException e) { } return edge; }

Target:
public Edge addEdge(AddEdgeQuery uniQuery) { UniEdge edge = new UniEdge(uniQuery.getProperties(), uniQuery.getOutVertex(), uniQuery.getInVertex(), graph); try { index(this.edgeSchemas, edge, true); } catch (DocumentAlreadyExistsException ex) { throw Graph.Exceptions.edgeWithIdAlreadyExists(edge.id()); } return edge; }
Source:
protected void channelRead0(ChannelHandlerContext ctx, OlapMessage.Command cmd) throws Exception { if (LOG.isTraceEnabled()) { LOG.trace("Received " + cmd); } if(cmd.getType()!=OlapMessage.Command.Type.STATUS){ ctx.fireChannelRead(cmd); return; } OlapJobStatus status = jobRegistry.getStatus(cmd.getUniqueName()); OlapMessage.Status statusMsg = cmd.getExtension(OlapMessage.Status.command); if (statusMsg.hasWaitTimeMillis() && status != null) { long waitTime = statusMsg.getWaitTimeMillis(); switch (status.checkState()) { case SUBMITTED: case RUNNING: status.wait(waitTime, TimeUnit.MILLISECONDS); } } writeResponse(ctx.channel(),cmd.getUniqueName(),status); if (LOG.isTraceEnabled()) { LOG.trace("Status " + status); } }

Target:
protected void channelRead0(ChannelHandlerContext ctx, OlapMessage.Command cmd) throws Exception { if (LOG.isTraceEnabled()) { LOG.trace("Received " + cmd); } if(cmd.getType()!=OlapMessage.Command.Type.STATUS){ ctx.fireChannelRead(cmd); return; } OlapJobStatus status = jobRegistry.getStatus(cmd.getUniqueName()); OlapMessage.Status statusMsg = cmd.getExtension(OlapMessage.Status.command); if (statusMsg.hasWaitTimeMillis() && status != null) { long waitTime = statusMsg.getWaitTimeMillis(); switch (status.checkState()) { case SUBMITTED: case RUNNING: status.wait(waitTime, TimeUnit.MILLISECONDS); default: } } writeResponse(ctx.channel(),cmd.getUniqueName(),status); if (LOG.isTraceEnabled()) { LOG.trace("Status " + status); } }
Source:
public PollResponse(OperationStatus status, String otherStatus, T value, Duration retryAfter, Map<Object, Object> properties) { Objects.requireNonNull(status, "The status input parameter cannot be null."); if (status == OperationStatus.OTHER) { if (Objects.isNull(otherStatus) || otherStatus.trim().length() == 0) { throw new IllegalArgumentException("otherStatus can not be empty or null for OperationState.OTHER"); } }else{ if (!Objects.isNull(otherStatus)) { throw new IllegalArgumentException("otherStatus can not have value for any OperationState except OperationState.OTHER"); } } this.status = status; this.value = value; this.retryAfter = retryAfter; this.properties = properties; this.otherStatus = otherStatus; }

Target:
private PollResponse(OperationStatus status, String otherStatus, T value, Duration retryAfter, Map<Object, Object> properties) { Objects.requireNonNull(status, "The status input parameter cannot be null."); this.status = status; this.value = value; this.retryAfter = retryAfter; this.properties = properties; this.otherStatus = otherStatus; }
Source:
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException { String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',handle_id) WHERE handle like concat(:oldPrefix,'%')"; Query query = createQuery(context, hql); query.setString("newPrefix", newPrefix); query.setString("oldPrefix", oldPrefix); return query.executeUpdate(); }

Target:
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException { String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',id) WHERE handle like concat(:oldPrefix,'%')"; Query query = createQuery(context, hql); query.setString("newPrefix", newPrefix); query.setString("oldPrefix", oldPrefix); return query.executeUpdate(); }
Source:
public void testWrongFormatNumber() throws Exception { NumberCellEditor editor; editor = new NumberCellEditor(shell, Integer.class); editor.setValue(" "); editor.getValue(); assertNull(editor.getValue() ); editor.setValue("aa"); editor.getValue(); assertNull(editor.getValue() ); }

Target:
public void testWrongFormatNumber() throws Exception { NumberCellEditor editor; editor = new NumberCellEditor(shell, Integer.class); editor.getValue(); assertNull(editor.getValue()); editor.setValue("aa"); editor.getValue(); assertNull(editor.getValue()); }
Source:
public static Optional<PrimitiveType> fromToken(String token) { return Optional.ofNullable(LOOKUP.get(token)); }

Target:
public static PrimitiveType fromToken(String token) { return LOOKUP.get(token); }
Source:
public static List<X500Principal> toSubjects(List<X509Certificate> certificates) { List<X500Principal> subjects = new ArrayList<X500Principal>(certificates.size()); if (certificates != null) { for (X509Certificate certificate : certificates) { subjects.add(certificate.getSubjectX500Principal()); } } return subjects; }

Target:
public static List<X500Principal> toSubjects(List<X509Certificate> certificates) { if (certificates != null) { List<X500Principal> subjects = new ArrayList<X500Principal>(certificates.size()); for (X509Certificate certificate : certificates) { subjects.add(certificate.getSubjectX500Principal()); } return subjects; } else { return Collections.emptyList(); } }
Source:
public void adjustCost(ResultSetNode rsn) throws StandardException { if (fetchFirst==-1 && offset ==-1) return; CostEstimate costEstimate = rsn.getFinalCostEstimate(false); long totalRowCount = costEstimate.getEstimatedRowCount(); long currentOffset = offset==-1?0:offset; long currentFetchFirst = fetchFirst==-1?totalRowCount:fetchFirst; scaleFactor = (double) currentFetchFirst/(double) totalRowCount; if (scaleFactor >= 1.0d) { } else { costEstimate.setEstimatedRowCount(currentOffset+currentFetchFirst); costEstimate.setRemoteCost(scaleFactor*costEstimate.getRemoteCost()); int numPartitions = costEstimate.partitionCount(); if (numPartitions <= 0) numPartitions = 1; costEstimate.setRemoteCostPerPartition(costEstimate.remoteCost()/numPartitions); } }

Target:
public void adjustCost(ResultSetNode rsn) throws StandardException { if (fetchFirst==-1 && offset ==-1) return; CostEstimate costEstimate = rsn.getFinalCostEstimate(false); long totalRowCount = costEstimate.getEstimatedRowCount(); long currentOffset = offset==-1?0:offset; long currentFetchFirst = fetchFirst==-1?totalRowCount:fetchFirst; scaleFactor = (double) currentFetchFirst/(double) totalRowCount; if (scaleFactor >= 1.0d) { } else { costEstimate.setEstimatedRowCount(currentOffset+currentFetchFirst); costEstimate.setRemoteCost(scaleFactor*costEstimate.getRemoteCost()); costEstimate.setRemoteCostPerPartition(costEstimate.remoteCost(), costEstimate.partitionCount()); } }
Source:
private Iterator<Content> iteratorsFor(final List<Publisher> publishers, ContentListingCriteria criteria) { final String uri = criteria.getProgress().getUri(); final List<ContentCategory> initialCats = remainingTables(criteria); final List<ContentCategory> allCats = criteria.getCategories(); return Iterators.concat(Iterators.transform(publishers.iterator(), new Function<Publisher, Iterator<Content>>() { @Override public Iterator<Content> apply(final Publisher publisher) { return contentIterator(first(publisher, publishers) ? initialCats : allCats, new ListingCursorBuilder<Content>() { public DBObject queryForCategory(ContentCategory category) { MongoQueryBuilder query = where().fieldEquals("publisher", publisher.key()); if(first(publisher, publishers) && first(category, initialCats) && !Strings.isNullOrEmpty(uri) ) { query.fieldGreaterThan(ID, uri); } return query.build(); } @Override public DBCursor cursorFor(ContentCategory category) { return contentTables.collectionFor(category) .find(queryForCategory(category)) .batchSize(1) .sort(new MongoSortBuilder().ascending("publisher").ascending(MongoConstants.ID).build()) .addOption(Bytes.QUERYOPTION_NOTIMEOUT) .noCursorTimeout(true); } @Override public Function<DBObject, Content> translatorFor(ContentCategory contentCategory) { return toContentFunction(contentCategory); } }); } private <T> boolean first(T e, List<T> es) { return e.equals(es.get(0)); } })); }

Target:
private Iterator<Content> iteratorsFor(final List<Publisher> publishers, ContentListingCriteria criteria) { return iteratorsFor(publishers, criteria, false); }
Source:
public void testChownToOwnGroup() throws Exception { Assume.assumeFalse(System.getProperty("os.name").startsWith( "Windows" )); String file1 = "some-file.dat"; createFileWithJunk(file1, 100); String fullPath = testDir + pathSep + file1; Path path = Paths.get(fullPath); GroupPrincipal group = Files.readAttributes(path, PosixFileAttributes.class, LinkOption.NOFOLLOW_LINKS).group(); vertx.fileSystem().chown(fullPath, null, group.getName(), ar -> { deleteFile(file1); assertTrue(ar.succeeded()); testComplete(); }); await(); }

Target:
public void testChownToOwnGroup() throws Exception { Assume.assumeFalse(Utils.isWindows()); String file1 = "some-file.dat"; createFileWithJunk(file1, 100); String fullPath = testDir + pathSep + file1; Path path = Paths.get(fullPath); GroupPrincipal group = Files.readAttributes(path, PosixFileAttributes.class, LinkOption.NOFOLLOW_LINKS).group(); vertx.fileSystem().chown(fullPath, null, group.getName(), ar -> { deleteFile(file1); assertTrue(ar.succeeded()); testComplete(); }); await(); }
Source:
public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, String offset, Object key, Object message, int size) { this.systemStreamPartition = systemStreamPartition; this.offset = offset; this.key = key; this.message = message; this.size = size; }

Target:
public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, String offset, Object key, Object message, int size) { this.systemStreamPartition = systemStreamPartition; this.offset = offset; this.key = key; this.message = message; this.size = size; this.arrivalTime = Instant.now().toEpochMilli(); }
Source:
protected List<InstanceGiven> extractGivenValues(ScesimModelDescriptor scesimModelDescriptor, List<FactMappingValue> factMappingValues, ClassLoader classLoader, ExpressionEvaluatorFactory expressionEvaluatorFactory) { List<InstanceGiven> instanceGiven = new ArrayList<>(); Map<FactIdentifier, List<FactMappingValue>> groupByFactIdentifier = groupByFactIdentifierAndFilter(factMappingValues, FactMappingType.GIVEN); boolean hasError = false; for (Map.Entry<FactIdentifier, List<FactMappingValue>> entry : groupByFactIdentifier.entrySet()) { try { FactIdentifier factIdentifier = entry.getKey(); Map<List<String>, Object> paramsForBean = getParamsForBean(scesimModelDescriptor, factIdentifier, entry.getValue(), expressionEvaluatorFactory); Object bean = createObject(getDirectMapping(paramsForBean).getOptional(), factIdentifier.getClassName(), paramsForBean, classLoader); instanceGiven.add(new InstanceGiven(factIdentifier, bean)); } catch (Exception e) { logger.error("Error in GIVEN data " + entry.getKey() + ": " + e.getMessage(), e); hasError = true; } } if (hasError) { throw new ScenarioException("Error in GIVEN data"); } return instanceGiven; }

Target:
protected List<InstanceGiven> extractGivenValues(ScesimModelDescriptor scesimModelDescriptor, List<FactMappingValue> factMappingValues, ClassLoader classLoader, ExpressionEvaluatorFactory expressionEvaluatorFactory) { List<InstanceGiven> instanceGiven = new ArrayList<>(); Map<FactIdentifier, List<FactMappingValue>> groupByFactIdentifier = groupByFactIdentifierAndFilter(factMappingValues, FactMappingType.GIVEN); boolean hasError = false; for (Map.Entry<FactIdentifier, List<FactMappingValue>> entry : groupByFactIdentifier.entrySet()) { try { FactIdentifier factIdentifier = entry.getKey(); Map<List<String>, Object> paramsForBean = getParamsForBean(scesimModelDescriptor, factIdentifier, entry.getValue(), expressionEvaluatorFactory); Object bean = createObject(getDirectMapping(paramsForBean).getOptional(), factIdentifier.getClassName(), paramsForBean, classLoader); instanceGiven.add(new InstanceGiven(factIdentifier, bean)); } catch (Exception e) { String errorMessage = e.getMessage() != null ? e.getMessage() : e.getClass().getCanonicalName(); logger.error("Error in GIVEN data " + entry.getKey() + ": " + errorMessage, e); hasError = true; } } if (hasError) { throw new ScenarioException("Error in GIVEN data"); } return instanceGiven; }
Source:
public Date determineLastBilledDateByInvoicingOption(List<ContractsAndGrantsBillingAwardAccount> awardAccounts, String invoicingOptionCode, Date awardLastBilledDate) { Date computedLastBilledDate = null; if (StringUtils.equalsIgnoreCase(ArConstants.INV_ACCOUNT, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_CONTRACT_CONTROL_ACCOUNT, invoicingOptionCode)) { ContractsAndGrantsBillingAwardAccount accountToUse = null; for (ContractsAndGrantsBillingAwardAccount awardAccount : awardAccounts) { if (ObjectUtils.isNotNull(accountToUse)) { if (isNotExpenditureAccount(awardAccount) && awardAccount.getCurrentLastBilledDate().after(accountToUse.getCurrentLastBilledDate())) { accountToUse = awardAccount; } } else { accountToUse = awardAccount; } } computedLastBilledDate = accountToUse.getCurrentLastBilledDate(); } else if (StringUtils.equalsIgnoreCase(ArConstants.INV_AWARD, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_SCHEDULE, invoicingOptionCode)) { computedLastBilledDate = awardLastBilledDate; } return computedLastBilledDate; }

Target:
public Date determineLastBilledDateByInvoicingOption(List<ContractsAndGrantsBillingAwardAccount> awardAccounts, String invoicingOptionCode, Date awardLastBilledDate) { Date computedLastBilledDate = null; if (StringUtils.equalsIgnoreCase(ArConstants.INV_ACCOUNT, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_CONTRACT_CONTROL_ACCOUNT, invoicingOptionCode)) { ContractsAndGrantsBillingAwardAccount accountToUse = null; for (ContractsAndGrantsBillingAwardAccount awardAccount : awardAccounts) { if (ObjectUtils.isNotNull(accountToUse)) { if (isNotExpenditureAccount(awardAccount) && ObjectUtils.isNotNull(awardAccount.getCurrentLastBilledDate()) && ObjectUtils.isNotNull(accountToUse.getCurrentLastBilledDate()) && awardAccount.getCurrentLastBilledDate().after(accountToUse.getCurrentLastBilledDate())) { accountToUse = awardAccount; } } else if (isNotExpenditureAccount(awardAccount)) { accountToUse = awardAccount; } } if (ObjectUtils.isNotNull(accountToUse)) { computedLastBilledDate = accountToUse.getCurrentLastBilledDate(); } else { LOG.error("determineLastBilledDateByInvoicingOption: NO award accounts passed to method when award had invoice option of Account or Contract Control Account. lastBilledDate being returned as NULL."); } } else if (StringUtils.equalsIgnoreCase(ArConstants.INV_AWARD, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_SCHEDULE, invoicingOptionCode)) { computedLastBilledDate = awardLastBilledDate; } return computedLastBilledDate; }
Source:
private void parse(File targetFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; try { while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) { rules.add(new IgnoreRule(txt)); } } } catch (IOException e) { throw e; } finally { br.close(); } }

Target:
private void parse(File targetFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; try { while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) rules.add(new IgnoreRule(txt)); } } catch (IOException e) { throw e; } finally { br.close(); } }
Source:
static protected <T> T[][] shuffleArray(T [][] input) { T[][] output = input.clone(); Integer indices = new Integer[input.length]; for (int idx = 0; idx < indices.length; idx += 1) { indices[idx] = Integer.valueOf(idx); } List<Integer> permutation = Arrays.asList(indices); Collections.shuffle(permutation); T[] tmp = input[permutation.get(0)]; for (int idx = 0; idx < input.length-1; idx += 1) { output[idx] = input[permutation.get(idx + 1)]; } output[input.length-1] = tmp; return output; }

Target:
static protected <T> T[][] shuffleArray(T [][] input) { T[][] output = input.clone(); Integer indices = new Integer[input.length]; for (int idx = 0; idx < indices.length; idx += 1) { indices[idx] = Integer.valueOf(idx); } List<Integer> permutation = Arrays.asList(indices); Collections.shuffle(permutation); for (int idx = 0; idx < input.length; idx += 1) { output[idx] = input[permutation.get(idx)]; } return output; }
Source:
public static PushTapTarget fromString(String target) { for (PushTapTarget entry : PushTapTarget.values()) { if (entry.getTarget().equals(target)) { return entry; } } throw new IllegalArgumentException("No enum found for string: " + target); }

Target:
public static PushTapTarget fromString(String target) { for (PushTapTarget entry : PushTapTarget.values()) { if (entry.getTarget().equals(target)) { return entry; } } return ERROR; }
Source:
protected Statement getStatement(ParameterAccessor accessor, Object[] runtimeParameters, ReturnedType returnedType) { String bucketName = getCouchbaseOperations().getCouchbaseBucket().name(); Expression bucket = N1qlUtils.escapedBucket(bucketName); FromPath select; if (partTree.isCountProjection()) { select = select(count("*")); } else { { select = N1qlUtils.createSelectClauseForEntity(bucketName, returnedType, this.getCouchbaseOperations().getConverter().getMappingContext()); } } WherePath selectFrom = select.from(bucket); N1qlQueryCreator queryCreator = new N1qlQueryCreator(partTree, accessor, selectFrom, getCouchbaseOperations().getConverter(), getQueryMethod()); LimitPath selectFromWhereOrderBy = queryCreator.createQuery(); if (queryMethod.isPageQuery()) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize()).offset(pageable.getOffset()); } else if (queryMethod.isSliceQuery() && accessor.getPageable() != null) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize() + 1).offset(pageable.getOffset()); } else if (partTree.isLimiting()) { return selectFromWhereOrderBy.limit(partTree.getMaxResults()); } else { return selectFromWhereOrderBy; } }

Target:
protected Statement getStatement(ParameterAccessor accessor, Object[] runtimeParameters, ReturnedType returnedType) { String bucketName = getCouchbaseOperations().getCouchbaseBucket().name(); Expression bucket = N1qlUtils.escapedBucket(bucketName); FromPath select; if (partTree.isCountProjection()) { select = select(count("*")); } else { select = N1qlUtils.createSelectClauseForEntity(bucketName, returnedType, this.getCouchbaseOperations().getConverter()); } WherePath selectFrom = select.from(bucket); N1qlQueryCreator queryCreator = new N1qlQueryCreator(partTree, accessor, selectFrom, getCouchbaseOperations().getConverter(), getQueryMethod()); LimitPath selectFromWhereOrderBy = queryCreator.createQuery(); if (queryMethod.isPageQuery()) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize()).offset(pageable.getOffset()); } else if (queryMethod.isSliceQuery() && accessor.getPageable() != null) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize() + 1).offset(pageable.getOffset()); } else if (partTree.isLimiting()) { return selectFromWhereOrderBy.limit(partTree.getMaxResults()); } else { return selectFromWhereOrderBy; } }
Source:
public static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys) { pubkeys = new ArrayList<ECKey>(pubkeys); Collections.sort(pubkeys, new PubKeyComparator()); Script redeemScript = ScriptBuilder.createMultiSigOutputScript(threshold, pubkeys); byte[] hash = Utils.sha256hash160(redeemScript.getProgram()); return ScriptBuilder.createP2SHOutputScript(hash); }

Target:
public static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys) { pubkeys = new ArrayList<ECKey>(pubkeys); final Comparator comparator = UnsignedBytes.lexicographicalComparator(); Collections.sort(pubkeys, new Comparator<ECKey>() { @Override public int compare(ECKey k1, ECKey k2) { return comparator.compare(k1.getPubKey(), k2.getPubKey()); } }); Script redeemScript = ScriptBuilder.createMultiSigOutputScript(threshold, pubkeys); byte[] hash = Utils.sha256hash160(redeemScript.getProgram()); return ScriptBuilder.createP2SHOutputScript(hash); }
Source:
public BadRequestException() { this("invalid request"); }

Target:
public BadRequestException() { this(ResponseCodeConstants.INVALID_REQUEST); }
Source:
private MutableMetric lookupMetric(String name) { MutableMetric metric = getRegistry().get(name); return metric; }

Target:
private MutableMetric lookupMetric(String name) { return getRegistry().get(name); }