SBSRE is an eclipse plugin for extract method refactoring based on the single responsibility principle(SRP)

Overview

SBSRE

SBSRE is a slice-based single responsibility extraction approach supported by an eclipse plugin for identifying Single responsibility violations in the methods.

The responsibility of a method can be best described by its impacts on the outer scope that are exposed through modifying the return values, outputs, and global variables. In the context of object-oriented programming, a method may modify either the class fields or return a value to its caller method. If the corresponding slices of these fields or return values within the method body are entirely separate, the method presumably exposes different functionalities.

Existing extract method refactoring tools do not pay serious attention to these so-called output instructions and the output variables while searching for extract method candidates, which results in imprecise refactoring opportunity detection from the developer's viewpoint. We introduce a new Output-based Slicing algorithm, focused on extracting chunks of codes that commit to the specific output from the body of long methods.

Relevant publications

To be announced.

Getting started

Step1: Prerequisites

It is recommended to use the Eclipse Neon IDE with JDK 1.8.x for lunching our SBSRE tool

Step2: Import the SBSRE tool

Import the SBSRE tool in the Eclipse IDE

Figure 1. Operations of Step 2.

Step3: Run the SBSRE tool

Run the SBSRE tool as as a plugin in the Eclipse IDE

Figure 2. Operations of Step 3.

Step4: Open SRP-Violation window

Insert or create a java project, then on Bad Smells tab, choose SRP-Violation

Figure 3. Operations of Step 4.

Step5: Identifying SRP-Violation

By clicking on each of the packages, classes, or methods, it will be selected. Then by clicking on the "i" icon, results will be shown.

Figure 4. Operations of Step 5.

Step6:

Results are shown here and by selecting each of them, a code fragment proposed for method extraction will be highlighted.

Figure 5. Operations of Step 6.

You might also like...

Implementation of Azure/SAML Single Sign on in PeopleSoft

Implementation of Azure/SAML Single Sign on in PeopleSoft

Azure/SAML SSO in PeopleSoft I had the requirement to implement Microsoft's Azure single sign on (SSO) in PeopleSoft without purchasing Oracle's or Ap

Aug 24, 2022

Small app to create icon sets for Linux, Windows, OSX, Android and IOS from a single PNG image

FXIconcreator Small app to create icon sets (multi resolution) for Linux, Windows, OSX from a single PNG image Reason for creating such an app was tha

Aug 4, 2022

Eclipse Temurin™ build scripts - common across all releases/versions

Repository for code and instructions for building OpenJDK binaries, defaulting to Eclipse Temurin™ These scripts can be used to build OpenJDK anywhere

Jan 4, 2023

Repositório que também será utilizado como workspace no eclipse

Repositório que também será utilizado como workspace no eclipse

entra21 Programação orientada a objetos Repositório com as práticas realizadas em aula Conteúdo prático realizado em sala durante o projeto Entra21 Em

Jun 8, 2022

trying to create a plugin using the spigot api! this plugin will be responsible for delivering the products according to the settings!

KettraShop "simples plugin de ativação de produtos da loja, dentro do Minecraft" ⚙️ Configurações caso você não tenha uma loja virtual para seu servid

Nov 2, 2022

A plugin that serving completely in-game webview based console backend for grasscutter

MojoConsolePlus EN|中文 MojoConsolePlus(MCP) is a Grasscutter plugin (Apart from 4Benj's GCGM plugin) and it's goal is to implement fully in-game webwie

Dec 13, 2022

This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncApi and OpenAPI.

SCS MultiApi Maven Plugin This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncAp

Dec 20, 2022

This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of David Schablowsky

This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of David Schablowsky

Mustang Mach-E Widget for Android Intro This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of Davi

Nov 15, 2022

Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

Oct 4, 2022
Owner
null
PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events.

PluginHooker PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events. Localization 简体中文 Feat

null 12 Nov 23, 2022
Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method, which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database

美团 Meituan 46 Nov 29, 2022
SpringBoot service to pick up CAN messages retransmitted by CANBridge and extract certain values for reporting/monitoring/alerting via DataDog

SpringBoot service to pick up CAN messages retransmitted by CANBridge and extract certain values for reporting/monitoring/alerting via DataDog

Grumpy Cricket 2 Mar 12, 2022
This is a plugin for Minecraft Server (Spigot API) introduces a sector system which connects a single world across multiple servers.

OpenSourceSectors ?? ??️ This is a plugin for Minecraft Server (Spigot API) introduces a sector system which connects a single world across multiple s

null 20 Dec 28, 2022
A log4j2 plugin to Eclipse.

Ganymede A log4j2 log viewer plugin for Eclipse. Installation Use the Eclipse update site: Ganymede2 - https://dbusche.github.io/Ganymede2/ History Th

null 3 Dec 15, 2022
Example usage of work manager in Android, while doing this study, image downloading was preferred as a method.

android-workmanager-example Example usage of work manager in Android, while doing this study, image downloading was preferred as a method. Java 11 com

Adil Çetin 1 Jan 29, 2022
A simple tool to get method stack

A simple tool to get method stack

赵元超 2 Jan 17, 2022
FEM for Students is a program of modeling and structural analysis by Finite Element Method

FEM For Students FEM for Students is a software for modeling and structural analysis by Finite Element Method. This software was developed by me in my

André de Sousa 4 Jun 23, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
All the Android-Java Projects in Single Repository

Android Java Projects List of Projects Factorial Calculator Multiplication Table Web App Steps to Run the Applications Clone this Repository Create a

Rajan Gautam 2 Oct 10, 2022