auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public DataNode(Datacenter datacenter, JSONObject jsonObject, ClusterMapConfig clusterMapConfig) throws JSONException { if (logger.isTraceEnabled()) { logger.trace("DataNode " + jsonObject.toString()); } this.datacenter = datacenter; this.hostname = getFullyQualifiedDomainName(jsonObject.getString("hostname")); this.port = jsonObject.getInt("port"); this.sslPort = jsonObject.getInt("sslport"); try { ResourceStatePolicyFactory resourceStatePolicyFactory = Utils .getObj(clusterMapConfig.clusterMapResourceStatePolicyFactory, this, HardwareState.valueOf(jsonObject.getString("hardwareState")), clusterMapConfig); this.dataNodeStatePolicy = resourceStatePolicyFactory.getResourceStatePolicy(); } catch (Exception e) { logger.error("Error creating resource state policy when instantiating a datanode " + e); throw new IllegalStateException( "Error creating resource state policy when instantiating a datanode: " + hostname + " " + port, e); } JSONArray diskJSONArray = jsonObject.getJSONArray("disks"); this.disks = new ArrayList<Disk>(diskJSONArray.length()); for (int i = 0; i < diskJSONArray.length(); ++i) { this.disks.add(new Disk(this, diskJSONArray.getJSONObject(i), clusterMapConfig)); } this.rawCapacityInBytes = calculateRawCapacityInBytes(); validate(); }

Target:
public DataNode(Datacenter datacenter, JSONObject jsonObject, ClusterMapConfig clusterMapConfig) throws JSONException { if (logger.isTraceEnabled()) { logger.trace("DataNode " + jsonObject.toString()); } this.datacenter = datacenter; this.hostname = getFullyQualifiedDomainName(jsonObject.getString("hostname")); this.port = jsonObject.getInt("port"); try { ResourceStatePolicyFactory resourceStatePolicyFactory = Utils .getObj(clusterMapConfig.clusterMapResourceStatePolicyFactory, this, HardwareState.valueOf(jsonObject.getString("hardwareState")), clusterMapConfig); this.dataNodeStatePolicy = resourceStatePolicyFactory.getResourceStatePolicy(); } catch (Exception e) { logger.error("Error creating resource state policy when instantiating a datanode " + e); throw new IllegalStateException( "Error creating resource state policy when instantiating a datanode: " + hostname + " " + port, e); } JSONArray diskJSONArray = jsonObject.getJSONArray("disks"); this.disks = new ArrayList<Disk>(diskJSONArray.length()); for (int i = 0; i < diskJSONArray.length(); ++i) { this.disks.add(new Disk(this, diskJSONArray.getJSONObject(i), clusterMapConfig)); } this.rawCapacityInBytes = calculateRawCapacityInBytes(); this.ports = new HashMap<PortType, Integer>(); this.ports.put(PortType.PLAINTEXT, port); populatePorts(jsonObject); validate(); }
Source:
int getRemainingTokens(String license) { return remainingTokens.get(license); }

Target:
int getRemainingTokens(String license) { if (!remainingTokens.containsKey(license)) { logger.error("License " + license + " does not exist in the remainingTokens map, whereas it should be."); } return remainingTokens.get(license); }
Source:
public void setIssueLabels(String issueKey, List<String> labels) { final IssueInput issueInput = new IssueInputBuilder() .setFieldValue(IssueFieldId.LABELS_FIELD.id, labels) .build(); try { jiraRestClient.getIssueClient().updateIssue(issueKey, issueInput).get(timeout, TimeUnit.SECONDS); } catch (Exception e) { LOGGER.warning("jira rest client update issue error. cause: " + e.getMessage()); } }

Target:
public void setIssueLabels(String issueKey, List<String> labels) { final IssueInput issueInput = new IssueInputBuilder() .setFieldValue(IssueFieldId.LABELS_FIELD.id, labels) .build(); try { jiraRestClient.getIssueClient().updateIssue(issueKey, issueInput).get(timeout, TimeUnit.SECONDS); } catch (Exception e) { LOGGER.log(Level.WARNING, "jira rest client update labels error for issue "+issueKey, e); } }
Source:
public final void uploadFile() throws Exception { File testFile = temporaryFolder.newFile("test.txt"); Files.asCharSink(testFile, StandardCharsets.UTF_8).write("content"); s3Client.putObject(MY_TEST_BUCKET, "file.txt", testFile); List<S3ObjectSummary> summaries = s3Client .listObjects(MY_TEST_BUCKET) .getObjectSummaries(); assertThat(summaries.size()).isEqualTo(1); assertThat(summaries.get(0).getKey()).isEqualTo("file.txt"); assertThat(summaries.get(0).getSize()) .isEqualTo(testFile.length()); }

Target:
public final void uploadFile() throws Exception { String testInput = "content"; s3Client.putObject(MY_TEST_BUCKET, "file.txt", testInput); List<S3ObjectSummary> summaries = s3Client .listObjects(MY_TEST_BUCKET) .getObjectSummaries(); assertThat(summaries).hasSize(1); assertThat(summaries.get(0).getKey()).isEqualTo("file.txt"); assertThat(summaries.get(0).getSize()).isEqualTo(testInput.length()); }
Source:
public static void unparseSpecialSyntax(SqlOperator operator, SqlWriter writer, SqlCall call) { final List<SqlNode> operands = call.getOperandList(); switch (operator.getKind()) { case INSERT: assert operands.size() == 3 || operands.size() == 4; final SqlInsert insert = new SqlInsert(call.getParserPosition(), (SqlNodeList) operands.get(0), operands.get(1), operands.get(2), operands.size() == 3 ? null : (SqlNodeList) call.getOperandList().get(3)); insert.unparse(writer, operator.getLeftPrec(), operator.getRightPrec()); return; default: throw Util.needToImplement(operator); } }

Target:
public static void unparseSpecialSyntax(SqlOperator operator, SqlWriter writer, SqlCall call) { final List<SqlNode> operands = call.getOperandList(); switch (operator.getKind()) { case INSERT: assert operands.size() == 4; final SqlInsert insert = new SqlInsert(call.getParserPosition(), (SqlNodeList) operands.get(0), operands.get(1), operands.get(2), (SqlNodeList) operands.get(3)); insert.unparse(writer, operator.getLeftPrec(), operator.getRightPrec()); return; default: throw Util.needToImplement(operator); } }
Source:
public ExternalConditionEval(ExternalCondition condition, Event event) { super(Type.EXTERNAL, condition.match(event.getText()), event.getCtime(), event.getContext()); this.condition = condition; this.event = event; this.typeValue = TypeValue.DATA; }

Target:
public ExternalConditionEval(ExternalCondition condition, Event event) { super(Type.EXTERNAL, condition.match(event.getText()), event.getCtime(), event.getContext()); this.condition = condition; this.event = event; }
Source:
private InteractiveUIContent(Composite parent, boolean hasDescription, boolean hasConfiguration) { super(); Composite contentComposite = new Composite(parent, SWT.NONE); contentComposite.setLayout(new GridLayout(hasConfiguration ? 2 : 1, true)); contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); this.viewerCompsite = new Composite(contentComposite, SWT.NONE); viewerCompsite.setLayout(new GridLayout(1, true)); viewerCompsite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); if (hasConfiguration) { this.configurationComposite = createConfigComposite(contentComposite); defaultComposite = new Composite(configurationComposite, SWT.NONE); defaultComposite.setLayout(new GridLayout(1, true)); Label text = new Label(defaultComposite, SWT.WRAP); text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1)); text.setText(EMFCompareRCPUIMessages .getString("InteractiveUIContent.DEFAULT_CONFIGURATION_LABEL")); } else { this.configurationComposite = null; this.defaultComposite = null; } if (hasDescription) { this.descriptionText = createDescriptionComposite(parent); } else { this.descriptionText = null; } }

Target:
private InteractiveUIContent(Composite parent, boolean hasDescription, boolean hasConfiguration) { super(); Composite contentComposite = new Composite(parent, SWT.NONE); final int numberOfColumns; if (hasConfiguration) { numberOfColumns = 2; } else { numberOfColumns = 1; } contentComposite.setLayout(new GridLayout(numberOfColumns, true)); contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); this.viewerCompsite = new Composite(contentComposite, SWT.NONE); viewerCompsite.setLayout(new GridLayout(1, true)); viewerCompsite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); if (hasConfiguration) { this.configurationComposite = createConfigComposite(contentComposite); defaultComposite = new Composite(configurationComposite, SWT.NONE); defaultComposite.setLayout(new GridLayout(1, true)); Label text = new Label(defaultComposite, SWT.WRAP); text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1)); text.setText(EMFCompareRCPUIMessages .getString("InteractiveUIContent.DEFAULT_CONFIGURATION_LABEL")); } else { this.configurationComposite = null; this.defaultComposite = null; } if (hasDescription) { this.descriptionText = createDescriptionComposite(parent); } else { this.descriptionText = null; } }
Source:
public void refreshHost(VDS vds) { try { refreshCapabilities(null, new AtomicBoolean(), vds); } finally { if (vds != null) { updateDynamicData(vds.getDynamicData()); updateNumaData(vds); monitoringStrategy.processHardwareCapabilities(vds); resourceManager.getEventListener().handleVdsVersion(vds.getId()); } } }

Target:
public void refreshHost(VDS vds) { refreshCapabilities(new RefreshCapabilitiesCallback(vds), new AtomicBoolean(), vds); }
Source:
protected String createPayload(Nic.Request.UpdatePayload payload) { checkNotNull(payload, "payload"); checkNotNull(payload.dataCenterId(), "dataCenterId"); checkNotNull(payload.serverId(), "serverId"); checkNotNull(payload.id(), "id"); dataCenterId = payload.dataCenterId(); serverId = payload.serverId(); nicId = payload.id(); requestBuilder.put("lan", payload.lan()); if (payload.name() != null) requestBuilder.put("name", payload.name()); if (payload.ips() != null && !payload.ips().isEmpty()) requestBuilder.put("ips", payload.ips()); if (payload.dhcp() != null) requestBuilder.put("dhcp", payload.dhcp()); return (new Gson()).toJson(requestBuilder); }

Target:
protected String createPayload(Nic.Request.UpdatePayload payload) { checkNotNull(payload, "payload"); checkNotNull(payload.dataCenterId(), "dataCenterId"); checkNotNull(payload.serverId(), "serverId"); checkNotNull(payload.id(), "id"); dataCenterId = payload.dataCenterId(); serverId = payload.serverId(); nicId = payload.id(); requestBuilder.put("lan", payload.lan()); if (payload.name() != null) requestBuilder.put("name", payload.name()); if (payload.ips() != null && !payload.ips().isEmpty()) requestBuilder.put("ips", payload.ips()); if (payload.dhcp() != null) requestBuilder.put("dhcp", payload.dhcp()); return jsonBinder.toJson(requestBuilder); }
Source:
private void checkIfEventsLogPluginSupported() { GerritServer server = PluginImpl.getInstance().getServer(serverName); if (server != null && server.getConfig() != null) { isSupported = GerritPluginChecker.isPluginEnabled( server.getConfig(), EVENTS_LOG_PLUGIN_NAME); } }

Target:
private void checkIfEventsLogPluginSupported() { GerritServer server = PluginImpl.getServer_(serverName); if (server != null && server.getConfig() != null) { isSupported = GerritPluginChecker.isPluginEnabled( server.getConfig(), EVENTS_LOG_PLUGIN_NAME); } }
Source:
private IPattern doFindByNegatedFactPattern(final List<IPattern> patterns, final Pattern52 find) { final String factType = find.getFactType(); for (IPattern ifp : patterns) { if (ifp instanceof FactPattern) { FactPattern fp = (FactPattern) ifp; if (fp.isNegated()) { if (fp.getFactType().equals(factType)) { return fp; } } } else if (ifp instanceof FromEntryPointFactPattern) { FromEntryPointFactPattern fefp = (FromEntryPointFactPattern) ifp; FactPattern fp = fefp.getFactPattern(); if (fp.isNegated()) { if (fp.getFactType().equals(factType)) { return fp; } } } } return null; }

Target:
private IPattern doFindByNegatedFactPattern(final List<IPattern> patterns, final Pattern52 find) { final String factType = find.getFactType(); for (IPattern ifp : patterns) { if (ifp instanceof FactPattern) { final FactPattern fp = (FactPattern) ifp; final Optional<IPattern> match = checkNegatedFactPattern(fp, factType); if (match.isPresent()) { return match.get(); } } else if (ifp instanceof FromEntryPointFactPattern) { final FromEntryPointFactPattern fefp = (FromEntryPointFactPattern) ifp; final FactPattern fp = fefp.getFactPattern(); final Optional<IPattern> match = checkNegatedFactPattern(fp, factType); if (match.isPresent()) { return match.get(); } } } return null; }
Source:
public Integer defineRoadsQuantityToBuild(GameUserBean gameUser, GameBean game) throws PlayException { List<EdgeBean> availableEdges = new ArrayList<EdgeBean>(game.fetchEdgesAccessibleForBuildingRoad(gameUser)); switch (availableEdges.size()) { case 0: log.debug("There are no available edges build road for current player"); throw new PlayException(ROAD_CANNOT_BE_BUILT_ERROR); case 1: Set<EdgeBean> edgesNextToAvailable = availableEdges.get(0).fetchNeighborEdgesAccessibleForBuildingRoad(gameUser); if (edgesNextToAvailable.size() > 0) { return 2; } else { return 1; } default: return 2; } }

Target:
public Integer defineRoadsQuantityToBuild(GameUserBean gameUser, GameBean game) throws PlayException { List<EdgeBean> availableEdges = new ArrayList<EdgeBean>(game.fetchEdgesAccessibleForBuildingRoad(gameUser)); if (availableEdges.isEmpty()) { log.debug("There are no available edges build road for current player"); throw new PlayException(ROAD_CANNOT_BE_BUILT_ERROR); } if (availableEdges.size() == 1 && availableEdges.get(0).fetchNeighborEdgesAccessibleForBuildingRoad(gameUser).size() == 0) { return 1; } return 2; }
Source:
public SeekablePathStream(final Path path) throws IOException { this.path = path; this.sbc = Files.newByteChannel(path); this.length = sbc.size(); allInstances.add(this); }

Target:
public SeekablePathStream(final Path path) throws IOException { this.path = path; this.sbc = Files.newByteChannel(path); ALL_INSTANCES.add(this); }
Source:
public static String decompressJSONString(byte[] compressed) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(compressed); GZIPInputStream gis = new GZIPInputStream(bis); BufferedReader br = new BufferedReader(new InputStreamReader(gis, "UTF-8")); StringBuilder sb = new StringBuilder(); String line; while((line = br.readLine()) != null) { sb.append(line); } br.close(); gis.close(); bis.close(); return sb.toString(); }

Target:
public static String decompressJSONString(byte[] compressed) throws IOException { ByteArrayOutputStream result = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; try (ByteArrayInputStream bis = new ByteArrayInputStream(compressed); GZIPInputStream gis = new GZIPInputStream(bis)) { int length; while ((length = gis.read(buffer)) != -1) { result.write(buffer, 0, length); } } catch (IOException e) { throw e; } return result.toString("UTF-8"); }
Source:
public void update(float deltaTime) { if (sort) { entities.sort(comparator); sort = false; } for (int i = 0; i < entities.size; ++i) { processEntity(entities.get(i), deltaTime); } }

Target:
public void update(float deltaTime) { sort(); for (int i = 0; i < sortedEntities.size; ++i) { processEntity(sortedEntities.get(i), deltaTime); } }
Source:
public Response addParser(@FormDataParam("parserJar") final InputStream inputStream, @FormDataParam("parserJar") final FormDataContentDisposition contentDispositionHeader, @FormDataParam("parserInfo") final String parserInfoStr, @FormDataParam("schemaFromParserJar") boolean schemaFromParserJar) { LOG.debug("schemaFromParser {}", schemaFromParserJar); File file = null; try { String name = ""; if (contentDispositionHeader != null && contentDispositionHeader.getFileName() != null) { name = contentDispositionHeader.getFileName(); this.jarStorage.uploadJar(inputStream, name); inputStream.close(); } ParserInfo parserInfo = objectMapper.readValue(parserInfoStr, ParserInfo.class); parserInfo.setJarStoragePath(name); Schema schema = loadSchemaFromParserJar(name, parserInfo.getClassName()); if (schema == null) { throw new RuntimeException("Cannot load parser class from uploaded Jar: " + parserInfo.getClassName()); } if (parserInfo.getParserSchema() == null && schemaFromParserJar) { parserInfo.setParserSchema(loadSchemaFromParserJar(name, parserInfo.getClassName())); } catalogService.addParserInfo(parserInfo); return WSUtils.respond(CREATED, SUCCESS, parserInfo); } catch (Exception ex) { return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } }

Target:
public Response addParser(@FormDataParam("parserJar") final InputStream inputStream, @FormDataParam("parserJar") final FormDataContentDisposition contentDispositionHeader, @FormDataParam("parserInfo") final String parserInfoStr, @FormDataParam("schemaFromParserJar") boolean schemaFromParserJar) { LOG.debug("schemaFromParser {}", schemaFromParserJar); File file = null; try { String name = ""; if (contentDispositionHeader != null && contentDispositionHeader.getFileName() != null) { name = contentDispositionHeader.getFileName(); this.jarStorage.uploadJar(inputStream, name); inputStream.close(); } ParserInfo parserInfo = objectMapper.readValue(parserInfoStr, ParserInfo.class); parserInfo.setJarStoragePath(name); Schema schema = loadSchemaFromParserJar(name, parserInfo.getClassName()); if (schema == null) { throw new RuntimeException("Cannot load parser class from uploaded Jar: " + parserInfo.getClassName()); } if (parserInfo.getParserSchema() == null && schemaFromParserJar) { parserInfo.setParserSchema(schema); } catalogService.addParserInfo(parserInfo); return WSUtils.respond(CREATED, SUCCESS, parserInfo); } catch (Exception ex) { return WSUtils.respond(INTERNAL_SERVER_ERROR, EXCEPTION, ex.getMessage()); } }
Source:
private DatasourceInputSplit toDataSourceSplit( List<WindowedDataSegment> segments, org.apache.hadoop.mapred.InputFormat fio, JobConf conf ) { String[] locations = null; try { locations = getFrequentLocations(segments, fio, conf); } catch (Exception e) { e.printStackTrace(); } return new DatasourceInputSplit(segments, locations); }

Target:
private DatasourceInputSplit toDataSourceSplit( List<WindowedDataSegment> segments, org.apache.hadoop.mapred.InputFormat fio, JobConf conf ) { String[] locations = null; try { locations = getFrequentLocations(segments, fio, conf); } catch (Exception e) { logger.error("Exception thrown finding location of splits", e); } return new DatasourceInputSplit(segments, locations); }
Source:
private void sendEvent(E e) { String message = _layout.doLayout(e); if (message == null) { throw new IllegalArgumentException(String.format( "The logback layout %s is probably incorrect, " + "and fails to format the message.", _layout.toString())); } this.sender.send( "", message, "", "", null, null, "" ); }

Target:
private void sendEvent(E e) { String message = _layout.doLayout(e); if (message == null) { throw new IllegalArgumentException(String.format( "The logback layout %s is probably incorrect, " + "and fails to format the message.", _layout.toString())); } this.sender.send(message); }
Source:
public S3InputSource( @JacksonInject ServerSideEncryptingAmazonS3 s3Client, @JsonProperty("uris") @Nullable List<URI> uris, @JsonProperty("prefixes") @Nullable List<URI> prefixes, @JsonProperty("objects") @Nullable List<CloudObjectLocation> objects ) { this.s3Client = Preconditions.checkNotNull(s3Client, "s3Client"); this.uris = uris == null ? new ArrayList<>() : uris; this.prefixes = prefixes == null ? new ArrayList<>() : prefixes; if (objects != null) { this.objects = objects; if (!this.uris.isEmpty()) { throw new IAE("uris cannot be used with object"); } if (!this.prefixes.isEmpty()) { throw new IAE("prefixes cannot be used with object"); } } else { this.objects = null; if (!this.uris.isEmpty() && !this.prefixes.isEmpty()) { throw new IAE("uris and prefixes cannot be used together"); } if (this.uris.isEmpty() && this.prefixes.isEmpty()) { throw new IAE("uris or prefixes must be specified"); } for (final URI inputURI : this.uris) { Preconditions.checkArgument("s3".equals(inputURI.getScheme()), "input uri scheme == s3 (%s)", inputURI); } for (final URI inputURI : this.prefixes) { Preconditions.checkArgument("s3".equals(inputURI.getScheme()), "input uri scheme == s3 (%s)", inputURI); } } }

Target:
public S3InputSource( @JacksonInject ServerSideEncryptingAmazonS3 s3Client, @JsonProperty("uris") @Nullable List<URI> uris, @JsonProperty("prefixes") @Nullable List<URI> prefixes, @JsonProperty("objects") @Nullable List<CloudObjectLocation> objects ) { this.s3Client = Preconditions.checkNotNull(s3Client, "s3Client"); this.uris = uris; this.prefixes = prefixes; this.objects = objects; if (!CollectionUtils.isNullOrEmpty(objects)) { throwIfIllegalArgs(!CollectionUtils.isNullOrEmpty(uris) || !CollectionUtils.isNullOrEmpty(prefixes)); } else if (!CollectionUtils.isNullOrEmpty(uris)) { throwIfIllegalArgs(!CollectionUtils.isNullOrEmpty(prefixes)); uris.forEach(S3Utils::checkURI); } else if (!CollectionUtils.isNullOrEmpty(prefixes)) { prefixes.forEach(S3Utils::checkURI); } else { throwIfIllegalArgs(true); } }
Source:
public Object execute(ExecutionEvent event) throws ExecutionException { final IEditorPart editorWindow = HandlerUtil.getActiveEditor(event); if (editorWindow instanceof TestSuiteEditor) { final TestSuiteEditor testSuiteEditorWindow = (TestSuiteEditor) editorWindow; final Variables variablesEditorWindow = (Variables) testSuiteEditorWindow.getSelectedPage(); variablesEditorWindow.removeAction(); } return null; }

Target:
public Object execute(ExecutionEvent event) throws ExecutionException { final IEditorPart editorWindow = HandlerUtil.getActiveEditor(event); if (editorWindow instanceof TestSuiteEditor) { final TestSuiteEditor testSuiteEditorWindow = (TestSuiteEditor) editorWindow; final Variables variablesEditorWindow = (Variables) testSuiteEditorWindow.getSelectedPage(); variablesEditorWindow.removeSelectedNodes(); } return null; }
Source:
DeferredImageViewRequest(Picasso picasso, Uri uri, int resourceId, ImageView imageView, PicassoBitmapOptions options, List<Transformation> transformations, boolean skipCache, boolean noFade, int errorResId, Drawable errorDrawable, String key, Callback callback) { super(picasso, uri, resourceId, imageView, options, transformations, skipCache, noFade, errorResId, errorDrawable, key, callback); ViewTreeObserver observer = imageView.getViewTreeObserver(); if (observer.isAlive()) { observer.addOnGlobalLayoutListener(this); } }

Target:
DeferredImageViewRequest(Picasso picasso, Uri uri, int resourceId, ImageView imageView, PicassoBitmapOptions options, List<Transformation> transformations, boolean skipCache, boolean noFade, int errorResId, Drawable errorDrawable, String key, Callback callback) { super(picasso, uri, resourceId, imageView, options, transformations, skipCache, noFade, errorResId, errorDrawable, key, callback); ViewTreeObserver observer = imageView.getViewTreeObserver(); observer.addOnGlobalLayoutListener(this); }
Source:
public static Gson getDefaultGsonParser() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); gsonBuilder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() { DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); @Override public Date deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { if(json == null || StringUtils.isBlank(json.getAsString())) { return null; } try { return df.parse(json.getAsString()); } catch(ParseException e) { LOG.error("error parsing date from Canvas: " + json.getAsString()); throw new JsonParseException(e); } } }); return gsonBuilder.create(); }

Target:
public static Gson getDefaultGsonParser() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); gsonBuilder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() { FastDateFormat df = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssXXX"); @Override public Date deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { if(json == null || StringUtils.isBlank(json.getAsString())) { return null; } try { return df.parse(json.getAsString()); } catch(ParseException e) { LOG.error("error parsing date from Canvas: " + json.getAsString()); throw new JsonParseException(e); } } }); return gsonBuilder.create(); }
Source:
public void clear() { oldGenerator = null; getJsonTextArea().setText(""); numberOfPayloadsSpinner.setValue(1); }

Target:
public void clear() { oldGenerator = null; getJsonTextArea().setText(""); jsonTextArea.discardAllEdits(); numberOfPayloadsSpinner.setValue(1); }
Source:
public long getNumberOfRestarts() { return executionFailureHandler.getNumberOfRestarts(); }

Target:
protected long getNumberOfRestarts() { return executionFailureHandler.getNumberOfRestarts(); }
Source:
public void applyParameters(Material program) { super.applyParameters(program); FBO scene = CoreRegistry.get(DynamicFBOsManager.class).get(DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName()); if (scene != null) { GL13.glActiveTexture(GL13.GL_TEXTURE0); scene.bindDepthTexture(); program.setInt("texDepth", 0); program.setFloat("texelWidth", 1.0f / scene.width()); program.setFloat("texelHeight", 1.0f / scene.height()); } program.setFloat("pixelOffsetX", pixelOffsetX); program.setFloat("pixelOffsetY", pixelOffsetY); }

Target:
public void applyParameters(Material program) { super.applyParameters(program); FBO scene = CoreRegistry.get(DisplayResolutionDependentFBOs.class).get(DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName()); if (scene != null) { GL13.glActiveTexture(GL13.GL_TEXTURE0); scene.bindDepthTexture(); program.setInt("texDepth", 0); program.setFloat("texelWidth", 1.0f / scene.width()); program.setFloat("texelHeight", 1.0f / scene.height()); } program.setFloat("pixelOffsetX", pixelOffsetX); program.setFloat("pixelOffsetY", pixelOffsetY); }
Source:
public Builder withQuestions(final QuestionResponseReadDAO questionResponseReadDAO) { this.surveyOneQuestions = Lists.newArrayList(); this.surveyOneQuestionIds = Lists.newArrayList(); final List<Question> allQuestions = questionResponseReadDAO.getAllQuestions(); for (final Question question : allQuestions) { if (question.category != QuestionCategory.SURVEY_ONE) { continue; } this.surveyOneQuestions.add(question); this.surveyOneQuestionIds.add(question.id); } return this; }

Target:
public Builder withQuestions(final QuestionResponseReadDAO questionResponseReadDAO) { this.surveyQuestions = Lists.newArrayList(); final List<Question> allQuestions = questionResponseReadDAO.getAllQuestions(); for (final Question question : allQuestions) { if (question.category != QuestionCategory.SURVEY) { continue; } this.surveyQuestions.add(question); } return this; }
Source:
public void updateWatchdogItems(Set<VmWatchdogType> vmWatchdogTypes) { List<String> watchDogModelsStrings = new ArrayList<String>(); final UIConstants constants = ConstantsManager.getInstance().getConstants(); for (VmWatchdogType vmWatchdogType : vmWatchdogTypes) { watchDogModelsStrings.add(vmWatchdogType.toString()); } watchDogModelsStrings.add(0, constants.NoWatchdog()); getWatchdogModelEditor().setItems(watchDogModelsStrings); String old_watchdog_selected_string = getWatchdogModelEditor().getSelectedItem(); if (watchDogModelsStrings.contains(old_watchdog_selected_string)) { getWatchdogModelEditor().setSelectedItem(old_watchdog_selected_string); } }

Target:
public void updateWatchdogItems(Set<VmWatchdogType> vmWatchdogTypes) { List<String> watchDogModelsStrings = new ArrayList<String>(); final UIConstants constants = ConstantsManager.getInstance().getConstants(); for (VmWatchdogType vmWatchdogType : vmWatchdogTypes) { watchDogModelsStrings.add(vmWatchdogType.toString()); } watchDogModelsStrings.add(0, constants.NoWatchdog()); getWatchdogModel().setItems(watchDogModelsStrings); String old_watchdog_selected_string = getWatchdogModel().getSelectedItem(); if (watchDogModelsStrings.contains(old_watchdog_selected_string)) { getWatchdogModel().setSelectedItem(old_watchdog_selected_string); } }
Source:
public IBuildPlan parseJob(HudsonModelJob job) throws HudsonException { IBuildPlan plan = createBuildPlan(); String jobUrl = job.getUrl(); if (this.hudsonUrlUtil.isNestedJob(jobUrl)) { plan.setId(jobUrl); } else { plan.setId(job.getName()); } plan.setName(job.getDisplayName()); plan.setDescription(job.getDescription()); plan.setUrl(jobUrl); updateStateAndStatus(job, plan); updateHealth(job, plan); if (job.getLastBuild() != null) { IBuild build = parseBuild(job, job.getLastBuild()); plan.setLastBuild(build); } parseJobActions(plan.getParameterDefinitions(), job.getAction()); if (job instanceof HudsonMatrixMatrixProject) { List<HudsonMatrixMatrixConfiguration> childConfigs = ((HudsonMatrixMatrixProject) job) .getActiveConfiguration(); if (childConfigs != null) { for (HudsonMatrixMatrixConfiguration config : childConfigs) { IBuildPlan newPlan = parseJob(config); newPlan.setName(config.getDisplayName()); newPlan.setParent(plan); newPlan.setId(newPlan.getParent().getId() + newPlan.getId()); plan.getChildren().add(newPlan); } } } return plan; }

Target:
public IBuildPlan parseJob(HudsonModelJob job) throws HudsonException { IBuildPlan plan = createBuildPlan(); String jobUrl = job.getUrl(); if (this.hudsonUrlUtil.isNestedJob(jobUrl)) { plan.setId(jobUrl); } else { plan.setId(job.getName()); } plan.setName(this.hudsonUrlUtil.getDisplayName(jobUrl)); plan.setDescription(job.getDescription()); plan.setUrl(jobUrl); updateStateAndStatus(job, plan); updateHealth(job, plan); if (job.getLastBuild() != null) { IBuild build = parseBuild(job, job.getLastBuild()); plan.setLastBuild(build); } parseJobActions(plan.getParameterDefinitions(), job.getAction()); if (job instanceof HudsonMatrixMatrixProject) { List<HudsonMatrixMatrixConfiguration> childConfigs = ((HudsonMatrixMatrixProject) job) .getActiveConfiguration(); if (childConfigs != null) { for (HudsonMatrixMatrixConfiguration config : childConfigs) { IBuildPlan newPlan = parseJob(config); newPlan.setName(config.getDisplayName()); newPlan.setParent(plan); newPlan.setId(newPlan.getParent().getId() + newPlan.getId()); plan.getChildren().add(newPlan); } } } return plan; }
Source:
public ValidationResult validate(URI fileUri, FileType fileType) { KitodoOutputHandler result = new KitodoOutputHandler(); try { JhoveBase jhoveBase = new JhoveBase(); jhoveBase.init(Config.getParameter(PARAMETER_JHOVE_CONF, "src/main/resources/jhove.conf"), JhoveBase.getSaxClassFromProperties()); jhoveBase.dispatch(App.newAppWithName("Jhove"), jhoveBase.getModule(determineModuleName(fileType)), null, result, null, new String[] {fileUri.getPath() }); } catch (Exception e) { result.treatException(e); } return result.toValidationResult(); }

Target:
public ValidationResult validate(URI fileUri, FileType fileType) { KitodoOutputHandler result = new KitodoOutputHandler(); try { KitodoJhoveBase jhoveBase = new KitodoJhoveBase(MODULES); jhoveBase.validate(fileUri.getPath(), MODULE_NAMES.get(fileType), result); } catch (Exception e) { result.treatException(e); } return result.toValidationResult(); }
Source:
public Condition parse() throws ParseException { parseReturnSentence(); functionName = parseFunctionName(); functionName = functionName.substring(KIE_FUNCTIONS.length(), functionName.length()); List<FunctionDef> functionDefs = FunctionsRegistry.getInstance().getFunctions(functionName); if (functionDefs.isEmpty()) { throw new ParseException(errorMessage(FUNCTION_NAME_NOT_RECOGNIZED_ERROR, functionName), parseIndex); } ParseException lastTryException = null; for (FunctionDef functionDef : functionDefs) { try { reset(); return parse(functionDef); } catch (ParseException e) { lastTryException = e; } } throw lastTryException; }

Target:
public Condition parse() throws ParseException { parseReturnSentence(); functionName = parseFunctionName(); functionName = functionName.substring(KIE_FUNCTIONS.length()); List<FunctionDef> functionDefs = FunctionsRegistry.getInstance().getFunctions(functionName); if (functionDefs.isEmpty()) { throw new ParseException(errorMessage(FUNCTION_NAME_NOT_RECOGNIZED_ERROR, functionName), parseIndex); } ParseException lastTryException = null; for (FunctionDef functionDef : functionDefs) { try { reset(); return parse(functionDef); } catch (ParseException e) { lastTryException = e; } } throw lastTryException; }
Source:
public static List<String> removePrefixUri(List<String> uris) { for (int i = 0; i < uris.size(); i++) { uris.set(i, removePrefixUri(uris.get(i))); } return uris; }

Target:
public static List<String> removePrefixUri(List<String> uris) { return uris.stream().map(LanguageServiceUtils::removePrefixUri).collect(Collectors.toList()); }
Source:
public void validate() { for (Frequency frequency: feed.frequencies) frequenciesById.put(frequency.trip_id, frequency); for (String tripId : frequenciesById.keySet()) { List<Frequency> frequencies = frequenciesById.get(tripId); if (frequencies.size() < 1) { return; } for (int i = 0; i < frequencies.size(); i++) { Frequency frequency = frequencies.get(i); for (int j = 0; j < frequencies.size(); j++) { if (i == j) continue; Frequency prevFrequency = frequencies.get(j); if ( frequency.end_time <= prevFrequency.end_time && frequency.start_time >= prevFrequency.start_time || frequency.start_time >= prevFrequency.start_time && frequency.start_time < prevFrequency.end_time || frequency.end_time > prevFrequency.start_time && frequency.end_time <= prevFrequency.end_time ) { registerError(frequency, NewGTFSErrorType.FREQUENCY_PERIOD_OVERLAP); } } } } }

Target:
public void validate() { for (Frequency frequency: feed.frequencies) frequenciesById.put(frequency.trip_id, frequency); for (String tripId : frequenciesById.keySet()) { List<Frequency> frequencies = frequenciesById.get(tripId); if (frequencies.size() <= 1) { return; } for (int i = 0; i < frequencies.size() - 1; i++) { Frequency a = frequencies.get(i); for (int j = i + 1; j < frequencies.size(); j++) { Frequency b = frequencies.get(j); if ( b.start_time >= a.start_time && b.end_time <= a.end_time || a.start_time >= b.start_time && a.end_time <= b.end_time || a.start_time >= b.start_time && a.start_time < b.end_time || a.end_time > b.start_time && a.end_time <= b.end_time ) { registerError(a, NewGTFSErrorType.FREQUENCY_PERIOD_OVERLAP); } } } } }
Source:
public Optional<Block> compute() { if (specialBlockProjectionOutput.isPresent()) { try { Optional<Block> output = specialBlockProjectionOutput.get().compute(); if (output.isPresent()) { lastOutputDictionary = output; } else { return Optional.empty(); } } catch (Exception ignored) { specialBlockProjectionOutput = emptySpecialBlockProjection(); } } if (block instanceof DictionaryBlock) { lastDictionaryUsageCount += selectedPositions.size(); } if (lastOutputDictionary.isPresent()) { if (block instanceof RunLengthEncodedBlock) { return Optional.of(new RunLengthEncodedBlock(lastOutputDictionary.get(), selectedPositions.size())); } if (block instanceof DictionaryBlock) { DictionaryBlock dictionaryBlock = (DictionaryBlock) block; lastDictionaryUsageCount += selectedPositions.size(); int[] outputIds = filterDictionaryIds(dictionaryBlock, selectedPositions); return Optional.of(new DictionaryBlock(selectedPositions.size(), lastOutputDictionary.get(), outputIds, false, sourceIdFunction.apply(dictionaryBlock))); } verify(false, "unexpected block type " + block.getClass()); } verify(!specialBlockProjectionOutput.isPresent()); return genericBlockProjectionOutput.compute(); }

Target:
public Optional<Block> compute() { if (fallbackProcessingProjectionOutput.isPresent()) { return fallbackProcessingProjectionOutput.get().compute(); } Optional<Block> dictionaryOutput = Optional.empty(); if (dictionaryProcessingProjectionOutput.isPresent()) { try { dictionaryOutput = dictionaryProcessingProjectionOutput.get().compute(); if (!dictionaryOutput.isPresent()) { return Optional.empty(); } lastOutputDictionary = dictionaryOutput; } catch (Exception ignored) { lastOutputDictionary = Optional.empty(); dictionaryProcessingProjectionOutput = Optional.empty(); } } if (block instanceof DictionaryBlock) { lastDictionaryUsageCount += selectedPositions.size(); } if (dictionaryOutput.isPresent()) { if (block instanceof RunLengthEncodedBlock) { return Optional.of(new RunLengthEncodedBlock(dictionaryOutput.get(), selectedPositions.size())); } if (block instanceof DictionaryBlock) { DictionaryBlock dictionaryBlock = (DictionaryBlock) block; int[] outputIds = filterDictionaryIds(dictionaryBlock, selectedPositions); return Optional.of(new DictionaryBlock(selectedPositions.size(), dictionaryOutput.get(), outputIds, false, sourceIdFunction.apply(dictionaryBlock))); } throw new UnsupportedOperationException("unexpected block type " + block.getClass()); } verify(!dictionaryProcessingProjectionOutput.isPresent()); verify(!fallbackProcessingProjectionOutput.isPresent()); fallbackProcessingProjectionOutput = Optional.of(projection.project(session, yieldSignal, new Page(block), selectedPositions)); return fallbackProcessingProjectionOutput.get().compute(); }
Source:
private Set<InferenceVariable> getInferenceVariables(ParameterizedTypeBinding parameterizedType) { final Set<InferenceVariable> inferenceVariables = new LinkedHashSet<>(); for(int i=0;i<parameterizedType.arguments.length;i++) { final TypeBinding argument = parameterizedType.arguments[i]; argument.collectInferenceVariables(inferenceVariables); } return inferenceVariables; }

Target:
private Set<InferenceVariable> getInferenceVariables(ParameterizedTypeBinding parameterizedType) { final Set<InferenceVariable> inferenceVariables = new LinkedHashSet<>(); for(final TypeBinding argument: parameterizedType.arguments) { argument.collectInferenceVariables(inferenceVariables); } return inferenceVariables; }
Source:
public VersionTypeValidation validateToolSet(Set<SourceFile> sourcefiles, String primaryDescriptorFilePath) { List<DescriptorLanguage.FileType> fileTypes = new ArrayList<>(Collections.singletonList(DescriptorLanguage.FileType.DOCKSTORE_CWL)); Set<SourceFile> filteredSourceFiles = filterSourcefiles(sourcefiles, fileTypes); Optional<SourceFile> mainDescriptor = filteredSourceFiles.stream().filter((sourceFile -> Objects.equals(sourceFile.getPath(), primaryDescriptorFilePath))).findFirst(); boolean isValid = true; String validationMessage = null; Map<String, String> validationMessageObject = new HashMap<>(); if (mainDescriptor.isPresent()) { Yaml yaml = new Yaml(); String content = mainDescriptor.get().getContent(); if (content == null || content.isEmpty()) { isValid = false; validationMessage = "Primary CWL descriptor is empty."; } else if (!content.contains("class: CommandLineTool") && !content.contains("class: ExpressionTool")) { isValid = false; validationMessage = "A CWL tool requires class: CommandLineTool or ExpressionTool."; if (content.contains("class: Workflow")) { validationMessage += " This file contains class: Workflow. Did you mean to register a workflow?"; } } else if (!this.isValidCwl(content, yaml)) { isValid = false; validationMessage = "Invalid CWL version."; } } else { isValid = false; validationMessage = "Primary CWL descriptor is not present."; } validationMessageObject.put(primaryDescriptorFilePath, validationMessage); return new VersionTypeValidation(isValid, validationMessageObject); }

Target:
public VersionTypeValidation validateToolSet(Set<SourceFile> sourcefiles, String primaryDescriptorFilePath) { List<DescriptorLanguage.FileType> fileTypes = new ArrayList<>(Collections.singletonList(DescriptorLanguage.FileType.DOCKSTORE_CWL)); Set<SourceFile> filteredSourceFiles = filterSourcefiles(sourcefiles, fileTypes); Optional<SourceFile> mainDescriptor = filteredSourceFiles.stream().filter((sourceFile -> Objects.equals(sourceFile.getPath(), primaryDescriptorFilePath))).findFirst(); boolean isValid = true; String validationMessage = null; Map<String, String> validationMessageObject = new HashMap<>(); if (mainDescriptor.isPresent()) { Yaml yaml = new Yaml(); String content = mainDescriptor.get().getContent(); if (content == null || content.isEmpty()) { isValid = false; validationMessage = "Primary CWL descriptor is empty."; } else if (!content.contains("class: CommandLineTool") && !content.contains("class: ExpressionTool")) { isValid = false; validationMessage = "A CWL tool requires 'class: CommandLineTool' or 'class: ExpressionTool'."; if (content.contains("class: Workflow")) { validationMessage += " This file contains 'class: Workflow'. Did you mean to register a workflow?"; } } else if (!this.isValidCwl(content, yaml)) { isValid = false; validationMessage = "Invalid CWL version."; } } else { isValid = false; validationMessage = "Primary CWL descriptor is not present."; } validationMessageObject.put(primaryDescriptorFilePath, validationMessage); return new VersionTypeValidation(isValid, validationMessageObject); }
Source:
public Map<String, Map<String, String>> previewNewNote(long mid, String[] flds) { Uri newNoteUri = addNoteInternal(mid, 1, flds, Collections.singleton(TEST_TAG)); Map<String, Map<String, String>> cards = new HashMap<>(); Uri cardsUri = Uri.withAppendedPath(newNoteUri, "cards"); final Cursor cardsCursor = mResolver.query(cardsUri, null, null, null, null); try { while (cardsCursor.moveToNext()) { final String n = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.CARD_NAME)); final String q = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.QUESTION)); final String a = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.ANSWER)); Map<String, String> html = new HashMap<>(); html.put("q", q); html.put("a", a); cards.put(n, html); } } finally { cardsCursor.close(); } mResolver.delete(newNoteUri, null, null); return cards; }

Target:
public Map<String, Map<String, String>> previewNewNote(long mid, String[] flds) { Uri newNoteUri = addNoteInternal(mid, DEFAULT_DECK_ID, flds, Collections.singleton(TEST_TAG)); Map<String, Map<String, String>> cards = new HashMap<>(); Uri cardsUri = Uri.withAppendedPath(newNoteUri, "cards"); final Cursor cardsCursor = mResolver.query(cardsUri, null, null, null, null); try { while (cardsCursor.moveToNext()) { final String n = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.CARD_NAME)); final String q = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.QUESTION)); final String a = cardsCursor.getString(cardsCursor.getColumnIndex(FlashCardsContract.Card.ANSWER)); Map<String, String> html = new HashMap<>(); html.put("q", q); html.put("a", a); cards.put(n, html); } } finally { cardsCursor.close(); } mResolver.delete(newNoteUri, null, null); return cards; }
Source:
public int execute() { try { Hive hiveDb = getHive(); Path dumpBaseDir = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), getNextDumpDir()); Path hiveDumpRoot = new Path(dumpBaseDir, ReplUtils.REPL_HIVE_BASE_DIR); DumpMetaData dmd = new DumpMetaData(hiveDumpRoot, conf); ReplChangeManager.getInstance(conf); Path cmRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLCMDIR)); Long lastReplId; if (work.isBootStrapDump()) { lastReplId = bootStrapDump(hiveDumpRoot, dmd, cmRoot, hiveDb); } else { lastReplId = incrementalDump(hiveDumpRoot, dmd, cmRoot, hiveDb); } prepareReturnValues(Arrays.asList(dumpBaseDir.toUri().toString(), String.valueOf(lastReplId))); } catch (Exception e) { LOG.error("failed", e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } return 0; }

Target:
public int execute() { try { Hive hiveDb = getHive(); Path dumpRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), Base64.getEncoder().encodeToString(work.dbNameOrPattern.toLowerCase() .getBytes(StandardCharsets.UTF_8.name()))); Path currentDumpPath = new Path(dumpRoot, getNextDumpDir()); DumpMetaData dmd = new DumpMetaData(currentDumpPath, conf); ReplChangeManager.getInstance(conf); Path cmRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLCMDIR)); Long lastReplId; if (!dumpRoot.getFileSystem(conf).exists(dumpRoot) || dumpRoot.getFileSystem(conf).listStatus(dumpRoot).length == 0) { lastReplId = bootStrapDump(currentDumpPath, dmd, cmRoot, hiveDb); } else { work.setEventFrom(getEventFromPreviousDumpMetadata(dumpRoot)); lastReplId = incrementalDump(currentDumpPath, dmd, cmRoot, hiveDb); } prepareReturnValues(Arrays.asList(currentDumpPath.toUri().toString(), String.valueOf(lastReplId))); } catch (Exception e) { LOG.error("failed", e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } return 0; }
Source:
private void startNextFetch() { final CommCareSession session = CommCareApplication._().getCurrentSession(); String needed = session.getNeededData(); StackFrameStep lastPopped = session.getPoppedStep(); if (needed == null) { readyToProceed(session); } else if (needed.equals(SessionFrame.STATE_COMMAND_ID)) { handleGetCommand(session); } else if (needed.equals(SessionFrame.STATE_DATUM_VAL)) { handleGetDatum(session, lastPopped); } else if (needed.equals(SessionFrame.STATE_DATUM_COMPUTED)) { handleCompute(session); } }

Target:
private void startNextFetch() { final CommCareSession session = CommCareApplication._().getCurrentSession(); String needed = session.getNeededData(); if (needed == null) { readyToProceed(session); } else if (needed.equals(SessionFrame.STATE_COMMAND_ID)) { handleGetCommand(session); } else if (needed.equals(SessionFrame.STATE_DATUM_VAL)) { handleGetDatum(session); } else if (needed.equals(SessionFrame.STATE_DATUM_COMPUTED)) { handleCompute(session); } }
Source:
public NextAction start(@SuppressWarnings("unused") StateExecution execution) throws InterruptedException { sleep(100); return counter++ < 100 ? moveToState(State.start, "loop") : moveToState(State.done, "done"); }

Target:
public NextAction start(@SuppressWarnings("unused") StateExecution execution) throws InterruptedException { sleep(100); return moveToState(State.start, "loop"); }
Source:
public String selector() { return EnvStackConfigUpdatesHandlerSelectors.STACK_CONFIG_UPDATES_HANDLER_EVENT .name(); }

Target:
public String selector() { return EnvStackConfigUpdatesHandlerSelectors.STACK_CONFIG_UPDATES_HANDLER_EVENT.event(); }
Source:
public int hashCode() { int result = dataLinks.hashCode(); result = 31 * result + paymentExternalId.hashCode(); result = 31 * result + amount.hashCode(); result = 31 * result + paymentProvider.hashCode(); result = 31 * result + description.hashCode(); result = 31 * result + reference.hashCode(); result = 31 * result + createdDate.hashCode(); result = 31 * result + state.hashCode(); return result; }

Target:
public int hashCode() { return Objects.hash(paymentExternalId, amount, paymentProvider, description, reference, createdDate, state); }