auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
String getQualifier(Date timestamp) throws MojoFailureException { String qualifier = format.format(timestamp); try { Version.parseVersion(Version.emptyVersion + "." + qualifier); } catch (IllegalArgumentException e) { throw new MojoFailureException("Invalid build qualifier format '" + format.toPattern() + "', it does not match the OSGi qualifier constraint ([0..9]|[a..zA..Z]|'_'|'-')"); } return qualifier; }

Target:
String getQualifier(Date timestamp) { return format.format(timestamp); }
Source:
public void sendToAll(String str) throws IOException { for (NanoWebSocketConnection connection : connectionsList) { if (connection != null) { try { connection.send(str); } catch (IOException e) { try { connection.close(WebSocketFrame.CloseCode.InvalidFramePayloadData,"reqrement",false); } catch (IOException e1) { connectionsList.remove(connection); } } } } }

Target:
public void sendToAll(String str){ for (NanoWebSocketConnection connection : connectionsList) { try { connection.send(str); }catch (IOException e) { try { connection.close(WebSocketFrame.CloseCode.InvalidFramePayloadData, CLOSE_REASON_CANT_SENT,false); } catch (IOException e1) { e1.printStackTrace(); } connectionsList.remove(connection); } } }
Source:
private final PGPEncryptedDataGenerator cpk() throws NoSuchProviderException, PGPException { final PGPEncryptedDataGenerator cpk = new PGPEncryptedDataGenerator(PGPEncryptedData.CAST5, true, prng, "BC"); cpk.addMethod(dest); return cpk; }

Target:
private final PGPEncryptedDataGenerator cpk() throws NoSuchProviderException, PGPException { PGPEncryptedDataGenerator cpk = new PGPEncryptedDataGenerator(PGPEncryptedData.CAST5, true, prng, "BC"); cpk.addMethod(dest); return cpk; }
Source:
CompactionDetails getCompactionDetails(BlobStore blobStore) throws StoreException { ReplicaId replicaId = blobStore.getReplicaId(); if (compactionPolicyFactory != null && compactionPolicyFactory instanceof HybridCompactionPolicyFactory) { CompactionPolicyCounter compactionPolicyCounter = replicaToCounterMap.getOrDefault(replicaId, new CompactionPolicyCounter(storeConfig)); compactionPolicyCounter.increment(); replicaToCounterMap.put(replicaId, compactionPolicyCounter); } return blobStore.getCompactionDetails(compactionPolicy, replicaToCounterMap.get(replicaId)); }

Target:
CompactionDetails getCompactionDetails(BlobStore blobStore) throws StoreException { return blobStore.getCompactionDetails(compactionPolicy); }
Source:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String teamName = getRequestParamValue(Const.ParamsNames.TEAM_NAME); if (teamName == null) { List<StudentAttributes> studentsForCourse = logic.getStudentsForCourse(courseId); StudentsData studentsData = new StudentsData(studentsForCourse); studentsData.getStudents().forEach(StudentData::hideInformationForInstructor); return new JsonResult(studentsData); } else { List<StudentAttributes> studentsForTeam = logic.getStudentsForTeam(teamName, courseId); StudentsData studentsData = new StudentsData(studentsForTeam); studentsData.getStudents().forEach(StudentData::hideInformationForStudent); return new JsonResult(studentsData); } }

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String teamName = getRequestParamValue(Const.ParamsNames.TEAM_NAME); if (teamName == null) { List<StudentAttributes> studentsForCourse = logic.getStudentsForCourse(courseId); return new JsonResult(new StudentsData(studentsForCourse)); } else { List<StudentAttributes> studentsForTeam = logic.getStudentsForTeam(teamName, courseId); StudentsData studentsData = new StudentsData(studentsForTeam); studentsData.getStudents().forEach(StudentData::hideInformationForStudent); return new JsonResult(studentsData); } }
Source:
private Object parseDateType(Object obj) { try { return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").parse((String) obj); } catch (ParseException e) { } return obj; }

Target:
private Object parseDateType(Object obj) { try { return new SimpleDateFormat(ISO8601_FORMAT).parse((String) obj); } catch (ParseException e) { return obj; } }
Source:
private void setTicker(String cryptoCurrency, String fiatCurrency) { String crypto = cryptoCurrency.toUpperCase(); String fiat = fiatCurrency.toUpperCase(); this.rateInfo = api.getTicker(crypto, fiat).get(fiat + '_' + crypto); }

Target:
private void setTicker(String cryptoCurrency, String fiatCurrency) { String crypto = cryptoCurrency.toUpperCase(); String fiat = fiatCurrency.toUpperCase(); this.bitKubRateInfo = api.getTicker(crypto, fiat).get(fiat + '_' + crypto); }
Source:
public KMSConfig(VerifiableProperties verifiableProperties) { kmsKeyGenAlgo = verifiableProperties.getString("kms.key.gen.algo", "AES"); kmsDefaultKey = verifiableProperties.getString("kms.default.key", "feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308"); }

Target:
public KMSConfig(VerifiableProperties verifiableProperties) { kmsKeyGenAlgo = verifiableProperties.getString("kms.key.gen.algo", "AES"); kmsRandomKeySizeInBits = verifiableProperties.getInt("kms.random.key.size.in.bits", 256); }
Source:
public Client get() throws OseeCoreException { Client client = new Client(); String[] supportedVersions = serverManager.getSupportedVersions(); for (String ver : supportedVersions) { client.getSupportedVersions().add(ver); } return client; }

Target:
public Client get() throws OseeCoreException { Client client = new Client(); String[] supportedVersions = serverManager.getSupportedVersions(); for (String ver : supportedVersions) { client.addSupportedVersion(ver); } return client; }
Source:
private boolean isWikibaseRedirection(MwRevision mwRevision) { return redirectionsPattern.matcher(mwRevision.getText()).matches(); }

Target:
private boolean isWikibaseRedirection(MwRevision mwRevision) { return mwRevision.getText().contains("\"redirect\":"); }
Source:
private void sendVolumeCommand(String itemName, String command, DataOutputStream outToServer, BufferedReader i) throws IOException { char[] cbuf = new char[50]; outToServer.write(hexStringToByteArray(command)); i.read(cbuf, 0, 50); Pattern p = Pattern.compile(".*Vol=(-?\\d{1,2}).*"); Matcher m = p.matcher(new String(cbuf)); if (m.find()) eventPublisher.postUpdate(itemName, new DecimalType(m.group(1))); else logger.error("Error sending command, received this: " + new String(cbuf)); }

Target:
private void sendVolumeCommand(String itemName, String command, DataOutputStream outToServer, BufferedReader i) throws IOException { char[] cbuf = new char[50]; logger.debug("Sending volume command {}", command); outToServer.write(hexStringToByteArray(command)); i.read(cbuf, 0, 50); Matcher m = volumePattern.matcher(new String(cbuf)); if (m.find()) { String volume = m.group(1); eventPublisher.postUpdate(itemName, new DecimalType(volume)); logger.debug("Setting volume for item on {}", itemName, volume); } else { logger.error( "Error sending regular volume command {}, received this: {}", command, new String(cbuf)); } }
Source:
public OpaqueValue<ITuple> fromValues(List<Values> valuesList) { if (valuesList == null || valuesList.size() == 0) { return null; } Values values = valuesList.get(0); int index = 0; SimpleTuple curr = new SimpleTuple(tupleFields); for (String valueField : tupleFields) { curr.put(valueField, values.get(index++)); } if (isAllNull(curr)) { curr = null; } SimpleTuple prev = new SimpleTuple(tupleFields); for (String valueField : tupleFields) { prev.put(valueField, values.get(index++)); } if (isAllNull(prev)) { prev = null; } Long currTx = (Long) values.get(index++); return new OpaqueValue<ITuple>(currTx, curr, prev); }

Target:
public OpaqueValue<ITuple> fromValues(List<Values> valuesList) { if (valuesList == null || valuesList.size() == 0) { return null; } Values values = valuesList.get(0); int index = 0; @SuppressWarnings("checkstyle:VariableDeclarationUsageDistance") Long currTx = (Long) values.get(index++); SimpleTuple curr = new SimpleTuple(tupleFields); for (String valueField : tupleFields) { curr.put(valueField, values.get(index++)); } if (isAllNull(curr)) { curr = null; } SimpleTuple prev = new SimpleTuple(tupleFields); for (String valueField : tupleFields) { prev.put(valueField, values.get(index++)); } if (isAllNull(prev)) { prev = null; } return new OpaqueValue<ITuple>(currTx, curr, prev); }
Source:
public Component getComponent(int number) { SideEffect effect = getSideEffects().get(number); SideEffect.State state = this.sideEffectSet.getState(effect); TextComponent.Builder builder = TextComponent.builder(); builder = builder.append(TranslatableComponent.of(effect.getDisplayName(), TextColor.YELLOW) .hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TranslatableComponent.of(effect.getDescription())))); for (SideEffect.State uiState : SideEffect.State.values()) { builder = builder.append(TextComponent.space()); builder = builder.append(TranslatableComponent.of(uiState.getDisplayName(), uiState == state ? TextColor.WHITE : TextColor.GRAY) .clickEvent(ClickEvent.runCommand(" .hoverEvent(HoverEvent.showText(uiState == state ? TextComponent.of("Current") : TextComponent.of("Click to set to ").append(TranslatableComponent.of(uiState.getDisplayName())))) ); } return builder.build(); }

Target:
public Component getComponent(int number) { SideEffect effect = getSideEffects().get(number); SideEffect.State state = this.sideEffectSet.getState(effect); TextComponent.Builder builder = TextComponent.builder(); builder = builder.append(TranslatableComponent.of(effect.getDisplayName(), TextColor.YELLOW) .hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TranslatableComponent.of(effect.getDescription())))); for (SideEffect.State uiState : SHOWN_VALUES) { builder = builder.append(TextComponent.space()); builder = builder.append(TranslatableComponent.of(uiState.getDisplayName(), uiState == state ? TextColor.WHITE : TextColor.GRAY) .clickEvent(ClickEvent.runCommand(" .hoverEvent(HoverEvent.showText(uiState == state ? TranslatableComponent.of("worldedit.sideeffect.box.current") : TranslatableComponent.of("worldedit.sideeffect.box.change-to", TranslatableComponent.of(uiState.getDisplayName())) )) ); } return builder.build(); }
Source:
public static void main(String[] args) { ConsoleAppender console = new ConsoleAppender(); console.setLayout(new PatternLayout("%d{ISO8601} [%t] %-5p %c - %m%n")); console.setThreshold(Level.DEBUG); console.activateOptions(); Logger.getRootLogger().addAppender(console); GraphicalSurveySummaryExporter exporter = new GraphicalSurveySummaryExporter(); Map<String, String> criteria = new HashMap<String, String>(); Map<String, String> options = new HashMap<String, String>(); options.put(LOCALE_OPT, "en"); options.put(LAST_COLLECTION_OPT, "false"); options.put("useQuestionId", "true"); options.put("email", "email@example.com"); options.put("from", null); options.put("to", null); options.put("maxDataReportRows", null); criteria.put(SurveyRestRequest.SURVEY_ID_PARAM, args[2]); criteria.put("apiKey", args[3]); exporter.export(criteria, new File(args[0]), args[1], options); }

Target:
public static void main(String[] args) { ConsoleAppender console = new ConsoleAppender(); console.setLayout(new PatternLayout("%d{ISO8601} [%t] %-5p %c - %m%n")); console.setThreshold(Level.DEBUG); console.activateOptions(); Logger.getRootLogger().addAppender(console); GraphicalSurveySummaryExporter exporter = new GraphicalSurveySummaryExporter(); Map<String, String> criteria = new HashMap<String, String>(); Map<String, String> options = new HashMap<String, String>(); options.put(LOCALE_OPT, "en"); options.put(LAST_COLLECTION_OPT, "false"); options.put("useQuestionId", "false"); options.put("email", "email@example.com"); options.put("from", null); options.put("to", null); options.put("maxDataReportRows", null); criteria.put(SurveyRestRequest.SURVEY_ID_PARAM, args[2]); criteria.put("apiKey", args[3]); exporter.export(criteria, new File(args[0]), args[1], options); }
Source:
public void testIncludedProtocols() throws Exception { URL url = new URL(baseUrl, SERVLET_PATH_ECHO + "?a=b&c=d"); String includedProtocols; String version = System.getProperty("java.version"); if (version.startsWith("1.")) { includedProtocols = INCLUDED_PROTOCOLS; } else { includedProtocols = INCLUDED_PROTOCOLS_JDK11; } HttpsURLConnection conn = getConnectionWithPreferredProtocolSSLSocketFactory(url, includedProtocols); assertFalse("included protocol list is empty", includedProtocols.isEmpty()); readFromConnection(conn); PreferredProtocolSSLSocketFactory factory = (PreferredProtocolSSLSocketFactory)conn.getSSLSocketFactory(); if (version.startsWith("1.")) { assertEquals("TLSv1.2", factory.getSocket().getSession().getProtocol()); } else { assertEquals("TLSv1.3", factory.getSocket().getSession().getProtocol()); } }

Target:
public void testIncludedProtocols() throws Exception { URL url = new URL(baseUrl, SERVLET_PATH_ECHO + "?a=b&c=d"); String includedProtocols = INCLUDED_PROTOCOLS; if (Shell.isJavaVersionAtLeast(11)) { includedProtocols = INCLUDED_PROTOCOLS_JDK11; } HttpsURLConnection conn = getConnectionWithPreferredProtocolSSLSocketFactory(url, includedProtocols); assertFalse("included protocol list is empty", includedProtocols.isEmpty()); readFromConnection(conn); PreferredProtocolSSLSocketFactory factory = (PreferredProtocolSSLSocketFactory)conn.getSSLSocketFactory(); if (Shell.isJavaVersionAtLeast(11)) { assertEquals("TLSv1.3", factory.getSocket().getSession().getProtocol()); } else { assertEquals("TLSv1.2", factory.getSocket().getSession().getProtocol()); } }
Source:
public void deploy(final GAV gav, final String jarPath, final RepositorySystemSession session) { Artifact jarArtifact = new DefaultArtifact(gav.getGroupId(), gav.getArtifactId(), JAR_ARTIFACT, gav.getVersion()); jarArtifact = jarArtifact.setFile(new File(jarPath)); Artifact pom = null; try { final ZipFile jarFile = new ZipFile(jarArtifact.getFile()); Path target = null; final Enumeration<? extends ZipEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if (entry.getName().endsWith("pom.xml")) { final String jarFileName = jarArtifact.getFile().toPath().getFileName().toString(); Path pomDir = Files.createDirectory(tempDir.resolve(jarFileName)); target = Files.createFile(pomDir.resolve(jarFileName.substring(0, jarFileName.length() - 4) + ".pom")); InputStream stream = jarFile.getInputStream(entry); java.nio.file.Files.copy(stream, target, StandardCopyOption.REPLACE_EXISTING); break; } } pom = new SubArtifact(jarArtifact, null, "pom").setFile(target.toFile()); } catch (Exception ex) { pom = null; } try { final InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact); if (pom != null) { installRequest.addArtifact(pom); } Aether.getAether().getSystem().install(session,installRequest); } catch (InstallationException e) { logger.error(e.getMessage(), e); } }

Target:
public void deploy(final GAV gav, final String jarPath, final RepositorySystemSession session) { Artifact jarArtifact = new DefaultArtifact(gav.getGroupId(), gav.getArtifactId(), JAR_ARTIFACT, gav.getVersion()); jarArtifact = jarArtifact.setFile(new File(jarPath)); Artifact pom = null; try { final ZipFile jarFile = new ZipFile(jarArtifact.getFile()); Path target = null; final Enumeration<? extends ZipEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if (entry.getName().endsWith("pom.xml")) { final String jarFileName = jarArtifact.getFile().toPath().getFileName().toString(); Path pomDir = Files.createDirectory(tempDir.resolve(jarFileName)); target = Files.createFile(pomDir.resolve(jarFileName.substring(0, jarFileName.length() - 4) + ".pom")); InputStream stream = jarFile.getInputStream(entry); java.nio.file.Files.copy(stream, target, StandardCopyOption.REPLACE_EXISTING); break; } } pom = new SubArtifact(jarArtifact, null, "pom").setFile(target.toFile()); } catch (Exception ex) { pom = null; logger.error(ex.getMessage(), ex); } try { final InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact); if (pom != null) { installRequest.addArtifact(pom); } Aether.getAether().getSystem().install(session, installRequest); } catch (InstallationException e) { logger.error(e.getMessage(), e); } }
Source:
public static ITmfTrace getTrace() { TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(null, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); return trace; } catch (Exception e) { trace.dispose(); throw new NullPointerException("The trace could not be instantiated" + e.getMessage()); } }

Target:
public static ITmfTrace getTrace() { TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } trace.initTrace(null, filePath.toOSString(), TmfEvent.class); TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(null, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); return trace; } catch (Exception e) { trace.dispose(); throw new NullPointerException("The trace could not be instantiated" + e.getMessage()); } }
Source:
public EvalTypeId(IType type, IBinding templateDefinition, ICPPEvaluation... arguments) { super(templateDefinition); fInputType= type; fArguments= arguments == null ? new ICPPEvaluation[0] : arguments; }

Target:
public EvalTypeId(IType type, IBinding templateDefinition, ICPPEvaluation... arguments) { super(templateDefinition); Assert.isNotNull(arguments); fInputType= type; fArguments= arguments == null ? new ICPPEvaluation[0] : arguments; }
Source:
public ConfigBuilder writeTo(URI viewUri) { conf.set(KITE_OUTPUT_URI, viewUri.toString()); DatasetRepository viewRepo = Datasets.repositoryFor(viewUri); if (viewRepo instanceof TemporaryRepositoryAccessor) { TemporaryDatasetRepository tempRepo = ((TemporaryRepositoryAccessor) viewRepo).getTemporaryRepository( UUID.randomUUID().toString()); conf.set(KITE_TEMP_REPO_URI, tempRepo.getUri().toString()); } return this; }

Target:
public ConfigBuilder writeTo(URI viewUri) { conf.set(KITE_OUTPUT_URI, viewUri.toString()); return this; }
Source:
private CompletableFuture<UserContext> init(Consumer<String> progressCallback) { progressCallback.accept("Retrieving Friends"); return writeSynchronizer.getCurrentWriterData(signer.publicKeyHash, signer.publicKeyHash, wd -> createFileTree(entrie, username, network, crypto.random, crypto.hasher) .thenCompose(root -> { this.entrie = root; return getByPath("/" + username + "/" + "shared") .thenApply(sharedOpt -> { if (!sharedOpt.isPresent()) throw new IllegalStateException("Couldn't find shared folder!"); return buildSharedWithCache(sharedOpt.get(), this::getUserRoot); }); }).thenApply(b -> wd) ).thenApply(res -> this); }

Target:
private CompletableFuture<UserContext> init(Consumer<String> progressCallback) { progressCallback.accept("Retrieving Friends"); return writeSynchronizer.getCurrentWriterData(signer.publicKeyHash, signer.publicKeyHash, wd -> createFileTree(entrie, username, network, crypto.random, crypto.hasher) .thenCompose(root -> { this.entrie = root; return getByPath("/" + username + "/" + "shared") .thenCompose(sharedOpt -> { if (!sharedOpt.isPresent()) throw new IllegalStateException("Couldn't find shared folder!"); return buildSharedWithCache(sharedOpt.get(), this::getUserRoot); }); }).thenApply(b -> wd) ).thenApply(res -> this); }
Source:
public Queue<ControllerAction> getInputQueue() { Queue<ControllerAction> result = new ArrayDeque<>(); result.addAll(queuedActions); queuedActions.clear(); return result; }

Target:
public Queue<ControllerAction> getInputQueue() { Queue<ControllerAction> result = new ArrayDeque<>(queuedActions); queuedActions.clear(); return result; }
Source:
private void getTargetResultSet(Configuration conf, byte[] startRow, byte[] stopRow) throws IOException, SQLException { Scan targetScan = targetQueryPlan.getContext().getScan(); targetScan.setAttribute(BaseScannerRegionObserver.SKIP_REGION_BOUNDARY_CHECK, Bytes.toBytes(true)); if(startRow != null) { targetScan.setStartRow(startRow); } if(stopRow != null) { targetScan.setStopRow(stopRow); } ResultIterator targetTableResultIterator = PhoenixMapReduceUtil .initializeIterator(conf, Collections.singletonList(targetScan), targetQueryPlan); targetResultSet = PhoenixMapReduceUtil.initializeResultSet(targetTableResultIterator, targetQueryPlan); targetHasNext = targetResultSet.next(); }

Target:
private void getTargetResultSet(Configuration conf, byte[] startRow, byte[] stopRow) throws IOException, SQLException { Scan targetScan = targetQueryPlan.getContext().getScan(); if(startRow != null) { targetScan.withStartRow(startRow); } if(stopRow != null) { targetScan.withStopRow(stopRow); } ResultIterator targetTableResultIterator = PhoenixMapReduceUtil .initializeIterator(conf, Collections.singletonList(targetScan), targetQueryPlan); targetResultSet = PhoenixMapReduceUtil.initializeResultSet(targetTableResultIterator, targetQueryPlan); targetHasNext = targetResultSet.next(); }
Source:
public void put(final JmxCollector.Rule rule, final String cacheKey, final MatchedRule matchedRule) { Map<String, MatchedRule> cachedRulesForRule = cachedRules.get(rule); if (cachedRulesForRule == null) { synchronized (cachedRules) { cachedRulesForRule = cachedRules.get(rule); if (cachedRulesForRule == null) { cachedRulesForRule = new ConcurrentHashMap<String, MatchedRule>(); cachedRules.put(rule, cachedRulesForRule); } } } cachedRulesForRule.put(cacheKey, matchedRule); }

Target:
public void put(final JmxCollector.Rule rule, final String cacheKey, final MatchedRule matchedRule) { Map<String, MatchedRule> cachedRulesForRule = cachedRules.get(rule); cachedRulesForRule.put(cacheKey, matchedRule); }
Source:
public static RelNode createCastRel( final RelNode rel, RelDataType castRowType, boolean rename, RelFactories.ProjectFactory projectFactory) { assert projectFactory != null; RelDataType rowType = rel.getRowType(); if (areRowTypesEqual(rowType, castRowType, rename)) { return rel; } if (rowType.getFieldCount() != castRowType.getFieldCount()) { throw new IllegalArgumentException("Field count is not equal: " + "rowType [" + rowType + "] castRowType [" + castRowType + "]"); } final RexBuilder rexBuilder = rel.getCluster().getRexBuilder(); List<RexNode> castExps; RelNode input; List<RelHint> hints = ImmutableList.of(); if (rel instanceof Project) { final Project project = (Project) rel; castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, ((Project) rel).getProjects()); input = rel.getInput(0); hints = project.getHints(); } else { castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, rowType); input = rel; } if (rename) { return projectFactory.createProject(input, hints, castExps, castRowType.getFieldNames()); } else { return projectFactory.createProject(input, hints, castExps, rowType.getFieldNames()); } }

Target:
public static RelNode createCastRel( final RelNode rel, RelDataType castRowType, boolean rename, RelFactories.ProjectFactory projectFactory) { assert projectFactory != null; RelDataType rowType = rel.getRowType(); if (areRowTypesEqual(rowType, castRowType, rename)) { return rel; } if (rowType.getFieldCount() != castRowType.getFieldCount()) { throw new IllegalArgumentException("Field counts are not equal: " + "rowType [" + rowType + "] castRowType [" + castRowType + "]"); } final RexBuilder rexBuilder = rel.getCluster().getRexBuilder(); List<RexNode> castExps; RelNode input; List<RelHint> hints = ImmutableList.of(); if (rel instanceof Project) { final Project project = (Project) rel; castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, ((Project) rel).getProjects()); input = rel.getInput(0); hints = project.getHints(); } else { castExps = RexUtil.generateCastExpressions( rexBuilder, castRowType, rowType); input = rel; } if (rename) { return projectFactory.createProject(input, hints, castExps, castRowType.getFieldNames()); } else { return projectFactory.createProject(input, hints, castExps, rowType.getFieldNames()); } }
Source:
public void initialize(FeaturesRunner runner) { runner.getFeature(TransactionalFeature.class) .addWaiter(deadline -> Framework.getService(BulkService.class).await(Duration.ofMinutes(1))); }

Target:
public void initialize(FeaturesRunner runner) { runner.getFeature(TransactionalFeature.class) .addWaiter(duration -> Framework.getService(BulkService.class).await(duration)); }
Source:
private void initUI() { VBox milestoneDialogBox = createMilestoneDialogBox(); assignedMilestoneBox = createAssignedMilestoneBox(); matchingMilestonesBox = createMatchingMilestonesBox(); inputField = createInputField(); ScrollPane allMilestoneScrollPane = createAllMilestonesScrollPane(); milestoneDialogBox.setSpacing(5); milestoneDialogBox.getChildren().addAll(assignedMilestoneBox, inputField, new Label(TITLE_RESULT), matchingMilestonesBox, new Label(TITLE_ALL), allMilestoneScrollPane); getDialogPane().setContent(milestoneDialogBox); refreshUI(state); Platform.runLater(inputField::requestFocus); }

Target:
private void initUI() { VBox milestoneDialogBox = createMilestoneDialogBox(); assignedMilestoneBox = createAssignedMilestoneBox(); matchingMilestonesBox = createMatchingMilestonesBox(); inputField = createInputField(); ScrollPane allMilestoneScrollPane = createAllMilestonesScrollPane(); milestoneDialogBox.getChildren().addAll( assignedMilestoneBox, inputField, new Label(TITLE_RESULT), matchingMilestonesBox, new Label(TITLE_ALL), allMilestoneScrollPane); getDialogPane().setContent(milestoneDialogBox); refreshUI(state); Platform.runLater(inputField::requestFocus); }
Source:
protected ResultSet executeQuery() throws SQLException { if (incrementingColumn != null && timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Long incOffset = offset.getIncrementingOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, endTime, UTC_CALENDAR); stmt.setTimestamp(2, tsOffset, UTC_CALENDAR); stmt.setLong(3, incOffset); stmt.setTimestamp(4, tsOffset, UTC_CALENDAR); log.debug("Executing prepared statement with start time value = " + tsOffset.toString() + " end time " + endTime.toString() + " and incrementing value = " + incOffset.toString()); } else if (incrementingColumn != null) { Long incOffset = offset.getIncrementingOffset(); stmt.setLong(1, incOffset); log.debug("Executing prepared statement with incrementing value = {}", incOffset); } else if (timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, tsOffset, UTC_CALENDAR); stmt.setTimestamp(2, endTime, UTC_CALENDAR); log.debug("Executing prepared statement with timestamp value = " + JdbcUtils.formatUTC(tsOffset) + " end time " + JdbcUtils.formatUTC(endTime)); } return stmt.executeQuery(); }

Target:
protected ResultSet executeQuery() throws SQLException { if (incrementingColumn != null && timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Long incOffset = offset.getIncrementingOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, endTime, UTC_CALENDAR); stmt.setTimestamp(2, tsOffset, UTC_CALENDAR); stmt.setLong(3, incOffset); stmt.setTimestamp(4, tsOffset, UTC_CALENDAR); log.debug("Executing prepared statement with start time value = end time = and incrementing value = {}", JdbcUtils.formatUTC(tsOffset), JdbcUtils.formatUTC(endTime), incOffset); } else if (incrementingColumn != null) { Long incOffset = offset.getIncrementingOffset(); stmt.setLong(1, incOffset); log.debug("Executing prepared statement with incrementing value = {}", incOffset); } else if (timestampColumn != null) { Timestamp tsOffset = offset.getTimestampOffset(); Timestamp endTime = new Timestamp(JdbcUtils.getCurrentTimeOnDB(stmt.getConnection(), UTC_CALENDAR).getTime() - timestampDelay); stmt.setTimestamp(1, tsOffset, UTC_CALENDAR); stmt.setTimestamp(2, endTime, UTC_CALENDAR); log.debug("Executing prepared statement with timestamp value = end time = {}", JdbcUtils.formatUTC(tsOffset), JdbcUtils.formatUTC(endTime)); } return stmt.executeQuery(); }
Source:
public void maybeAddParticipant(String identifier) { if (!this.participants.containsKey(identifier)) { Participant p = new Participant(this, identifier); this.participants.put(identifier, p); } }

Target:
public void maybeAddParticipant(String identifier) { synchronized (this.participants) { this.participants.computeIfAbsent(identifier, key -> new Participant(this, identifier)); } }
Source:
public ObjectName createName(String type, String domain, String name) { Hashtable<String, String> properties = new Hashtable<>(); properties.put(KEY_NAME, name); properties.put(KEY_TYPE, type); properties.put(KEY_NAMESPACE, _namespace); try { ObjectName objectName = new ObjectName(domain, properties); boolean needQuote = false; if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_NAME)) { properties.put(KEY_NAME, ObjectName.quote(name)); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_TYPE)) { properties.put(KEY_TYPE, ObjectName.quote(type)); needQuote = true; } return needQuote ? new ObjectName(domain, properties) : objectName; } catch (MalformedObjectNameException e) { try { return new ObjectName(domain, KEY_NAME, ObjectName.quote(name)); } catch (MalformedObjectNameException e1) { LOG.warn("Unable to register {}", type, name, e1); throw new RuntimeException(e1); } } }

Target:
public ObjectName createName(String type, String domain, String name) { Hashtable<String, String> properties = new Hashtable<>(); properties.put(KEY_NAME, name); properties.put(KEY_TYPE, type); properties.put(KEY_NAMESPACE, _namespace); try { ObjectName objectName = new ObjectName(domain, properties); boolean needQuote = false; if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_NAME)) { properties.put(KEY_NAME, ObjectName.quote(name)); needQuote = true; } if (objectName.isPropertyValuePattern(KEY_TYPE)) { properties.put(KEY_TYPE, ObjectName.quote(type)); needQuote = true; } return needQuote ? new ObjectName(domain, properties) : objectName; } catch (MalformedObjectNameException e) { throw new HelixException(String .format("Unable to register metrics: domain=%s, name=%s, namespace=%s", domain, name, _namespace), e); } }
Source:
private static String[] getDexCodeInstructionSets(String[] instructionSets) { HashSet<String> dexCodeInstructionSets = new HashSet<String>(instructionSets.length); for (String instructionSet : instructionSets) { dexCodeInstructionSets.add(getDexCodeInstructionSet(instructionSet)); } return dexCodeInstructionSets.toArray(new String[0]); }

Target:
private static String[] getDexCodeInstructionSets(String[] instructionSets) { HashSet<String> dexCodeInstructionSets = new HashSet<String>(instructionSets.length); for (String instructionSet : instructionSets) { dexCodeInstructionSets.add(getDexCodeInstructionSet(instructionSet)); } return dexCodeInstructionSets.toArray(new String[dexCodeInstructionSets.size()]); }
Source:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); authWebView.initWebView(getActivity()); authWebView.getWebViewClient().setPageStatusListener(new URLInterceptorWebViewClient.IPageStatusListener() { @Override public void onPageStarted() { } @Override public void onPageFinished() { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, true); } @Override public void onPageLoadError(WebView view, int errorCode, String description, String failingUrl) { if (failingUrl != null && failingUrl.equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override public void onPagePartiallyLoaded() { } }); if (ViewPagerDownloadManager.USING_UI_PRELOADING) { if (ViewPagerDownloadManager.instance.inInitialPhase(unit)) { ViewPagerDownloadManager.instance.addTask(this); } else { authWebView.loadUrl(true, unit.getBlockUrl()); } } }

Target:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); authWebView.initWebView(getActivity()); authWebView.getWebViewClient().setPageStatusListener(new URLInterceptorWebViewClient.IPageStatusListener() { @Override public void onPageStarted() { } @Override public void onPageFinished() { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, true); } @Override public void onPageLoadError(WebView view, int errorCode, String description, String failingUrl) { if (failingUrl != null && failingUrl.equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override @TargetApi(Build.VERSION_CODES.M) public void onPageLoadError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) { if (request.getUrl().toString().equals(view.getUrl())) { ViewPagerDownloadManager.instance.done(CourseUnitWebViewFragment.this, false); } } @Override public void onPagePartiallyLoaded() { } }); if (ViewPagerDownloadManager.USING_UI_PRELOADING) { if (ViewPagerDownloadManager.instance.inInitialPhase(unit)) { ViewPagerDownloadManager.instance.addTask(this); } else { authWebView.loadUrl(true, unit.getBlockUrl()); } } }
Source:
public static SelectOrExamineResponse parse(List<ImapResponse> imapResponses, ImapFolder folder) throws IOException, MessagingException { SelectOrExamineResponse selectOrExamineResponse = new SelectOrExamineResponse(); for (ImapResponse imapResponse : imapResponses) { if (imapResponse.isTagged() || !equalsIgnoreCase(imapResponse.get(0), Responses.OK) || !imapResponse.isList(1)) { continue; } handleUidValidity(imapResponse, selectOrExamineResponse); handleHighestModSeq(imapResponse, selectOrExamineResponse); handlePermanentFlags(imapResponse, selectOrExamineResponse, folder.store.getPermanentFlagsIndex()); } selectOrExamineResponse.readWriteMode = isModeReadWrite(ImapUtility.getLastResponse(imapResponses)); if (folder.supportsQresync()) { selectOrExamineResponse.qresyncResponse = QresyncResponse.parse(imapResponses, folder); } else { selectOrExamineResponse.qresyncResponse = null; } return selectOrExamineResponse; }

Target:
private void parse(List<ImapResponse> imapResponses, ImapFolder folder) throws IOException, MessagingException { for (ImapResponse imapResponse : imapResponses) { if (imapResponse.isTagged() || !equalsIgnoreCase(imapResponse.get(0), Responses.OK) || !imapResponse.isList(1)) { continue; } parseUidValidity(imapResponse); parseHighestModSeq(imapResponse); parsePermanentFlags(imapResponse, folder.getPermanentFlags()); } this.readWriteMode = isModeReadWriteIfAvailable(ImapUtility.getLastResponse(imapResponses)); if (folder.doesConnectionSupportQresync() && highestModSeq != INVALID_HIGHEST_MOD_SEQ && ImapConfig.shouldUseQresync()) { this.qresyncParamResponse = QresyncParamResponse.fromSelectOrExamineResponse(imapResponses, folder); } else { this.qresyncParamResponse = null; } }
Source:
protected void evaluateTextField() { String trimName = nameText.getText().trim(); IStatus status = ResourcesPlugin.getWorkspace().validateName(trimName, IResource.FILE); if(!status.isOK()){ nameStatus = status; updatePageStatus(); return; } else { nameStatus = AbstractNamedWizardPage.createOkStatus(); if (!isValidResourceName(trimName)) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.itemAlreadyExist")); updatePageStatus(); return; } else { if (property != null && nameStatus.getSeverity() == IStatus.OK) { property.setLabel(getPropertyLabel(trimName)); property.setDisplayName(trimName); property.setModificationDate(new Date()); } } } if(filenameText != null){ String filePath = filenameText.getText().trim(); if (filePath != null && !filePath.isEmpty()) { File file = new File(filePath); if (!file.exists()) { try { url = new URL(filePath); InputStream is = url.openStream(); if (is == null) { url = null; } if (is != null) { is.close(); } } catch (Exception e) { url = null; } } else { try { url = file.toURI().toURL(); } catch (Exception e) { url = null; } } if (url == null) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.errorLoadFile") + filePath + "."); } } } updatePageStatus(); }

Target:
protected void evaluateTextField() { String trimName = nameText.getText().trim(); nameStatus = ResourcesPlugin.getWorkspace().validateName(trimName, IResource.FILE); if(!nameStatus.isOK()){ updatePageStatus(); return; } else { nameStatus = AbstractNamedWizardPage.createOkStatus(); if (!isValidResourceName(trimName)) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.itemAlreadyExist")); updatePageStatus(); return; } else { if (property != null && nameStatus.getSeverity() == IStatus.OK) { property.setLabel(getPropertyLabel(trimName)); property.setDisplayName(trimName); property.setModificationDate(new Date()); } } } if(filenameText != null){ String filePath = filenameText.getText().trim(); if (filePath != null && !filePath.isEmpty()) { File file = new File(filePath); if (!file.exists()) { try { url = new URL(filePath); InputStream is = url.openStream(); if (is == null) { url = null; } if (is != null) { is.close(); } } catch (Exception e) { url = null; } } else { try { url = file.toURI().toURL(); } catch (Exception e) { url = null; } } if (url == null) { nameStatus = createStatus(IStatus.ERROR, Messages.getString("NewRouteResourceWizardPage.errorLoadFile") + filePath + "."); } } } updatePageStatus(); }
Source:
public int getNumberOfResultTemplates() { switchToIFrame(); int numberOfTemplates = -1; if (checkIfElementOnPage(resultTemplatesBy)) { numberOfTemplates = resultTemplates.size(); } else { numberOfTemplates = 0; } switchOutOfIFrame(); PageObjectLogging.log("getNumberOfResultTemplates", "Number of result templates found: " + numberOfTemplates, true); return numberOfTemplates; }

Target:
public int getNumberOfResultTemplates() { switchToIFrame(); try { if (resultTemplates.isEmpty()) { return 0; } else { return resultTemplates.size(); } } finally { PageObjectLogging.log( "getNumberOfResultTemplates", "Number of result templates found: " + resultTemplates.size(), true ); switchOutOfIFrame(); } }
Source:
private void sendReplyMessage(Message<?> replyMessage, final Object replyChannelHeaderValue) { if (logger.isDebugEnabled()) { logger.debug("handler '" + this + "' sending reply Message: " + replyMessage); } if (StringUtils.hasText(this.outputChannelName)) { synchronized (this) { if (this.outputChannelName != null) { try { this.outputChannel = this.getBeanFactory().getBean(this.outputChannelName, MessageChannel.class); this.outputChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.outputChannelName + "' in the BeanFactory."); } } } } if (this.outputChannel != null) { this.sendMessage(replyMessage, this.outputChannel); } else if (replyChannelHeaderValue != null) { this.sendMessage(replyMessage, replyChannelHeaderValue); } else { throw new DestinationResolutionException("no output-channel or replyChannel header available"); } }

Target:
private void sendReplyMessage(Message<?> replyMessage, final Object replyChannelHeaderValue) { if (logger.isDebugEnabled()) { logger.debug("handler '" + this + "' sending reply Message: " + replyMessage); } if (this.outputChannelName != null) { synchronized (this) { if (this.outputChannelName != null) { try { this.outputChannel = this.getBeanFactory().getBean(this.outputChannelName, MessageChannel.class); this.outputChannelName = null; } catch (BeansException e) { throw new DestinationResolutionException("Failed to look up MessageChannel with name '" + this.outputChannelName + "' in the BeanFactory."); } } } } if (this.outputChannel != null) { this.sendMessage(replyMessage, this.outputChannel); } else if (replyChannelHeaderValue != null) { this.sendMessage(replyMessage, replyChannelHeaderValue); } else { throw new DestinationResolutionException("no output-channel or replyChannel header available"); } }
Source:
public void mechCamo(Vector<Entity> entities) { if (entities.size() < 1) { return; } CamoChooser mcd = new CamoChooser(clientgui.getFrame()); int result = mcd.showDialog(entities.get(0)); if (result == JOptionPane.CANCEL_OPTION || mcd.getSelectedItem() == null) { return; } DirectoryItem selectedItem = mcd.getSelectedItem(); IPlayer owner = entities.get(0).getOwner(); DirectoryItem ownerCamo = new DirectoryItem(owner.getCamoCategory(), owner.getCamoFileName()); boolean noIndividualCamo = selectedItem.equals(ownerCamo); for (Entity ent : entities) { if (isEditable(ent)) { if (noIndividualCamo) { ent.setCamoCategory(null); ent.setCamoFileName(null); } else { ent.setCamoCategory(selectedItem.getCategory()); ent.setCamoFileName(selectedItem.getItem()); } getLocalClient(ent).sendUpdateEntity(ent); } } }

Target:
public void mechCamo(Vector<Entity> entities) { if (entities.size() < 1) { return; } CamoChooser mcd = new CamoChooser(clientgui.getFrame()); int result = mcd.showDialog(entities.get(0)); if ((result == JOptionPane.CANCEL_OPTION) || (mcd.getSelectedItem() == null)) { return; } DirectoryItem selectedItem = mcd.getSelectedItem(); IPlayer owner = entities.get(0).getOwner(); DirectoryItem ownerCamo = new DirectoryItem(owner.getCamoCategory(), owner.getCamoFileName()); boolean noIndividualCamo = selectedItem.equals(ownerCamo); for (Entity ent : entities) { if (isEditable(ent)) { if (noIndividualCamo) { ent.setCamoCategory(null); ent.setCamoFileName(null); } else { ent.setCamoCategory(selectedItem.getCategory()); ent.setCamoFileName(selectedItem.getItem()); } getLocalClient(ent).sendUpdateEntity(ent); } } }
Source:
public static void afterTests() { KEY_STORE_FILE.delete(); TRUST_STORE_FILE.delete(); }

Target:
public static void afterTests() { deleteKeyStoreFiles(); }
Source:
public Object[] getVariants() { PhpIndex phpIndex = PhpIndex.getInstance(getElement().getProject()); Symfony2ProjectComponent symfony2ProjectComponent = getElement().getProject().getComponent(Symfony2ProjectComponent.class); Map<String, String> em = symfony2ProjectComponent.getEntityNamespacesMap(); List<LookupElement> results = new ArrayList<LookupElement>(); for (String shortcutName : em.keySet()) { Collection<PhpNamespace> entities = phpIndex.getNamespacesByName(em.get(shortcutName)); for (PhpNamespace entity_files : entities) { String filename = entity_files.getContainingFile().getName(); String className = filename.substring(0, filename.lastIndexOf('.')); String repoName = shortcutName + ':' + className; if(!className.endsWith("Repository")) { for (PhpClass entityClass : phpIndex.getClassesByFQN(em.get(shortcutName) + "\\" + className)) { if(!entityClass.isAbstract()) { results.add(new DoctrineEntityLookupElement(repoName, entityClass)); } } } } } return results.toArray(); }

Target:
public Object[] getVariants() { PhpIndex phpIndex = PhpIndex.getInstance(getElement().getProject()); Symfony2ProjectComponent symfony2ProjectComponent = getElement().getProject().getComponent(Symfony2ProjectComponent.class); Map<String, String> entityNamespaces = symfony2ProjectComponent.getEntityNamespacesMap(); List<LookupElement> results = new ArrayList<LookupElement>(); PhpClass repositoryClass = getRepositoryClass(phpIndex); if(null == repositoryClass) { return results.toArray(); } for (Map.Entry<String, String> entry : entityNamespaces.entrySet()) { Collection<PhpNamespace> entities = phpIndex.getNamespacesByName(entry.getValue()); for (PhpNamespace entity_files : entities) { String filename = entity_files.getContainingFile().getName(); String className = filename.substring(0, filename.lastIndexOf('.')); String repoName = entry.getKey() + ':' + className; PhpClass entityClass = getClass(phpIndex, entityNamespaces.get(entry.getKey()) + "\\" + className); if(null != entityClass && isEntity(entityClass, repositoryClass)) { results.add(new DoctrineEntityLookupElement(repoName, entityClass)); } } } return results.toArray(); }
Source:
private boolean validateVmwareConfiguration() { getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getVmwareDatacenter().validateEntity(new IValidation[] { new NotEmptyValidation() }); getUsername().validateEntity(new IValidation[] { new NotEmptyValidation() }); getPassword().validateEntity(new IValidation[] { new NotEmptyValidation()} ); return getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid() && getUsername().getIsValid() && getPassword().getIsValid(); }

Target:
private boolean validateVmwareConfiguration() { getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() }); getVmwareDatacenter().validateEntity(new IValidation[] { new NotEmptyValidation() }); getUsername().validateEntity(new IValidation[] { new NotEmptyValidation(), new NameAndOptionalDomainValidation() }); getPassword().validateEntity(new IValidation[] { new NotEmptyValidation() }); return getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid() && getUsername().getIsValid() && getPassword().getIsValid(); }
Source:
public Map<String, Object> getLibraries() throws IOException { Map<String, Object> map = new HashMap<String, Object>(); for (DatabaseFile df : getPipelineScanner().getLibraryFiles()) { map.put(df.getId().toString(), getLibraryMap(df)); } return map; }

Target:
public Map<String, Object> getLibraries() throws DatabaseException { try { Map<String, Object> map = new HashMap<String, Object>(); for (DatabaseFile df : getPipelineScanner().getLibraryFiles()) { map.put(df.getId().toString(), getLibraryMap(df)); } return map; } catch (IOException e) { throw new DatabaseException("Failed to scan pipeline", e); } }
Source:
private void setupSettings() { testEnumSetting = new SettingImpl<>(TestEnum.class, new SimpleUri("engine-tests:TestSetting1"), TestEnum.A1); config.add(testEnumSetting); doubleSetting = new SettingImpl<>(Double.class, new SimpleUri("engine-tests:TestSetting2"), 30.0); config.add(doubleSetting); testClassSetting = new SettingImpl<>(TestClass.class, new SimpleUri("engine-tests:TestSetting3"), null); config.add(testClassSetting); }

Target:
private void setupSettings() { testEnumSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting1"), TestEnum.A1); config.add(testEnumSetting); doubleSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting2"), 30.0); config.add(doubleSetting); testClassSetting = new SettingImpl<>(new SimpleUri("engine-tests:TestSetting3"), new TestClass(101)); config.add(testClassSetting); }
Source:
public void setData(String data) { this.data = data; }

Target:
public void setData(String data) { mData = data; }