Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm a systems engineer, recent college grad, and I've just been given a project that is exceptionally daunting.
We have a legacy system, we legally own the entire code and all rights to it. The problem is that the code is poorly documented, what little documentation is incomplete, sometimes wrong and the original devs are unavailable.
It uses a custom Perl build script requires a thousand modules from CPAN to work and I do not know Perl. Reverse engineering into UML has failed except with Doxygen and that is limited to just inheritance diagrams and call graphs.
I've obtained a massive chalkboard and I'm slowly trawling through the code, modeling packages and then the nested packages within.
My question is whether or not I'm approaching this reverse engineering from the right direction. I'm working close from the bottom trying to figure out what calls what while developing UML and writing a Design Document. I did a package diagram but it's hard to figure out what's going on at that high a level.
An academic paper I pulled up suggests I also make a new Requirements Document which would slow me down even more and I don't know if it's a good idea as the other developers are always busy trying to keep the legacy system up.
Are there any books out there that can help me and am I approaching this from the right angle? Should I hire a contract worker that knows Perl and JMX to assist me?
The book "Working Effectively with Legacy Code" by Michael Feathers will probably help you more than anything we can tell you here.
However, the most important thing you need to clarify for yourself (and from your question it sounds like it's not completely clear) is this: what is your goal? What do you want to achieve with this codebase?
If the answer is (as it sounds) "being able to effectively maintain the existing project", then trying to directly build a complete high-level model of the system may not be the most effective path. It's probably just too much at once to keep in mind.
In this case, I would try to understand only the use cases of the system that you currently need to modify; follow method calls through the code (pssibly using a debugger on the running system) to see what parts are involved. Do this for a few different use cases and you'll start to see patterns, then document those and gradually fit them together into a high-level image of the system.
This tool might assist you.
Or if the legacy system is written poorly it could just make a huge unreadable mess, but I hope it helps.
If it is a java code then a deep reverse engineering would be very helpful.
See a documentation at: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed yesterday.
Improve this question
I'm trying to figure out how to: read xbrl files, analyze the files and make use of the data e.g. for calculating key figures, in Java.
I know how to read xbrl files as xml and structuring them with json nodes, but I have concluded that it's much more complicated to actually analyze them and use the data. I figured out that tags and attributes like "context id", "period" and "dimenson" etc determines how data is wired together.
Now, I'm not going to implement my own xbrl processor from scratch, because I simply don't have the time and knowledge to do that.
I'm looking for a Java library, including documentation and/or guides on how to use it, that processes xbrl files and that can be used to analyze and extract data.
I searched the web and read a few articles about how to get started, but I didn't quite find something that seemed very useful.
Any suggestions? I would really appreciate if someone could point me in the right direction.
Using an existing XBRL processor is a good idea as it saves you the (considerable) efforts of interpreting the XBRL semantics at a raw syntactic level.
From the top of my mind, I know of at least the following products that offer a Java API, in a random order. I have no affiliation with either and abstain from commenting further to not land into a taste/preference discussion.
Reporting Standard: http://www.reportingstandard.com/index.php/en/
CoreFiling: https://www.corefiling.com/
There are probably many more, possibly also open source. XBRL.org has a much more comprehensive list of vendors here as well as a getting started guide for developers.
I was able to parse Xbrl files from XbrlParser project here.
Credits: https://github.com/marcioalexandre
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've been programming in java for a while and I really like the language, I've mostly just done game programming, but I want to get a feel for some of the more commonly used api's and frameworks and just get a generally more well-rounded grasp of the language and the common libraries in the current job market.
From what I found things like spring, hibernate, and GWT are pretty in demand right now. I looked at some tutorials online and they weren't hard to follow but I really felt like I had no context for what I was learning - I had no idea how any of it would be use in a real work environment. I know nothing can rival the benefit I'd get from actual work experience but that's not an option for me right now, I need another way to learn these technologies in a way where I'll at least feel comfortable working with them and know what I'm doing beyond just understanding what code does what. I checked out a few books but they were all really old(like pre-2006, am I right to assume those books would be kind of out of date today?) or required experience with libraries that I didn't have and can't get. I hate getting stuck looking for the best resource to learn something instead of spending my time actually learning.
All I really want is someone to point me to a resource(website or ebook) that is aimed at already experienced java developers and will not only teach me some interesting useful java technology(anything that is useful, I dont know much outside of graphics libraries and game related things so I was thinking some database or web programming api's) but also give me a good perspective of it and leave me feeling confident that I could actually use what I learned on a practical application.
If my post makes you think I'm not yet experienced to be learning these things, which I doubted earlier today but am now starting to question, then what do you think is the next step for me? I just want to get better at java.
Thanks everyone
Register to the online courses at www.javapassion.com. It is cheap for the content and quality they offer.
The best way to learn is by doing. So I would recommend you to either start a private project which uses the technologies you want to learn or to find an open source project which uses them and contribute to that. The latter option has the advantage that you get feedback from other programmers, but the disadvantage that it leaves less room for experimentation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Our team is doing reverse-engineering on a application with virtually non-existant documentation. We want to detect if there's a use of architectural or design patterns. You may understand that this application is large, so looking manually is no sense for us.
This application is written in Java and we use Eclipse for IDE, so it may be a plugin for Eclipse.
We have found some tools, like "Design Patterns detections Similarity Scoring", but it's not working very well.
So, such tools do exists?
If you have the source code of the app, you are most probably reengineering it, rather than reverse engineering. (The latter means recovering some sort of higher level code from machine- or bytecode).
At any rate, you want to understand the application, i.e. build a mental model of it in your mind. I am afraid automatic tools aren't of much help in this. What use would it be for you to get a list of supposed patterns in the code? Would it help you understand better what the code actually does and why? Especially taking into account the high chances of patterns being misused in legacy code :-(
In the end, you need to get down to reading the code anyway. But here is another similar thread which hopefully helps in the daunting task of taking over a legacy app.
I do not believe these kind of tools exist, because that would be pretty complex. Another approach could be to generate something like an UML diagram. This should give an abstraction of the code which could help you identify the design pattern.
I doubt there are tools out there for detecting patterns or designs in code
Code Bubbles could drastically help the reverse engineering effort, when it eventually comes out !
Lately, am finding it extremely useful to use code coverage tools to identify which parts of the code are called when a particular user/system action is initiated. It's not what the tools were designed for but am increasingly finding it more effective than other approaches. (Can post a link to details here if there is demand for it)
The next best approach is using a tool such as MaintainJ to trace code execution. This link documents that approach (when the author talks about aspects) and various other approaches, and having tried them all, coverage is what I've settled for.
Have you tried running javadoc on the code base? That would give you some idea if the structure (or lack of it) of the code. If you are really lucky design patterns might be mentioned in the comments.
There are lots of other tools for discovering class hierarchy - ClassCycle, Macker, JDepend etc.
Automatic detection of design patterns would be quite difficult I think, because a design pattern carries a lot of scope for variation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to maintain some project in Java, but it is very big. I need some plugin for Eclipse or program alone which can generate UML from Java project. Is there something what can help me ?
Visual Paradigm for UML
Tools --> Instant Reverse --> Java --> Specify your sources and you are done.
This is a commercial application with lots of stuff, but for what you need to do, you are fine with the evaluation key.
EDIT: Also have a look at this video
This has been asked before.. please find it at
How to generate UML diagrams (especially sequence diagrams) from Java code
I recommend Architexa for its great class digram generation. Instead of generating every classes in a huge class diagram, Arhitexa allows you to selectively display the relevant classes in the diagram.
Most UML tools can import Java code. Last time I used JUDE Community edition it could do it, but they've split it into community and paid editions. I'm not sure if the free one does anymore. Sparx Enterprise Architect can import Java as well.
Umbrello supports Java code import, and it is open source, so will cost you nothing to try.
You might also give Doxygen(with GraphViz) a go; it will generate UML 'style' class diagrams and is a great code navigation tool for unfamiliar code-bases. Not truly a UML tool though, but might suit your requirements.
I suggest euml2 as an eclipse pluggin.
It has a free version and it is quite good!
I recommend Enterprise Architect which supports full reverse and forward engineering including for Java. Automatic Documentation generation as Word, PDF or website.
Free Class Visualizer does exactly that - you load compiled Java code and, as a result, receive class diagrams allowing you to navigate through relations.
It supports parametrized types, annotations and discovers all sort of outbound and inbound relations (including dependencies).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I'm looking for a well-maintained Java bytecode manipulation library with an intuitive API. There seem to be quite a lot of them out there. Any suggestions on which ones to try?
The best answer to your question will be governed by your specific needs and objectives; if you can expand upon what you're trying to accomplish, I can perhaps offer a more tailored response.
In lieu of that, however, in my experience, ASM offers probably the best combination of maturity, flexibility, and ease-of-use:
It's under relatively active development: even though the latest release is from June 2009, developers are regularly making commits to their VCS.
It's already in wide use in a number of prominent Java products, such as AspectJ, Groovy, Cobertura, and many others, which promises a wide user-base and thus a wide community for support.
It's fairly thoroughly documented, and there are a number of tutorials, user guides, and reference documents available both from the OW2 Consortium and the community at large.
N.B. The comment #Yuri left below describes a situation I personally haven't yet encountered but that may potentially pose a significant obstacle. Keep his observation/experience in mind while evaluating the various bytecode manipulation libraries.
That actually depends on how you define intuitive ;-) I started using ASM two weeks ago for a certain task on my current project and it worked like a charm. It only took me a couple hours to understand it and be able to use it, but I wouldn't exactly call the API intuitive. But if you know a little bit about Java bytecode and are familiar with the visitor pattern, the learning curve is not very high, IMO.
Another advantage of ASM is that it is apparently bundled with the standard API at least in the Sun JDK, although in a different package (com.sun.xml.internal.ws.org.objectweb.asm and subpackages).
Take a look at this article :
http://www.pabrantes.net/blog/space/start/2008-03-24/1
A little old but still relevant.
ASM And Javassist are the most used ones now.
Bcel is dying.