auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public String getFormattedStartDate(Context context){ StringBuilder dateBuilder = new StringBuilder(); SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM dd"); Date startDate = DateUtil.convertToDate(start); Date endDate = DateUtil.convertToDate(end); if (hasDefaultStartDate()) { dateBuilder.append(context.getString(R.string.assessment_empty_coming_soon).toUpperCase()); } else if (isEnded()) { if (endDate != null) { dateBuilder.append(context.getString(R.string.label_ended)); dateBuilder.append(" - "); dateBuilder.append(dateFormat.format(endDate)); } } else if (isStarted()) { if (endDate != null) { dateBuilder.append(context.getString(R.string.label_ending_on)); dateBuilder.append(" - "); dateBuilder.append(dateFormat.format(endDate)); } } else { if (startDate != null) { dateBuilder.append(context.getString(R.string.label_starting_from)); dateBuilder.append(" - "); dateBuilder.append(dateFormat.format(startDate)); } } return dateBuilder.toString().toUpperCase(); }

Target:
public CharSequence getFormattedStartDate(Context context) { if (isStarted()) { Date endDate = DateUtil.convertToDate(end); if (endDate == null) { return null; } else if (isEnded()) { return ResourceUtil.getFormattedString(context.getResources(), R.string.label_ended, "date", DateUtils.formatDateTime(context, endDate.getTime(), DateUtils .FORMAT_NO_YEAR)); } else { return ResourceUtil.getFormattedString(context.getResources(), R.string .label_ending, "date", DateUtils.formatDateTime(context, endDate.getTime(), DateUtils .FORMAT_NO_YEAR)); } } else { if (start_type == StartType.TIMESTAMP && !TextUtils.isEmpty(start)) { Date startDate = DateUtil.convertToDate(start); return ResourceUtil.getFormattedString(context.getResources(), R.string .label_starting, "date", DateUtils.formatDateTime(context, startDate.getTime(), DateUtils .FORMAT_NO_YEAR)); } else if (start_type == StartType.STRING && !TextUtils.isEmpty(start_display)) { return ResourceUtil.getFormattedString(context.getResources(), R.string .label_starting, "date", start_display); } else { return ResourceUtil.getFormattedString(context.getResources(), R.string .label_starting, "date", context.getString(R.string.assessment_soon)); } } }
Source:
public void init(ArrayList<DiskImage> diskImages) { setDiskImages(diskImages); AsyncDataProvider.getDataCenterList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { MoveOrCopyDiskModel model = (MoveOrCopyDiskModel) target; @SuppressWarnings("unchecked") List<StoragePool> dataCenters = (ArrayList<StoragePool>) returnValue; model.getDataCenter().setItems(dataCenters); if (getDataCenterId() != null) { model.getDataCenter().setIsChangable(false); for (StoragePool i : dataCenters) { if (getDataCenterId().equals(i.getId())) { model.getDataCenter().setSelectedItem(i); break; } } } initStorageDomains(); } })); AsyncDataProvider.getDiskList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { MoveOrCopyDiskModel model = (MoveOrCopyDiskModel) target; @SuppressWarnings("unchecked") ArrayList<Disk> diskImages = (ArrayList<Disk>) returnValue; model.onInitAllDisks(diskImages); model.onInitDisks(); } })); }

Target:
public void init(ArrayList<DiskImage> diskImages) { setDiskImages(diskImages); initDataCenters(); AsyncDataProvider.getDiskList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { MoveOrCopyDiskModel model = (MoveOrCopyDiskModel) target; @SuppressWarnings("unchecked") ArrayList<Disk> diskImages = (ArrayList<Disk>) returnValue; model.onInitAllDisks(diskImages); model.onInitDisks(); } })); }
Source:
private void updateDiskSize(DiskImage diskImage) { long sizeToAddInGigabytes; try { sizeToAddInGigabytes = Long.parseLong(getSizeExtend().getEntity()); } catch (NumberFormatException ignored) { return; } if (sizeToAddInGigabytes > 0) { diskImage.setSizeInGigabytes(diskImage.getSizeInGigabytes() + sizeToAddInGigabytes); } }

Target:
private void updateDiskSize(DiskImage diskImage) { getSizeExtend().validateEntity(new IValidation[] { new NotEmptyValidation(), new NonNegativeLongNumberValidation(), }); if (getSizeExtend().getIsValid()) { long sizeToAddInGigabytes = Long.parseLong(getSizeExtend().getEntity()); if (sizeToAddInGigabytes > 0) { diskImage.setSizeInGigabytes(diskImage.getSizeInGigabytes() + sizeToAddInGigabytes); } } }
Source:
public Void get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException { if (!isDone()) { if (reopenThread.waitForGeneration(gen, (int) MILLISECONDS.convert(timeout, unit))) { set(null); } } return super.get(timeout, unit); }

Target:
public Void get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException { if (!isDone()) { if (reopenThread.waitForGeneration(gen, (int) MILLISECONDS.convert(timeout, unit))) { set(null); } else { throw new TimeoutException(); } } return super.get(timeout, unit); }
Source:
public static Map<Integer, Collection<Tile>> readLaneTiles(final File illuminaRunDirectory, final ReadStructure readStructure) { final Collection<Tile> tiles; try { tiles = TileMetricsUtil.parseTileMetrics(TileMetricsUtil.renderTileMetricsFileFromBasecallingDirectory(illuminaRunDirectory), readStructure); } catch (final FileNotFoundException e) { throw new PicardException("Unable to open laneMetrics file.", e); } Map<Integer,? extends Collection<Tile>> tilesByLane=tiles.stream().collect(Collectors.groupingBy(Tile::getLaneNumber)); return (Map<Integer, Collection<Tile>>) tilesByLane; }

Target:
public static Map<Integer, ? extends Collection<Tile>> readLaneTiles(final File illuminaRunDirectory, final ReadStructure readStructure) { final Collection<Tile> tiles; try { tiles = TileMetricsUtil.parseTileMetrics(TileMetricsUtil.renderTileMetricsFileFromBasecallingDirectory(illuminaRunDirectory), readStructure); } catch (final FileNotFoundException e) { throw new PicardException("Unable to open laneMetrics file.", e); } return tiles.stream().collect(Collectors.groupingBy(Tile::getLaneNumber)); }
Source:
public int getTeamSkillLevel() { calculateSkillLevel(); return teamSkillLevel; }

Target:
public int getTeamSkillLevel() { return teamSkillLevel; }
Source:
private Optional<TaskGroup> findTaskGroupForTask(final Task task) { giant.lock(); try { final List<TaskGroup> maybeTaskGroup = Lists.newArrayList( FunctionalIterable.create(findTaskGroupsForInterval(task.getDataSource(), task.getInterval())) .filter( new Predicate<TaskGroup>() { @Override public boolean apply(TaskGroup taskGroup) { return taskGroup.contains(task.getId()); } } ) ); if (maybeTaskGroup.size() == 1) { return Optional.of(maybeTaskGroup.get(0)); } else if (maybeTaskGroup.size() == 0) { return Optional.absent(); } else { throw new IllegalStateException(String.format("WTF?! Task %s is in multiple task groups!", task.getId())); } } finally { giant.unlock(); } }

Target:
private Optional<TaskGroup> findTaskGroupForTask(final Task task) { giant.lock(); try { final Iterator<TaskGroup> maybeTaskGroup = FunctionalIterable.create(findTaskGroupsForInterval(task.getDataSource(), task.getInterval())) .filter( new Predicate<TaskGroup>() { @Override public boolean apply(TaskGroup taskGroup) { return taskGroup.contains(task.getId()); } } ) .iterator(); if (!maybeTaskGroup.hasNext()) { return Optional.absent(); } else { return Optional.of(Iterators.getOnlyElement(maybeTaskGroup)); } } finally { giant.unlock(); } }
Source:
public void stop(final BundleContext context) throws Exception { if (refreshHandle != null) { refreshHandle.remove(); refreshHandle = null; } if (focusListener != null) { if (PlatformUI.isWorkbenchRunning()) PlatformUI.getWorkbench().removeWindowListener(focusListener); focusListener = null; } if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Trying to cancel " + rcs.getName() + " job"); rcs.setReschedule(false); rcs.cancel(); if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Trying to cancel " + refreshJob.getName() + " job"); refreshJob.cancel(); rcs.join(); refreshJob.join(); if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Jobs terminated"); if (resourceManager != null) { resourceManager.dispose(); resourceManager = null; } super.stop(context); plugin = null; }

Target:
public void stop(final BundleContext context) throws Exception { if (refreshHandle != null) { refreshHandle.remove(); refreshHandle = null; } if (focusListener != null) { if (PlatformUI.isWorkbenchRunning()) { PlatformUI.getWorkbench().removeWindowListener(focusListener); } focusListener = null; } if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) { GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Trying to cancel " + rcs.getName() + " job"); } getPreferenceStore().removePropertyChangeListener(rcs); rcs.setReschedule(false); rcs.cancel(); if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) { GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Trying to cancel " + refreshJob.getName() + " job"); } refreshJob.cancel(); rcs.join(); refreshJob.join(); if (GitTraceLocation.REPOSITORYCHANGESCANNER.isActive()) { GitTraceLocation.getTrace().trace( GitTraceLocation.REPOSITORYCHANGESCANNER.getLocation(), "Jobs terminated"); } if (resourceManager != null) { resourceManager.dispose(); resourceManager = null; } super.stop(context); plugin = null; }
Source:
public ShiftedToday(String input) { _input = validateInput(input); int[] counts = parseCounts(); Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); calendar.add(Calendar.DAY_OF_MONTH, counts[0]); calendar.add(Calendar.MONTH, counts[1]); calendar.add(Calendar.YEAR, counts[2]); setTime(calendar.getTime().getTime()); }

Target:
public ShiftedToday(String input) { _input = validateInput(input); final int[] counts = parseCounts(); final Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); calendar.add(Calendar.DAY_OF_MONTH, counts[0]); calendar.add(Calendar.MONTH, counts[1]); calendar.add(Calendar.YEAR, counts[2]); setTime(calendar.getTime().getTime()); }
Source:
public static void load() { loadFrom(Paths.get("config")); }

Target:
public static void load() { loadFrom(FMLPaths.CONFIGDIR.get()); }
Source:
public boolean isNormalDependency() { return scope == null || !scope.equals("import"); }

Target:
public boolean isNormalDependency() { return !"import".equals(scope); }
Source:
private Map<EventTypePartition, NakadiCursor> getBeforeFirstCursors(final Set<EventTypePartition> newAssignment) { return newAssignment.stream() .map(EventTypePartition::getEventType) .map(et -> { try { return getContext().getTimelineService().getActiveTimelinesOrdered(et).get(0); } catch (final NakadiException e) { throw new NakadiRuntimeException(e); } }) .collect(groupingBy(Timeline::getStorage)) .values() .stream() .flatMap(timelines -> { try { return getContext().getTimelineService().getTopicRepository(timelines.get(0)) .loadTopicStatistics(timelines).stream(); } catch (final ServiceUnavailableException e) { throw new NakadiRuntimeException(e); } }) .map(PartitionStatistics::getBeforeFirst) .collect(Collectors.toMap( cursor -> new EventTypePartition(cursor.getEventType(), cursor.getPartition()), cursor -> cursor)); }

Target:
private Map<EventTypePartition, NakadiCursor> getBeforeFirstCursors(final Set<EventTypePartition> newAssignment) { return newAssignment.stream() .map(EventTypePartition::getEventType) .map(et -> { try { return getContext().getTimelineService().getActiveTimelinesOrdered(et).get(0); } catch (final NakadiException e) { throw new NakadiRuntimeException(e); } }) .collect(groupingBy(Timeline::getStorage)) .values() .stream() .flatMap(timelines -> { try { return getContext().getTimelineService().getTopicRepository(timelines.get(0)) .loadTopicStatistics(timelines).stream(); } catch (final ServiceUnavailableException e) { throw new NakadiRuntimeException(e); } }) .map(PartitionStatistics::getBeforeFirst) .collect(Collectors.toMap(NakadiCursor::getEventTypePartition, cursor -> cursor)); }
Source:
private void compressSegmentToFile(long nextSegment, File raw, File zip) throws IOException, IgniteCheckedException { int segmentSerializerVer; try (FileIO fileIO = ioFactory.create(raw)) { segmentSerializerVer = readSegmentHeader(new SegmentIO(nextSegment, fileIO), segmentFileInputFactory).getSerializerVersion(); } try (ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zip)))) { zos.setLevel(dsCfg.getWalCompactionLevel()); zos.putNextEntry(new ZipEntry(cctx.igniteInstanceName() + "-" + nextSegment + ".wal")); ByteBuffer buf = ByteBuffer.allocate(HEADER_RECORD_SIZE); buf.order(ByteOrder.nativeOrder()); zos.write(prepareSerializerVersionBuffer(nextSegment, segmentSerializerVer, true, buf).array()); final CIX1<WALRecord> appendToZipC = new CIX1<WALRecord>() { @Override public void applyx(WALRecord record) throws IgniteCheckedException { final MarshalledRecord marshRec = (MarshalledRecord)record; try { zos.write(marshRec.buffer().array(), 0, marshRec.buffer().remaining()); } catch (IOException e) { throw new IgniteCheckedException(e); } } }; try (SingleSegmentLogicalRecordsIterator iter = new SingleSegmentLogicalRecordsIterator( log, cctx, ioFactory, BUF_SIZE, nextSegment, walArchiveDir, appendToZipC)) { while (iter.hasNextX()) iter.nextX(); } RecordSerializer ser = new RecordSerializerFactoryImpl(cctx).createSerializer(segmentSerializerVer); ByteBuffer heapBuf = prepareSwitchSegmentRecordBuffer(nextSegment, ser); zos.write(heapBuf.array()); } }

Target:
private void compressSegmentToFile(long nextSegment, File raw, File zip) throws IOException, IgniteCheckedException { int segmentSerializerVer; try (FileIO fileIO = ioFactory.create(raw)) { segmentSerializerVer = readSegmentHeader(new SegmentIO(nextSegment, fileIO), segmentFileInputFactory).getSerializerVersion(); } try (ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zip)))) { zos.setLevel(dsCfg.getWalCompactionLevel()); zos.putNextEntry(new ZipEntry(nextSegment + ".wal")); ByteBuffer buf = ByteBuffer.allocate(HEADER_RECORD_SIZE); buf.order(ByteOrder.nativeOrder()); zos.write(prepareSerializerVersionBuffer(nextSegment, segmentSerializerVer, true, buf).array()); final CIX1<WALRecord> appendToZipC = new CIX1<WALRecord>() { @Override public void applyx(WALRecord record) throws IgniteCheckedException { final MarshalledRecord marshRec = (MarshalledRecord)record; try { zos.write(marshRec.buffer().array(), 0, marshRec.buffer().remaining()); } catch (IOException e) { throw new IgniteCheckedException(e); } } }; try (SingleSegmentLogicalRecordsIterator iter = new SingleSegmentLogicalRecordsIterator( log, cctx, ioFactory, BUF_SIZE, nextSegment, walArchiveDir, appendToZipC)) { while (iter.hasNextX()) iter.nextX(); } RecordSerializer ser = new RecordSerializerFactoryImpl(cctx).createSerializer(segmentSerializerVer); ByteBuffer heapBuf = prepareSwitchSegmentRecordBuffer(nextSegment, ser); zos.write(heapBuf.array()); } }
Source:
public void testIrrelevantDoubleSpend() throws Exception { Transaction tx0 = createFakeTx(PARAMS, COIN.multiply(5), OTHER_ADDRESS, OTHER_ADDRESS2)[1]; Transaction tx1 = createFakeTx(PARAMS, COIN.multiply(5), OTHER_ADDRESS, OTHER_ADDRESS2)[1]; Transaction tx2 = new Transaction(PARAMS); tx2.addInput(tx0.getOutput(0)); tx2.addOutput(COIN, myAddress); tx2.addOutput(COIN, OTHER_ADDRESS); sendMoneyToWallet(AbstractBlockChain.NewBlockType.BEST_CHAIN, tx2, tx1, tx0); Transaction tx3 = new Transaction(PARAMS); tx3.addInput(tx1.getOutput(0)); tx3.addOutput(COIN, myAddress); tx3.addOutput(COIN, OTHER_ADDRESS); wallet.receivePending(tx3, null); Transaction tx4 = new Transaction(PARAMS); tx4.addInput(tx1.getOutput(0)); tx4.addInput(tx2.getOutput(1)); tx4.addOutput(COIN, OTHER_ADDRESS); sendMoneyToWallet(AbstractBlockChain.NewBlockType.BEST_CHAIN, tx4); wallet = roundTrip(wallet); log.info(wallet.toString()); }

Target:
public void testIrrelevantDoubleSpend() throws Exception { Transaction tx0 = createFakeTx(PARAMS); Transaction tx1 = createFakeTx(PARAMS); Transaction tx2 = new Transaction(PARAMS); tx2.addInput(tx0.getOutput(0)); tx2.addOutput(COIN, myAddress); tx2.addOutput(COIN, OTHER_ADDRESS); sendMoneyToWallet(AbstractBlockChain.NewBlockType.BEST_CHAIN, tx2, tx1, tx0); Transaction tx3 = new Transaction(PARAMS); tx3.addInput(tx1.getOutput(0)); tx3.addOutput(COIN, myAddress); tx3.addOutput(COIN, OTHER_ADDRESS); wallet.receivePending(tx3, null); Transaction tx4 = new Transaction(PARAMS); tx4.addInput(tx1.getOutput(0)); tx4.addInput(tx2.getOutput(1)); tx4.addOutput(COIN, OTHER_ADDRESS); sendMoneyToWallet(AbstractBlockChain.NewBlockType.BEST_CHAIN, tx4); wallet = roundTrip(wallet); assertTrue(wallet.isConsistent()); }
Source:
public String generateBodyValue(String name, Schema<?> property) { if (isArray(property)) { return generators .getArrayGenerator() .generate(name, (ArraySchema) property, "csv", false); } else if (isMap(property)) { return generators.getMapGenerator().generate(TYPES, property); } else { return generateValue(name, property, false); } }

Target:
public String generateBodyValue(String name, Schema<?> property) { if (isArray(property)) { return generators .getArrayGenerator() .generate(name, (ArraySchema) property, "csv", false); } if (isMap(property)) { return generators.getMapGenerator().generate(TYPES, property); } return generateValue(name, property, false); }
Source:
public void testValueOf() { StudentProfile studentProfile = new StudentProfile("id", "Joe", "joe@gmail.com", "Teammates Institute", "American", Gender.MALE, new Text("hello"), new BlobKey("key")); StudentProfileAttributes profileAttributes = StudentProfileAttributes.valueOf(studentProfile); assertEquals(studentProfile.getGoogleId(), profileAttributes.googleId); assertEquals(studentProfile.getShortName(), profileAttributes.shortName); assertEquals(studentProfile.getEmail(), profileAttributes.email); assertEquals(studentProfile.getInstitute(), profileAttributes.institute); assertEquals(studentProfile.getNationality(), profileAttributes.nationality); assertEquals(studentProfile.getGender().name(), profileAttributes.gender.name()); assertEquals(studentProfile.getMoreInfo().getValue(), profileAttributes.moreInfo); assertEquals(studentProfile.getPictureKey().getKeyString(), profileAttributes.pictureKey); }

Target:
public void testValueOf() { StudentProfile studentProfile = new StudentProfile("id", "Joe", "joe@gmail.com", "Teammates Institute", "American", Gender.MALE, new Text("hello"), new BlobKey("key")); StudentProfileAttributes profileAttributes = StudentProfileAttributes.valueOf(studentProfile); assertEquals(studentProfile.getGoogleId(), profileAttributes.googleId); assertEquals(studentProfile.getShortName(), profileAttributes.shortName); assertEquals(studentProfile.getEmail(), profileAttributes.email); assertEquals(studentProfile.getInstitute(), profileAttributes.institute); assertEquals(studentProfile.getNationality(), profileAttributes.nationality); assertEquals(studentProfile.getGender(), profileAttributes.gender); assertEquals(studentProfile.getMoreInfo().getValue(), profileAttributes.moreInfo); assertEquals(studentProfile.getPictureKey().getKeyString(), profileAttributes.pictureKey); }
Source:
public void showReflogFor(Repository repository) { String refName = Constants.R_HEADS + Constants.MASTER; try { Ref ref = repository.getRef(Constants.HEAD); if (ref != null && ref.isSymbolic()) refName = ref.getTarget().getName(); } catch (IOException e) { Activator.logError("Error getting HEAD reference", e); } showReflogFor(repository, refName); }

Target:
public void showReflogFor(Repository repository) { showReflogFor(repository, Constants.HEAD); }
Source:
private void fetchPinotData() { log.debug("Fetching data from Pinot for table %s, segment %s", split.getTableName(), split.getSegment()); long startTimeNanos = System.nanoTime(); int idx = 0; for (PinotColumnHandle columnHandle : columnHandles) { pinotColumnNameIndexMap.put(columnHandle.getColumnName(), idx++); } String pinotQuery = getPinotQuery(pinotConfig, columnHandles, split.getPinotFilter(), split.getTimeFilter(), split.getTableName(), split.getLimit()); Map<ServerInstance, DataTable> dataTableMap = pinotQueryClient.queryPinotServerForDataTable(pinotQuery, split.getHost(), split.getSegment()); dataTableMap.values().stream() .filter(table -> table != null && table.getNumberOfRows() > 0) .forEach(dataTable -> { int estimatedTableSizeInBytes = IntStream.rangeClosed(0, dataTable.getDataSchema().size() - 1) .map(i -> getEstimatedColumnSizeInBytes(dataTable.getDataSchema().getColumnDataType(i)) * dataTable.getNumberOfRows()) .reduce(0, Integer::sum); dataTableList.add(new PinotDataTableWithSize(dataTable, estimatedTableSizeInBytes)); estimatedMemoryUsageInBytes += estimatedTableSizeInBytes; }); ImmutableList.Builder<Type> types = ImmutableList.builder(); columnHandles .stream() .map(columnHandle -> getTypeForBlock(columnHandle)) .forEach(types::add); this.columnTypes = types.build(); readTimeNanos = System.nanoTime() - startTimeNanos; isPinotDataFetched = true; }

Target:
private void fetchPinotData() { log.debug("Fetching data from Pinot for table %s, segment %s", split.getTableName(), split.getSegment()); long startTimeNanos = System.nanoTime(); if (pinotColumnNameIndexMap.isEmpty()) { int idx = 0; for (PinotColumnHandle columnHandle : columnHandles) { pinotColumnNameIndexMap.put(columnHandle.getColumnName(), idx++); } } String pinotQuery = getPinotQuery(pinotConfig, columnHandles, split.getPinotFilter(), split.getTimeFilter(), split.getTableName(), split.getLimit()); Map<ServerInstance, DataTable> dataTableMap = pinotQueryClient.queryPinotServerForDataTable(pinotQuery, split.getHost(), split.getSegment()); dataTableMap.values().stream() .filter(table -> table != null && table.getNumberOfRows() > 0) .forEach(dataTable -> { int estimatedTableSizeInBytes = IntStream.rangeClosed(0, dataTable.getDataSchema().size() - 1) .map(i -> getEstimatedColumnSizeInBytes(dataTable.getDataSchema().getColumnDataType(i)) * dataTable.getNumberOfRows()) .reduce(0, Integer::sum); dataTableList.add(new PinotDataTableWithSize(dataTable, estimatedTableSizeInBytes)); estimatedMemoryUsageInBytes += estimatedTableSizeInBytes; }); ImmutableList.Builder<Type> types = ImmutableList.builder(); columnHandles.stream() .map(PinotPageSource::getTypeForBlock) .forEach(types::add); columnTypes = types.build(); readTimeNanos += System.nanoTime() - startTimeNanos; isPinotDataFetched = true; }
Source:
public static <S, T> ForwardingObservable<T> convert(ClosableObservable<S> observable, Converter<S, T> converter) { return new ForwardingObservable<>("InstUtils", new ConvertingObservable<>(observable, converter)); }

Target:
public static <S, T> ForwardingObservable<T> convert(ClosableObservable<S> observable, Converter<S, T> converter) { return new ForwardingObservable<>(new ConvertingObservable<>(observable, converter)); }
Source:
public static String checkScientificNameAtNCBI(String scientificName) throws IOException { if (!taxonomyCache.containsKey(scientificName)) { String query = ncbiEntrezUtilsURL + URLEncoder.encode(scientificName, "UTF-8"); final HttpClient httpclient = HttpClientBuilder.create().build(); HttpGet httpget = new HttpGet(query); HttpResponse response = httpclient.execute(httpget); String out = parseEntity(response.getEntity()); DocumentBuilder docBuilder; try { docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document d = docBuilder.newDocument(); TransformerFactory.newInstance().newTransformer().transform(new StreamSource(new UnicodeReader(out)), new DOMResult(d)); NodeList nl = d.getElementsByTagName("Id"); if (nl.getLength() > 0) { taxonomyCache.put(scientificName, nl.item(0).getTextContent()); } } catch (ParserConfigurationException | TransformerException | TransformerFactoryConfigurationError e) { throw new IOException("Taxon lookup error", e); } } return taxonomyCache.get(scientificName); }

Target:
public static String checkScientificNameAtNCBI(String scientificName) throws IOException { if (!taxonomyCache.containsKey(scientificName)) { String query = NCBI_ENTREZ_UTILS_URL + URLEncoder.encode(scientificName, "UTF-8"); final HttpClient httpclient = HttpClientBuilder.create().build(); HttpGet httpget = new HttpGet(query); HttpResponse response = httpclient.execute(httpget); String out = parseEntity(response.getEntity()); DocumentBuilder docBuilder; try { docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document d = docBuilder.newDocument(); TransformerFactory.newInstance().newTransformer().transform(new StreamSource(new UnicodeReader(out)), new DOMResult(d)); NodeList nl = d.getElementsByTagName("Id"); if (nl.getLength() > 0) { taxonomyCache.put(scientificName, nl.item(0).getTextContent()); } } catch (ParserConfigurationException | TransformerException | TransformerFactoryConfigurationError e) { throw new IOException("Taxon lookup error", e); } } return taxonomyCache.get(scientificName); }
Source:
public static String toString(String str, Object... triplets) { assert triplets.length % 3 == 0; int propCnt = triplets.length / 3; Object[] propNames = new Object[propCnt]; Object[] propVals = new Object[propCnt]; boolean[] propSens = new boolean[propCnt]; for (int i = 0; i < propCnt; i++) { Object name = triplets[i * 3]; assert name != null; propNames[i] = name; propVals[i] = triplets[i * 3 + 1]; Object sens = triplets[i * 3 + 2]; assert sens instanceof Boolean; propSens[i] = (Boolean)sens; } SBLimitedLength sb = threadLocSB.get(); boolean newStr = sb.length() == 0; try { return toStringImpl(str, sb, propNames, propVals, propSens, propCnt); } finally { if (newStr) sb.reset(); } }

Target:
public static String toString(String str, Object... triplets) { if (triplets.length % 3 != 0) throw new IllegalArgumentException("Array length must be a multiple of 3"); int propCnt = triplets.length / 3; Object[] propNames = new Object[propCnt]; Object[] propVals = new Object[propCnt]; boolean[] propSens = new boolean[propCnt]; for (int i = 0; i < propCnt; i++) { Object name = triplets[i * 3]; assert name != null; propNames[i] = name; propVals[i] = triplets[i * 3 + 1]; Object sens = triplets[i * 3 + 2]; assert sens instanceof Boolean; propSens[i] = (Boolean)sens; } SBLimitedLength sb = threadLocSB.get(); boolean newStr = sb.length() == 0; try { return toStringImpl(str, sb, propNames, propVals, propSens, propCnt); } finally { if (newStr) sb.reset(); } }
Source:
public void testWithTrace() throws IOException { String tracePath; tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath(); SWTWorkbenchBot bot = new SWTWorkbenchBot(); SWTBotView view = bot.viewById(VIEW_ID); view.close(); bot.waitUntil(ConditionHelpers.ViewIsClosed(view)); SWTBotUtils.createProject(PROJECT_NAME); SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE); SWTBotUtils.waitForJobs(); createTable(); SWTBotUtils.waitForJobs(); SWTBotTable tableBot = new SWTBotTable(fTable.getTableViewer().getTable()); assertEquals("24100", tableBot.cell(0, 2)); tableBot.header("Duration").click(); assertEquals("1000", tableBot.cell(0, 2)); tableBot.header("Duration").click(); assertEquals("5904091700", tableBot.cell(0, 2)); bot.closeAllEditors(); }

Target:
public void testWithTrace() throws IOException { String tracePath; tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath(); SWTWorkbenchBot bot = new SWTWorkbenchBot(); SWTBotView view = bot.viewById(VIEW_ID); view.close(); bot.waitUntil(ConditionHelpers.ViewIsClosed(view)); SWTBotUtils.createProject(PROJECT_NAME); SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE); SWTBotUtils.waitForJobs(); createTable(); SWTBotUtils.waitForJobs(); SWTBotTable tableBot = new SWTBotTable(fTable.getTableViewer().getTable()); assertEquals("24100", tableBot.cell(0, 2)); tableBot.header("Duration").click(); assertEquals("1000", tableBot.cell(0, 2)); tableBot.header("Duration").click(); assertEquals("5904091700", tableBot.cell(0, 2)); bot.closeAllEditors(); SWTBotUtils.deleteProject(PROJECT_NAME, bot); }
Source:
public static void main(String[] args) throws TException, IOException, TimeoutException { FProtocolFactory protocolFactory = new FProtocolFactory(new TBinaryProtocol.Factory()); Properties properties = new Properties(); properties.put(Options.PROP_URL, Options.DEFAULT_URL); Options.Builder optionsBuilder = new Options.Builder(properties); Connection conn = Nats.connect(optionsBuilder.build()); FPublisherTransportFactory publisherFactory = new FNatsPublisherTransport.Factory(conn); FSubscriberTransportFactory subscriberFactory = new FNatsSubscriberTransport.Factory(conn); FScopeProvider provider = new FScopeProvider(publisherFactory, subscriberFactory, protocolFactory); AlbumWinnersSubscriber.Iface subscriber = new AlbumWinnersSubscriber.Client(provider); subscriber.subscribeWinner((ctx, album) -> System.out.println("You won! " + album)); subscriber.subscribeContestStart((ctx, albums) -> System.out.println("Contest started, available albums: " + albums)); System.out.println("Subscriber started..."); }

Target:
public static void main(String[] args) throws TException, IOException, InterruptedException { FProtocolFactory protocolFactory = new FProtocolFactory(new TBinaryProtocol.Factory()); Options.Builder optionsBuilder = new Options.Builder().server(Options.DEFAULT_URL); Connection conn = Nats.connect(optionsBuilder.build()); FPublisherTransportFactory publisherFactory = new FNatsPublisherTransport.Factory(conn); FSubscriberTransportFactory subscriberFactory = new FNatsSubscriberTransport.Factory(conn); FScopeProvider provider = new FScopeProvider(publisherFactory, subscriberFactory, protocolFactory); AlbumWinnersSubscriber.Iface subscriber = new AlbumWinnersSubscriber.Client(provider); subscriber.subscribeWinner((ctx, album) -> System.out.println("You won! " + album)); subscriber.subscribeContestStart((ctx, albums) -> System.out.println("Contest started, available albums: " + albums)); System.out.println("Subscriber started..."); }
Source:
public List<SourceRecord> poll() throws InterruptedException { log.trace("{} Polling for new data"); while (!stop.get()) { final TableQuerier querier = tableQueue.peek(); if (!querier.querying()) { final long nextUpdate = querier.getLastUpdate() + config.getInt(JdbcSourceTaskConfig.POLL_INTERVAL_MS_CONFIG); final long untilNext = nextUpdate - time.milliseconds(); if (untilNext > 0) { log.trace("Waiting ms to poll next", untilNext, querier.toString()); time.sleep(untilNext); continue; } } final List<SourceRecord> results = new ArrayList<>(); try { log.debug("Checking for next block of results from {}", querier.toString()); querier.maybeStartQuery(cachedConnectionProvider.getValidConnection()); int batchMaxRows = config.getInt(JdbcSourceTaskConfig.BATCH_MAX_ROWS_CONFIG); boolean hadNext = true; while (results.size() < batchMaxRows && (hadNext = querier.next())) { results.add(querier.extractRecord()); } if (!hadNext) { resetAndRequeueHead(querier); } if (results.isEmpty()) { log.trace("No updates for {}", querier.toString()); continue; } log.debug("Returning records for {}", results.size(), querier.toString()); return results; } catch (SQLException e) { log.error("Failed to run query for table {}: {}", querier.toString(), e); resetAndRequeueHead(querier); return null; } catch (ConnectException e) { log.error("Failed to run query for table {}: {}", querier.toString(), e); resetAndRequeueHead(querier); return null; } } return null; }

Target:
public List<SourceRecord> poll() throws InterruptedException { log.trace("{} Polling for new data"); while (!stop.get()) { final TableQuerier querier = tableQueue.peek(); if (!querier.querying()) { final long nextUpdate = querier.getLastUpdate() + config.getInt(JdbcSourceTaskConfig.POLL_INTERVAL_MS_CONFIG); final long untilNext = nextUpdate - time.milliseconds(); if (untilNext > 0) { log.trace("Waiting ms to poll next", untilNext, querier.toString()); time.sleep(untilNext); continue; } } final List<SourceRecord> results = new ArrayList<>(); try { log.debug("Checking for next block of results from {}", querier.toString()); querier.maybeStartQuery(cachedConnectionProvider.getValidConnection()); int batchMaxRows = config.getInt(JdbcSourceTaskConfig.BATCH_MAX_ROWS_CONFIG); boolean hadNext = true; while (results.size() < batchMaxRows && (hadNext = querier.next())) { results.add(querier.extractRecord()); } if (!hadNext) { resetAndRequeueHead(querier); } if (results.isEmpty()) { log.trace("No updates for {}", querier.toString()); continue; } log.debug("Returning records for {}", results.size(), querier.toString()); return results; } catch (SQLException e) { log.error("Failed to run query for table {}: {}", querier.toString(), e); resetAndRequeueHead(querier); return null; } } return null; }
Source:
public void deleteProject() { LOG.log(Level.INFO, "Deleting project: " + toBeDeletedProject); String sessionId = ((HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest()) .getSession().getId(); try { projectsManagementController.deleteProject(toBeDeletedProject, sessionId); allProjects.remove(toBeDeletedProject); toBeDeletedProject = null; MessagesController.addInfoMessage("Project deleted!"); } catch (AppException ex) { LOG.log(Level.SEVERE, "Failed to delete project " + toBeDeletedProject, ex); MessagesController.addErrorMessage("Deletion failed", "Failed deleting project " + toBeDeletedProject.getName()); } }

Target:
public void deleteProject() { LOG.log(Level.INFO, "Deleting project: " + toBeDeletedProject); Cookie[] cookies = ((HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest()) .getCookies(); try { String sessionId = ""; for (Cookie cookie : cookies) { if (cookie.getName().equalsIgnoreCase("SESSION")) { sessionId = cookie.getValue(); break; } } projectsManagementController.deleteProject(toBeDeletedProject, sessionId); allProjects.remove(toBeDeletedProject); toBeDeletedProject = null; MessagesController.addInfoMessage("Project deleted!"); } catch (AppException ex) { LOG.log(Level.SEVERE, "Failed to delete project " + toBeDeletedProject, ex); MessagesController.addErrorMessage("Deletion failed", "Failed deleting project " + toBeDeletedProject.getName()); } }
Source:
public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController(AccountUrl.AUTHENTICATION_PAGE); registry.addViewController("/error/status-code"); }

Target:
public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController(AccountUrl.AUTHENTICATION_PAGE); registry.addViewController(SiteUrl.FORBIDDEN_PAGE).setViewName("error/status-code"); }
Source:
public void onDownloadUpdateButtonClicked() { Platform.runLater(() -> downloadUpdateButton.setOnAction(event -> { })); log.info("Downloading update"); updateInfoFuture .thenAccept(updateInfo -> { DownloadUpdateTask downloadUpdateTask = clientUpdateService.downloadAndInstallInBackground(updateInfo); if (downloadUpdateTask != null) { downloadUpdateButton.textProperty().bind( Bindings.createStringBinding(() -> downloadUpdateTask.getProgress() == -1 ? i18n.get("login.button.downloadPreparing") : i18n.get("login.button.downloadProgress", downloadUpdateTask.getProgress()), downloadUpdateTask.progressProperty())); } }); }

Target:
public void onDownloadUpdateButtonClicked() { downloadUpdateButton.setOnAction(event -> { }); log.info("Downloading update"); updateInfoFuture .thenAccept(updateInfo -> { DownloadUpdateTask downloadUpdateTask = clientUpdateService.downloadAndInstallInBackground(updateInfo); if (downloadUpdateTask != null) { downloadUpdateButton.textProperty().bind( Bindings.createStringBinding(() -> downloadUpdateTask.getProgress() == -1 ? i18n.get("login.button.downloadPreparing") : i18n.get("login.button.downloadProgress", downloadUpdateTask.getProgress()), downloadUpdateTask.progressProperty())); } }); }
Source:
private boolean checkFileExtension() { String[] sourceDirs = source.toString().split("/"); String[] destinationDirs = destination.toString().split("/"); boolean different = false; if (sourceDirs.length != destinationDirs.length) different = true; else { for (int i = 0; i < sourceDirs.length - 1; i++) { if (!sourceDirs[i].equals(destinationDirs[i])) { different = true; break; } } } String[] sourceFileNames = sourceDirs[sourceDirs.length - 1].split("\\."); String[] destinationFileNames = destinationDirs[destinationDirs.length - 1].split("\\."); boolean sameFileExt = sourceFileNames[sourceFileNames.length - 1] .equals(destinationFileNames[destinationFileNames.length - 1]); if (!different && sameFileExt) return true; else return false; }

Target:
private boolean checkFileExtension() { String[] sourceDirs = source.toString().split("/"); String[] destinationDirs = destination.toString().split("/"); boolean different = false; if (sourceDirs.length != destinationDirs.length) different = true; else { for (int i = 0; i < sourceDirs.length - 1; i++) { if (!sourceDirs[i].equals(destinationDirs[i])) { different = true; break; } } } String[] sourceFileNames = sourceDirs[sourceDirs.length - 1].split("\\."); String[] destinationFileNames = destinationDirs[destinationDirs.length - 1].split("\\."); boolean sameFileExt = sourceFileNames[sourceFileNames.length - 1] .equals(destinationFileNames[destinationFileNames.length - 1]); if (!different && sameFileExt) return true; return false; }
Source:
public static AbstractTask getTaskByUrl(String taskUrl) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); for (AbstractTask task : tasks) { String currUrl = task.getUrl(); if (currUrl != null && !currUrl.equals("") && currUrl.equals(taskUrl)) { return task; } else { AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector( task.getConnectorKind()); TaskRepository repository = getRepository(task); if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null) { currUrl = url.toString(); if (currUrl != null && !currUrl.equals("") && currUrl.equals(taskUrl)) { return task; } } } } } return null; }

Target:
public static AbstractTask getTaskByUrl(String taskUrl) { if (!Strings.isNullOrEmpty(taskUrl)) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); List<AbstractTask> sortedTasks = sortTasksByRepositoryUrl(tasks); String oldRepositorUrl = null; AbstractRepositoryConnector connector = null; TaskRepository repository = null; for (AbstractTask task : sortedTasks) { if (taskUrl.equals(task.getUrl())) { return task; } else { String repositoryUrl = task.getRepositoryUrl(); if (!repositoryUrl.equals(oldRepositorUrl)) { connector = TasksUi.getRepositoryManager().getRepositoryConnector(task.getConnectorKind()); repository = getRepository(task); } if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null && taskUrl.equals(url.toString())) { return task; } } oldRepositorUrl = repositoryUrl; } } } return null; }
Source:
public static Drawable getCubicGradient(int baseColor, int gravity) { final int numStops = 8; final int cubePower = 3; PaintDrawable paintDrawable = new PaintDrawable(); paintDrawable.setShape(new RectShape()); final int[] stopColors = new int[numStops]; int red = Color.red(baseColor); int green = Color.green(baseColor); int blue = Color.blue(baseColor); int alpha = Color.alpha(baseColor); for (int i = 0; i < numStops; i++) { float x = i * 1f / (numStops - 1); float opacity = (float) Math.pow(x, cubePower); if (opacity < 0.0f) { opacity = 0.0f; } else if (opacity > 1.0f) { opacity = 1.0f; } stopColors[i] = Color.argb((int) (alpha * opacity), red, green, blue); } final float x0, x1, y0, y1; switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { case Gravity.LEFT: x0 = 1; x1 = 0; break; case Gravity.RIGHT: x0 = 0; x1 = 1; break; default: x0 = 0; x1 = 0; break; } switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { case Gravity.TOP: y0 = 1; y1 = 0; break; case Gravity.BOTTOM: y0 = 0; y1 = 1; break; default: y0 = 0; y1 = 0; break; } paintDrawable.setShaderFactory(new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { return new LinearGradient(width * x0, height * y0, width * x1, height * y1, stopColors, null, Shader.TileMode.CLAMP); } }); return paintDrawable; }

Target:
public static Drawable getCubicGradient(int baseColor, int gravity) { PaintDrawable paintDrawable = new PaintDrawable(); paintDrawable.setShape(new RectShape()); final int[] stopColors = new int[GRADIENT_NUM_STOPS]; int red = Color.red(baseColor); int green = Color.green(baseColor); int blue = Color.blue(baseColor); int alpha = Color.alpha(baseColor); for (int i = 0; i < GRADIENT_NUM_STOPS; i++) { float x = i * 1f / (GRADIENT_NUM_STOPS - 1); float opacity = MathUtil.constrain((float) Math.pow(x, GRADIENT_POWER), 0.0f, 1.0f); stopColors[i] = Color.argb((int) (alpha * opacity), red, green, blue); } final float x0, x1, y0, y1; switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { case Gravity.START: x0 = 1; x1 = 0; break; case Gravity.END: x0 = 0; x1 = 1; break; default: x0 = 0; x1 = 0; break; } switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { case Gravity.TOP: y0 = 1; y1 = 0; break; case Gravity.BOTTOM: y0 = 0; y1 = 1; break; default: y0 = 0; y1 = 0; break; } paintDrawable.setShaderFactory(new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { return new LinearGradient(width * x0, height * y0, width * x1, height * y1, stopColors, null, Shader.TileMode.CLAMP); } }); return paintDrawable; }
Source:
public void filter(final ContainerRequestContext request, final ContainerResponseContext response) throws IOException { final UUID id = UUID.randomUUID(); LOGGER.info("method={} path={} request_id={} status={} bytes={}", request.getMethod(), request.getUriInfo().getPath(), id, response.getStatus(), response.getLength()); response.getHeaders().add(REQUEST_ID, id); }

Target:
public void filter(final ContainerRequestContext request, final ContainerResponseContext response) throws IOException { String id = request.getHeaderString(REQUEST_ID); if (Strings.isNullOrEmpty(id)) { id = generateRandomUuid().toString(); } LOGGER.trace("method={} path={} request_id={} status={} length={}", request.getMethod(), request.getUriInfo().getPath(), id, response.getStatus(), response.getLength()); response.getHeaders().putSingle(REQUEST_ID, id); }
Source:
public static <T> List<T> loadAll(Class<T> spi) { ServiceLoader<T> serviceLoader = ServiceLoader.load(spi); List<T> implementations = new ArrayList<>(); for (T implementation : serviceLoader) { implementations.add(implementation); } return Collections.unmodifiableList(implementations); }

Target:
public static <T> List<T> loadAll(Class<T> spi) { Assert.notNull(spi, "Parameter 'spi' must not be null."); ServiceLoader<T> serviceLoader = ServiceLoader.load(spi); List<T> implementations = new ArrayList<>(); for (T implementation : serviceLoader) { implementations.add(implementation); } if (implementations.isEmpty()) { throw new UnavailableImplementationException(spi); } return Collections.unmodifiableList(implementations); }
Source:
MemberWorker(WorkerType type, String publicAddress, int agentIndex, int workerIndex, int workerPort, String hzConfigFile, boolean autoCreateHzInstance, int workerPerformanceMonitorIntervalSeconds) throws Exception { this.type = type; this.publicAddress = publicAddress; this.autoCreateHzInstance = autoCreateHzInstance; this.hzConfigFile = hzConfigFile; this.hazelcastInstance = getHazelcastInstance(); this.workerConnector = WorkerConnector.createInstance(agentIndex, workerIndex, workerPort, type, hazelcastInstance, this); this.workerPerformanceMonitor = initWorkerPerformanceMonitor(workerPerformanceMonitorIntervalSeconds); Runtime.getRuntime().addShutdownHook(new WorkerShutdownThread(true)); signalStartToAgent(); }

Target:
MemberWorker(WorkerType type, String publicAddress, int agentIndex, int workerIndex, int workerPort, String hzConfigFile, boolean autoCreateHzInstance, int workerPerformanceMonitorIntervalSeconds) throws Exception { SHUTDOWN_STARTED.set(false); this.type = type; this.publicAddress = publicAddress; this.autoCreateHzInstance = autoCreateHzInstance; this.hzConfigFile = hzConfigFile; this.hazelcastInstance = getHazelcastInstance(); this.workerConnector = WorkerConnector.createInstance(agentIndex, workerIndex, workerPort, type, hazelcastInstance, this); this.workerPerformanceMonitor = initWorkerPerformanceMonitor(workerPerformanceMonitorIntervalSeconds); Runtime.getRuntime().addShutdownHook(new WorkerShutdownThread(true)); signalStartToAgent(); }
Source:
public List<String> getDependencies() { return Collections.singletonList(AttributesManager.NS_FACILITY_ATTR_DEF + ":googleGroupNameNamespace"); }

Target:
public List<String> getDependencies() { List<String> dependencies = new ArrayList<>(); dependencies.add(AttributesManager.NS_FACILITY_ATTR_DEF + ":googleGroupNameNamespace"); return dependencies; }
Source:
public WebsocketConnection() { super(); SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); ExperimentRunManager.getInstance(); this.connectionHandler = new ConnectionHandler(this, geppettoManager,geppettoManagerConfig.getAllowVolatileProjectsSimulation()); }

Target:
public WebsocketConnection() { super(); SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); ExperimentRunManager.getInstance(); this.connectionHandler = new ConnectionHandler(this, geppettoManager,geppettoManagerConfiguration); }