Coder Social home page Coder Social logo

m-zakeri / d4t Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 250.99 MB

Design for testability

Home Page: https://m-zakeri.github.io/D4T/

License: MIT License

Python 96.65% ANTLR 3.35%
class-diagram design-patterns java machine-learning refactoring testability dependecy-injection factory-method-pattern software software-testability design-testability

d4t's Introduction

D4T: Design for testability

This repository contains the source code and replication package for our creative learning-based ‘design for testability’ approach in software systems. More information is available at https://m-zakeri.github.io/D4T.

Note: The full implementation will be available after our relevant paper(s) are published.

d4t's People

Contributors

m-zakeri avatar sadeghjafari5528 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

d4t's Issues

Factory detection bug.

In the following example factory can not detected.
if we remove "implements Y" this can detect factory but if we keep it this algorithm can not detect factory pattern in this example.

example:

package com.products;
import com.functions.DecodedImage;

class X
{

}

interface Y
{

}

class GifReader extends X implements Y{
private DecodedImage decodedImage;

public GifReader(String image, int size) {
    this.decodedImage = new DecodedImage(image);
}

public DecodedImage getDecodeImage() {
    return decodedImage;
}

public int getEncodeImage() {
    return 0;
}

}

Statistical analysis

Write some scripts that show the following data:
1- number of detected factory pattern
2- number of injection pattern detected in each case(case1, case2, case3, total)
3- compute complexity for each project or package(in very big project).
4- Find best sensitivity(hyper parameter in factory pattern).
5- Show some useful charts and analyze them.

Class Diagram Bug(set_stereotypes)

after refactor factory pattern in "10_water-simulator", when we want to make class_diagram of refactored code return bellow error:

File "/media/sadegh/Data/sadegh/iust/compiler/compiler projects/main_project/class_diagram.py", line 652, in __calculate_interface_modification_type
if method_info[class_name]['methods'][m]['is_modify_itself']:
KeyError: 'getInstance'

Factory method extended or abstract class does not handle.

We have 2 case in this issue:
1- Imagine that we have products that extends a class that have products-common-methods so in this case we must make a interface from extended class and use this interface in creator class.

2- Imagine that we have products that extends an abstract class, if abstract class does not have non-abstract method we can replace it with an interface and use that interface in the creator class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.