Method for reducing Android project code repetition degree

A technology of repetition and code, applied in the direction of code compilation, program code conversion, program control design, etc., can solve the problems of code repetition, program instability, bug increase and so on

Inactive Publication Date: 2020-09-25
杭州冒险元素网络技术有限公司
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] With the rapid development of Internet technology, there are currently a large number of excellent programmers working on the development and application of various software. When developing projects, especially very large projects, programmers will face the problem of implementing specific functions written in the early stage of the project. Code blocks and code blocks of other functions are packaged together. As the number of packages increases, the data exchange between the code of the specific function and various code blocks becomes increasingly close. However, this application scenario will lead to when the software is put on the shelf, because The repetitiveness of the software exceeds a certain limit, resulting in unqualified review, but if the repeated code is modified, it may lead to instability of the entire software function, resulting in an increase in bugs, and even the collapse of the entire software
At present, programmers generally use one person to write the code of related functions to reduce code repetition, and try to reduce an independent functional module to be written by multiple people. In addition, the smallest module method is used when packaging, and more complex functions are packaged with the smallest module. module
The disadvantage of this method is that when the project code is very large, it is impossible for one person to complete the writing of a certain function code alone, and encapsulating it with the smallest module will also cause more code duplication, and even more cause when the duplication is detected. The high degree of code repetition leads to listing failures. In addition, if the project code is directly modified, new bugs may be generated, resulting in program instability and even project failure.
This solution proposes a solution to the problem of failure to pass the review due to the high repetition of software codes caused by too many packaging times during the software review process. It has the advantages of simple method and no bug introduction.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] A method to reduce code duplication in Android projects, so that all compiled class files md5 and code content change; compiled class file names, internal method names and variable names will be changed to unrecognizable names; all unobfuscated The name of the code file is uniformly modified, and the naming of the referenced place will also be modified synchronously; modify the content and project path of all files in the project, and then create a new unique signature file, and use this file for packaging, including the following steps:

[0018] 1: The project code adopts the aspect-oriented programming method, and inserts non-functional code into the compiled code;

[0019] 2: Turn on obfuscation and configure the obfuscation dictionary: After the obfuscation is enabled, after the Android project is compiled by the Java compiler, the folder name, class name, method name, parameter name and variable name of the compiled project code will be replaced with some meaningles...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method for reducing Android project code repetition degree, and belongs to the technical field of project code repetition degree reduction. The method includes: enabling Android project code to adopt a section-oriented programming method, and inserting a non-functional code into a compiled code; starting confusion and configuring a confusion dictionary; modifying paths ofcode files which are not confused in batches by using a Java script, and modifying naming formats of the entity class and Android component folders in batches by using the Java script; writing a Javascript program to add characters to the ends of all files in the project, and adding different characters to project files of different file formats; modifying a path where the project package is located; and when any directory of the project is positioned, newly creating a new signature file under the any directory, and when the App is packaged, using the signature file to perform signature. Compared with a method for directly modifying codes, the method for reducing the Android project code repetition degree has the advantages of being small in workload, capable of preventing generation of new bugs and the like.

Description

technical field [0001] The invention belongs to the technical field of reducing the repetition degree of project codes, and in particular relates to a method for reducing the repetition degree of Android project codes. Background technique [0002] With the rapid development of Internet technology, there are currently a large number of excellent programmers working on the development and application of various software. When developing projects, especially very large projects, programmers will face the problem of implementing specific functions written in the early stage of the project. Code blocks and code blocks of other functions are packaged together. As the number of packages increases, the data exchange between the code of the specific function and various code blocks becomes increasingly close. However, this application scenario will lead to when the software is put on the shelf, because If the repetitiveness of the software exceeds a certain limit, it will fail the r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06F9/445G06F11/36
CPCG06F8/434G06F9/4451G06F11/3608G06F11/3616
Inventor 魏鹏
Owner 杭州冒险元素网络技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products