<commit_before>package com.aspose.barcode.examples.barcode.advanced_features;

import com.aspose.barcode.CodabarChecksumMode;
import com.aspose.barcode.EnableChecksum;
import com.aspose.barcode.barcoderecognition.BarCodeReader;
import com.aspose.barcode.barcoderecognition.ChecksumValidation;
import com.aspose.barcode.barcoderecognition.DecodeType;
import com.aspose.barcode.examples.Utils;

public class ApplyingChecksumForCodaBar 
{
	public static void main(String[] args) 
        {

		// ExStart:ApplyingChecksumValidation

		// The path to the resource directory.
		String dataDir = Utils.getDataDir(ApplyingChecksumValidation.class) + "Barcode/AdvancedFeatures/";

                //Generation
                //Instantiate BarCodeBuilder object
                com.aspose.barcode.BarCodeBuilder builder = new com.aspose.barcode.BarCodeBuilder();
        
                //Set the Code text for the barcode
                builder.setCodeText("1234567890");
        
                //Set the symbology type to CodaBar
                builder.setEncodeType(com.aspose.barcode.EncodeTypes.CODABAR);
        
                //Set the EnableChecksum property to yes
                builder.setEnableChecksum(EnableChecksum.YES);
        
                //Set the CodabarChecksumMode
                builder.setCodabarChecksumMode(CodabarChecksumMode.MOD_10);
        
                //Save the image on the system
                builder.save("Codabar_Mod10.png");

                //Recognition
                //Initialize reader object
                BarCodeReader reader = new BarCodeReader("Codabar_Mod10.png", com.aspose.barcode.barcoderecognition.DecodeType.CODABAR);
        
                //Set ChecksumValidation property of the reader to On
                reader.setChecksumValidation(ChecksumValidation.ON);
                while (reader.read())
                {
                     //Get code text
                     System.out.println(" codetext: " + reader.getCodeText());
            
                     //Get type of barcode
                     System.out.println(" type: " + reader.getCodeType());
            
                    //Get checksum value
                    System.out.println(" Checksum: " + reader.getCheckSum());
                }		

		// ExEnd:ApplyingChecksumValidation
	}<commit_msg>Update ApplyingChecksumForCodaBar.java<commit_after>package com.aspose.barcode.examples.barcode.advanced_features;

import java.io.IOException;

import com.aspose.barcode.CodabarChecksumMode;
import com.aspose.barcode.EnableChecksum;
import com.aspose.barcode.barcoderecognition.BarCodeReader;
import com.aspose.barcode.barcoderecognition.ChecksumValidation;
import com.aspose.barcode.examples.Utils;
import com.aspose.barcode.generation.BarCodeGenerator;

public class ApplyingChecksumForCodaBar 
{
	public static void main(String[] args) throws IOException 
    {

		// ExStart:ApplyingChecksumValidation

		// The path to the resource directory.
		String dataDir = Utils.getDataDir(ApplyingChecksumValidation.class) + "Barcode/AdvancedFeatures/";

        //Generation
        //Instantiate BarCodeGenerator object
        BarCodeGenerator generator = new BarCodeGenerator(com.aspose.barcode.EncodeTypes.CODABAR, "1234567890");
        
        //Set the EnableChecksum property to yes
        generator.getChecksum().setEnable(EnableChecksum.YES);
        
        //Set the CodabarChecksumMode
        generator.getCodabar().setChecksumMode(CodabarChecksumMode.MOD_10);
        
        //Save the image on the system
        generator.save("Codabar_Mod10.png");

        //Recognition
        //Initialize reader object
        BarCodeReader reader = new BarCodeReader("Codabar_Mod10.png", com.aspose.barcode.barcoderecognition.DecodeType.CODABAR);
        
        //Set ChecksumValidation property of the reader to On
        reader.setChecksumValidation(ChecksumValidation.ON);
        while (reader.read())
        {
        	//Get code text
            System.out.println(" codetext: " + reader.getCodeText());
            
            //Get type of barcode
            System.out.println(" type: " + reader.getCodeType());
            
            //Get checksum value
            System.out.println(" Checksum: " + reader.getCheckSum());
        }		
		// ExEnd:ApplyingChecksumValidation
	}
{'fraction_non_alphanumeric': 0.08680635505411007, 'fraction_numerical': 0.007368178678332949, 'mean_word_length': 2.3211009174311927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7493486', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1193, 'n_words': 219}